From 70e0853bc717cf9c275f89d802ff28550d506127 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Oct 2025 18:20:06 +0000 Subject: [PATCH 1/2] Initial plan From 3fd068871c15258784d38c0165e5d3ba4f563e3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Oct 2025 18:46:45 +0000 Subject: [PATCH 2/2] Port microsoft/TypeScript PR #62391: Update submodule and fix test expectations Update the TypeScript submodule to include PR #62391 which switches libReplacement default from true to false. The Go code already had the correct implementation, so no code changes were needed. Updated test expectations for new transformer files added to the TypeScript codebase and accepted baseline changes. --- _submodules/TypeScript | 2 +- internal/tsoptions/tsconfigparsing_test.go | 2 + .../submodule/compiler/2dArrays.js.diff | 35 +- .../compiler/APISample_Watch.js.diff | 39 +- .../APISample_WatchWithDefaults.js.diff | 29 +- .../APISample_WatchWithOwnWatchHost.js.diff | 38 +- .../compiler/APISample_compile.js.diff | 21 +- .../compiler/APISample_jsdoc.js.diff | 91 +- .../compiler/APISample_linter.js.diff | 40 +- .../compiler/APISample_parseConfig.js.diff | 24 +- .../compiler/APISample_transform.js.diff | 6 +- .../compiler/APISample_watcher.js.diff | 97 +- .../compiler/ArrowFunctionExpression1.js.diff | 8 + .../compiler/ClassDeclaration10.js.diff | 13 + .../compiler/ClassDeclaration11.js.diff | 15 + .../compiler/ClassDeclaration13.js.diff | 15 + .../compiler/ClassDeclaration14.js.diff | 13 + .../compiler/ClassDeclaration15.js.diff | 14 + .../compiler/ClassDeclaration21.js.diff | 15 + .../compiler/ClassDeclaration22.js.diff | 15 + .../compiler/ClassDeclaration24.js.diff | 13 + .../compiler/ClassDeclaration25.js.diff | 13 + .../compiler/ClassDeclaration26.js.diff | 15 +- .../compiler/ClassDeclaration8.js.diff | 13 + .../compiler/ClassDeclaration9.js.diff | 13 + ...hInvalidConstOnPropertyDeclaration.js.diff | 6 +- ...InvalidConstOnPropertyDeclaration2.js.diff | 12 +- .../compiler/ExportAssignment7.js.diff | 14 + .../compiler/ExportAssignment8.js.diff | 14 + .../compiler/FunctionDeclaration7.errors.txt | 2 +- .../compiler/FunctionDeclaration7.js | 2 +- .../compiler/FunctionDeclaration7.symbols | 4 +- .../compiler/FunctionDeclaration7.types | 2 +- .../MemberAccessorDeclaration15.js.diff | 19 + .../submodule/compiler/ParameterList6.js.diff | 14 + .../submodule/compiler/ParameterList7.js.diff | 14 +- .../abstractClassInLocalScope.js.diff | 42 + ...bstractClassInLocalScopeIsAbstract.js.diff | 42 + .../abstractClassUnionInstantiation.js.diff | 50 +- .../compiler/abstractPropertyBasics.js.diff | 59 +- .../abstractPropertyInConstructor.js.diff | 167 +- .../compiler/abstractPropertyNegative.js.diff | 145 +- .../submodule/compiler/acceptableAlias1.js | 4 +- .../compiler/acceptableAlias1.symbols | 8 +- .../submodule/compiler/acceptableAlias1.types | 4 +- ...ssInstanceMemberFromStaticMethod01.js.diff | 19 +- .../accessOverriddenBaseClassMember1.js.diff | 59 +- ...ssStaticMemberFromInstanceMethod01.js.diff | 19 +- .../accessorAccidentalCallDiagnostic.js.diff | 22 + .../accessorInAmbientContextES5.js.diff | 20 +- ...ssorParameterAccessibilityModifier.js.diff | 25 + .../compiler/accessorWithInitializer.js.diff | 29 + .../accessorWithLineTerminator.js.diff | 21 + .../compiler/accessorWithRestParam.js.diff | 35 + .../submodule/compiler/accessorsEmit.js.diff | 51 + .../accessorsInAmbientContext.errors.txt | 2 +- .../compiler/accessorsInAmbientContext.js | 2 +- .../accessorsInAmbientContext.symbols | 4 +- .../compiler/accessorsInAmbientContext.types | 2 +- ...ssors_spec_section-4.5_error-cases.js.diff | 45 + ...cessors_spec_section-4.5_inference.js.diff | 92 + .../compiler/aliasAssignments.js.diff | 12 +- .../submodule/compiler/aliasBug.errors.txt | 4 +- .../reference/submodule/compiler/aliasBug.js | 4 +- .../submodule/compiler/aliasBug.js.diff | 27 +- .../submodule/compiler/aliasBug.symbols | 24 +- .../submodule/compiler/aliasBug.types | 4 +- .../aliasDoesNotDuplicateSignatures.js.diff | 6 +- .../submodule/compiler/aliasErrors.errors.txt | 4 +- .../submodule/compiler/aliasErrors.js | 4 +- .../submodule/compiler/aliasErrors.js.diff | 27 +- .../submodule/compiler/aliasErrors.symbols | 32 +- .../compiler/aliasErrors.symbols.diff | 2 +- .../submodule/compiler/aliasErrors.types | 4 +- .../compiler/aliasInaccessibleModule.js | 4 +- .../compiler/aliasInaccessibleModule.symbols | 8 +- .../compiler/aliasInaccessibleModule.types | 4 +- .../compiler/aliasInaccessibleModule2.js | 4 +- .../compiler/aliasInaccessibleModule2.js.diff | 19 + .../compiler/aliasInaccessibleModule2.symbols | 10 +- .../compiler/aliasInaccessibleModule2.types | 4 +- ...ressionGenericIntersectionNoCrash1.js.diff | 9 +- ...tionWithRestBehavedSameAsUnaliased.js.diff | 11 +- .../aliasOnMergedModuleInterface.errors.txt | 2 +- .../compiler/aliasOnMergedModuleInterface.js | 2 +- .../aliasOnMergedModuleInterface.symbols | 8 +- .../aliasOnMergedModuleInterface.types | 2 +- .../aliasUsageInAccessorsOfClass.js.diff | 65 +- .../compiler/aliasUsageInArray.js.diff | 38 +- .../aliasUsageInFunctionExpression.js.diff | 44 +- .../aliasUsageInGenericFunction.js.diff | 38 +- .../aliasUsageInIndexerOfClass.js.diff | 58 +- .../aliasUsageInObjectLiteral.js.diff | 38 +- .../compiler/aliasUsageInOrExpression.js.diff | 38 +- ...UsageInTypeArgumentOfExtendsClause.js.diff | 79 +- .../aliasUsageInVarAssignment.js.diff | 42 +- ...allowImportClausesToMergeWithTypes.js.diff | 9 +- ...allowJscheckJsTypeParameterNoCrash.js.diff | 10 +- .../compiler/alwaysStrictModule.errors.txt | 2 +- .../submodule/compiler/alwaysStrictModule.js | 2 +- .../compiler/alwaysStrictModule.symbols | 4 +- .../compiler/alwaysStrictModule.types | 2 +- .../compiler/alwaysStrictModule2.errors.txt | 4 +- .../compiler/alwaysStrictModule2.symbols | 8 +- .../compiler/alwaysStrictModule2.types | 4 +- .../compiler/alwaysStrictModule3.js.diff | 8 + .../compiler/ambientConstLiterals.js.diff | 39 + .../ambientConstLiterals.symbols.diff | 16 + .../ambientEnumElementInitializer6.js | 2 +- .../ambientEnumElementInitializer6.symbols | 4 +- .../ambientEnumElementInitializer6.types | 2 +- .../ambientExportDefaultErrors.types.diff | 19 + .../submodule/compiler/ambientFundule.js | 2 +- .../submodule/compiler/ambientFundule.symbols | 10 +- .../submodule/compiler/ambientFundule.types | 2 +- .../compiler/ambientModuleExports.js | 4 +- .../compiler/ambientModuleExports.symbols | 16 +- .../compiler/ambientModuleExports.types | 4 +- ...ntModuleWithClassDeclarationWithExtends.js | 2 +- ...uleWithClassDeclarationWithExtends.symbols | 6 +- ...oduleWithClassDeclarationWithExtends.types | 2 +- .../ambientModuleWithTemplateLiterals.js | 2 +- .../ambientModuleWithTemplateLiterals.symbols | 10 +- .../ambientModuleWithTemplateLiterals.types | 2 +- .../submodule/compiler/ambientModules.js | 2 +- .../submodule/compiler/ambientModules.symbols | 14 +- .../submodule/compiler/ambientModules.types | 2 +- ...ntRequireFunction(module=commonjs).js.diff | 10 + ...ntRequireFunction(module=preserve).js.diff | 10 + .../compiler/ambientStatement1.errors.txt | 2 +- .../submodule/compiler/ambientStatement1.js | 2 +- .../compiler/ambientStatement1.symbols | 2 +- .../compiler/ambientStatement1.types | 2 +- .../compiler/ambientWithStatements.errors.txt | 2 +- .../compiler/ambientWithStatements.js | 2 +- .../compiler/ambientWithStatements.symbols | 2 +- .../compiler/ambientWithStatements.types | 2 +- ...mbiguousCallsWhereReturnTypesAgree.js.diff | 37 + .../ambiguousGenericAssertion1.js.diff | 11 + .../ambiguousOverloadResolution.js.diff | 40 +- .../anonClassDeclarationEmitIsAnon.js.diff | 90 +- ...nonClassDeclarationEmitIsAnon.symbols.diff | 11 + .../submodule/compiler/anonterface.js | 2 +- .../submodule/compiler/anonterface.js.diff | 21 + .../submodule/compiler/anonterface.symbols | 8 +- .../submodule/compiler/anonterface.types | 2 +- ...DeclarationDoesntPrintWithReadonly.js.diff | 45 +- .../anonymousClassExpression1.js.diff | 14 + .../anonymousClassExpression1.types.diff | 11 + .../anonymousClassExpression2.js.diff | 31 + .../anyAndUnknownHaveFalsyComponents.js.diff | 18 + .../submodule/compiler/anyDeclare.errors.txt | 2 +- .../submodule/compiler/anyDeclare.js | 2 +- .../submodule/compiler/anyDeclare.symbols | 2 +- .../submodule/compiler/anyDeclare.types | 2 +- .../compiler/anyIdenticalToItself.js.diff | 29 + .../anyInferenceAnonymousFunctions.js.diff | 15 + .../submodule/compiler/argsInScope.js.diff | 22 + .../compiler/argumentsAsPropertyName.js.diff | 18 + .../argumentsAsPropertyName.symbols.diff | 11 + .../compiler/argumentsAsPropertyName2.js.diff | 22 + ...umentsObjectIterator01_ES5.errors.txt.diff | 17 + .../argumentsObjectIterator01_ES5.js.diff | 14 + ...umentsObjectIterator02_ES5.errors.txt.diff | 20 + .../argumentsObjectIterator02_ES5.js.diff | 16 + ...argumentsObjectIterator02_ES5.symbols.diff | 12 + .../argumentsObjectIterator02_ES5.types.diff | 31 + ...umentsObjectIterator03_ES5.errors.txt.diff | 16 + .../argumentsObjectIterator03_ES5.js.diff | 10 + .../argumentsPropertyNameInJsMode1.js.diff | 15 +- ...dRestIterables(target=es5).errors.txt.diff | 72 + ...readRestIterables(target=es5).symbols.diff | 11 + ...SpreadRestIterables(target=es5).types.diff | 102 + ...rStaticInitializationBlock.errors.txt.diff | 27 + ...ializerOrStaticInitializationBlock.js.diff | 176 +- ...erOrStaticInitializationBlock.symbols.diff | 12 + ...izerOrStaticInitializationBlock.types.diff | 76 +- ...gumentsUsedInObjectLiteralProperty.js.diff | 20 + .../compiler/arithAssignTyping.js.diff | 16 + ...rityErrorRelatedSpanBindingPattern.js.diff | 16 + .../arrayAssignmentTest1.errors.txt.diff | 85 + .../compiler/arrayAssignmentTest1.js.diff | 55 + .../arrayAssignmentTest2.errors.txt.diff | 43 + .../compiler/arrayAssignmentTest2.js.diff | 55 + .../arrayAssignmentTest3.errors.txt.diff | 4 +- .../compiler/arrayAssignmentTest3.js.diff | 27 +- .../arrayAssignmentTest4.errors.txt.diff | 16 + .../compiler/arrayAssignmentTest4.js.diff | 18 + .../compiler/arrayAssignmentTest5.errors.txt | 2 +- .../compiler/arrayAssignmentTest5.js | 2 +- .../compiler/arrayAssignmentTest5.js.diff | 29 + .../compiler/arrayAssignmentTest5.symbols | 16 +- .../compiler/arrayAssignmentTest5.types | 2 +- .../compiler/arrayAssignmentTest6.js | 2 +- .../compiler/arrayAssignmentTest6.js.diff | 20 + .../compiler/arrayAssignmentTest6.symbols | 8 +- .../compiler/arrayAssignmentTest6.types | 2 +- .../compiler/arrayAugment.symbols.diff | 19 + .../compiler/arrayBestCommonTypes.js | 4 +- .../compiler/arrayBestCommonTypes.js.diff | 124 +- .../compiler/arrayBestCommonTypes.symbols | 20 +- .../compiler/arrayBestCommonTypes.types | 4 +- .../compiler/arrayBestCommonTypes.types.diff | 40 + ...indingPatternOmittedExpressions.types.diff | 29 + .../arrayBufferIsViewNarrowsType.symbols.diff | 10 + .../compiler/arrayConcat2.symbols.diff | 11 + .../compiler/arrayConcat3.symbols.diff | 15 + .../compiler/arrayConcat3.types.diff | 10 + .../submodule/compiler/arrayConcatMap.js.diff | 8 + .../compiler/arrayConstructors1.symbols.diff | 36 + .../arrayDestructuringInSwitch1.js.diff | 22 + .../arrayDestructuringInSwitch1.symbols.diff | 10 + .../arrayDestructuringInSwitch1.types.diff | 11 + .../arrayDestructuringInSwitch2.js.diff | 19 + .../submodule/compiler/arrayEvery.js.diff | 13 + .../submodule/compiler/arrayEvery.types.diff | 10 + .../submodule/compiler/arrayFilter.js.diff | 8 + .../submodule/compiler/arrayFind.js.diff | 14 + .../submodule/compiler/arrayFind.types.diff | 11 + .../submodule/compiler/arrayFlatMap.js.diff | 14 + .../arrayFlatNoCrashInference.types.diff | 17 + ...ayFlatNoCrashInferenceDeclarations.js.diff | 7 +- ...latNoCrashInferenceDeclarations.types.diff | 17 + .../submodule/compiler/arrayFrom.js.diff | 50 +- .../compiler/arrayIndexWithArrayFails.js.diff | 8 + ...dArrayConstructorEquivalence1.symbols.diff | 26 + .../compiler/arrayLiteralComments.js.diff | 11 + .../compiler/arrayLiteralComments.types.diff | 13 + .../arrayLiteralContextualType.js.diff | 28 +- .../arrayLiteralContextualType.types.diff | 43 + .../arrayLiteralInNonVarArgParameter.js.diff | 14 + .../arrayLiteralTypeInference.js.diff | 52 +- .../compiler/arrayOfExportedClass.js.diff | 27 +- ...SubtypeIsAssignableToReadonlyArray.js.diff | 52 +- ...peIsAssignableToReadonlyArray.symbols.diff | 26 + .../arrayReferenceWithoutTypeArgs.js.diff | 15 + ...arrayReferenceWithoutTypeArgs.symbols.diff | 9 + .../compiler/arraySigChecking.errors.txt | 2 +- .../submodule/compiler/arraySigChecking.js | 2 +- .../compiler/arraySigChecking.symbols | 6 +- .../compiler/arraySigChecking.symbols.diff | 16 + .../submodule/compiler/arraySigChecking.types | 2 +- .../arrayToLocaleStringES5.errors.txt.diff | 129 + .../compiler/arrayToLocaleStringES5.js.diff | 63 + .../arrayToLocaleStringES5.symbols.diff | 342 + .../arrayToLocaleStringES5.types.diff | 415 + ...arrayTypeInSignatureOfInterfaceAndClass.js | 4 +- ...TypeInSignatureOfInterfaceAndClass.symbols | 22 +- ...ayTypeInSignatureOfInterfaceAndClass.types | 4 +- .../submodule/compiler/arrayconcat.js.diff | 23 +- .../submodule/compiler/arrayconcat.types.diff | 10 + .../compiler/arrowFunctionErrorSpan.js.diff | 44 +- ...rrowFunctionInConstructorArgument1.js.diff | 16 + ...rrowFunctionInExpressionStatement1.js.diff | 8 + .../arrowFunctionInExpressionStatement2.js | 2 +- ...rrowFunctionInExpressionStatement2.js.diff | 9 + ...rrowFunctionInExpressionStatement2.symbols | 2 +- .../arrowFunctionInExpressionStatement2.types | 2 +- ...wFunctionMissingCurlyWithSemicolon.js.diff | 11 + ...useParenthesizedObjectForArrowHead.js.diff | 20 + ...ParenthesizedObjectForArrowHead.types.diff | 28 + ...rrowFunctionWithObjectLiteralBody1.js.diff | 2 +- ...rrowFunctionWithObjectLiteralBody2.js.diff | 2 +- ...rrowFunctionWithObjectLiteralBody5.js.diff | 10 +- .../arrowFunctionsMissingTokens.errors.txt | 12 +- .../compiler/arrowFunctionsMissingTokens.js | 12 +- .../arrowFunctionsMissingTokens.js.diff | 83 + .../arrowFunctionsMissingTokens.symbols | 14 +- .../arrowFunctionsMissingTokens.types | 12 +- .../submodule/compiler/asiAbstract.js.diff | 38 +- .../compiler/asiInES6Classes.js.diff | 21 +- .../asiPublicPrivateProtected.js.diff | 102 +- .../assertInWrapSomeTypeParameter.js.diff | 18 + ...onFunctionsCanNarrowByDiscriminant.js.diff | 9 +- .../reference/submodule/compiler/assign1.js | 2 +- .../submodule/compiler/assign1.symbols | 6 +- .../submodule/compiler/assign1.types | 2 +- ...gnLambdaToNominalSubtypeOfFunction.js.diff | 9 + ...bdaToNominalSubtypeOfFunction.symbols.diff | 11 + .../compiler/assignToExistingClass.errors.txt | 2 +- .../compiler/assignToExistingClass.js | 2 +- .../compiler/assignToExistingClass.js.diff | 29 +- .../compiler/assignToExistingClass.symbols | 8 +- .../compiler/assignToExistingClass.types | 2 +- .../submodule/compiler/assignToFn.errors.txt | 2 +- .../submodule/compiler/assignToFn.js | 2 +- .../submodule/compiler/assignToFn.symbols | 6 +- .../submodule/compiler/assignToFn.types | 2 +- .../compiler/assignToModule.errors.txt | 2 +- .../submodule/compiler/assignToModule.js | 2 +- .../submodule/compiler/assignToModule.symbols | 2 +- .../submodule/compiler/assignToModule.types | 2 +- ...nToObjectTypeWithPrototypeProperty.js.diff | 15 + ...ngFromObjectToAnythingElse.errors.txt.diff | 4 +- ...gningFromObjectToAnythingElse.symbols.diff | 29 + ...ssigningFunctionToTupleIssuesError.js.diff | 8 + .../compiler/assignmentCompatBug2.js.diff | 55 + .../compiler/assignmentCompatBug3.js.diff | 25 + .../assignmentCompatBug3.symbols.diff | 11 + .../compiler/assignmentCompatBug5.js.diff | 10 + ...tInterfaceWithStringIndexSignature.js.diff | 17 + .../compiler/assignmentCompatOnNew.js.diff | 16 + .../assignmentCompatWithOverloads.js.diff | 16 + .../compiler/assignmentCompatability1.js | 4 +- .../compiler/assignmentCompatability1.symbols | 8 +- .../compiler/assignmentCompatability1.types | 4 +- .../compiler/assignmentCompatability10.js | 4 +- .../assignmentCompatability10.js.diff | 18 +- .../assignmentCompatability10.symbols | 12 +- .../compiler/assignmentCompatability10.types | 4 +- .../assignmentCompatability11.errors.txt | 4 +- .../compiler/assignmentCompatability11.js | 4 +- .../assignmentCompatability11.symbols | 8 +- .../compiler/assignmentCompatability11.types | 4 +- .../assignmentCompatability12.errors.txt | 4 +- .../compiler/assignmentCompatability12.js | 4 +- .../assignmentCompatability12.symbols | 8 +- .../compiler/assignmentCompatability12.types | 4 +- .../assignmentCompatability13.errors.txt | 4 +- .../compiler/assignmentCompatability13.js | 4 +- .../assignmentCompatability13.symbols | 8 +- .../compiler/assignmentCompatability13.types | 4 +- .../assignmentCompatability14.errors.txt | 4 +- .../compiler/assignmentCompatability14.js | 4 +- .../assignmentCompatability14.symbols | 8 +- .../compiler/assignmentCompatability14.types | 4 +- .../assignmentCompatability15.errors.txt | 4 +- .../compiler/assignmentCompatability15.js | 4 +- .../assignmentCompatability15.symbols | 8 +- .../compiler/assignmentCompatability15.types | 4 +- .../assignmentCompatability16.errors.txt | 4 +- .../compiler/assignmentCompatability16.js | 4 +- .../assignmentCompatability16.symbols | 8 +- .../compiler/assignmentCompatability16.types | 4 +- .../assignmentCompatability17.errors.txt | 4 +- .../compiler/assignmentCompatability17.js | 4 +- .../assignmentCompatability17.symbols | 8 +- .../compiler/assignmentCompatability17.types | 4 +- .../assignmentCompatability18.errors.txt | 4 +- .../compiler/assignmentCompatability18.js | 4 +- .../assignmentCompatability18.symbols | 8 +- .../compiler/assignmentCompatability18.types | 4 +- .../assignmentCompatability19.errors.txt | 4 +- .../compiler/assignmentCompatability19.js | 4 +- .../assignmentCompatability19.symbols | 8 +- .../compiler/assignmentCompatability19.types | 4 +- .../compiler/assignmentCompatability2.js | 4 +- .../compiler/assignmentCompatability2.symbols | 8 +- .../compiler/assignmentCompatability2.types | 4 +- .../assignmentCompatability20.errors.txt | 4 +- .../compiler/assignmentCompatability20.js | 4 +- .../assignmentCompatability20.symbols | 8 +- .../compiler/assignmentCompatability20.types | 4 +- .../assignmentCompatability21.errors.txt | 4 +- .../compiler/assignmentCompatability21.js | 4 +- .../assignmentCompatability21.symbols | 8 +- .../compiler/assignmentCompatability21.types | 4 +- .../assignmentCompatability22.errors.txt | 4 +- .../compiler/assignmentCompatability22.js | 4 +- .../assignmentCompatability22.symbols | 8 +- .../compiler/assignmentCompatability22.types | 4 +- .../assignmentCompatability23.errors.txt | 4 +- .../compiler/assignmentCompatability23.js | 4 +- .../assignmentCompatability23.symbols | 8 +- .../compiler/assignmentCompatability23.types | 4 +- .../assignmentCompatability24.errors.txt | 4 +- .../compiler/assignmentCompatability24.js | 4 +- .../assignmentCompatability24.symbols | 8 +- .../compiler/assignmentCompatability24.types | 4 +- .../assignmentCompatability25.errors.txt | 4 +- .../compiler/assignmentCompatability25.js | 4 +- .../assignmentCompatability25.symbols | 8 +- .../compiler/assignmentCompatability25.types | 4 +- .../assignmentCompatability26.errors.txt | 4 +- .../compiler/assignmentCompatability26.js | 4 +- .../assignmentCompatability26.symbols | 8 +- .../compiler/assignmentCompatability26.types | 4 +- .../assignmentCompatability27.errors.txt | 4 +- .../compiler/assignmentCompatability27.js | 4 +- .../assignmentCompatability27.symbols | 8 +- .../compiler/assignmentCompatability27.types | 4 +- .../assignmentCompatability28.errors.txt | 4 +- .../compiler/assignmentCompatability28.js | 4 +- .../assignmentCompatability28.symbols | 8 +- .../compiler/assignmentCompatability28.types | 4 +- .../assignmentCompatability29.errors.txt | 4 +- .../compiler/assignmentCompatability29.js | 4 +- .../assignmentCompatability29.symbols | 8 +- .../compiler/assignmentCompatability29.types | 4 +- .../compiler/assignmentCompatability3.js | 4 +- .../compiler/assignmentCompatability3.symbols | 8 +- .../compiler/assignmentCompatability3.types | 4 +- .../assignmentCompatability30.errors.txt | 4 +- .../compiler/assignmentCompatability30.js | 4 +- .../assignmentCompatability30.symbols | 8 +- .../compiler/assignmentCompatability30.types | 4 +- .../assignmentCompatability31.errors.txt | 4 +- .../compiler/assignmentCompatability31.js | 4 +- .../assignmentCompatability31.symbols | 8 +- .../compiler/assignmentCompatability31.types | 4 +- .../assignmentCompatability32.errors.txt | 4 +- .../compiler/assignmentCompatability32.js | 4 +- .../assignmentCompatability32.symbols | 8 +- .../compiler/assignmentCompatability32.types | 4 +- .../assignmentCompatability33.errors.txt | 4 +- .../compiler/assignmentCompatability33.js | 4 +- .../assignmentCompatability33.symbols | 8 +- .../compiler/assignmentCompatability33.types | 4 +- .../assignmentCompatability34.errors.txt | 4 +- .../compiler/assignmentCompatability34.js | 4 +- .../assignmentCompatability34.symbols | 8 +- .../compiler/assignmentCompatability34.types | 4 +- .../assignmentCompatability35.errors.txt | 4 +- .../compiler/assignmentCompatability35.js | 4 +- .../assignmentCompatability35.symbols | 8 +- .../compiler/assignmentCompatability35.types | 4 +- .../compiler/assignmentCompatability36.js | 4 +- .../assignmentCompatability36.symbols | 8 +- .../compiler/assignmentCompatability36.types | 4 +- .../assignmentCompatability37.errors.txt | 4 +- .../compiler/assignmentCompatability37.js | 4 +- .../assignmentCompatability37.symbols | 8 +- .../compiler/assignmentCompatability37.types | 4 +- .../assignmentCompatability38.errors.txt | 4 +- .../compiler/assignmentCompatability38.js | 4 +- .../assignmentCompatability38.symbols | 8 +- .../compiler/assignmentCompatability38.types | 4 +- .../assignmentCompatability39.errors.txt | 4 +- .../compiler/assignmentCompatability39.js | 4 +- .../assignmentCompatability39.js.diff | 18 +- .../assignmentCompatability39.symbols | 12 +- .../compiler/assignmentCompatability39.types | 4 +- .../compiler/assignmentCompatability4.js | 4 +- .../compiler/assignmentCompatability4.symbols | 8 +- .../compiler/assignmentCompatability4.types | 4 +- .../assignmentCompatability40.errors.txt | 4 +- .../compiler/assignmentCompatability40.js | 4 +- .../assignmentCompatability40.js.diff | 17 +- .../assignmentCompatability40.symbols | 12 +- .../compiler/assignmentCompatability40.types | 4 +- .../assignmentCompatability41.errors.txt | 4 +- .../compiler/assignmentCompatability41.js | 4 +- .../assignmentCompatability41.js.diff | 18 +- .../assignmentCompatability41.symbols | 12 +- .../compiler/assignmentCompatability41.types | 4 +- .../assignmentCompatability42.errors.txt | 4 +- .../compiler/assignmentCompatability42.js | 4 +- .../assignmentCompatability42.js.diff | 18 +- .../assignmentCompatability42.symbols | 12 +- .../compiler/assignmentCompatability42.types | 4 +- .../assignmentCompatability43.errors.txt | 4 +- .../compiler/assignmentCompatability43.js | 4 +- .../assignmentCompatability43.symbols | 12 +- .../compiler/assignmentCompatability43.types | 4 +- .../assignmentCompatability44.js.diff | 16 + .../assignmentCompatability45.js.diff | 42 + .../compiler/assignmentCompatability5.js | 4 +- .../compiler/assignmentCompatability5.symbols | 12 +- .../compiler/assignmentCompatability5.types | 4 +- .../compiler/assignmentCompatability6.js | 4 +- .../compiler/assignmentCompatability6.symbols | 12 +- .../compiler/assignmentCompatability6.types | 4 +- .../compiler/assignmentCompatability7.js | 4 +- .../compiler/assignmentCompatability7.symbols | 12 +- .../compiler/assignmentCompatability7.types | 4 +- .../compiler/assignmentCompatability8.js | 4 +- .../compiler/assignmentCompatability8.js.diff | 17 +- .../compiler/assignmentCompatability8.symbols | 12 +- .../compiler/assignmentCompatability8.types | 4 +- .../compiler/assignmentCompatability9.js | 4 +- .../compiler/assignmentCompatability9.js.diff | 17 +- .../compiler/assignmentCompatability9.symbols | 12 +- .../compiler/assignmentCompatability9.types | 4 +- ...y-member-off-of-function-interface.js.diff | 8 +- ...l-member-off-of-function-interface.js.diff | 8 +- .../assignmentIndexedToPrimitives.js.diff | 30 + .../assignmentNestedInLiterals.js.diff | 10 + ...assignmentNonObjectTypeConstraints.js.diff | 24 +- ...mentRestElementWithErrorSourceType.js.diff | 8 + ...ignmentToAnyArrayRestParameters.types.diff | 18 + ...onalBrandedStringTemplateOrMapping.js.diff | 16 + .../assignmentToExpandingArrayType.js.diff | 11 + .../compiler/assignmentToFunction.errors.txt | 2 +- .../compiler/assignmentToFunction.js | 2 +- .../compiler/assignmentToFunction.js.diff | 11 + .../compiler/assignmentToFunction.symbols | 4 +- .../compiler/assignmentToFunction.types | 2 +- ...ssignmentToInstantiationExpression.js.diff | 15 +- .../assignmentToObjectAndFunction.errors.txt | 6 +- ...ignmentToObjectAndFunction.errors.txt.diff | 18 + .../compiler/assignmentToObjectAndFunction.js | 6 +- .../assignmentToObjectAndFunction.js.diff | 11 + .../assignmentToObjectAndFunction.symbols | 8 +- ...assignmentToObjectAndFunction.symbols.diff | 36 + .../assignmentToObjectAndFunction.types | 6 +- .../assignmentToReferenceTypes.errors.txt | 2 +- .../compiler/assignmentToReferenceTypes.js | 2 +- .../assignmentToReferenceTypes.js.diff | 12 +- .../assignmentToReferenceTypes.symbols | 2 +- .../compiler/assignmentToReferenceTypes.types | 2 +- .../compiler/asyncArrowInClassES5.js.diff | 12 +- ...syncAwaitWithCapturedBlockScopeVar.js.diff | 155 +- ...unctionContextuallyTypedReturns.types.diff | 29 +- .../asyncFunctionNoReturnType.errors.txt.diff | 17 + .../asyncFunctionNoReturnType.js.diff | 41 +- ...ReturnExpressionErrorSpans.errors.txt.diff | 21 - ...FunctionReturnExpressionErrorSpans.js.diff | 50 +- ...ionReturnExpressionErrorSpans.symbols.diff | 11 + .../asyncFunctionTempVariableScoping.js.diff | 47 +- ...syncFunctionTempVariableScoping.types.diff | 11 + ...ctionWithForStatementNoInitializer.js.diff | 76 +- .../compiler/asyncImportNestedYield.js.diff | 40 +- .../compiler/augmentArray.symbols.diff | 13 + ...ssWithPrototypePropertyOnModule.errors.txt | 2 +- ...entedClassWithPrototypePropertyOnModule.js | 2 +- ...ClassWithPrototypePropertyOnModule.symbols | 2 +- ...edClassWithPrototypePropertyOnModule.types | 2 +- ...ypeBracketNamedPropertyAccess.symbols.diff | 11 + .../compiler/augmentedTypesClass.js.diff | 29 + .../compiler/augmentedTypesClass2.js.diff | 49 + .../compiler/augmentedTypesClass2a.js.diff | 18 + .../compiler/augmentedTypesClass3.js | 6 +- .../compiler/augmentedTypesClass3.js.diff | 50 + .../compiler/augmentedTypesClass3.symbols | 20 +- .../compiler/augmentedTypesClass3.types | 6 +- .../compiler/augmentedTypesClass4.js.diff | 24 + .../compiler/augmentedTypesEnum.errors.txt | 6 +- .../submodule/compiler/augmentedTypesEnum.js | 6 +- .../compiler/augmentedTypesEnum.js.diff | 25 + .../compiler/augmentedTypesEnum.symbols | 18 +- .../compiler/augmentedTypesEnum.types | 6 +- .../compiler/augmentedTypesEnum2.js.diff | 20 + .../compiler/augmentedTypesEnum3.errors.txt | 8 +- .../submodule/compiler/augmentedTypesEnum3.js | 8 +- .../compiler/augmentedTypesEnum3.symbols | 18 +- .../compiler/augmentedTypesEnum3.types | 8 +- .../augmentedTypesFunction.errors.txt | 8 +- .../compiler/augmentedTypesFunction.js | 8 +- .../compiler/augmentedTypesFunction.js.diff | 30 + .../compiler/augmentedTypesFunction.symbols | 28 +- .../compiler/augmentedTypesFunction.types | 8 +- .../compiler/augmentedTypesInterface.js.diff | 18 +- .../compiler/augmentedTypesModules.errors.txt | 82 +- .../compiler/augmentedTypesModules.js | 58 +- .../compiler/augmentedTypesModules.js.diff | 109 + .../compiler/augmentedTypesModules.symbols | 192 +- .../compiler/augmentedTypesModules.types | 58 +- .../augmentedTypesModules2.errors.txt | 30 +- .../compiler/augmentedTypesModules2.js | 18 +- .../compiler/augmentedTypesModules2.js.diff | 17 + .../compiler/augmentedTypesModules2.symbols | 62 +- .../compiler/augmentedTypesModules2.types | 18 +- .../augmentedTypesModules3.errors.txt | 8 +- .../compiler/augmentedTypesModules3.js | 4 +- .../compiler/augmentedTypesModules3.js.diff | 26 + .../compiler/augmentedTypesModules3.symbols | 14 +- .../compiler/augmentedTypesModules3.types | 4 +- .../compiler/augmentedTypesModules3b.js | 12 +- .../compiler/augmentedTypesModules3b.js.diff | 45 + .../compiler/augmentedTypesModules3b.symbols | 44 +- .../compiler/augmentedTypesModules3b.types | 12 +- .../compiler/augmentedTypesModules4.js | 14 +- .../compiler/augmentedTypesModules4.js.diff | 18 + .../compiler/augmentedTypesModules4.symbols | 56 +- .../compiler/augmentedTypesModules4.types | 14 +- .../compiler/augmentedTypesVar.errors.txt | 14 +- .../submodule/compiler/augmentedTypesVar.js | 6 +- .../compiler/augmentedTypesVar.js.diff | 27 +- .../compiler/augmentedTypesVar.symbols | 10 +- .../compiler/augmentedTypesVar.types | 6 +- ...utoAsiForStaticsInClassDeclaration.js.diff | 12 +- .../submodule/compiler/autoLift2.js.diff | 31 + .../submodule/compiler/autolift3.js.diff | 22 + .../submodule/compiler/autolift4.js.diff | 65 +- .../submodule/compiler/autolift4.symbols.diff | 20 + .../submodule/compiler/avoid.js.diff | 18 + .../compiler/awaitUnionPromise.types.diff | 16 + .../compiler/awaitedTypeNoLib.errors.txt.diff | 20 + .../compiler/awaitedTypeNoLib.js.diff | 25 + .../compiler/awaitedTypeNoLib.types.diff | 24 +- .../submodule/compiler/badArraySyntax.js.diff | 15 +- ...enceLowerPriorityThanGoodInference.js.diff | 15 +- .../submodule/compiler/badThisBinding.js.diff | 23 + .../submodule/compiler/baseCheck.js.diff | 123 +- .../baseClassImprovedMismatchErrors.js.diff | 73 +- .../baseConstraintOfDecorator.js.diff | 75 +- .../baseExpressionTypeParameters.js.diff | 49 +- .../baseIndexSignatureResolution.js.diff | 41 +- .../compiler/baseTypeAfterDerivedType.js.diff | 20 + .../compiler/baseTypeOrderChecking.js.diff | 59 +- .../baseTypePrivateMemberClash.js.diff | 21 +- ...baseTypeWrappingInstantiationChain.js.diff | 80 +- .../submodule/compiler/bases.js.diff | 47 + .../submodule/compiler/bestChoiceType.js.diff | 25 + .../compiler/bestChoiceType.symbols.diff | 35 + .../compiler/bestChoiceType.types.diff | 54 + .../compiler/bigintAmbientMinimal.js.diff | 8 + .../compiler/bigintWithoutLib.js.diff | 49 + .../compiler/bigintWithoutLib.symbols.diff | 51 + ...thmeticControlFlowGraphNotTooLarge.js.diff | 7 +- .../submodule/compiler/bind1.errors.txt | 2 +- .../reference/submodule/compiler/bind1.js | 2 +- .../submodule/compiler/bind1.js.diff | 15 + .../submodule/compiler/bind1.symbols | 4 +- .../reference/submodule/compiler/bind1.types | 2 +- ...PatternCannotBeOnlyInferenceSource.js.diff | 51 + ...ContextualTypeDoesNotCauseWidening.js.diff | 10 + .../bindingPatternInParameter01.js.diff | 13 + ...ingPatternOmittedExpressionNesting.js.diff | 2 +- ...PatternOmittedExpressionNesting.types.diff | 12 + .../compiler/binopAssignmentShouldHaveType.js | 2 +- .../binopAssignmentShouldHaveType.js.diff | 28 + .../binopAssignmentShouldHaveType.symbols | 6 +- .../binopAssignmentShouldHaveType.types | 2 +- ...ScopedBindingCaptureThisInFunction.js.diff | 21 + .../blockScopedBindingUsedBeforeDef.js.diff | 18 + ...ScopedBindingsInDownlevelGenerator.js.diff | 96 + ...ockScopedBindingsReassignedInLoop1.js.diff | 15 +- ...ockScopedBindingsReassignedInLoop2.js.diff | 114 + ...ockScopedBindingsReassignedInLoop3.js.diff | 232 + ...ockScopedBindingsReassignedInLoop4.js.diff | 29 + ...ockScopedBindingsReassignedInLoop5.js.diff | 26 + ...ockScopedBindingsReassignedInLoop6.js.diff | 59 + ...ockScopedEnumVariablesUseBeforeDef.js.diff | 19 + ...iablesUseBeforeDef_isolatedModules.js.diff | 25 + ...EnumVariablesUseBeforeDef_preserve.js.diff | 25 + ...sUseBeforeDef_verbatimModuleSyntax.js.diff | 25 + ...edFunctionDeclarationInStrictClass.js.diff | 22 + .../blockScopedVariablesUseBeforeDef.js.diff | 256 +- .../compiler/bluebirdStaticThis.errors.txt | 2 +- .../submodule/compiler/bluebirdStaticThis.js | 2 +- .../compiler/bluebirdStaticThis.js.diff | 18 + .../compiler/bluebirdStaticThis.symbols | 150 +- .../compiler/bluebirdStaticThis.symbols.diff | 44 + .../compiler/bluebirdStaticThis.types | 2 +- .../compiler/bluebirdStaticThis.types.diff | 2 +- .../compiler/booleanFilterAnyArray.js.diff | 11 + .../booleanFilterAnyArray.symbols.diff | 20 + ...ContextuallyTypedFromUnion.errors.txt.diff | 35 - ...LiteralsContextuallyTypedFromUnion.js.diff | 23 +- ...alsContextuallyTypedFromUnion.symbols.diff | 14 +- .../compiler/builtinIterator.errors.txt.diff | 38 + .../compiler/builtinIterator.types.diff | 58 +- .../compiler/cachedContextualTypes.js.diff | 16 +- ...onditionalTypeWithConcreteBranches.js.diff | 21 + ...ionalTypeWithConcreteBranches.symbols.diff | 11 + .../submodule/compiler/callOnClass.js.diff | 14 + ...OverloadViaElementAccessExpression.js.diff | 21 + .../submodule/compiler/callOverloads1.js.diff | 20 + .../submodule/compiler/callOverloads2.js.diff | 20 + .../compiler/callOverloads2.symbols.diff | 11 + .../submodule/compiler/callOverloads3.js.diff | 20 + .../submodule/compiler/callOverloads4.js.diff | 20 + .../submodule/compiler/callOverloads5.js.diff | 20 + .../compiler/callbacksDontShareTypes.js.diff | 14 + .../compiler/callsOnComplexSignatures.js.diff | 47 +- .../callsOnComplexSignatures.types.diff | 44 +- .../cannotInvokeNewOnErrorExpression.js.diff | 15 + ...reSuperPropertyAccessInSuperCall01.js.diff | 45 + .../compiler/captureThisInSuperCall.js.diff | 42 + .../compiler/capturedLetConstInLoop1.js.diff | 338 + .../compiler/capturedLetConstInLoop10.js.diff | 124 + .../compiler/capturedLetConstInLoop11.js.diff | 31 + .../compiler/capturedLetConstInLoop12.js.diff | 34 +- .../compiler/capturedLetConstInLoop13.js.diff | 45 + .../compiler/capturedLetConstInLoop14.js.diff | 17 +- .../compiler/capturedLetConstInLoop2.js.diff | 320 + .../compiler/capturedLetConstInLoop3.js.diff | 342 + .../compiler/capturedLetConstInLoop5.js.diff | 491 + .../compiler/capturedLetConstInLoop6.js.diff | 523 + .../compiler/capturedLetConstInLoop7.js.diff | 816 ++ .../compiler/capturedLetConstInLoop8.js.diff | 274 + .../compiler/capturedLetConstInLoop9.js.diff | 198 +- .../capturedParametersInInitializers2.js.diff | 45 +- ...ShorthandPropertyAssignmentNoCheck.js.diff | 20 + .../compiler/capturedVarInLoop.js.diff | 18 + ...stemWithCapsImportTypeDeclarations.js.diff | 20 + .../castExpressionParentheses.js.diff | 7 +- .../castExpressionParentheses.types.diff | 10 + .../submodule/compiler/castOfAwait.types.diff | 20 + .../compiler/castOfYield.errors.txt.diff | 11 + .../submodule/compiler/castOfYield.js.diff | 53 + .../submodule/compiler/castOfYield.types.diff | 11 + .../compiler/castParentheses.js.diff | 14 +- .../compiler/chainedAssignment1.js.diff | 47 +- .../compiler/chainedAssignment2.symbols.diff | 16 + .../compiler/chainedAssignment3.js.diff | 41 +- .../chainedAssignmentChecking.js.diff | 47 +- ...rainedToOtherTypeParameter.errors.txt.diff | 16 + ...terConstrainedToOtherTypeParameter.js.diff | 69 +- ...erConstrainedToOtherTypeParameter2.js.diff | 62 +- .../submodule/compiler/chainedImportAlias.js | 2 +- .../compiler/chainedImportAlias.symbols | 8 +- .../compiler/chainedImportAlias.types | 2 +- ...dSpecializationToObjectTypeLiteral.js.diff | 10 + .../checkForObjectTooStrict.errors.txt.diff | 2 +- .../compiler/checkForObjectTooStrict.js | 2 +- .../compiler/checkForObjectTooStrict.js.diff | 56 + .../compiler/checkForObjectTooStrict.symbols | 10 +- .../checkForObjectTooStrict.symbols.diff | 10 + .../compiler/checkForObjectTooStrict.types | 2 +- ...heckJsObjectLiteralHasCheckedKeyof.js.diff | 17 + ...heckJsObjectLiteralIndexSignatures.js.diff | 17 + ...sObjectLiteralIndexSignatures.symbols.diff | 11 + ...eckJsdocTypeTagOnExportAssignment3.js.diff | 3 +- ...eckJsdocTypeTagOnExportAssignment7.js.diff | 3 +- .../compiler/checkJsxNotSetError.js.diff | 11 +- .../checkMergedGlobalUMDSymbol.js.diff | 8 + .../checkSuperCallBeforeThisAccess.types.diff | 15 + ...checkSuperCallBeforeThisAccessing1.js.diff | 50 +- ...checkSuperCallBeforeThisAccessing2.js.diff | 51 +- ...checkSuperCallBeforeThisAccessing3.js.diff | 57 +- ...checkSuperCallBeforeThisAccessing4.js.diff | 67 +- ...checkSuperCallBeforeThisAccessing5.js.diff | 49 +- ...checkSuperCallBeforeThisAccessing6.js.diff | 49 + ...checkSuperCallBeforeThisAccessing7.js.diff | 43 + ...checkSuperCallBeforeThisAccessing8.js.diff | 49 + ...kSwitchStatementIfCaseTypeIsString.js.diff | 25 + ...chStatementIfCaseTypeIsString.symbols.diff | 11 + ...unctionNonexistentPropertyNoCrash1.js.diff | 16 +- ...bjectWithThisInNamePositionNoCrash.js.diff | 17 +- ...arConstraintYieldsAppropriateError.js.diff | 53 +- .../circularConstructorWithReturn.js.diff | 17 +- .../circularContextualMappedType.js.diff | 11 +- .../circularContextualReturnType.js.diff | 6 +- .../circularObjectLiteralAccessors.js.diff | 11 + .../circularOptionalityRemoval.js.diff | 15 + .../circularResolvedSignature.js.diff | 16 + ...rgumentsLocalAndOuterNoCrash1.symbols.diff | 11 + .../circularTypeofWithFunctionModule.js.diff | 43 + ...InfiniteInstantiationDepth.errors.txt.diff | 26 + ...SimplifyingConditionalTypesNoCrash.js.diff | 11 + .../submodule/compiler/class2.js.diff | 7 +- .../compiler/classBlockScoping.js.diff | 39 +- .../compiler/classCannotExtendVar.js.diff | 14 + .../classDeclarationBlockScoping1.js.diff | 22 + .../classDeclarationBlockScoping2.js.diff | 27 + ...oreDefinitionInFunctionDeclaration.js.diff | 13 + ...clarationMergedInModuleWithContinuation.js | 6 +- ...tionMergedInModuleWithContinuation.js.diff | 47 + ...tionMergedInModuleWithContinuation.symbols | 16 +- ...rationMergedInModuleWithContinuation.types | 6 +- ...nShouldBeOutOfScopeInComputedNames.js.diff | 18 +- .../classDeclaredBeforeClassFactory.js.diff | 40 + .../classExpressionAssignment.js.diff | 13 + ...ssExpressionExtendingAbstractClass.js.diff | 37 + ...xpressionInClassStaticDeclarations.js.diff | 33 +- .../compiler/classExpressionTest1.js.diff | 24 + .../compiler/classExpressionTest2.js.diff | 24 + .../classExpressionWithDecorator1.js.diff | 7 +- ...hResolutionOfNamespaceOfSameName01.js.diff | 12 +- ...assExpressionWithStaticProperties1.js.diff | 7 +- ...assExpressionWithStaticProperties2.js.diff | 7 +- ...assExpressionWithStaticProperties3.js.diff | 27 +- .../compiler/classExpressions.js.diff | 20 +- .../classExtendingQualifiedName.errors.txt | 2 +- .../compiler/classExtendingQualifiedName.js | 2 +- .../classExtendingQualifiedName.js.diff | 40 + .../classExtendingQualifiedName.symbols | 4 +- .../classExtendingQualifiedName.types | 2 +- .../compiler/classExtendingQualifiedName2.js | 2 +- .../classExtendingQualifiedName2.js.diff | 41 + .../classExtendingQualifiedName2.symbols | 8 +- .../classExtendingQualifiedName2.types | 2 +- .../compiler/classExtendsAcrossFiles.js.diff | 82 +- ...ithModuleNotReferingConstructor.errors.txt | 4 +- ...sMergedWithModuleNotReferingConstructor.js | 4 +- ...edWithModuleNotReferingConstructor.js.diff | 40 +- ...edWithModuleNotReferingConstructor.symbols | 4 +- ...rgedWithModuleNotReferingConstructor.types | 4 +- ...useClassNotReferringConstructor.errors.txt | 2 +- ...tendsClauseClassNotReferringConstructor.js | 2 +- ...ClauseClassNotReferringConstructor.js.diff | 38 +- ...ClauseClassNotReferringConstructor.symbols | 2 +- ...dsClauseClassNotReferringConstructor.types | 2 +- .../compiler/classExtendsInterface.js.diff | 53 + .../classExtendsInterfaceInExpression.js.diff | 33 + .../classExtendsInterfaceInModule.errors.txt | 4 +- .../compiler/classExtendsInterfaceInModule.js | 4 +- .../classExtendsInterfaceInModule.js.diff | 48 + .../classExtendsInterfaceInModule.symbols | 12 +- .../classExtendsInterfaceInModule.types | 4 +- ...rfaceThatExtendsClassWithPrivates1.js.diff | 32 +- .../classExtendsInterface_not.js.diff | 30 + .../classExtendsMultipleBaseClasses.js.diff | 44 + .../compiler/classExtendsNull.js.diff | 47 + .../compiler/classExtensionNameOutput.js.diff | 44 + .../compiler/classFunctionMerging.js.diff | 10 + .../compiler/classFunctionMerging2.js.diff | 9 + ...classHeritageWithTrailingSeparator.js.diff | 38 +- .../classImplementingInterfaceIndexer.js.diff | 13 + .../compiler/classImplementsClass1.js.diff | 20 + .../compiler/classImplementsClass2.js.diff | 54 + .../compiler/classImplementsClass3.js.diff | 53 + .../compiler/classImplementsClass4.js.diff | 54 +- .../compiler/classImplementsClass5.js.diff | 57 +- .../compiler/classImplementsClass6.js.diff | 57 + .../compiler/classImplementsClass7.js.diff | 21 +- .../classImplementsImportedInterface.js | 4 +- .../classImplementsImportedInterface.js.diff | 13 +- .../classImplementsImportedInterface.symbols | 12 +- .../classImplementsImportedInterface.types | 4 +- .../compiler/classImplementsPrimitive.js.diff | 69 + .../compiler/classInConvertedLoopES5.js.diff | 26 +- .../submodule/compiler/classIndexer.js.diff | 14 + .../submodule/compiler/classIndexer2.js.diff | 13 +- .../submodule/compiler/classIndexer3.js.diff | 40 +- .../submodule/compiler/classIndexer4.js.diff | 14 + .../compiler/classInheritence.js.diff | 39 + .../classMemberInitializerScoping.js.diff | 25 +- ...sMemberInitializerWithLamdaScoping.js.diff | 45 +- ...MemberInitializerWithLamdaScoping2.js.diff | 15 +- ...MemberInitializerWithLamdaScoping3.js.diff | 15 +- ...MemberInitializerWithLamdaScoping4.js.diff | 15 +- ...MemberInitializerWithLamdaScoping5.js.diff | 16 +- .../classMemberWithMissingIdentifier.js.diff | 12 +- .../classMemberWithMissingIdentifier2.js.diff | 15 +- ...dWithInterfaceMultipleBasesNoError.js.diff | 47 +- .../classMethodWithKeywordName1.js.diff | 15 + .../submodule/compiler/classOrder1.js.diff | 20 + .../submodule/compiler/classOrder2.js.diff | 43 + .../submodule/compiler/classOrderBug.js.diff | 45 +- .../compiler/classOverloadForFunction.js.diff | 15 + .../classOverloadForFunction2.js.diff | 13 + .../classPropertyErrorOnNameOnly.js.diff | 16 +- ...terWithinItsOwnBaseExpression.symbols.diff | 10 + .../compiler/classSideInheritance1.js.diff | 46 + .../compiler/classSideInheritance2.js.diff | 46 +- .../compiler/classSideInheritance3.js.diff | 62 +- ...zersUsePropertiesBeforeDeclaration.js.diff | 14 +- .../classStaticPropertyAccess.js.diff | 14 +- .../classStaticPropertyTypeGuard.js.diff | 29 +- .../classTypeParametersInStatics.errors.txt | 2 +- .../compiler/classTypeParametersInStatics.js | 2 +- .../classTypeParametersInStatics.js.diff | 53 +- .../classTypeParametersInStatics.symbols | 26 +- .../classTypeParametersInStatics.types | 2 +- .../compiler/classUpdateTests.js.diff | 307 +- .../compiler/classUpdateTests.symbols.diff | 11 + ...lassUsedBeforeInitializedVariables.js.diff | 70 +- .../compiler/classVarianceCircularity.js.diff | 14 +- .../classVarianceResolveCircularity1.js.diff | 9 +- .../classVarianceResolveCircularity2.js.diff | 20 +- .../classWithDuplicateIdentifier.js.diff | 37 +- .../classWithEmptyTypeParameter.js.diff | 13 + .../classWithMultipleBaseClasses.js.diff | 35 + ...hOverloadImplementationOfWrongName.js.diff | 15 + ...OverloadImplementationOfWrongName2.js.diff | 15 + .../reference/submodule/compiler/classdecl.js | 6 +- .../submodule/compiler/classdecl.js.diff | 181 +- .../submodule/compiler/classdecl.symbols | 16 +- .../submodule/compiler/classdecl.types | 6 +- .../submodule/compiler/clinterfaces.js | 2 +- .../submodule/compiler/clinterfaces.js.diff | 38 +- .../submodule/compiler/clinterfaces.symbols | 6 +- .../submodule/compiler/clinterfaces.types | 2 +- .../cloduleAcrossModuleDefinitions.js | 6 +- .../cloduleAcrossModuleDefinitions.js.diff | 25 + .../cloduleAcrossModuleDefinitions.symbols | 12 +- .../cloduleAcrossModuleDefinitions.types | 6 +- .../compiler/cloduleAndTypeParameters.js | 2 +- .../compiler/cloduleAndTypeParameters.js.diff | 24 + .../compiler/cloduleAndTypeParameters.symbols | 6 +- .../compiler/cloduleAndTypeParameters.types | 2 +- .../cloduleGenericOnSelfMember.js.diff | 41 +- .../cloduleSplitAcrossFiles.errors.txt | 6 +- .../compiler/cloduleSplitAcrossFiles.js | 2 +- .../compiler/cloduleSplitAcrossFiles.js.diff | 16 + .../compiler/cloduleSplitAcrossFiles.symbols | 2 +- .../compiler/cloduleSplitAcrossFiles.types | 2 +- .../compiler/cloduleStaticMembers.errors.txt | 2 +- .../compiler/cloduleStaticMembers.js | 2 +- .../compiler/cloduleStaticMembers.js.diff | 6 +- .../compiler/cloduleStaticMembers.symbols | 2 +- .../compiler/cloduleStaticMembers.types | 2 +- .../compiler/cloduleTest2.errors.txt | 18 +- .../submodule/compiler/cloduleTest2.js | 18 +- .../submodule/compiler/cloduleTest2.js.diff | 38 + .../submodule/compiler/cloduleTest2.symbols | 60 +- .../submodule/compiler/cloduleTest2.types | 18 +- .../cloduleWithDuplicateMember1.errors.txt | 4 +- .../compiler/cloduleWithDuplicateMember1.js | 4 +- .../cloduleWithDuplicateMember1.js.diff | 33 + .../cloduleWithDuplicateMember1.symbols | 6 +- .../cloduleWithDuplicateMember1.types | 4 +- .../cloduleWithDuplicateMember2.errors.txt | 4 +- .../compiler/cloduleWithDuplicateMember2.js | 4 +- .../cloduleWithDuplicateMember2.js.diff | 28 + .../cloduleWithDuplicateMember2.symbols | 6 +- .../cloduleWithDuplicateMember2.types | 4 +- ...duleWithPriorInstantiatedModule.errors.txt | 8 +- .../cloduleWithPriorInstantiatedModule.js | 4 +- ...cloduleWithPriorInstantiatedModule.js.diff | 24 + ...cloduleWithPriorInstantiatedModule.symbols | 8 +- .../cloduleWithPriorInstantiatedModule.types | 4 +- .../cloduleWithPriorUninstantiatedModule.js | 4 +- ...oduleWithPriorUninstantiatedModule.js.diff | 24 + ...oduleWithPriorUninstantiatedModule.symbols | 8 +- ...cloduleWithPriorUninstantiatedModule.types | 4 +- .../compiler/cloduleWithRecursiveReference.js | 2 +- .../cloduleWithRecursiveReference.js.diff | 16 + .../cloduleWithRecursiveReference.symbols | 2 +- .../cloduleWithRecursiveReference.types | 2 +- .../clodulesDerivedClasses.errors.txt | 4 +- .../compiler/clodulesDerivedClasses.js | 4 +- .../compiler/clodulesDerivedClasses.js.diff | 38 +- .../compiler/clodulesDerivedClasses.symbols | 12 +- .../compiler/clodulesDerivedClasses.types | 4 +- .../coAndContraVariantInferences.js.diff | 13 +- .../coAndContraVariantInferences2.js.diff | 20 +- ...coAndContraVariantInferences2.symbols.diff | 11 + .../coAndContraVariantInferences2.types.diff | 12 +- .../coAndContraVariantInferences3.js.diff | 41 +- .../coAndContraVariantInferences3.types.diff | 107 +- ...ndContraVariantInferences5.errors.txt.diff | 38 + ...coAndContraVariantInferences5.symbols.diff | 15 + .../coAndContraVariantInferences6.types.diff | 6 +- .../compiler/collectionPatternNoError.js.diff | 40 +- .../collectionPatternNoError.symbols.diff | 11 + .../collisionArgumentsArrowFunctions.js.diff | 42 + ...collisionArgumentsClassConstructor.js.diff | 155 +- .../collisionArgumentsClassMethod.js.diff | 88 + .../collisionArgumentsFunction.js.diff | 53 + ...lisionArgumentsFunctionExpressions.js.diff | 53 + ...lisionCodeGenModuleWithAccessorChildren.js | 10 +- ...nCodeGenModuleWithAccessorChildren.js.diff | 102 +- ...nCodeGenModuleWithAccessorChildren.symbols | 22 +- ...ionCodeGenModuleWithAccessorChildren.types | 10 +- ...ionCodeGenModuleWithConstructorChildren.js | 6 +- ...deGenModuleWithConstructorChildren.js.diff | 37 +- ...deGenModuleWithConstructorChildren.symbols | 10 +- ...CodeGenModuleWithConstructorChildren.types | 6 +- ...sionCodeGenModuleWithEnumMemberConflict.js | 2 +- ...odeGenModuleWithEnumMemberConflict.js.diff | 11 + ...odeGenModuleWithEnumMemberConflict.symbols | 4 +- ...nCodeGenModuleWithEnumMemberConflict.types | 2 +- ...lisionCodeGenModuleWithFunctionChildren.js | 6 +- ...nCodeGenModuleWithFunctionChildren.js.diff | 10 +- ...nCodeGenModuleWithFunctionChildren.symbols | 10 +- ...ionCodeGenModuleWithFunctionChildren.types | 6 +- ...ionCodeGenModuleWithMemberClassConflict.js | 4 +- ...deGenModuleWithMemberClassConflict.js.diff | 36 + ...deGenModuleWithMemberClassConflict.symbols | 16 +- ...CodeGenModuleWithMemberClassConflict.types | 4 +- ...odeGenModuleWithMemberInterfaceConflict.js | 2 +- ...nModuleWithMemberInterfaceConflict.js.diff | 16 + ...nModuleWithMemberInterfaceConflict.symbols | 6 +- ...GenModuleWithMemberInterfaceConflict.types | 2 +- ...ollisionCodeGenModuleWithMemberVariable.js | 2 +- ...ionCodeGenModuleWithMemberVariable.symbols | 2 +- ...isionCodeGenModuleWithMemberVariable.types | 2 +- ...ollisionCodeGenModuleWithMethodChildren.js | 8 +- ...ionCodeGenModuleWithMethodChildren.js.diff | 61 +- ...ionCodeGenModuleWithMethodChildren.symbols | 14 +- ...isionCodeGenModuleWithMethodChildren.types | 8 +- ...ollisionCodeGenModuleWithModuleChildren.js | 22 +- ...ionCodeGenModuleWithModuleChildren.js.diff | 38 +- ...ionCodeGenModuleWithModuleChildren.symbols | 44 +- ...isionCodeGenModuleWithModuleChildren.types | 22 +- ...llisionCodeGenModuleWithModuleReopening.js | 8 +- ...onCodeGenModuleWithModuleReopening.js.diff | 47 +- ...onCodeGenModuleWithModuleReopening.symbols | 46 +- ...sionCodeGenModuleWithModuleReopening.types | 8 +- ...collisionCodeGenModuleWithPrivateMember.js | 2 +- ...sionCodeGenModuleWithPrivateMember.js.diff | 24 + ...sionCodeGenModuleWithPrivateMember.symbols | 6 +- ...lisionCodeGenModuleWithPrivateMember.types | 2 +- ...onCodeGenModuleWithUnicodeNames.errors.txt | 15 + .../collisionCodeGenModuleWithUnicodeNames.js | 10 +- ...isionCodeGenModuleWithUnicodeNames.js.diff | 16 + ...isionCodeGenModuleWithUnicodeNames.symbols | 9 +- ...llisionCodeGenModuleWithUnicodeNames.types | 14 +- ...tsRequireAndAmbientFunctionInGlobalFile.js | 4 +- ...uireAndAmbientFunctionInGlobalFile.symbols | 8 +- ...equireAndAmbientFunctionInGlobalFile.types | 4 +- ...onExportsRequireAndFunctionInGlobalFile.js | 4 +- ...ortsRequireAndFunctionInGlobalFile.symbols | 8 +- ...xportsRequireAndFunctionInGlobalFile.types | 4 +- ...quireAndInternalModuleAliasInGlobalFile.js | 6 +- ...AndInternalModuleAliasInGlobalFile.js.diff | 13 +- ...AndInternalModuleAliasInGlobalFile.symbols | 28 +- ...reAndInternalModuleAliasInGlobalFile.types | 6 +- ...llisionRestParameterArrowFunctions.js.diff | 34 + ...isionRestParameterClassConstructor.js.diff | 125 +- .../collisionRestParameterClassMethod.js.diff | 68 + .../collisionRestParameterFunction.js.diff | 37 + ...onRestParameterFunctionExpressions.js.diff | 37 + ...isionRestParameterUnderscoreIUsage.js.diff | 20 + ...onSuperAndLocalFunctionInAccessors.js.diff | 122 + ...SuperAndLocalFunctionInConstructor.js.diff | 70 + ...isionSuperAndLocalFunctionInMethod.js.diff | 85 + ...ionSuperAndLocalFunctionInProperty.js.diff | 66 +- ...llisionSuperAndLocalVarInAccessors.js.diff | 109 + ...isionSuperAndLocalVarInConstructor.js.diff | 60 + .../collisionSuperAndLocalVarInMethod.js.diff | 63 + ...ollisionSuperAndLocalVarInProperty.js.diff | 57 +- .../collisionSuperAndNameResolution.js.diff | 44 + .../collisionSuperAndParameter.js.diff | 139 +- .../collisionSuperAndParameter1.js.diff | 44 + ...dPropertyNameAsConstuctorParameter.js.diff | 92 +- ...collisionThisExpressionAndAliasInGlobal.js | 2 +- ...sionThisExpressionAndAliasInGlobal.js.diff | 13 +- ...sionThisExpressionAndAliasInGlobal.symbols | 2 +- ...lisionThisExpressionAndAliasInGlobal.types | 2 +- ...sExpressionAndAmbientClassInGlobal.js.diff | 10 + ...hisExpressionAndAmbientVarInGlobal.js.diff | 10 + ...sionThisExpressionAndClassInGlobal.js.diff | 16 + ...isionThisExpressionAndEnumInGlobal.js.diff | 14 + ...nThisExpressionAndFunctionInGlobal.js.diff | 12 + ...isExpressionAndLocalVarInAccessors.js.diff | 100 + ...ExpressionAndLocalVarInConstructor.js.diff | 42 + ...hisExpressionAndLocalVarInFunction.js.diff | 11 + ...nThisExpressionAndLocalVarInLambda.js.diff | 18 + ...nThisExpressionAndLocalVarInMethod.js.diff | 41 + ...hisExpressionAndLocalVarInProperty.js.diff | 40 +- ...sionAndLocalVarWithSuperExperssion.js.diff | 68 + ...ollisionThisExpressionAndModuleInGlobal.js | 2 +- ...ionThisExpressionAndModuleInGlobal.js.diff | 19 + ...ionThisExpressionAndModuleInGlobal.symbols | 4 +- ...isionThisExpressionAndModuleInGlobal.types | 2 +- ...ionThisExpressionAndNameResolution.js.diff | 24 + ...ollisionThisExpressionAndParameter.js.diff | 131 + ...dPropertyNameAsConstuctorParameter.js.diff | 86 +- ...lisionThisExpressionAndVarInGlobal.js.diff | 10 + ...mmaOperatorInConditionalExpression.js.diff | 13 + .../commaOperatorLeftSideUnused.js.diff | 48 + .../commaOperatorLeftSideUnused.symbols.diff | 20 + .../commaOperatorLeftSideUnused.types.diff | 19 + .../commentBeforeStaticMethod1.js.diff | 21 + .../compiler/commentEmitAtEndOfFile1.js | 4 +- .../compiler/commentEmitAtEndOfFile1.symbols | 6 +- .../compiler/commentEmitAtEndOfFile1.types | 4 +- .../compiler/commentOnAmbientModule.js | 6 +- .../compiler/commentOnAmbientModule.symbols | 16 +- .../compiler/commentOnAmbientModule.types | 6 +- .../compiler/commentOnArrayElement1.js.diff | 11 + .../compiler/commentOnArrayElement10.js.diff | 8 + .../commentOnArrayElement10.types.diff | 8 + .../compiler/commentOnArrayElement11.js.diff | 10 + .../commentOnArrayElement11.types.diff | 9 + .../compiler/commentOnArrayElement12.js.diff | 11 + .../commentOnArrayElement12.types.diff | 10 + .../compiler/commentOnArrayElement13.js.diff | 2 +- .../compiler/commentOnArrayElement14.js.diff | 8 + .../compiler/commentOnArrayElement15.js.diff | 8 + .../compiler/commentOnArrayElement16.js.diff | 11 + .../compiler/commentOnArrayElement2.js.diff | 11 + .../compiler/commentOnArrayElement3.js.diff | 11 + .../commentOnArrayElement3.types.diff | 10 + .../compiler/commentOnArrayElement4.js.diff | 11 + .../compiler/commentOnArrayElement5.js.diff | 11 + .../compiler/commentOnArrayElement6.js.diff | 8 + .../compiler/commentOnArrayElement7.js.diff | 8 + .../compiler/commentOnArrayElement8.js.diff | 10 + .../compiler/commentOnArrayElement9.js.diff | 10 + .../compiler/commentOnClassAccessor1.js.diff | 25 + .../compiler/commentOnClassAccessor2.js.diff | 33 + .../compiler/commentOnClassMethod1.js.diff | 20 + ...commentOnDecoratedClassDeclaration.js.diff | 17 +- .../compiler/commentOnElidedModule1.js | 6 +- .../compiler/commentOnElidedModule1.symbols | 6 +- .../compiler/commentOnElidedModule1.types | 6 +- .../compiler/commentOnSignature1.js.diff | 17 +- .../commentOnSimpleArrowFunctionBody1.js.diff | 13 + .../compiler/commentOnStaticMember1.js.diff | 18 + ...WithUnreasonableIndentationLevel01.js.diff | 10 +- .../commentsAfterFunctionExpression1.js.diff | 13 + ...commentsArgumentsOfCallExpression1.js.diff | 19 + ...commentsArgumentsOfCallExpression2.js.diff | 16 + .../commentsBeforeFunctionExpression1.js.diff | 2 +- .../submodule/compiler/commentsClass.js.diff | 95 +- .../compiler/commentsClassMembers.js.diff | 458 +- .../compiler/commentsCommentParsing.js.diff | 16 + .../compiler/commentsExternalModules3.js | 8 +- .../compiler/commentsExternalModules3.js.diff | 38 +- .../compiler/commentsExternalModules3.symbols | 32 +- .../compiler/commentsExternalModules3.types | 8 +- .../submodule/compiler/commentsFormatting.js | 2 +- .../compiler/commentsFormatting.js.diff | 55 +- .../compiler/commentsFormatting.symbols | 4 +- .../compiler/commentsFormatting.types | 2 +- .../compiler/commentsFunction.js.diff | 26 +- .../compiler/commentsInheritance.js.diff | 216 +- .../compiler/commentsInterface.js.diff | 2 +- .../submodule/compiler/commentsModules.js | 24 +- .../compiler/commentsModules.js.diff | 127 +- .../compiler/commentsModules.symbols | 146 +- .../submodule/compiler/commentsModules.types | 24 +- .../compiler/commentsMultiModuleSingleFile.js | 4 +- .../commentsMultiModuleSingleFile.js.diff | 46 + .../commentsMultiModuleSingleFile.symbols | 16 +- .../commentsMultiModuleSingleFile.types | 4 +- ...ule=commonjs,moduledetection=auto).js.diff | 20 +- ...le=commonjs,moduledetection=force).js.diff | 20 +- ...e=commonjs,moduledetection=legacy).js.diff | 20 +- ...ule=commonjs,moduledetection=auto).js.diff | 18 + ...le=commonjs,moduledetection=force).js.diff | 18 + ...e=commonjs,moduledetection=legacy).js.diff | 18 + ...ule=commonjs,moduledetection=auto).js.diff | 14 +- ...le=commonjs,moduledetection=force).js.diff | 14 +- ...e=commonjs,moduledetection=legacy).js.diff | 18 +- ...ule=commonjs,moduledetection=auto).js.diff | 17 +- ...le=commonjs,moduledetection=force).js.diff | 17 +- ...e=commonjs,moduledetection=legacy).js.diff | 22 +- .../compiler/commentsOnObjectLiteral3.js.diff | 11 + .../compiler/commentsOnObjectLiteral5.js.diff | 11 + ...commentsOnPropertyOfObjectLiteral1.js.diff | 16 +- .../commentsOnReturnStatement1.js.diff | 21 + .../compiler/commentsOnStaticMembers.js.diff | 6 +- .../compiler/commentsOverloads.js.diff | 91 + .../compiler/commentsTypeParameters.js.diff | 32 + .../compiler/commentsVarDecl.js.diff | 11 + .../compiler/commentsdoNotEmitComments.js | 4 +- .../commentsdoNotEmitComments.js.diff | 59 +- .../commentsdoNotEmitComments.symbols | 6 +- .../compiler/commentsdoNotEmitComments.types | 4 +- .../compiler/commentsemitComments.js | 4 +- .../compiler/commentsemitComments.js.diff | 68 +- .../compiler/commentsemitComments.symbols | 6 +- .../compiler/commentsemitComments.types | 4 +- .../commonJsImportClassExpression.js.diff | 15 +- ...bilityTypeParametersRelatedByUnion.js.diff | 26 +- ...ndexedAccessTerminatesWithoutError.js.diff | 8 + .../complexClassRelationships.js.diff | 134 +- .../compiler/complexNarrowingWithAny.js.diff | 121 +- .../complexNarrowingWithAny.symbols.diff | 11 + .../complexRecursiveCollections.errors.txt | 32 +- .../compiler/complexRecursiveCollections.js | 32 +- .../complexRecursiveCollections.symbols | 238 +- .../complexRecursiveCollections.types | 32 +- .../complexRecursiveCollections.types.diff | 70 +- ...GenericRecursiveBaseClassReference.js.diff | 31 + ...liesOnKeyofNeverUpperBound.errors.txt.diff | 107 + ...sKeyofReliesOnKeyofNeverUpperBound.js.diff | 19 + ...yofReliesOnKeyofNeverUpperBound.types.diff | 11 +- ...exesOfIntersectionsAreInferencable.js.diff | 8 +- ...sOfIntersectionsAreInferencable.types.diff | 6 +- .../compiler/complicatedPrivacy.errors.txt | 18 +- .../submodule/compiler/complicatedPrivacy.js | 18 +- .../compiler/complicatedPrivacy.js.diff | 114 +- .../compiler/complicatedPrivacy.symbols | 42 +- .../compiler/complicatedPrivacy.types | 18 +- .../compositeContextualSignature.symbols.diff | 11 + .../submodule/compiler/compoundVarDecl1.js | 2 +- .../compiler/compoundVarDecl1.symbols | 10 +- .../submodule/compiler/compoundVarDecl1.types | 2 +- .../compiler/computedEnumTypeWidening.js.diff | 104 +- ...computedPropertiesInDestructuring1.js.diff | 62 + ...computedPropertiesInDestructuring2.js.diff | 10 + ...TransformedInOtherwiseNonTSClasses.js.diff | 14 +- ...omputedPropertyNameWithImportedKey.js.diff | 6 +- ...dTypesKeyofNoIndexSignatureType.types.diff | 8 + ...PropertiesInES5ShouldBeTransformed.js.diff | 11 + .../compiler/concatClassAndString.js.diff | 14 + .../submodule/compiler/concatTuples.js.diff | 9 + .../compiler/concatTuples.types.diff | 14 + ...ionalAnyCheckTypePicksBothBranches.js.diff | 14 + ...sntLeakUninstantiatedTypeParameter.js.diff | 10 + ...onditionalEqualityOnLiteralObjects.js.diff | 13 + ...nalEqualityTestingNullability.symbols.diff | 17 + .../conditionalExpression1.errors.txt.diff | 14 + .../conditionalExpressions2.types.diff | 11 + ...ionalTypeAssignabilityWhenDeferred.js.diff | 54 +- ...TypeAssignabilityWhenDeferred.symbols.diff | 10 + ...edContextualTypeReturnTypeWidening.js.diff | 14 + ...ontextualTypeReturnTypeWidening.types.diff | 12 +- ...ntextualTypeSimplificationsSuceeds.js.diff | 8 +- ...RegularTypeFetchingSpeedReasonable.js.diff | 10 + ...ypeRelaxingConstraintAssignability.js.diff | 17 +- ...onditionalTypesSimplifyWhenTrivial.js.diff | 39 +- ...verloadsCausedByOverloadResolution.js.diff | 16 + .../compiler/configFileExtendsAsList.js.diff | 9 + .../conflictMarkerDiff3Trivia1.js.diff | 12 +- .../conflictMarkerDiff3Trivia2.js.diff | 20 + .../compiler/conflictMarkerTrivia1.js.diff | 12 +- .../compiler/conflictMarkerTrivia2.js.diff | 20 + .../compiler/conflictMarkerTrivia3.js.diff | 8 + .../compiler/conflictMarkerTrivia4.js.diff | 8 + ...ngDeclarationsImportFromNamespace1.js.diff | 3 +- ...larationsImportFromNamespace1.symbols.diff | 11 + ...ngDeclarationsImportFromNamespace2.js.diff | 3 +- ...larationsImportFromNamespace2.symbols.diff | 11 + ...lictingTypeParameterSymbolTransfer.js.diff | 99 +- ...clarationShadowedByVarDeclaration3.js.diff | 17 +- ...tionShadowedByVarDeclaration3.symbols.diff | 13 + .../constDeclarations-access3.errors.txt | 2 +- .../compiler/constDeclarations-access3.js | 2 +- .../constDeclarations-access3.symbols | 2 +- .../compiler/constDeclarations-access3.types | 2 +- .../constDeclarations-access4.errors.txt | 2 +- .../compiler/constDeclarations-access4.js | 2 +- .../constDeclarations-access4.symbols | 2 +- .../compiler/constDeclarations-access4.types | 2 +- ...onstDeclarations-ambient-errors.errors.txt | 2 +- .../constDeclarations-ambient-errors.js | 2 +- .../constDeclarations-ambient-errors.symbols | 2 +- .../constDeclarations-ambient-errors.types | 2 +- .../compiler/constDeclarations-ambient.js | 2 +- .../constDeclarations-ambient.symbols | 2 +- .../compiler/constDeclarations-ambient.types | 2 +- .../compiler/constDeclarations-es5.js.diff | 12 + .../constDeclarations-scopes.errors.txt | 2 +- .../compiler/constDeclarations-scopes.js | 2 +- .../compiler/constDeclarations-scopes.symbols | 2 +- .../compiler/constDeclarations-scopes.types | 2 +- ...constDeclarations-validContexts.errors.txt | 2 +- .../constDeclarations-validContexts.js | 2 +- .../constDeclarations-validContexts.symbols | 2 +- .../constDeclarations-validContexts.types | 2 +- .../submodule/compiler/constDeclarations2.js | 2 +- .../compiler/constDeclarations2.symbols | 2 +- .../compiler/constDeclarations2.types | 2 +- .../compiler/constEnumErrors.errors.txt | 6 +- .../submodule/compiler/constEnumErrors.js | 2 +- .../compiler/constEnumErrors.js.diff | 11 + .../compiler/constEnumErrors.symbols | 2 +- .../submodule/compiler/constEnumErrors.types | 2 +- ...stEnumNamespaceReferenceCausesNoImport2.js | 2 +- ...mNamespaceReferenceCausesNoImport2.js.diff | 11 +- .../compiler/constEnumOnlyModuleMerging.js | 6 +- .../constEnumOnlyModuleMerging.symbols | 18 +- .../compiler/constEnumOnlyModuleMerging.types | 6 +- .../constEnumToStringNoComments.js.diff | 30 + .../constEnumToStringWithComments.js.diff | 30 + .../submodule/compiler/constEnums.js | 26 +- .../submodule/compiler/constEnums.js.diff | 13 +- .../submodule/compiler/constEnums.symbols | 180 +- .../submodule/compiler/constEnums.types | 26 +- .../submodule/compiler/constEnums.types.diff | 2 +- .../compiler/constInClassExpression.js.diff | 12 +- .../compiler/constIndexedAccess.js.diff | 29 + .../constantEnumAssert.errors.txt.diff | 15 + .../compiler/constantEnumAssert.js.diff | 35 + .../compiler/constantOverloadFunction.js.diff | 66 + ...tantOverloadFunctionNoSubtypeError.js.diff | 66 + ...intCheckInGenericBaseTypeReference.js.diff | 71 +- ...ntsThatReferenceOtherContstraints1.js.diff | 23 +- ...constraintsUsedInPrototypeProperty.js.diff | 14 + .../constructorArgWithGenericCallSignature.js | 2 +- ...tructorArgWithGenericCallSignature.js.diff | 17 + ...tructorArgWithGenericCallSignature.symbols | 10 +- ...nstructorArgWithGenericCallSignature.types | 2 +- .../compiler/constructorArgs.js.diff | 50 +- .../compiler/constructorArgsErrors1.js.diff | 14 + .../compiler/constructorArgsErrors2.js.diff | 14 +- .../compiler/constructorArgsErrors3.js.diff | 14 +- .../compiler/constructorArgsErrors4.js.diff | 14 +- .../compiler/constructorArgsErrors5.js.diff | 14 + ...ructorInvocationWithTooFewTypeArgs.js.diff | 12 +- .../compiler/constructorOverloads1.js.diff | 24 + .../compiler/constructorOverloads2.js.diff | 49 + .../compiler/constructorOverloads3.js.diff | 37 + .../compiler/constructorOverloads4.errors.txt | 2 +- .../compiler/constructorOverloads4.js | 2 +- .../compiler/constructorOverloads4.symbols | 18 +- .../compiler/constructorOverloads4.types | 2 +- .../compiler/constructorOverloads5.js | 2 +- .../compiler/constructorOverloads5.symbols | 12 +- .../constructorOverloads5.symbols.diff | 11 + .../compiler/constructorOverloads5.types | 2 +- .../compiler/constructorOverloads8.js.diff | 23 + ...orParametersInVariableDeclarations.js.diff | 33 +- ...xternalNamesInVariableDeclarations.js.diff | 27 +- .../constructorReturningAPrimitive.js.diff | 27 + .../constructorReturnsInvalidType.js.diff | 18 + .../constructorStaticParamName.js.diff | 14 + .../constructorStaticParamNameErrors.js.diff | 14 + .../constructorWithCapturedSuper.js.diff | 112 + ...torWithIncompleteTypeAnnotation.errors.txt | 2 +- ...constructorWithIncompleteTypeAnnotation.js | 2 +- ...ructorWithIncompleteTypeAnnotation.js.diff | 201 +- ...ructorWithIncompleteTypeAnnotation.symbols | 8 +- ...structorWithIncompleteTypeAnnotation.types | 2 +- ...onstructorWithSuperAndPrologue.es5.js.diff | 46 +- ...structorsWithSpecializedSignatures.js.diff | 23 + ...ontextSensitiveReturnTypeInference.js.diff | 44 +- ...ressionTypecheckingDoesntBlowStack.js.diff | 36 + ...sionTypecheckingDoesntBlowStack.types.diff | 17 + ...xtualOverloadListFromArrayUnion.types.diff | 21 +- ...textualPropertyOfGenericMappedType.js.diff | 3 +- .../contextualReturnTypeOfIIFE.js.diff | 47 +- .../contextualReturnTypeOfIIFE.types.diff | 16 + .../contextualReturnTypeOfIIFE2.js.diff | 12 + .../contextualReturnTypeOfIIFE3.js.diff | 10 + ...ignatureInArrayElementLibEs2015.types.diff | 6 +- ...alSignatureInArrayElementLibEs5.types.diff | 6 +- .../contextualSignatureInstantiation1.js.diff | 12 + .../contextualSignatureInstantiation2.js.diff | 10 + .../contextualSignatureInstantiation4.js.diff | 13 +- ..._objectLiteralMethodMayReturnNever.js.diff | 8 + ...ntextualTupleTypeParameterReadonly.js.diff | 25 +- ...ualTupleTypeParameterReadonly.symbols.diff | 14 + .../contextualTypeAppliedToVarArgs.js.diff | 21 + .../contextualTypeArrayReturnType.js.diff | 11 + ...dOnIntersectionWithAnyInTheMix1.types.diff | 11 +- ...dOnIntersectionWithAnyInTheMix3.types.diff | 3 +- ...nIntersectionWithAnyInTheMix5.symbols.diff | 11 + .../compiler/contextualTypeCaching.types.diff | 11 + ...nitalizedVariablesFiltersUndefined.js.diff | 18 +- ...ctionObjectPropertyIntersection.types.diff | 14 +- .../contextualTypeIterableUnions.types.diff | 10 + .../compiler/contextualTypeLogicalOr.js.diff | 11 + ...ntextualTypeObjectSpreadExpression.js.diff | 9 + ...extualTypeOfIndexedAccessParameter.js.diff | 7 +- .../contextualTypeShouldBeLiteral.js.diff | 44 +- .../contextualTypeShouldBeLiteral.types.diff | 32 + .../compiler/contextualTyping.errors.txt | 4 +- .../submodule/compiler/contextualTyping.js | 4 +- .../compiler/contextualTyping.js.diff | 47 +- .../compiler/contextualTyping.js.map | 4 +- .../compiler/contextualTyping.js.map.diff | 8 +- .../compiler/contextualTyping.sourcemap.txt | 40 +- .../contextualTyping.sourcemap.txt.diff | 2128 +++-- .../compiler/contextualTyping.symbols | 4 +- .../submodule/compiler/contextualTyping.types | 4 +- .../compiler/contextualTyping10.js.diff | 12 +- .../compiler/contextualTyping11.js.diff | 12 +- .../compiler/contextualTyping12.js.diff | 12 +- .../compiler/contextualTyping14.js.diff | 12 +- .../compiler/contextualTyping15.js.diff | 12 +- .../compiler/contextualTyping3.js.diff | 12 +- .../compiler/contextualTyping4.js.diff | 12 +- .../compiler/contextualTyping5.js.diff | 12 +- ...pingArrayDestructuringWithDefaults.js.diff | 18 + .../contextualTypingArrayOfLambdas.js.diff | 52 +- ...ualTypingFunctionReturningFunction.js.diff | 11 + ...alTypingFunctionReturningFunction2.js.diff | 8 + .../contextualTypingOfAccessors.js.diff | 11 + ...textualTypingOfArrayLiterals1.symbols.diff | 18 + ...xtualTypingOfConditionalExpression.js.diff | 56 +- ...tualTypingOfConditionalExpression2.js.diff | 52 +- ...ngOfGenericFunctionTypedArguments1.js.diff | 11 + ...enericFunctionTypedArguments1.symbols.diff | 11 + ...tualTypingOfLambdaReturnExpression.js.diff | 10 + ...pingOfLambdaWithMultipleSignatures.js.diff | 8 + ...ingOfLambdaWithMultipleSignatures2.js.diff | 8 + .../contextualTypingOfObjectLiterals2.js.diff | 8 + .../contextualTypingOfOptionalMembers.js.diff | 38 + ...ontextualTypingOfTooShortOverloads.js.diff | 13 + ...atementWithReturnTypeAnnotation.types.diff | 17 +- ...ingTwoInstancesOfSameTypeParameter.js.diff | 8 + ...tualTypingWithFixedTypeParameters1.js.diff | 10 + ...gWithGenericAndNonGenericSignature.js.diff | 11 + ...ntextualTypingWithGenericSignature.js.diff | 8 + .../contextuallyTypedBooleanLiterals.js.diff | 16 +- ...textuallyTypedByDiscriminableUnion.js.diff | 21 + ...contextuallyTypedGenericAssignment.js.diff | 8 + .../contextuallyTypedJsxAttribute.js.diff | 15 + ...lyTypedParametersWithInitializers1.js.diff | 192 + ...edParametersWithInitializers1.symbols.diff | 47 + .../contextuallyTypingOrOperator.js.diff | 14 + .../contextuallyTypingOrOperator2.js.diff | 10 + .../contextuallyTypingRestParameters.js.diff | 15 + ...psWithCapturedBlockScopedBindings1.js.diff | 23 + .../continueNotInIterationStatement4.js.diff | 11 + ...contravariantInferenceAndTypeGuard.js.diff | 15 +- .../controlFlowAliasedDiscriminants.js.diff | 105 +- ...controlFlowAliasedDiscriminants.types.diff | 83 +- ...ntrolFlowAnalysisOnBareThisKeyword.js.diff | 10 +- ...olFlowAnalysisOnBareThisKeyword.types.diff | 10 + .../compiler/controlFlowArrayErrors.js.diff | 67 + .../compiler/controlFlowArrays.js.diff | 155 + .../controlFlowBreakContinueWithLabel.js.diff | 9 +- .../compiler/controlFlowCaching.js.diff | 9 + .../compiler/controlFlowCaching.symbols.diff | 45 + .../compiler/controlFlowCaching.types.diff | 11 + ...maExpressionAssertionWithinTernary.js.diff | 7 +- ...rolFlowCommaExpressionFunctionCall.js.diff | 18 + .../controlFlowDestructuringLoop.js.diff | 17 +- .../controlFlowDestructuringLoop.types.diff | 11 +- ...controlFlowDestructuringParameters.js.diff | 11 + ...owDestructuringVariablesInTryCatch.js.diff | 15 +- ...ntrolFlowFinallyNoCatchAssignments.js.diff | 9 +- ...FlowFinallyNoCatchAssignments.symbols.diff | 11 + .../controlFlowForCatchAndFinally.js.diff | 121 +- ...wForCompoundAssignmentToThisMember.js.diff | 19 +- .../controlFlowForIndexSignatures.js.diff | 27 + .../controlFlowForIndexSignatures.types.diff | 10 +- ...wInitializedDestructuringVariables.js.diff | 3 +- .../compiler/controlFlowLoopAnalysis.js.diff | 37 + ...owManyCallExpressionStatementsPerf.js.diff | 7 +- ...ManyConsecutiveConditionsNoTimeout.js.diff | 13 + .../compiler/controlFlowNoImplicitAny.js.diff | 127 + .../controlFlowNullTypeAndLiteral.js.diff | 19 +- .../compiler/controlFlowOuterVariable.js.diff | 17 + .../controlFlowPropertyDeclarations.js.diff | 37 +- ...ntrolFlowPropertyDeclarations.symbols.diff | 27 + ...controlFlowPropertyDeclarations.types.diff | 25 +- .../controlFlowPropertyInitializer.js.diff | 16 +- .../controlFlowSelfReferentialLoop.js.diff | 18 +- ...ontrolFlowSelfReferentialLoop.symbols.diff | 11 + ...UnionContainingTypeParameter1.symbols.diff | 11 + .../controlFlowWithIncompleteTypes.js.diff | 16 +- .../controlFlowWithIncompleteTypes.types.diff | 19 + ...ssionToFunctionFromObjectProperty1.js.diff | 634 ++ ...ssionToFunctionFromObjectProperty2.js.diff | 632 ++ .../compiler/convertKeywordsYes.errors.txt | 2 +- .../submodule/compiler/convertKeywordsYes.js | 2 +- .../compiler/convertKeywordsYes.js.diff | 118 +- .../compiler/convertKeywordsYes.symbols | 4 +- .../compiler/convertKeywordsYes.types | 2 +- .../correctOrderOfPromiseMethod.js.diff | 74 +- .../compiler/correlatedUnions.js.diff | 160 +- .../compiler/correlatedUnions.symbols.diff | 10 + .../compiler/correlatedUnions.types.diff | 10 +- .../submodule/compiler/covariance1.js | 2 +- .../submodule/compiler/covariance1.js.diff | 17 +- .../submodule/compiler/covariance1.symbols | 10 +- .../submodule/compiler/covariance1.types | 2 +- .../crashInEmitTokenWithComment.js.diff | 15 + ...ashInGetTextOfComputedPropertyName.js.diff | 24 + ...InGetTextOfComputedPropertyName.types.diff | 29 + .../compiler/crashInResolveInterface.js.diff | 10 + .../crashInresolveReturnStatement.js.diff | 43 + ...ropertyIsRelatableToTargetProperty.js.diff | 39 +- .../compiler/crashOnMethodSignatures.js.diff | 13 + .../compiler/crashRegressionTest.errors.txt | 2 +- .../submodule/compiler/crashRegressionTest.js | 2 +- .../compiler/crashRegressionTest.js.diff | 30 +- .../compiler/crashRegressionTest.symbols | 6 +- .../compiler/crashRegressionTest.types | 2 +- .../submodule/compiler/createArray.js.diff | 16 + .../compiler/ctsFileInEsnextHelpers.js.diff | 11 +- .../dataViewConstructor.errors.txt.diff | 22 + .../compiler/dataViewConstructor.symbols.diff | 10 + .../compiler/declFileAccessors.js.diff | 262 + .../declFileAliasUseBeforeDeclaration.js.diff | 16 + .../declFileAliasUseBeforeDeclaration2.js | 2 +- ...declFileAliasUseBeforeDeclaration2.symbols | 6 +- .../declFileAliasUseBeforeDeclaration2.types | 2 +- ...tExternalModuleWithSingleExportedModule.js | 4 +- ...rnalModuleWithSingleExportedModule.symbols | 12 +- ...ternalModuleWithSingleExportedModule.types | 4 +- .../compiler/declFileClassExtendsNull.js.diff | 32 + .../declFileClassWithIndexSignature.js.diff | 16 + ...thStaticMethodReturningConstructor.js.diff | 20 + .../compiler/declFileConstructors.js.diff | 204 +- .../compiler/declFileEnums.symbols.diff | 11 + ...ileExportAssignmentImportInternalModule.js | 4 +- ...portAssignmentImportInternalModule.symbols | 20 +- ...ExportAssignmentImportInternalModule.types | 4 +- ...ileForClassWithMultipleBaseClasses.js.diff | 42 + ...ClassWithPrivateOverloadedFunction.js.diff | 18 + ...FileForFunctionTypeAsTypeParameter.js.diff | 40 + .../declFileForTypeParameters.js.diff | 20 +- .../compiler/declFileFunctions.js.diff | 54 + ...nericClassWithGenericExtendedClass.js.diff | 49 +- .../submodule/compiler/declFileGenericType.js | 2 +- .../compiler/declFileGenericType.js.diff | 74 +- .../compiler/declFileGenericType.symbols | 36 +- .../compiler/declFileGenericType.symbols.diff | 11 + .../compiler/declFileGenericType.types | 2 +- .../compiler/declFileGenericType2.js | 14 +- .../compiler/declFileGenericType2.js.diff | 58 +- .../compiler/declFileGenericType2.symbols | 138 +- .../compiler/declFileGenericType2.types | 14 +- .../declFileImportChainInExportAssignment.js | 4 +- ...lFileImportChainInExportAssignment.js.diff | 15 +- ...lFileImportChainInExportAssignment.symbols | 10 +- ...eclFileImportChainInExportAssignment.types | 4 +- ...leImportChainInExportAssignment.types.diff | 2 +- ...eclFileImportModuleWithExportAssignment.js | 2 +- ...leImportModuleWithExportAssignment.symbols | 10 +- ...FileImportModuleWithExportAssignment.types | 2 +- ...leImportedTypeUseInTypeArgPosition.js.diff | 16 + .../compiler/declFileInternalAliases.js | 6 +- .../compiler/declFileInternalAliases.js.diff | 16 + .../compiler/declFileInternalAliases.symbols | 20 +- .../compiler/declFileInternalAliases.types | 6 +- .../compiler/declFileMethods.js.diff | 241 + ...ModuleAssignmentInObjectLiteralProperty.js | 2 +- ...eAssignmentInObjectLiteralProperty.js.diff | 16 + ...eAssignmentInObjectLiteralProperty.symbols | 8 +- ...uleAssignmentInObjectLiteralProperty.types | 2 +- .../compiler/declFileModuleContinuation.js | 4 +- .../declFileModuleContinuation.js.diff | 12 +- .../declFileModuleContinuation.symbols | 22 +- .../compiler/declFileModuleContinuation.types | 4 +- .../declFileModuleWithPropertyOfTypeModule.js | 2 +- ...FileModuleWithPropertyOfTypeModule.js.diff | 16 + ...FileModuleWithPropertyOfTypeModule.symbols | 4 +- ...clFileModuleWithPropertyOfTypeModule.types | 2 +- .../declFilePrivateMethodOverloads.js.diff | 28 + ...eclFilePrivateMethodOverloads.symbols.diff | 20 + .../compiler/declFilePrivateStatic.js.diff | 34 +- .../compiler/declFileRegressionTests.js.diff | 11 + ...arametersOfFunctionAndFunctionType.js.diff | 22 + .../declFileTypeAnnotationArrayType.js | 2 +- .../declFileTypeAnnotationArrayType.js.diff | 54 + .../declFileTypeAnnotationArrayType.symbols | 14 +- .../declFileTypeAnnotationArrayType.types | 2 +- .../declFileTypeAnnotationParenType.js.diff | 25 +- .../declFileTypeAnnotationTupleType.js | 2 +- .../declFileTypeAnnotationTupleType.js.diff | 46 + .../declFileTypeAnnotationTupleType.symbols | 10 +- .../declFileTypeAnnotationTupleType.types | 2 +- .../declFileTypeAnnotationTypeAlias.js | 8 +- .../declFileTypeAnnotationTypeAlias.js.diff | 41 + .../declFileTypeAnnotationTypeAlias.symbols | 22 +- .../declFileTypeAnnotationTypeAlias.types | 8 +- .../declFileTypeAnnotationTypeLiteral.js | 2 +- .../declFileTypeAnnotationTypeLiteral.js.diff | 32 + .../declFileTypeAnnotationTypeLiteral.symbols | 8 +- .../declFileTypeAnnotationTypeLiteral.types | 2 +- .../declFileTypeAnnotationTypeQuery.js | 2 +- .../declFileTypeAnnotationTypeQuery.js.diff | 42 + .../declFileTypeAnnotationTypeQuery.symbols | 16 +- .../declFileTypeAnnotationTypeQuery.types | 2 +- .../declFileTypeAnnotationTypeReference.js | 2 +- ...eclFileTypeAnnotationTypeReference.js.diff | 42 + ...eclFileTypeAnnotationTypeReference.symbols | 14 +- .../declFileTypeAnnotationTypeReference.types | 2 +- .../declFileTypeAnnotationUnionType.js | 2 +- .../declFileTypeAnnotationUnionType.js.diff | 71 +- .../declFileTypeAnnotationUnionType.symbols | 14 +- .../declFileTypeAnnotationUnionType.types | 2 +- ...declFileTypeAnnotationUnionType.types.diff | 29 + ...eTypeAnnotationVisibilityErrorAccessors.js | 4 +- ...AnnotationVisibilityErrorAccessors.js.diff | 240 + ...AnnotationVisibilityErrorAccessors.symbols | 40 +- ...peAnnotationVisibilityErrorAccessors.types | 4 +- ...ationVisibilityErrorParameterOfFunction.js | 4 +- ...VisibilityErrorParameterOfFunction.js.diff | 77 + ...VisibilityErrorParameterOfFunction.symbols | 28 +- ...onVisibilityErrorParameterOfFunction.types | 4 +- ...tionVisibilityErrorReturnTypeOfFunction.js | 4 +- ...isibilityErrorReturnTypeOfFunction.js.diff | 40 + ...isibilityErrorReturnTypeOfFunction.symbols | 28 +- ...nVisibilityErrorReturnTypeOfFunction.types | 4 +- ...eTypeAnnotationVisibilityErrorTypeAlias.js | 12 +- ...AnnotationVisibilityErrorTypeAlias.js.diff | 63 + ...AnnotationVisibilityErrorTypeAlias.symbols | 36 +- ...peAnnotationVisibilityErrorTypeAlias.types | 12 +- ...ypeAnnotationVisibilityErrorTypeLiteral.js | 4 +- ...notationVisibilityErrorTypeLiteral.js.diff | 33 + ...notationVisibilityErrorTypeLiteral.symbols | 36 +- ...AnnotationVisibilityErrorTypeLiteral.types | 4 +- ...ationVisibilityErrorVariableDeclaration.js | 4 +- ...VisibilityErrorVariableDeclaration.js.diff | 40 + ...VisibilityErrorVariableDeclaration.symbols | 28 +- ...onVisibilityErrorVariableDeclaration.types | 4 +- .../compiler/declFileTypeofClass.js.diff | 24 +- .../compiler/declFileTypeofFunction.js.diff | 11 +- .../compiler/declFileTypeofInAnonymousType.js | 2 +- .../declFileTypeofInAnonymousType.js.diff | 19 + .../declFileTypeofInAnonymousType.symbols | 14 +- .../declFileTypeofInAnonymousType.types | 2 +- .../compiler/declFileTypeofModule.js | 4 +- .../compiler/declFileTypeofModule.symbols | 4 +- .../compiler/declFileTypeofModule.types | 4 +- ...lictingWithClassReferredByExtendsClause.js | 6 +- ...ngWithClassReferredByExtendsClause.js.diff | 44 +- ...ngWithClassReferredByExtendsClause.symbols | 50 +- ...tingWithClassReferredByExtendsClause.types | 6 +- ...ithErrorsInInputDeclarationFile.errors.txt | 4 +- ...eclFileWithErrorsInInputDeclarationFile.js | 4 +- ...leWithErrorsInInputDeclarationFile.symbols | 10 +- ...FileWithErrorsInInputDeclarationFile.types | 4 +- ...rsInInputDeclarationFileWithOut.errors.txt | 4 +- ...rrorsInInputDeclarationFileWithOut.symbols | 10 +- ...hErrorsInInputDeclarationFileWithOut.types | 4 +- ...dsClauseThatHasItsContainerNameConflict.js | 6 +- ...useThatHasItsContainerNameConflict.js.diff | 41 +- ...useThatHasItsContainerNameConflict.symbols | 24 +- ...lauseThatHasItsContainerNameConflict.types | 6 +- ...rnalModuleNameConflictsInExtendsClause1.js | 6 +- ...oduleNameConflictsInExtendsClause1.js.diff | 12 +- ...oduleNameConflictsInExtendsClause1.symbols | 32 +- ...lModuleNameConflictsInExtendsClause1.types | 6 +- ...rnalModuleNameConflictsInExtendsClause2.js | 8 +- ...oduleNameConflictsInExtendsClause2.js.diff | 12 +- ...oduleNameConflictsInExtendsClause2.symbols | 40 +- ...lModuleNameConflictsInExtendsClause2.types | 8 +- ...rnalModuleNameConflictsInExtendsClause3.js | 8 +- ...oduleNameConflictsInExtendsClause3.js.diff | 12 +- ...oduleNameConflictsInExtendsClause3.symbols | 42 +- ...lModuleNameConflictsInExtendsClause3.types | 8 +- .../submodule/compiler/declInput-2.js | 2 +- .../submodule/compiler/declInput-2.js.diff | 45 +- .../submodule/compiler/declInput-2.symbols | 12 +- .../submodule/compiler/declInput-2.types | 2 +- .../submodule/compiler/declInput.js.diff | 27 + .../submodule/compiler/declInput3.js.diff | 27 + .../submodule/compiler/declInput4.js | 2 +- .../submodule/compiler/declInput4.js.diff | 39 +- .../submodule/compiler/declInput4.symbols | 4 +- .../submodule/compiler/declInput4.types | 2 +- .../declarationEmitAliasExportStar.js.diff | 10 + ...clarationEmitAliasFromIndirectFile.js.diff | 10 + .../declarationEmitAliasInlineing.js.diff | 18 +- ...tionEmitAnyComputedPropertyInClass.js.diff | 15 +- ...rayTypesFromGenericArrayUsage.symbols.diff | 8 + ...arationEmitArrowFunctionNoRenaming.js.diff | 10 +- ...EmitBindingPatternWithReservedWord.js.diff | 12 + .../declarationEmitBindingPatterns.js.diff | 18 + .../declarationEmitClassInherritsAny.js.diff | 41 + ...arationEmitClassMemberNameConflict.js.diff | 80 +- ...rationEmitClassMemberNameConflict2.js.diff | 23 +- ...mitClassMixinLocalClassDeclaration.js.diff | 59 +- ...arationEmitClassPrivateConstructor.js.diff | 50 +- ...rationEmitClassPrivateConstructor2.js.diff | 25 +- ...omputedNameCausesImportToBePainted.js.diff | 20 +- ...tionEmitComputedNameConstEnumAlias.js.diff | 16 +- ...nEmitComputedNameWithQuestionToken.js.diff | 22 + ...ationEmitComputedNamesInaccessible.js.diff | 41 + ...EmitComputedNamesInaccessible.symbols.diff | 20 + .../declarationEmitConstantNoWidening.js.diff | 14 +- ...tDefaultExportWithStaticAssignment.js.diff | 32 +- .../declarationEmitDestructuring1.js.diff | 25 + .../declarationEmitDestructuring2.js.diff | 25 + .../declarationEmitDestructuring3.js.diff | 17 + .../declarationEmitDestructuring4.js.diff | 25 + .../declarationEmitDestructuring5.js.diff | 25 +- .../declarationEmitDestructuring5.types.diff | 38 + ...tionEmitDestructuringArrayPattern1.js.diff | 22 + ...nEmitDestructuringArrayPattern1.types.diff | 11 + ...tionEmitDestructuringArrayPattern2.js.diff | 21 + ...clarationEmitDestructuringArrayPattern3.js | 2 +- ...tionEmitDestructuringArrayPattern3.symbols | 2 +- ...rationEmitDestructuringArrayPattern3.types | 2 +- ...tionEmitDestructuringArrayPattern4.js.diff | 25 + ...tionEmitDestructuringArrayPattern5.js.diff | 15 + ...nEmitDestructuringArrayPattern5.types.diff | 30 + ...structuringObjectLiteralPattern.errors.txt | 2 +- ...onEmitDestructuringObjectLiteralPattern.js | 2 +- ...tDestructuringObjectLiteralPattern.js.diff | 31 +- ...tDestructuringObjectLiteralPattern.symbols | 2 +- ...mitDestructuringObjectLiteralPattern.types | 2 +- ...DestructuringObjectLiteralPattern1.js.diff | 23 + ...nEmitDestructuringObjectLiteralPattern2.js | 2 +- ...DestructuringObjectLiteralPattern2.js.diff | 17 +- ...DestructuringObjectLiteralPattern2.symbols | 2 +- ...itDestructuringObjectLiteralPattern2.types | 2 +- ...tionalBindingParametersInOverloads.js.diff | 21 + ...itDestructuringParameterProperties.js.diff | 38 +- ...eclarationEmitDestructuringPrivacyError.js | 2 +- ...ationEmitDestructuringPrivacyError.js.diff | 9 +- ...ationEmitDestructuringPrivacyError.symbols | 6 +- ...arationEmitDestructuringPrivacyError.types | 2 +- ...uringWithOptionalBindingParameters.js.diff | 15 + .../declarationEmitDetachedComment1.js.diff | 40 + .../declarationEmitDetachedComment2.js.diff | 25 +- ...itDistributiveConditionalWithInfer.js.diff | 8 +- ...eclarationEmitEnumReadonlyProperty.js.diff | 19 +- ...onEmitEnumReferenceViaImportEquals.js.diff | 18 +- ...(exactoptionalpropertytypes=false).js.diff | 10 + ...d(exactoptionalpropertytypes=true).js.diff | 10 + ...onEmitExpandoWithGenericConstraint.js.diff | 17 +- ...nEmitExportAliasVisibiilityMarking.js.diff | 10 +- .../declarationEmitExportDeclaration.js.diff | 6 +- ...declarationEmitExpressionInExtends.js.diff | 41 +- ...eclarationEmitExpressionInExtends2.js.diff | 42 +- ...eclarationEmitExpressionInExtends3.js.diff | 85 +- ...eclarationEmitExpressionInExtends4.js.diff | 61 + ...eclarationEmitExpressionInExtends5.js.diff | 43 + ...eclarationEmitExpressionInExtends6.js.diff | 44 +- ...eclarationEmitExpressionInExtends7.js.diff | 33 + ...ltExportClassExtendingExpression01.js.diff | 46 + ...ingModuleAugmentationRetainsImport.js.diff | 19 +- ...mitGenericTypeParamerSerialization.js.diff | 11 + ...itGenericTypeParamerSerialization2.js.diff | 11 +- ...ationEmitHasTypesRefOnNamespaceUse.js.diff | 16 + ...EmitHigherOrderRetainedGenerics.types.diff | 6 +- ...ationEmitImportInExportAssignmentModule.js | 4 +- ...EmitImportInExportAssignmentModule.js.diff | 16 +- ...EmitImportInExportAssignmentModule.symbols | 10 +- ...onEmitImportInExportAssignmentModule.types | 4 +- ...tImportInExportAssignmentModule.types.diff | 2 +- .../declarationEmitIndexTypeArray.js.diff | 19 + .../declarationEmitInferredTypeAlias1.js.diff | 17 + ...clarationEmitInferredTypeAlias1.types.diff | 10 + .../declarationEmitInferredTypeAlias2.js.diff | 19 + ...clarationEmitInferredTypeAlias2.types.diff | 10 + .../declarationEmitInferredTypeAlias3.js.diff | 11 + .../declarationEmitInferredTypeAlias5.js.diff | 17 + ...clarationEmitInferredTypeAlias5.types.diff | 10 + .../declarationEmitInferredTypeAlias6.js.diff | 17 + ...clarationEmitInferredTypeAlias6.types.diff | 10 + .../declarationEmitInferredTypeAlias7.js.diff | 16 + ...clarationEmitInferredTypeAlias7.types.diff | 10 + ...edUndefinedPropFromFunctionInArray.js.diff | 14 +- ...ndefinedPropFromFunctionInArray.types.diff | 11 + ...EmitInlinedDistributiveConditional.js.diff | 16 +- ...ithNonEntityNameExpressionHeritage.js.diff | 16 + ...NonEntityNameExpressionHeritage.types.diff | 11 + ...onErrorNotEmittedForNonEmittedFile.js.diff | 3 +- ...eclarationEmitKeywordDestructuring.js.diff | 30 + ...tionEmitLocalClassDeclarationMixin.js.diff | 78 +- ...onEmitLocalClassHasRequiredDeclare.js.diff | 30 +- ...DistributivityPreservesConstraints.js.diff | 9 +- ...pePreservesTypeParameterConstraint.js.diff | 11 +- ...edTypePropertyFromNumericStringKey.js.diff | 8 +- ...clarationEmitMixinPrivateProtected.js.diff | 100 +- ...mitMultipleComputedNamesSameDomain.js.diff | 9 +- .../compiler/declarationEmitNameConflicts.js | 16 +- .../declarationEmitNameConflicts.js.diff | 62 +- .../declarationEmitNameConflicts.symbols | 46 +- .../declarationEmitNameConflicts.types | 16 +- .../declarationEmitNameConflicts.types.diff | 2 +- .../compiler/declarationEmitNameConflicts2.js | 6 +- .../declarationEmitNameConflicts2.js.diff | 18 +- .../declarationEmitNameConflicts2.symbols | 54 +- .../declarationEmitNameConflicts2.types | 6 +- .../compiler/declarationEmitNameConflicts3.js | 10 +- .../declarationEmitNameConflicts3.js.diff | 66 +- .../declarationEmitNameConflicts3.symbols | 44 +- .../declarationEmitNameConflicts3.types | 10 +- .../declarationEmitNameConflictsWithAlias.js | 6 +- ...larationEmitNameConflictsWithAlias.symbols | 18 +- ...eclarationEmitNameConflictsWithAlias.types | 6 +- ...ationEmitNameConflictsWithAlias.types.diff | 4 +- .../declarationEmitNestedGenerics.js.diff | 14 +- ...ationEmitNonExportedBindingPattern.js.diff | 18 + ...clarationEmitOfTypeofAliasedExport.js.diff | 13 +- .../declarationEmitOptionalMethod.js.diff | 10 +- ...tionEmitOverloadedPrivateInference.js.diff | 20 +- .../declarationEmitParameterProperty.js.diff | 16 +- ...mitPartialReuseComputedProperty.types.diff | 6 +- ...ationEmitPreserveReferencedImports.js.diff | 9 +- .../declarationEmitPrivateAsync.js.diff | 49 +- ...larationEmitPrivateNameCausesError.js.diff | 38 +- ...ionEmitPrivatePromiseLikeInterface.js.diff | 36 +- ...arationEmitPrivateReadonlyLiterals.js.diff | 12 +- ...ateSymbolCausesVarDeclarationEmit2.js.diff | 43 +- ...bolCausesVarDeclarationToBeEmitted.js.diff | 18 +- ...rationEmitPropertyNumericStringKey.js.diff | 24 + .../declarationEmitProtectedMembers.js.diff | 133 +- ...rationEmitReadonlyComputedProperty.js.diff | 16 +- ...RecursiveConditionalAliasPreserved.js.diff | 10 + ...nedAnnotationRetainsImportInOutput.js.diff | 4 +- ...clarationEmitRetainsJsdocyComments.js.diff | 37 +- .../declarationEmitScopeConsistency.js.diff | 9 +- .../declarationEmitScopeConsistency3.js.diff | 15 + .../compiler/declarationEmitShadowing.js.diff | 17 +- ...rationEmitShadowingInferNotRenamed.js.diff | 10 +- ...eclarationEmitSimpleComputedNames1.js.diff | 54 +- ...ationEmitSimpleComputedNames1.symbols.diff | 29 + ...EmitStringEnumUsedInNonlocalSpread.js.diff | 76 +- ...tStringEnumUsedInNonlocalSpread.types.diff | 15 + ...ationEmitTopLevelNodeFromCrossFile.js.diff | 10 +- ...tTupleRestSignatureLeadingVariadic.js.diff | 16 + ...onEmitTypeAliasWithTypeParameters1.js.diff | 10 + ...onEmitTypeAliasWithTypeParameters2.js.diff | 10 + ...nEmitTypeParameterNameInOuterScope.js.diff | 23 + ...TypeParameterNameReusedInOverloads.js.diff | 52 +- ...ypeParameterNameShadowedInternally.js.diff | 13 + ...declarationEmitTypeofDefaultExport.js.diff | 14 +- .../declarationEmitTypeofThisInClass.js.diff | 11 +- ...ngAlternativeContainingModules1.types.diff | 27 +- ...ngAlternativeContainingModules2.types.diff | 29 +- ...ationEmitWithDefaultAsComputedName.js.diff | 17 +- ...tionEmitWithDefaultAsComputedName2.js.diff | 17 +- ...nEmitWithInvalidPackageJsonTypings.js.diff | 16 + ...onFileNoCrashOnExtraExportModifier.js.diff | 12 +- .../declarationFileOverwriteError.js.diff | 13 + ...tionTypeNonlocalShouldNotBeAnError.js.diff | 10 + ...mportTypeAliasInferredAndEmittable.js.diff | 32 +- .../submodule/compiler/declarationMaps.js | 2 +- .../submodule/compiler/declarationMaps.js.map | 4 +- .../compiler/declarationMaps.js.map.diff | 8 +- .../compiler/declarationMaps.sourcemap.txt | 10 +- .../declarationMaps.sourcemap.txt.diff | 10 +- .../compiler/declarationMaps.symbols | 10 +- .../submodule/compiler/declarationMaps.types | 2 +- .../compiler/declarationMapsMultifile.js.diff | 31 +- ...clarationMapsWithoutDeclaration.errors.txt | 2 +- .../declarationMapsWithoutDeclaration.js | 2 +- .../declarationMapsWithoutDeclaration.symbols | 10 +- .../declarationMapsWithoutDeclaration.types | 2 +- .../compiler/declarationMerging1.js.diff | 15 +- .../declarationNoDanglingGenerics.js.diff | 76 +- ...tionsForFileShadowingGlobalNoError.js.diff | 39 +- ...tionsForIndirectTypeAliasReference.js.diff | 24 + ...ationsForInferredTypeFromOtherFile.js.diff | 16 +- ...onsIndirectGeneratedAliasReference.js.diff | 3 +- ...ternalTypesProduceUniqueTypeParams.js.diff | 50 +- .../compiler/declareAlreadySeen.errors.txt | 4 +- .../submodule/compiler/declareAlreadySeen.js | 4 +- .../compiler/declareAlreadySeen.symbols | 6 +- .../compiler/declareAlreadySeen.types | 4 +- .../compiler/declareDottedExtend.js.diff | 36 +- .../compiler/declareDottedModuleName.js | 10 +- .../compiler/declareDottedModuleName.symbols | 20 +- .../compiler/declareDottedModuleName.types | 10 +- ...ExternalModuleWithExportAssignedFundule.js | 2 +- ...nalModuleWithExportAssignedFundule.symbols | 8 +- ...duleWithExportAssignedFundule.symbols.diff | 14 + ...ernalModuleWithExportAssignedFundule.types | 2 +- .../compiler/declareFileExportAssignment.js | 2 +- .../declareFileExportAssignment.symbols | 10 +- .../declareFileExportAssignment.types | 2 +- ...tAssignmentWithVarFromVariableStatement.js | 2 +- ...gnmentWithVarFromVariableStatement.symbols | 10 +- ...signmentWithVarFromVariableStatement.types | 2 +- ...AsBeginningOfStatementExpression01.js.diff | 15 + .../decoratorMetadataConditionalType.js.diff | 12 +- ...MethodWithNoReturnTypeAnnotation01.js.diff | 12 +- ...coratorMetadataGenericTypeVariable.js.diff | 6 +- ...MetadataGenericTypeVariableDefault.js.diff | 6 +- ...MetadataGenericTypeVariableInScope.js.diff | 15 +- ...rMetadataNoLibIsolatedModulesTypes.js.diff | 8 +- .../decoratorMetadataNoStrictNull.js.diff | 9 +- .../decoratorMetadataOnInferredType.js.diff | 25 +- ...adataRestParameterWithImportedType.js.diff | 68 +- .../decoratorMetadataTypeOnlyExport.js.diff | 25 +- .../decoratorMetadataTypeOnlyImport.js.diff | 6 +- ...coratorMetadataWithConstructorType.js.diff | 25 +- ...WithImportDeclarationNameCollision.js.diff | 42 +- ...ithImportDeclarationNameCollision2.js.diff | 42 +- ...ithImportDeclarationNameCollision3.js.diff | 42 +- ...ithImportDeclarationNameCollision4.js.diff | 42 +- ...ithImportDeclarationNameCollision5.js.diff | 42 +- ...ithImportDeclarationNameCollision6.js.diff | 42 +- ...ithImportDeclarationNameCollision7.js.diff | 42 +- ...ithImportDeclarationNameCollision8.js.diff | 42 +- .../decoratorReferenceOnOtherProperty.js.diff | 59 +- .../compiler/decoratorReferences.js.diff | 12 +- .../decoratorUsedBeforeDeclaration.js.diff | 120 +- ...atorWithNegativeLiteralTypeNoCrash.js.diff | 10 +- .../decoratorWithUnderscoreMethod.js.diff | 16 +- .../compiler/deepComparisons.js.diff | 23 + ...tyCheckingWhenTargetIsIntersection.js.diff | 16 + .../compiler/deepKeysIndexing.js.diff | 24 + ...yNestedAssignabilityErrorsCombined.js.diff | 37 +- .../deeplyNestedAssignabilityIssue.js.diff | 11 + .../compiler/deeplyNestedCheck.js.diff | 14 +- .../deeplyNestedConditionalTypes.types.diff | 8 + .../compiler/deeplyNestedConstraints.js.diff | 18 +- .../deeplyNestedMappedTypes.types.diff | 31 +- ...efaultArgsInFunctionExpressions.errors.txt | 4 +- .../defaultArgsInFunctionExpressions.js | 4 +- .../defaultArgsInFunctionExpressions.js.diff | 52 + .../defaultArgsInFunctionExpressions.symbols | 8 +- .../defaultArgsInFunctionExpressions.types | 4 +- .../compiler/defaultArgsInOverloads.js.diff | 25 + ...efaultDeclarationEmitDefaultImport.js.diff | 14 +- ...faultDeclarationEmitNamedCorrectly.js.diff | 6 +- ...larationEmitShadowedNamedCorrectly.js.diff | 17 +- .../compiler/defaultIndexProps1.js.diff | 15 +- .../compiler/defaultIndexProps2.js.diff | 15 +- .../defaultKeywordWithoutExport1.js.diff | 8 +- .../defaultOfAnyInStrictNullChecks.js.diff | 10 + ...rAddsUndefinedWithStrictNullChecks.js.diff | 64 + .../defaultParameterTrailingComments.js.diff | 18 + ...aultPropsEmptyCurlyBecomesAnyForJs.js.diff | 69 +- ...defaultValueInConstructorOverload1.js.diff | 15 + .../defaultValueInFunctionOverload1.js.diff | 10 + .../deferredLookupTypeResolution.js.diff | 30 +- .../deferredLookupTypeResolution.types.diff | 24 + ...teAssignmentOfDestructuredVariable.js.diff | 22 +- .../deleteReadonlyInStrictNullChecks.js.diff | 14 + ...eteReadonlyInStrictNullChecks.symbols.diff | 20 + .../deprecatedCompilerOptions1.js.diff | 8 + .../deprecatedCompilerOptions3.js.diff | 8 + .../deprecatedCompilerOptions4.js.diff | 8 + .../deprecatedCompilerOptions5.js.diff | 8 + ...ssConstructorWithExplicitReturns01.js.diff | 69 +- ...nstructorWithExplicitReturns01.js.map.diff | 4 +- ...orWithExplicitReturns01.sourcemap.txt.diff | 786 +- ...structorWithExplicitReturns01.symbols.diff | 11 + ...ivedClassOverridesPrivateFunction1.js.diff | 51 + .../submodule/compiler/derivedClasses.js.diff | 69 + ...eCallingBaseImplWithOptionalParams.js.diff | 19 + .../destructionAssignmentError.js.diff | 23 + ...,useunknownincatchvariables=false).js.diff | 191 + ...e,useunknownincatchvariables=true).js.diff | 191 + ...,useunknownincatchvariables=false).js.diff | 186 +- ...e,useunknownincatchvariables=true).js.diff | 186 +- .../destructureComputedProperty.js.diff | 32 +- ...structureOfVariableSameAsShorthand.js.diff | 77 +- ...tureOfVariableSameAsShorthand.symbols.diff | 11 + .../destructureOptionalParameter.js.diff | 12 + ...ctureTupleWithVariableElement.symbols.diff | 20 + .../destructuredDeclarationEmit.js.diff | 27 +- .../destructuredDeclarationEmit.types.diff | 15 + ...turedMaappedTypeIsNotImplicitlyAny.js.diff | 13 + ...destructuringAssignmentWithDefault.js.diff | 54 + ...tructuringAssignmentWithDefault.types.diff | 40 +- ...estructuringAssignmentWithDefault2.js.diff | 39 + ...ringAssignmentWithStrictNullChecks.js.diff | 5 +- .../destructuringAssignment_private.js.diff | 29 +- ...ucturingControlFlowNoCrash.errors.txt.diff | 25 + .../destructuringControlFlowNoCrash.js.diff | 40 +- .../destructuringFromUnionSpread.js.diff | 8 + ...itializerContextualTypeFromContext.js.diff | 27 +- ...izerContextualTypeFromContext.symbols.diff | 10 + ...ssignmentNameIsNotAssignmentTarget.js.diff | 13 + ...structuringTempOccursAfterPrologue.js.diff | 4 +- .../compiler/destructuringTuple.js.diff | 12 +- .../destructuringTypeGuardFlow.js.diff | 38 + ...turingUnspreadableIntoRest.errors.txt.diff | 239 + ...structuringUnspreadableIntoRest.types.diff | 254 + .../destructuringWithConstraint.js.diff | 6 +- .../destructuringWithGenericParameter.js.diff | 21 +- .../destructuringWithNewExpression.js.diff | 15 +- .../destructuringWithNumberLiteral.js.diff | 8 + ...tachedCommentAtStartOfConstructor1.js.diff | 19 +- ...tachedCommentAtStartOfConstructor2.js.diff | 19 +- ...achedCommentAtStartOfFunctionBody1.js.diff | 23 + ...achedCommentAtStartOfFunctionBody2.js.diff | 23 + ...hedCommentAtStartOfLambdaFunction1.js.diff | 33 +- ...hedCommentAtStartOfLambdaFunction2.js.diff | 33 +- ...ressionsWhichCouldBeCalled.errors.txt.diff | 18 + ...nsForExpressionsWhichCouldBeCalled.js.diff | 15 +- ...ExpressionsWhichCouldBeCalled.symbols.diff | 38 + .../didYouMeanStringLiteral.errors.txt.diff | 22 + .../compiler/didYouMeanStringLiteral.js.diff | 12 + .../didYouMeanStringLiteral.types.diff | 26 + .../didYouMeanSuggestionErrors.js.diff | 48 + .../differentTypesWithSameName.errors.txt | 2 +- .../compiler/differentTypesWithSameName.js | 2 +- .../differentTypesWithSameName.js.diff | 23 +- .../differentTypesWithSameName.symbols | 6 +- .../compiler/differentTypesWithSameName.types | 2 +- ...minableUnionWithIntersectedMembers.js.diff | 11 + .../discriminantElementAccessCheck.js.diff | 20 + ...scriminantNarrowingCouldBeCircular.js.diff | 35 +- .../discriminantPropertyCheck.js.diff | 38 + .../discriminantPropertyCheck.symbols.diff | 14 + .../discriminantPropertyInference.js.diff | 22 +- .../discriminantPropertyInference.types.diff | 3 +- ...ngEvaluatableTemplateExpression.types.diff | 3 +- .../discriminantsAndPrimitives.js.diff | 11 +- .../discriminantsAndPrimitives.symbols.diff | 50 + .../discriminantsAndPrimitives.types.diff | 88 +- .../discriminateObjectTypesOnly.js.diff | 11 +- ...scriminateWithMissingProperty.symbols.diff | 17 + ...actoptionalpropertytypes=false).types.diff | 29 + ...xactoptionalpropertytypes=true).types.diff | 29 + ...actoptionalpropertytypes=false).types.diff | 59 + ...xactoptionalpropertytypes=true).types.diff | 59 + .../discriminatedUnionErrorMessage.js.diff | 11 + .../discriminatedUnionJsxElement.js.diff | 6 +- ...scriminatedUnionWithIndexSignature.js.diff | 17 + ...iminatedUnionWithIndexSignature.types.diff | 11 + ...iveConditionalTypeConstraints.symbols.diff | 11 + ...utiveConditionalTypeConstraints.types.diff | 49 + .../compiler/divergentAccessors1.js.diff | 14 +- .../compiler/divergentAccessorsTypes3.js.diff | 84 +- .../compiler/divergentAccessorsTypes4.js.diff | 52 +- .../compiler/divergentAccessorsTypes5.js.diff | 75 +- .../divergentAccessorsTypes5.types.diff | 11 + .../compiler/divergentAccessorsTypes6.js.diff | 17 + .../divergentAccessorsTypes6.symbols.diff | 25 + .../compiler/divergentAccessorsTypes7.js.diff | 31 + .../divergentAccessorsTypes8.symbols.diff | 11 + .../divergentAccessorsTypes8.types.diff | 11 + ...divideAndConquerIntersections.symbols.diff | 29 + .../divideAndConquerIntersections.types.diff | 30 +- ...orateAssignabilityToTypeParameters.js.diff | 40 +- ...tachedCommentsAtStartOfConstructor.js.diff | 50 + ...hedCommentsAtStartOfLambdaFunction.js.diff | 30 + ...tEmitPinnedCommentOnNotEmittedNode.js.diff | 16 + ...mitPinnedCommentOnNotEmittedNodets.js.diff | 15 + .../compiler/doNotInferUnrelatedTypes.js.diff | 8 + .../doNotInferUnrelatedTypes.symbols.diff | 20 + .../compiler/doWhileUnreachableCode.js.diff | 11 + ...ngeYourTargetLibraryES2015.errors.txt.diff | 351 + ...eedToChangeYourTargetLibraryES2015.js.diff | 191 + ...ChangeYourTargetLibraryES2015.symbols.diff | 513 + ...ToChangeYourTargetLibraryES2015.types.diff | 996 ++ ...oChangeYourTargetLibraryES2016Plus.js.diff | 78 + ...wUnionOfConstructorsWithInstanceof.js.diff | 37 +- .../compiler/dottedModuleName.errors.txt | 12 +- .../submodule/compiler/dottedModuleName.js | 12 +- .../compiler/dottedModuleName.js.diff | 25 +- .../compiler/dottedModuleName.symbols | 34 +- .../submodule/compiler/dottedModuleName.types | 12 +- .../submodule/compiler/dottedModuleName2.js | 4 +- .../compiler/dottedModuleName2.js.diff | 8 + .../compiler/dottedModuleName2.symbols | 22 +- .../compiler/dottedModuleName2.symbols.diff | 8 +- .../compiler/dottedModuleName2.types | 4 +- .../compiler/dottedSymbolResolution1.js.diff | 18 + ...MixinConditionalTypeBaseClassWorks.js.diff | 49 +- .../compiler/doubleUnderscoreLabels.js.diff | 11 + .../doubleUnderscoreMappedTypes.js.diff | 19 + .../doubleUnderscoreReactNamespace.js.diff | 8 + .../compiler/downlevelLetConst1.js.diff | 8 + .../compiler/downlevelLetConst10.js.diff | 8 + .../compiler/downlevelLetConst12.js.diff | 18 + .../submodule/compiler/downlevelLetConst13.js | 2 +- .../compiler/downlevelLetConst13.symbols | 2 +- .../compiler/downlevelLetConst13.types | 2 +- .../compiler/downlevelLetConst14.js.diff | 73 + .../compiler/downlevelLetConst15.js.diff | 73 + .../compiler/downlevelLetConst16.errors.txt | 8 +- .../submodule/compiler/downlevelLetConst16.js | 8 +- .../compiler/downlevelLetConst16.js.diff | 323 + .../compiler/downlevelLetConst16.symbols | 8 +- .../compiler/downlevelLetConst16.types | 8 +- .../compiler/downlevelLetConst17.js.diff | 104 + .../compiler/downlevelLetConst18.js.diff | 64 + .../compiler/downlevelLetConst19.js.diff | 22 + .../compiler/downlevelLetConst2.js.diff | 8 + .../compiler/downlevelLetConst3.js.diff | 8 + .../compiler/downlevelLetConst4.js.diff | 8 + .../compiler/downlevelLetConst5.js.diff | 8 + .../compiler/downlevelLetConst7.js.diff | 8 + .../compiler/downlevelLetConst8.js.diff | 8 + .../compiler/downlevelLetConst9.js.diff | 8 + .../compiler/duplicateAnonymousInners1.js | 4 +- .../duplicateAnonymousInners1.js.diff | 35 + .../duplicateAnonymousInners1.symbols | 8 +- .../compiler/duplicateAnonymousInners1.types | 4 +- .../duplicateAnonymousModuleClasses.js | 14 +- .../duplicateAnonymousModuleClasses.js.diff | 68 + .../duplicateAnonymousModuleClasses.symbols | 30 +- .../duplicateAnonymousModuleClasses.types | 14 +- .../compiler/duplicateClassElements.js.diff | 105 +- ...licateConstructorOverloadSignature.js.diff | 14 + ...icateConstructorOverloadSignature2.js.diff | 14 + .../duplicateErrorAssignability.js.diff | 6 +- .../duplicateErrorClassExpression.js.diff | 38 +- ...dingElementInParameterDeclaration1.js.diff | 46 + ...dingElementInParameterDeclaration2.js.diff | 46 + .../duplicateIdentifierComputedName.js.diff | 12 +- ...licateIdentifierDifferentModifiers.js.diff | 21 +- ...plicateIdentifierDifferentSpelling.js.diff | 17 +- .../compiler/duplicateIdentifierEnum.js.diff | 28 +- .../duplicateIdentifierRelatedSpans1.js.diff | 26 + .../duplicateIdentifierRelatedSpans2.js.diff | 133 + ...ifiersAcrossContainerBoundaries.errors.txt | 28 +- ...ateIdentifiersAcrossContainerBoundaries.js | 28 +- ...entifiersAcrossContainerBoundaries.js.diff | 71 +- ...entifiersAcrossContainerBoundaries.symbols | 48 +- ...IdentifiersAcrossContainerBoundaries.types | 28 +- ...IdentifiersAcrossFileBoundaries.errors.txt | 12 +- ...uplicateIdentifiersAcrossFileBoundaries.js | 8 +- ...ateIdentifiersAcrossFileBoundaries.js.diff | 55 +- ...ateIdentifiersAcrossFileBoundaries.symbols | 12 +- ...icateIdentifiersAcrossFileBoundaries.types | 8 +- .../compiler/duplicateLocalVariable1.js.diff | 46 +- .../duplicateLocalVariable1.symbols.diff | 11 + .../duplicateLocalVariable1.types.diff | 11 + ...bjectLiteralProperty_computedName1.js.diff | 77 + ...bjectLiteralProperty_computedName2.js.diff | 50 + ...bjectLiteralProperty_computedName3.js.diff | 39 +- ...plicateOverloadInTypeAugmentation1.js.diff | 8 + ...teOverloadInTypeAugmentation1.symbols.diff | 58 + .../duplicatePackage_referenceTypes.js.diff | 3 +- .../duplicatePackage_subModule.js.diff | 3 +- .../compiler/duplicateTypeParameters2.js.diff | 24 + .../compiler/duplicateVarAndImport.js | 2 +- .../compiler/duplicateVarAndImport.symbols | 6 +- .../compiler/duplicateVarAndImport.types | 2 +- .../compiler/duplicateVarAndImport.types.diff | 2 +- .../duplicateVarAndImport2.errors.txt | 2 +- .../compiler/duplicateVarAndImport2.js | 2 +- .../compiler/duplicateVarAndImport2.symbols | 8 +- .../compiler/duplicateVarAndImport2.types | 2 +- .../compiler/duplicateVariablesByScope.js | 2 +- .../duplicateVariablesByScope.js.diff | 23 + .../duplicateVariablesByScope.symbols | 2 +- .../compiler/duplicateVariablesByScope.types | 2 +- .../duplicateVariablesWithAny.errors.txt | 2 +- .../compiler/duplicateVariablesWithAny.js | 2 +- .../duplicateVariablesWithAny.symbols | 2 +- .../compiler/duplicateVariablesWithAny.types | 2 +- ...plicateVarsAcrossFileBoundaries.errors.txt | 4 +- .../duplicateVarsAcrossFileBoundaries.js | 4 +- .../duplicateVarsAcrossFileBoundaries.symbols | 10 +- .../duplicateVarsAcrossFileBoundaries.types | 4 +- .../dynamicImportTrailingComma.js.diff | 6 +- .../compiler/elaboratedErrors.js.diff | 15 +- ...essExpressionInternalComments.symbols.diff | 16 + ...dedStatementsReplacedWithSemicolon.js.diff | 19 + .../elidedJSImport2(module=commonjs).js.diff | 30 +- .../elidedJSImport2(module=es2022).js.diff | 34 +- ...iteralExpressionInArrowFunctionES5.js.diff | 10 + ...CapturingThisInTupleDestructuring1.js.diff | 12 + ...CapturingThisInTupleDestructuring2.js.diff | 20 +- ...itClassExpressionInDeclarationFile.js.diff | 119 +- ...lassExpressionInDeclarationFile.types.diff | 6 +- ...tClassExpressionInDeclarationFile2.js.diff | 74 +- ...assExpressionInDeclarationFile2.types.diff | 6 +- ...a_isolatedModules(module=commonjs).js.diff | 24 +- ...ata_isolatedModules(module=esnext).js.diff | 27 +- .../emitDecoratorMetadata_object.js.diff | 11 +- .../emitDecoratorMetadata_restArgs.js.diff | 36 +- .../compiler/emitMemberAccessExpression.js | 4 +- .../emitMemberAccessExpression.js.diff | 31 +- .../emitMemberAccessExpression.symbols | 22 +- .../compiler/emitMemberAccessExpression.types | 4 +- .../compiler/emitMethodCalledNew.js.diff | 20 +- ...ableDeclarationRemoveCommentsFalse.js.diff | 20 +- .../emitSkipsThisWithRestParameter.js.diff | 15 + ...eEmitParameterPropertyDeclaration1.js.diff | 51 +- ...CallBeforeEmitPropertyDeclaration1.js.diff | 53 +- ...onAndParameterPropertyDeclaration1.js.diff | 56 +- .../emitThisInObjectLiteralGetter.js.diff | 14 + .../emitThisInSuperMethodCall.js.diff | 78 + ...tNarrowing(strictnullchecks=false).js.diff | 11 + ...rrowing(strictnullchecks=false).types.diff | 18 + ...ctNarrowing(strictnullchecks=true).js.diff | 11 + ...arrowing(strictnullchecks=true).types.diff | 18 + ...ringExpressionVisitedByTransformer.js.diff | 10 + .../emptyDeclarationEmitIsModule.js.diff | 16 + .../compiler/emptyGenericParamList.js.diff | 14 + .../compiler/emptyModuleName.js.diff | 29 +- ...eOfIndexSignatureContainingObject1.js.diff | 11 + ...eOfIndexSignatureContainingObject2.js.diff | 13 + .../compiler/emptyThenWarning.js.diff | 11 + .../compiler/emptyThenWithoutWarning.js.diff | 14 + .../emptyTypeArgumentListWithNew.js.diff | 23 + .../compiler/enumAssignmentCompat.errors.txt | 2 +- .../compiler/enumAssignmentCompat.js | 2 +- .../compiler/enumAssignmentCompat.js.diff | 16 + .../compiler/enumAssignmentCompat.symbols | 10 +- .../compiler/enumAssignmentCompat.types | 2 +- .../compiler/enumAssignmentCompat2.errors.txt | 2 +- .../compiler/enumAssignmentCompat2.js | 2 +- .../compiler/enumAssignmentCompat2.js.diff | 16 + .../compiler/enumAssignmentCompat2.symbols | 10 +- .../compiler/enumAssignmentCompat2.types | 2 +- .../compiler/enumAssignmentCompat3.errors.txt | 2 +- .../compiler/enumAssignmentCompat3.js | 2 +- .../compiler/enumAssignmentCompat3.js.diff | 72 + .../compiler/enumAssignmentCompat3.symbols | 2 +- .../compiler/enumAssignmentCompat3.types | 2 +- .../compiler/enumAssignmentCompat4.js.diff | 29 + .../compiler/enumAssignmentCompat5.js.diff | 22 + .../compiler/enumAssignmentCompat6.js.diff | 39 + .../compiler/enumAssignmentCompat7.js.diff | 57 +- .../submodule/compiler/enumBasics3.errors.txt | 4 +- .../submodule/compiler/enumBasics3.js | 4 +- .../submodule/compiler/enumBasics3.js.diff | 18 +- .../submodule/compiler/enumBasics3.symbols | 16 +- .../submodule/compiler/enumBasics3.types | 4 +- .../reference/submodule/compiler/enumDecl1.js | 2 +- .../submodule/compiler/enumDecl1.symbols | 4 +- .../submodule/compiler/enumDecl1.types | 2 +- .../compiler/enumGenericTypeClash.js.diff | 16 + .../submodule/compiler/enumIndexer.js.diff | 8 + ...eralAssignableToEnumInsideUnion.errors.txt | 8 +- .../enumLiteralAssignableToEnumInsideUnion.js | 8 +- ...LiteralAssignableToEnumInsideUnion.js.diff | 52 + ...LiteralAssignableToEnumInsideUnion.symbols | 54 +- ...umLiteralAssignableToEnumInsideUnion.types | 8 +- .../enumLiteralUnionNotWidened.js.diff | 15 +- .../compiler/enumNumbering1.symbols.diff | 15 + .../enumUsedBeforeDeclaration.js.diff | 13 + .../enumsWithMultipleDeclarations3.js | 2 +- .../enumsWithMultipleDeclarations3.symbols | 2 +- .../enumsWithMultipleDeclarations3.types | 2 +- .../erasableSyntaxOnly.errors.txt.diff | 15 + .../compiler/erasableSyntaxOnly.js.diff | 113 +- .../compiler/erasableSyntaxOnly.types.diff | 11 + .../compiler/erasableSyntaxOnly2.js.diff | 12 + .../errorConstructorSubtypes.symbols.diff | 11 + .../compiler/errorElaboration.js.diff | 16 +- ...rrorForUsingPropertyOfTypeAsType01.js.diff | 15 +- ...rrorForUsingPropertyOfTypeAsType02.js.diff | 10 + ...rrorForUsingPropertyOfTypeAsType03.js.diff | 36 + ...rwardReferenceForwadingConstructor.js.diff | 42 +- .../errorHandlingInInstanceOf.symbols.diff | 11 + ...dIndexTypesNoConstraintElaboration.js.diff | 20 + .../errorMessagesIntersectionTypes01.js.diff | 10 + .../errorMessagesIntersectionTypes02.js.diff | 10 + .../errorMessagesIntersectionTypes03.js.diff | 19 + .../errorMessagesIntersectionTypes04.js.diff | 19 + .../errorOnEnumReferenceInCondition.js.diff | 22 +- ...ializerInObjectTypeLiteralProperty.js.diff | 8 + ...ctShouldDeeplyDisambiguate.errors.txt.diff | 18 + ...onVsObjectShouldDeeplyDisambiguate.js.diff | 30 + ...bjectShouldDeeplyDisambiguate.symbols.diff | 61 + ...tShouldDeeplyDisambiguate2.errors.txt.diff | 18 + ...nVsObjectShouldDeeplyDisambiguate2.js.diff | 30 + ...jectShouldDeeplyDisambiguate2.symbols.diff | 68 + .../errorRecoveryInClassDeclaration.js.diff | 18 + ...yWithDotFollowedByNamespaceKeyword.js.diff | 11 + .../errorSpanForUnclosedJsxTag.js.diff | 15 +- .../compiler/errorSupression1.js.diff | 18 + .../compiler/errorWithSameNameType.js.diff | 13 + ...allAndAssignmentAreSimilar.errors.txt.diff | 28 + ...rorsForCallAndAssignmentAreSimilar.js.diff | 11 + .../errorsInGenericTypeReference.js.diff | 112 +- ...rorsOnUnionsOfOverlappingObjects01.js.diff | 10 + ...sOnUnionsOfOverlappingObjects01.types.diff | 3 +- .../errorsWithInvokablesInUnions01.js.diff | 19 +- .../compiler/es5-asyncFunction.js.diff | 43 +- .../es5-asyncFunctionArrayLiterals.js.diff | 107 +- ...es5-asyncFunctionBinaryExpressions.js.diff | 406 +- .../es5-asyncFunctionCallExpressions.js.diff | 274 +- .../es5-asyncFunctionConditionals.js.diff | 50 +- .../es5-asyncFunctionDoStatements.js.diff | 309 +- .../es5-asyncFunctionElementAccess.js.diff | 36 +- .../es5-asyncFunctionForInStatements.js.diff | 230 +- .../es5-asyncFunctionForOfStatements.js.diff | 463 +- .../es5-asyncFunctionForStatements.js.diff | 120 +- .../es5-asyncFunctionHoisting.js.diff | 61 +- .../es5-asyncFunctionIfStatements.js.diff | 64 +- ...es5-asyncFunctionLongObjectLiteral.js.diff | 114 +- .../es5-asyncFunctionNestedLoops.js.diff | 26 +- .../es5-asyncFunctionNewExpressions.js.diff | 276 +- .../es5-asyncFunctionObjectLiterals.js.diff | 140 +- .../es5-asyncFunctionPropertyAccess.js.diff | 33 +- .../es5-asyncFunctionReturnStatements.js.diff | 60 +- .../es5-asyncFunctionSwitchStatements.js.diff | 280 +- .../es5-asyncFunctionTryStatements.js.diff | 266 +- .../es5-asyncFunctionWhileStatements.js.diff | 290 +- .../es5-asyncFunctionWithStatements.js.diff | 105 +- .../submodule/compiler/es5-commonjs.js.diff | 20 + .../submodule/compiler/es5-commonjs4.js.diff | 21 + .../es5-importHelpersAsyncFunctions.js.diff | 37 +- .../es5-yieldFunctionObjectLiterals.js.diff | 189 + .../es5ExportDefaultClassDeclaration.js.diff | 17 + .../es5ExportDefaultClassDeclaration2.js.diff | 17 + .../es5ExportDefaultClassDeclaration3.js.diff | 21 + .../submodule/compiler/es5ExportEqualsDts.js | 2 +- .../compiler/es5ExportEqualsDts.js.diff | 20 +- .../compiler/es5ExportEqualsDts.symbols | 6 +- .../compiler/es5ExportEqualsDts.types | 2 +- .../es5ModuleWithModuleGenCommonjs.js.diff | 20 + .../es5ModuleWithoutModuleGenTarget.js.diff | 20 + ...terparameterDestructuringNotElided.js.diff | 14 + .../compiler/es5andes6module.js.diff | 20 + .../compiler/es6ClassSuperCodegenBug.js.diff | 48 + .../compiler/es6ClassTest.errors.txt | 2 +- .../submodule/compiler/es6ClassTest.js | 2 +- .../submodule/compiler/es6ClassTest.js.diff | 64 +- .../submodule/compiler/es6ClassTest.symbols | 4 +- .../submodule/compiler/es6ClassTest.types | 2 +- .../submodule/compiler/es6ClassTest2.js.diff | 251 +- .../submodule/compiler/es6ClassTest3.js | 2 +- .../submodule/compiler/es6ClassTest3.js.diff | 28 +- .../submodule/compiler/es6ClassTest3.symbols | 8 +- .../submodule/compiler/es6ClassTest3.types | 2 +- .../submodule/compiler/es6ClassTest5.js | 2 +- .../submodule/compiler/es6ClassTest5.js.diff | 27 +- .../submodule/compiler/es6ClassTest5.symbols | 4 +- .../submodule/compiler/es6ClassTest5.types | 2 +- .../submodule/compiler/es6ClassTest7.js | 2 +- .../submodule/compiler/es6ClassTest7.js.diff | 30 + .../submodule/compiler/es6ClassTest7.symbols | 8 +- .../submodule/compiler/es6ClassTest7.types | 2 +- .../submodule/compiler/es6ClassTest8.js.diff | 60 +- .../compiler/es6DeclOrdering.js.diff | 23 + .../compiler/es6ExportAll.errors.txt | 4 +- .../compiler/es6ExportAll.errors.txt.diff | 4 +- .../submodule/compiler/es6ExportAll.js | 4 +- .../submodule/compiler/es6ExportAll.symbols | 4 +- .../submodule/compiler/es6ExportAll.types | 4 +- .../submodule/compiler/es6ExportAllInEs5.js | 4 +- .../compiler/es6ExportAllInEs5.js.diff | 16 + .../compiler/es6ExportAllInEs5.symbols | 4 +- .../compiler/es6ExportAllInEs5.types | 4 +- .../submodule/compiler/es6ExportClause.js | 4 +- .../compiler/es6ExportClause.symbols | 4 +- .../submodule/compiler/es6ExportClause.types | 4 +- .../compiler/es6ExportClauseInEs5.js | 4 +- .../compiler/es6ExportClauseInEs5.js.diff | 16 + .../compiler/es6ExportClauseInEs5.symbols | 4 +- .../compiler/es6ExportClauseInEs5.types | 4 +- ...ortClauseWithoutModuleSpecifier.errors.txt | 4 +- ...auseWithoutModuleSpecifier.errors.txt.diff | 4 +- .../es6ExportClauseWithoutModuleSpecifier.js | 4 +- ...ExportClauseWithoutModuleSpecifier.symbols | 4 +- ...s6ExportClauseWithoutModuleSpecifier.types | 4 +- ...ExportClauseWithoutModuleSpecifierInEs5.js | 4 +- ...tClauseWithoutModuleSpecifierInEs5.js.diff | 16 +- ...tClauseWithoutModuleSpecifierInEs5.symbols | 4 +- ...ortClauseWithoutModuleSpecifierInEs5.types | 4 +- .../es6ExportEqualsInterop.errors.txt | 10 +- .../es6ExportEqualsInterop.errors.txt.diff | 74 - .../compiler/es6ExportEqualsInterop.js | 10 +- .../compiler/es6ExportEqualsInterop.symbols | 12 +- .../compiler/es6ExportEqualsInterop.types | 10 +- .../es6ExportEqualsInterop.types.diff | 43 - .../es6ImportDefaultBindingDts.js.diff | 14 +- ...tBindingFollowedWithNamedImportDts.js.diff | 54 +- ...BindingFollowedWithNamedImportDts1.js.diff | 14 +- ...ingFollowedWithNamespaceBindingDts.js.diff | 14 +- ...6ImportDefaultBindingInEs5.errors.txt.diff | 16 - .../es6ImportDefaultBindingInEs5.types.diff | 8 - .../compiler/es6ImportEqualsDeclaration2.js | 2 +- .../es6ImportEqualsDeclaration2.symbols | 2 +- .../es6ImportEqualsDeclaration2.types | 2 +- ...ortEqualsExportModuleCommonJsError.js.diff | 13 +- ...mportEqualsExportModuleEs2015Error.js.diff | 16 + .../es6ImportNameSpaceImportDts.js.diff | 15 +- .../compiler/es6ImportNamedImportDts.js.diff | 118 +- ...rtNamedImportInIndirectExportAssignment.js | 2 +- ...edImportInIndirectExportAssignment.js.diff | 13 +- ...edImportInIndirectExportAssignment.symbols | 4 +- ...amedImportInIndirectExportAssignment.types | 2 +- ...mportNamedImportWithTypesAndValues.js.diff | 21 +- ...portWithoutFromClauseInEs5.errors.txt.diff | 14 + ...ithoutFromClauseWithExport.errors.txt.diff | 17 + .../compiler/es6MemberScoping.js.diff | 26 +- .../compiler/es6ModuleClassDeclaration.js | 4 +- .../es6ModuleClassDeclaration.symbols | 16 +- .../compiler/es6ModuleClassDeclaration.types | 4 +- .../submodule/compiler/es6ModuleConst.js | 4 +- .../submodule/compiler/es6ModuleConst.symbols | 4 +- .../submodule/compiler/es6ModuleConst.types | 4 +- .../compiler/es6ModuleConstEnumDeclaration.js | 4 +- .../es6ModuleConstEnumDeclaration.symbols | 16 +- .../es6ModuleConstEnumDeclaration.types | 4 +- .../es6ModuleConstEnumDeclaration2.js | 4 +- .../es6ModuleConstEnumDeclaration2.symbols | 16 +- .../es6ModuleConstEnumDeclaration2.types | 4 +- .../compiler/es6ModuleEnumDeclaration.js | 4 +- .../compiler/es6ModuleEnumDeclaration.symbols | 16 +- .../compiler/es6ModuleEnumDeclaration.types | 4 +- .../compiler/es6ModuleFunctionDeclaration.js | 4 +- .../es6ModuleFunctionDeclaration.symbols | 16 +- .../es6ModuleFunctionDeclaration.types | 4 +- .../compiler/es6ModuleInternalImport.js | 6 +- .../compiler/es6ModuleInternalImport.symbols | 22 +- .../compiler/es6ModuleInternalImport.types | 6 +- .../es6ModuleInternalNamedImports.errors.txt | 6 +- .../compiler/es6ModuleInternalNamedImports.js | 6 +- .../es6ModuleInternalNamedImports.symbols | 16 +- .../es6ModuleInternalNamedImports.types | 6 +- .../es6ModuleInternalNamedImports2.errors.txt | 8 +- .../es6ModuleInternalNamedImports2.js | 8 +- .../es6ModuleInternalNamedImports2.symbols | 18 +- .../es6ModuleInternalNamedImports2.types | 8 +- .../submodule/compiler/es6ModuleLet.js | 4 +- .../submodule/compiler/es6ModuleLet.symbols | 4 +- .../submodule/compiler/es6ModuleLet.types | 4 +- .../compiler/es6ModuleModuleDeclaration.js | 12 +- .../es6ModuleModuleDeclaration.symbols | 12 +- .../compiler/es6ModuleModuleDeclaration.types | 12 +- .../compiler/es6ModuleVariableStatement.js | 4 +- .../es6ModuleVariableStatement.symbols | 4 +- .../compiler/es6ModuleVariableStatement.types | 4 +- ...erMustBeSyntacticallyDefaultExport.js.diff | 6 +- .../esModuleInteropImportCall.js.diff | 2 +- ...esModuleInteropNamedDefaultImports.js.diff | 24 +- .../esModuleInteropTslibHelpers.js.diff | 36 +- .../esModuleIntersectionCrash.types.diff | 19 + .../submodule/compiler/escapedIdentifiers.js | 2 +- .../compiler/escapedIdentifiers.js.diff | 53 +- .../compiler/escapedIdentifiers.symbols | 2 +- .../compiler/escapedIdentifiers.types | 2 +- ...erPatternWithRecordOfFunction.symbols.diff | 11 + .../evolvingArrayTypeInAssert.js.diff | 11 + ...onalPropertyTypesIdentical.errors.txt.diff | 19 + .../exactOptionalPropertyTypesIdentical.js | 13 + ...xactOptionalPropertyTypesIdentical.symbols | 16 + .../exactOptionalPropertyTypesIdentical.types | 13 + ...heckIntersectionWithIndexSignature.js.diff | 11 +- ...excessPropertyCheckWithEmptyObject.js.diff | 11 + ...kWithMultipleDiscriminants.errors.txt.diff | 31 + ...ertyCheckWithMultipleDiscriminants.js.diff | 61 +- ...tyCheckWithNestedArrayIntersection.js.diff | 11 + ...ckWithNestedArrayIntersection.symbols.diff | 20 + .../excessPropertyCheckWithUnions.js.diff | 76 +- ...heckingIntersectionWithConditional.js.diff | 10 + ...pertyChecksWithNestedIntersections.js.diff | 24 +- ...xcessPropertyErrorForFunctionTypes.js.diff | 8 + .../excessiveStackDepthFlatArray.js.diff | 27 +- .../excessivelyLargeTupleSpread.js.diff | 42 +- .../exhaustiveSwitchCheckCircularity.js.diff | 19 +- .../exhaustiveSwitchImplicitReturn.js.diff | 11 + ...tiveSwitchWithWideningLiteralTypes.js.diff | 26 +- .../expandoFunctionBlockShadowing.js.diff | 23 +- ...expandoFunctionBlockShadowing.symbols.diff | 18 +- .../expandoFunctionContextualTypes.js.diff | 11 + .../expandoFunctionContextualTypes.types.diff | 11 +- ...doFunctionContextualTypesJSDocInTs.js.diff | 8 + ...andoFunctionContextualTypesNoValue.js.diff | 3 +- ...unctionExpressionsWithDynamicNames.js.diff | 13 +- .../expandoFunctionNestedAssigments.js.diff | 33 +- ...doFunctionNestedAssigmentsDeclared.js.diff | 19 + ...MetadataUnresolvedTypeObjectInEmit.js.diff | 10 +- ...itAnyAfterSpreadNoImplicitAnyError.js.diff | 8 + .../compiler/exportAlreadySeen.errors.txt | 8 +- .../submodule/compiler/exportAlreadySeen.js | 8 +- .../compiler/exportAlreadySeen.js.diff | 19 + .../compiler/exportAlreadySeen.symbols | 12 +- .../compiler/exportAlreadySeen.types | 8 +- .../exportArrayBindingPattern.js.diff | 8 +- .../exportArrayBindingPattern.types.diff | 10 + .../compiler/exportAssignClassAndModule.js | 2 +- .../exportAssignClassAndModule.js.diff | 15 +- .../exportAssignClassAndModule.symbols | 8 +- .../compiler/exportAssignClassAndModule.types | 2 +- .../exportAssignClassAndModule.types.diff | 2 +- .../compiler/exportAssignValueAndType.js | 2 +- .../compiler/exportAssignValueAndType.symbols | 6 +- .../exportAssignValueAndType.symbols.diff | 20 + .../compiler/exportAssignValueAndType.types | 2 +- .../exportAssignmentWithExports.js.diff | 21 + .../exportClassExtendingIntersection.js.diff | 79 +- ...portDeclarationInInternalModule.errors.txt | 4 +- .../exportDeclarationInInternalModule.js | 4 +- .../exportDeclarationInInternalModule.js.diff | 56 +- .../exportDeclarationInInternalModule.symbols | 10 +- .../exportDeclarationInInternalModule.types | 4 +- ...ortDeclarationsInAmbientNamespaces.js.diff | 8 + ...clarationsInAmbientNamespaces.symbols.diff | 11 + .../exportDefaultAbstractClass.js.diff | 66 +- .../exportDefaultClassAndValue.js.diff | 17 + .../exportDefaultClassInNamespace.js.diff | 20 +- .../exportDefaultForNonInstantiatedModule.js | 2 +- ...ortDefaultForNonInstantiatedModule.symbols | 4 +- ...xportDefaultForNonInstantiatedModule.types | 2 +- .../exportDefaultFunctionInNamespace.js.diff | 31 +- ...xportDefaultInterfaceClassAndValue.js.diff | 17 + .../exportDefaultParenthesize.js.diff | 68 + .../compiler/exportDefaultProperty.js.diff | 30 +- .../compiler/exportDefaultProperty2.js.diff | 15 +- .../exportDefaultQualifiedNameNoError.js.diff | 6 +- .../exportDefaultTypeAndClass.js.diff | 14 + .../exportDefaultTypeClassAndValue.js.diff | 17 + ...attern(module=commonjs,target=es5).js.diff | 2 +- ...gPattern(module=es2015,target=es5).js.diff | 9 + ...gPattern(module=esnext,target=es5).js.diff | 9 + ...attern(module=commonjs,target=es5).js.diff | 2 +- ...gPattern(module=es2015,target=es5).js.diff | 9 + ...gPattern(module=esnext,target=es5).js.diff | 9 + .../exportEqualMemberMissing.errors.txt | 2 +- .../compiler/exportEqualMemberMissing.js | 2 +- .../compiler/exportEqualMemberMissing.symbols | 6 +- .../exportEqualMemberMissing.symbols.diff | 11 + .../compiler/exportEqualMemberMissing.types | 2 +- .../compiler/exportEqualsCommonJs.js.diff | 9 + ...xportEqualsDefaultProperty.errors.txt.diff | 21 - .../exportEqualsDefaultProperty.symbols.diff | 9 - .../exportEqualsDefaultProperty.types.diff | 19 - .../compiler/exportEqualsProperty.js.diff | 30 +- .../compiler/exportEqualsProperty2.js.diff | 15 +- .../compiler/exportImportAndClodule.js | 6 +- .../compiler/exportImportAndClodule.js.diff | 17 +- .../compiler/exportImportAndClodule.symbols | 20 +- .../compiler/exportImportAndClodule.types | 6 +- .../exportImportNonInstantiatedModule.js | 4 +- .../exportImportNonInstantiatedModule.symbols | 12 +- .../exportImportNonInstantiatedModule.types | 4 +- ...AndValueWithDuplicatesInImportList.js.diff | 17 + ...jectRest(module=es2015,target=es5).js.diff | 8 + ...jectRest(module=esnext,target=es5).js.diff | 8 + .../submodule/compiler/exportPrivateType.js | 2 +- .../compiler/exportPrivateType.js.diff | 25 +- .../compiler/exportPrivateType.symbols | 8 +- .../compiler/exportPrivateType.types | 2 +- ...rtSpecifierAndExportedMemberDeclaration.js | 2 +- ...cifierAndExportedMemberDeclaration.symbols | 8 +- ...pecifierAndExportedMemberDeclaration.types | 2 +- ...cifierAndLocalMemberDeclaration.errors.txt | 2 +- ...xportSpecifierAndLocalMemberDeclaration.js | 2 +- ...SpecifierAndLocalMemberDeclaration.symbols | 6 +- ...rtSpecifierAndLocalMemberDeclaration.types | 2 +- ...ierReferencingOuterDeclaration1.errors.txt | 2 +- ...rtSpecifierReferencingOuterDeclaration1.js | 2 +- ...cifierReferencingOuterDeclaration1.symbols | 8 +- ...pecifierReferencingOuterDeclaration1.types | 2 +- ...ierReferencingOuterDeclaration2.errors.txt | 2 +- ...rtSpecifierReferencingOuterDeclaration2.js | 2 +- ...cifierReferencingOuterDeclaration2.symbols | 6 +- ...pecifierReferencingOuterDeclaration2.types | 2 +- ...ierReferencingOuterDeclaration3.errors.txt | 4 +- ...rtSpecifierReferencingOuterDeclaration3.js | 4 +- ...cifierReferencingOuterDeclaration3.symbols | 12 +- ...pecifierReferencingOuterDeclaration3.types | 4 +- ...ierReferencingOuterDeclaration4.errors.txt | 4 +- ...rtSpecifierReferencingOuterDeclaration4.js | 4 +- ...cifierReferencingOuterDeclaration4.symbols | 10 +- ...pecifierReferencingOuterDeclaration4.types | 4 +- .../exportStarFromEmptyModule.js.diff | 25 +- .../compiler/exportStarNotElided.js.diff | 11 +- .../submodule/compiler/exportToString.js.diff | 9 + .../compiler/exportVisibility.js.diff | 16 + .../expressionTypeNodeShouldError.js.diff | 59 + ...expressionTypeNodeShouldError.symbols.diff | 11 + .../expressionTypeNodeShouldError.types.diff | 56 + .../expressionWithJSDocTypeArguments.js.diff | 26 +- ...nsForbiddenInParameterInitializers.js.diff | 68 +- .../submodule/compiler/extBaseClass1.js | 6 +- .../submodule/compiler/extBaseClass1.js.diff | 65 +- .../submodule/compiler/extBaseClass1.symbols | 20 +- .../submodule/compiler/extBaseClass1.types | 6 +- .../compiler/extBaseClass2.errors.txt | 4 +- .../submodule/compiler/extBaseClass2.js | 4 +- .../submodule/compiler/extBaseClass2.js.diff | 47 + .../submodule/compiler/extBaseClass2.symbols | 8 +- .../submodule/compiler/extBaseClass2.types | 4 +- .../extendAndImplementTheSameBaseType.js.diff | 45 +- ...extendAndImplementTheSameBaseType2.js.diff | 45 +- .../submodule/compiler/extendArray.errors.txt | 2 +- .../submodule/compiler/extendArray.js | 2 +- .../submodule/compiler/extendArray.symbols | 4 +- .../compiler/extendArray.symbols.diff | 11 + .../submodule/compiler/extendArray.types | 2 +- .../extendBaseClassBeforeItsDeclared.js.diff | 42 +- ...xtendConstructSignatureInInterface.js.diff | 32 + .../submodule/compiler/extendFromAny.js.diff | 35 +- .../compiler/extendGenericArray.symbols.diff | 18 + .../compiler/extendGenericArray2.symbols.diff | 16 + .../compiler/extendGlobalThis.errors.txt.diff | 24 + .../compiler/extendGlobalThis.symbols.diff | 13 + .../compiler/extendGlobalThis.types.diff | 14 + .../compiler/extendNonClassSymbol1.js.diff | 40 + .../compiler/extendNonClassSymbol2.js.diff | 34 + .../extendPrivateConstructorClass.js.diff | 30 + ...ingClassFromAliasAndUsageInIndexer.js.diff | 66 +- .../compiler/extendsClauseAlreadySeen.js.diff | 39 + .../extendsClauseAlreadySeen2.js.diff | 39 + .../compiler/extendsJavaScript.js.diff | 13 + .../compiler/extendsUntypedModule.js.diff | 30 +- .../submodule/compiler/extension.errors.txt | 4 +- .../reference/submodule/compiler/extension.js | 4 +- .../submodule/compiler/extension.symbols | 10 +- .../submodule/compiler/extension.types | 4 +- .../submodule/compiler/externModule.js.diff | 17 + .../submodule/compiler/externModuleClobber.js | 2 +- .../compiler/externModuleClobber.symbols | 8 +- .../compiler/externModuleClobber.types | 2 +- .../compiler/externSyntax.errors.txt | 2 +- .../submodule/compiler/externSyntax.js | 2 +- .../submodule/compiler/externSyntax.symbols | 4 +- .../submodule/compiler/externSyntax.types | 2 +- ...xternalModuleExportingGenericClass.js.diff | 12 +- .../externalModuleImmutableBindings.js.diff | 45 +- .../externalModuleQualification.js.diff | 25 +- .../compiler/externalModuleResolution.js | 4 +- .../compiler/externalModuleResolution.symbols | 2 +- .../compiler/externalModuleResolution.types | 2 +- .../compiler/externalModuleResolution2.js | 4 +- .../externalModuleResolution2.symbols | 2 +- .../compiler/externalModuleResolution2.types | 2 +- .../externalModuleWithoutCompilerFlag1.js | 2 +- ...externalModuleWithoutCompilerFlag1.symbols | 2 +- .../externalModuleWithoutCompilerFlag1.types | 2 +- ...ckToBindingPatternForTypeInference.js.diff | 31 + .../submodule/compiler/fatArrowSelf.js | 4 +- .../submodule/compiler/fatArrowSelf.js.diff | 43 +- .../submodule/compiler/fatArrowSelf.symbols | 14 +- .../submodule/compiler/fatArrowSelf.types | 4 +- .../compiler/fatarrowfunctions.js.diff | 51 + .../compiler/fatarrowfunctionsErrors.js.diff | 40 +- ...nctionsInFunctionParameterDefaults.js.diff | 14 + .../fatarrowfunctionsOptionalArgs.js.diff | 330 + ...fatarrowfunctionsOptionalArgs.symbols.diff | 41 + ...tarrowfunctionsOptionalArgsErrors1.js.diff | 38 + ...tarrowfunctionsOptionalArgsErrors3.js.diff | 14 + ...tarrowfunctionsOptionalArgsErrors4.js.diff | 56 + ...lInMissingTypeArgsOnConstructCalls.js.diff | 12 +- .../findLast(target=esnext).symbols.diff | 20 + .../firstMatchRegExpMatchArray.js.diff | 9 +- .../firstMatchRegExpMatchArray.symbols.diff | 13 + .../firstMatchRegExpMatchArray.types.diff | 14 + .../fixingTypeParametersRepeatedly1.js.diff | 10 + .../fixingTypeParametersRepeatedly2.js.diff | 10 + .../fixingTypeParametersRepeatedly3.js.diff | 10 + .../flatArrayNoExcessiveStackDepth.types.diff | 30 + .../flowControlTypeGuardThenSwitch.js.diff | 20 + .../submodule/compiler/flowInFinally1.js.diff | 21 + .../compiler/forAwaitForUnion.types.diff | 10 +- .../submodule/compiler/forInModule.js | 2 +- .../submodule/compiler/forInModule.symbols | 2 +- .../submodule/compiler/forInModule.types | 2 +- .../forInStrictNullChecksNoError.js.diff | 11 + .../forLoopEndingMultilineComments.js.diff | 12 + ...ringDoesNotElideFollowingStatement.js.diff | 15 + .../compiler/forOfStringConstituents.js.diff | 11 + .../forOfTransformsExpression.js.diff | 12 + .../forwardRefInClassProperties.js.diff | 20 +- ...RefInTypeDeclaration(strict=false).js.diff | 27 +- ...dRefInTypeDeclaration(strict=true).js.diff | 24 +- .../compiler/freshLiteralInference.js.diff | 18 + .../freshLiteralTypesInIntersections.js.diff | 3 +- .../submodule/compiler/funClodule.errors.txt | 6 +- .../submodule/compiler/funClodule.js | 6 +- .../submodule/compiler/funClodule.js.diff | 13 + .../submodule/compiler/funClodule.symbols | 12 +- .../submodule/compiler/funClodule.types | 6 +- .../reference/submodule/compiler/funcdecl.js | 2 +- .../submodule/compiler/funcdecl.js.diff | 39 + .../submodule/compiler/funcdecl.symbols | 8 +- .../submodule/compiler/funcdecl.types | 2 +- .../functionAndPropertyNameConflict.js.diff | 24 + .../compiler/functionArgShadowing.js.diff | 38 +- ...ilityWithArrayLike01(strict=false).js.diff | 8 + ...bilityWithArrayLike01(strict=true).js.diff | 3 +- .../compiler/functionAssignment.js.diff | 16 + .../compiler/functionAssignment.symbols.diff | 20 + .../submodule/compiler/functionCall10.js.diff | 16 + .../submodule/compiler/functionCall13.js.diff | 16 + .../submodule/compiler/functionCall14.js.diff | 16 + .../submodule/compiler/functionCall15.js.diff | 13 + .../submodule/compiler/functionCall16.js.diff | 16 + .../submodule/compiler/functionCall17.js.diff | 16 + .../submodule/compiler/functionCall5.js | 2 +- .../submodule/compiler/functionCall5.js.diff | 15 +- .../submodule/compiler/functionCall5.symbols | 16 +- .../submodule/compiler/functionCall5.types | 2 +- .../compiler/functionCall7.errors.txt | 2 +- .../submodule/compiler/functionCall7.js | 2 +- .../submodule/compiler/functionCall7.js.diff | 15 +- .../submodule/compiler/functionCall7.symbols | 26 +- .../submodule/compiler/functionCall7.types | 2 +- ...ExpressionAndLambdaMatchesFunction.js.diff | 19 + ...ssionAndLambdaMatchesFunction.symbols.diff | 11 + .../functionExpressionInWithBlock.js.diff | 12 + ...functionLikeInParameterInitializer.js.diff | 49 +- .../compiler/functionMergedWithModule.js | 4 +- .../compiler/functionMergedWithModule.symbols | 18 +- .../compiler/functionMergedWithModule.types | 4 +- .../functionOverloadAmbiguity1.js.diff | 11 + .../compiler/functionOverloads43.js.diff | 12 + .../compiler/functionOverloads44.js.diff | 17 + .../compiler/functionOverloads44.types.diff | 13 +- .../compiler/functionOverloads45.js.diff | 17 + .../compiler/functionOverloads5.js.diff | 15 + .../compiler/functionOverloads6.js.diff | 15 + .../compiler/functionOverloads7.js.diff | 21 + ...ctionOverloadsOnGenericArity2.symbols.diff | 9 + .../functionOverloadsOutOfOrder.js.diff | 32 + ...verloadsRecursiveGenericReturnType.js.diff | 31 +- .../functionParameterArityMismatch.js.diff | 24 + .../functionSubtypingOfVarArgs.js.diff | 47 +- .../functionSubtypingOfVarArgs2.js.diff | 47 +- .../compiler/functionType.symbols.diff | 10 + .../functionTypeArgumentArrayAssignment.js | 2 +- ...unctionTypeArgumentArrayAssignment.symbols | 4 +- .../functionTypeArgumentArrayAssignment.types | 2 +- ...nctionTypeArgumentAssignmentCompat.js.diff | 11 + ...AnyReturnTypeAndNoReturnExpression.js.diff | 10 + ...hDefaultParameterWithNoStatements1.js.diff | 10 + ...DefaultParameterWithNoStatements10.js.diff | 14 + ...DefaultParameterWithNoStatements11.js.diff | 14 + ...DefaultParameterWithNoStatements12.js.diff | 14 + ...DefaultParameterWithNoStatements13.js.diff | 14 + ...DefaultParameterWithNoStatements14.js.diff | 14 + ...DefaultParameterWithNoStatements15.js.diff | 14 + ...DefaultParameterWithNoStatements16.js.diff | 14 + ...hDefaultParameterWithNoStatements2.js.diff | 10 + ...hDefaultParameterWithNoStatements3.js.diff | 14 + ...hDefaultParameterWithNoStatements4.js.diff | 14 + ...hDefaultParameterWithNoStatements5.js.diff | 14 + ...hDefaultParameterWithNoStatements6.js.diff | 14 + ...hDefaultParameterWithNoStatements7.js.diff | 14 + ...hDefaultParameterWithNoStatements8.js.diff | 14 + ...hDefaultParameterWithNoStatements9.js.diff | 14 + .../functionWithNoBestCommonType1.types.diff | 11 + .../functionWithNoBestCommonType2.types.diff | 13 + .../functionWithSameNameAsField.js.diff | 18 +- .../functionsInClassExpressions.js.diff | 22 +- ...singReturnStatementsAndExpressions.js.diff | 93 + ...fined(strictnullchecks=false).symbols.diff | 56 + ...efined(strictnullchecks=true).symbols.diff | 56 + ...uleExportedClassIsUsedBeforeDeclaration.js | 2 +- ...portedClassIsUsedBeforeDeclaration.symbols | 12 +- ...ExportedClassIsUsedBeforeDeclaration.types | 2 +- ...leOfFunctionWithoutReturnTypeAnnotation.js | 2 +- ...unctionWithoutReturnTypeAnnotation.symbols | 2 +- ...fFunctionWithoutReturnTypeAnnotation.types | 2 +- .../funduleSplitAcrossFiles.errors.txt | 6 +- .../compiler/funduleSplitAcrossFiles.js | 2 +- .../compiler/funduleSplitAcrossFiles.symbols | 2 +- .../compiler/funduleSplitAcrossFiles.types | 2 +- .../compiler/funduleUsedAcrossFileBoundary.js | 2 +- .../funduleUsedAcrossFileBoundary.symbols | 6 +- .../funduleUsedAcrossFileBoundary.types | 2 +- .../submodule/compiler/fuzzy.errors.txt | 2 +- .../reference/submodule/compiler/fuzzy.js | 2 +- .../submodule/compiler/fuzzy.js.diff | 31 +- .../submodule/compiler/fuzzy.symbols | 8 +- .../reference/submodule/compiler/fuzzy.types | 2 +- .../compiler/generativeRecursionWithTypeOf.js | 2 +- .../generativeRecursionWithTypeOf.js.diff | 19 +- .../generativeRecursionWithTypeOf.symbols | 4 +- .../generativeRecursionWithTypeOf.types | 2 +- .../generatorTransformFinalLabel.js.diff | 20 +- ...ArgumentCallSigAssignmentCompat.errors.txt | 2 +- .../genericArgumentCallSigAssignmentCompat.js | 2 +- ...ricArgumentCallSigAssignmentCompat.symbols | 6 +- ...nericArgumentCallSigAssignmentCompat.types | 2 +- .../submodule/compiler/genericArray1.js.diff | 11 + ...icArrayAssignmentCompatErrors.symbols.diff | 29 + .../genericArrayExtenstions.errors.txt.diff | 17 + .../genericArrayExtenstions.symbols.diff | 11 + .../genericArrayWithoutTypeAnnotation.js.diff | 16 + ...ricAssignmentCompatWithInterfaces1.js.diff | 18 + .../genericBaseClassLiteralProperty.js.diff | 44 +- .../genericBaseClassLiteralProperty2.js.diff | 54 +- ...seAfterMappedTypeApplication1.symbols.diff | 11 + .../genericCallWithFixedArguments.js.diff | 26 + ...inOwnBodyCastTypeParameterIdentity.js.diff | 35 +- .../genericCallbacksAndClassHierarchy.js | 2 +- .../genericCallbacksAndClassHierarchy.js.diff | 69 +- .../genericCallbacksAndClassHierarchy.symbols | 8 +- .../genericCallbacksAndClassHierarchy.types | 2 +- .../compiler/genericChainedCalls.js.diff | 18 + ...entingGenericInterfaceFromAnotherModule.js | 4 +- ...gGenericInterfaceFromAnotherModule.js.diff | 15 + ...gGenericInterfaceFromAnotherModule.symbols | 12 +- ...ingGenericInterfaceFromAnotherModule.types | 4 +- ...ritsConstructorFromNonGenericClass.js.diff | 47 + ...cClassPropertyInheritanceSpecialization.js | 6 +- ...sPropertyInheritanceSpecialization.js.diff | 65 +- ...sPropertyInheritanceSpecialization.symbols | 58 +- ...assPropertyInheritanceSpecialization.types | 6 +- .../compiler/genericClassStaticMethod.js.diff | 45 + .../compiler/genericClassWithStaticFactory.js | 2 +- .../genericClassWithStaticFactory.js.diff | 154 +- .../genericClassWithStaticFactory.symbols | 118 +- .../genericClassWithStaticFactory.types | 2 +- ...ClassWithStaticsUsingTypeArguments.js.diff | 20 +- .../compiler/genericClasses0.js.diff | 14 +- .../compiler/genericClasses1.js.diff | 14 +- .../compiler/genericClasses2.js.diff | 15 +- .../compiler/genericClasses3.js.diff | 41 +- .../compiler/genericClasses4.js.diff | 31 +- .../compiler/genericClassesInModule.js | 2 +- .../compiler/genericClassesInModule.js.diff | 24 + .../compiler/genericClassesInModule.symbols | 8 +- .../compiler/genericClassesInModule.types | 2 +- .../genericClassesRedeclaration.errors.txt | 4 +- .../compiler/genericClassesRedeclaration.js | 4 +- .../genericClassesRedeclaration.symbols | 12 +- .../genericClassesRedeclaration.types | 4 +- .../compiler/genericCloduleInModule.js | 4 +- .../compiler/genericCloduleInModule.js.diff | 20 + .../compiler/genericCloduleInModule.symbols | 10 +- .../compiler/genericCloduleInModule.types | 4 +- .../genericCloduleInModule2.errors.txt | 6 +- .../compiler/genericCloduleInModule2.js | 6 +- .../compiler/genericCloduleInModule2.js.diff | 25 + .../compiler/genericCloduleInModule2.symbols | 12 +- .../compiler/genericCloduleInModule2.types | 6 +- .../compiler/genericCloneReturnTypes.js.diff | 22 +- .../compiler/genericCloneReturnTypes2.js.diff | 23 +- .../genericCloneReturnTypes2.symbols.diff | 11 + .../compiler/genericCombinators2.js.diff | 11 + .../compiler/genericCombinators2.symbols.diff | 19 + .../compiler/genericConstraint1.js.diff | 20 + .../compiler/genericConstraint2.js.diff | 22 +- .../compiler/genericConstraint2.types.diff | 11 + .../genericConstraintDeclaration.js.diff | 18 + ...genericConstraintOnExtendedBuiltinTypes.js | 6 +- ...icConstraintOnExtendedBuiltinTypes.js.diff | 47 +- ...icConstraintOnExtendedBuiltinTypes.symbols | 28 +- ...ericConstraintOnExtendedBuiltinTypes.types | 6 +- ...enericConstraintOnExtendedBuiltinTypes2.js | 6 +- ...cConstraintOnExtendedBuiltinTypes2.js.diff | 47 +- ...cConstraintOnExtendedBuiltinTypes2.symbols | 28 +- ...ricConstraintOnExtendedBuiltinTypes2.types | 6 +- .../genericConstructorFunction1.symbols.diff | 20 + ...ericContextualTypingSpecialization.js.diff | 8 + .../compiler/genericDefaults.js.diff | 111 + .../compiler/genericDefaults.types.diff | 314 + ...ericDerivedTypeWithSpecializedBase.js.diff | 41 +- ...ricDerivedTypeWithSpecializedBase2.js.diff | 41 +- ...llSignatureReturnTypeMismatch.symbols.diff | 13 + .../genericFunctionHasFreshTypeArgs.js.diff | 8 + .../genericFunctionInference2.js.diff | 24 +- ...nericFunctionSpecializations1.symbols.diff | 10 + ...ericFunctionTypedArgumentsAreFixed.js.diff | 8 + .../compiler/genericFunctions2.js.diff | 11 + ...icFunctionsAndConditionalInference.js.diff | 24 + ...enericFunctionsNotContextSensitive.js.diff | 6 +- ...ctionsWithOptionalParameters1.symbols.diff | 11 + ...ctionsWithOptionalParameters2.symbols.diff | 11 + ...icFunctionsWithOptionalParameters3.js.diff | 26 + ...ctionsWithOptionalParameters3.symbols.diff | 29 + .../genericFunduleInModule.errors.txt | 4 +- .../compiler/genericFunduleInModule.js | 4 +- .../compiler/genericFunduleInModule.symbols | 12 +- .../compiler/genericFunduleInModule.types | 4 +- .../genericFunduleInModule2.errors.txt | 6 +- .../compiler/genericFunduleInModule2.js | 6 +- .../compiler/genericFunduleInModule2.js.diff | 11 + .../compiler/genericFunduleInModule2.symbols | 14 +- .../compiler/genericFunduleInModule2.types | 6 +- .../submodule/compiler/genericGetter.js.diff | 25 +- .../submodule/compiler/genericGetter2.js.diff | 33 +- .../submodule/compiler/genericGetter3.js.diff | 37 +- .../compiler/genericImplements.js.diff | 61 +- ...essMethodIntersectionCanBeAccessed.js.diff | 17 + ...thodIntersectionCanBeAccessed.symbols.diff | 14 + ...MethodIntersectionCanBeAccessed.types.diff | 14 + ...essVarianceComparisonResultCorrect.js.diff | 25 +- .../compiler/genericInference1.js.diff | 8 + .../submodule/compiler/genericInference2.js | 2 +- .../compiler/genericInference2.symbols | 6 +- .../compiler/genericInference2.types | 2 +- ...nericInferenceDefaultTypeParameter.js.diff | 9 +- ...erenceDefaultTypeParameterJsxReact.js.diff | 4 +- ...enericInheritedDefaultConstructors.js.diff | 38 +- .../compiler/genericInstanceOf.js.diff | 21 +- .../genericInterfaceImplementation.js.diff | 23 + .../compiler/genericInterfaceTypeCall.js.diff | 10 + ...ericInterfacesWithoutTypeArguments.js.diff | 15 + .../genericIsNeverEmptyObject.js.diff | 10 +- ...enericLambaArgWithoutTypeArguments.js.diff | 8 + .../genericMappedTypeAsClause.js.diff | 21 +- ...edDeclarationUsingTypeParameter.errors.txt | 2 +- ...ericMergedDeclarationUsingTypeParameter.js | 2 +- ...ergedDeclarationUsingTypeParameter.symbols | 2 +- ...cMergedDeclarationUsingTypeParameter.types | 2 +- ...dDeclarationUsingTypeParameter2.errors.txt | 2 +- ...ricMergedDeclarationUsingTypeParameter2.js | 2 +- ...rgedDeclarationUsingTypeParameter2.js.diff | 17 + ...rgedDeclarationUsingTypeParameter2.symbols | 2 +- ...MergedDeclarationUsingTypeParameter2.types | 2 +- ...nericObjectCreationWithoutTypeArgs.js.diff | 16 + .../genericObjectLitReturnType.js.diff | 18 + .../genericObjectSpreadResultInSwitch.js.diff | 31 + .../compiler/genericOfACloduleType1.js | 4 +- .../compiler/genericOfACloduleType1.js.diff | 38 + .../compiler/genericOfACloduleType1.symbols | 14 +- .../compiler/genericOfACloduleType1.types | 4 +- .../compiler/genericOfACloduleType2.js | 6 +- .../compiler/genericOfACloduleType2.js.diff | 38 + .../compiler/genericOfACloduleType2.symbols | 16 +- .../compiler/genericOfACloduleType2.types | 6 +- .../genericOverloadSignatures.js.diff | 14 + .../genericParameterAssignability1.js.diff | 9 + .../compiler/genericPrototypeProperty.js.diff | 19 +- .../genericPrototypeProperty2.js.diff | 58 +- .../genericPrototypeProperty3.js.diff | 58 +- ...ericRecursiveImplicitConstructorErrors2.js | 2 +- ...ecursiveImplicitConstructorErrors2.js.diff | 62 + ...ecursiveImplicitConstructorErrors2.symbols | 6 +- ...cRecursiveImplicitConstructorErrors2.types | 2 +- ...rsiveImplicitConstructorErrors3.errors.txt | 4 +- ...ericRecursiveImplicitConstructorErrors3.js | 4 +- ...ecursiveImplicitConstructorErrors3.js.diff | 72 +- ...ecursiveImplicitConstructorErrors3.symbols | 18 +- ...cRecursiveImplicitConstructorErrors3.types | 4 +- .../submodule/compiler/genericReduce.js.diff | 20 + .../compiler/genericRestArgs.js.diff | 17 + .../compiler/genericRestTypes.js.diff | 31 +- .../genericReversingTypeParameters.js.diff | 21 +- .../genericReversingTypeParameters2.js.diff | 21 +- .../genericSignatureIdentity.symbols.diff | 11 + .../compiler/genericSpecializations1.js.diff | 33 + .../compiler/genericSpecializations2.js.diff | 45 + .../compiler/genericSpecializations3.js.diff | 49 + .../genericStaticAnyTypeFunction.js.diff | 25 + .../genericTemplateOverloadResolution.js.diff | 12 + ...ricTemplateOverloadResolution.symbols.diff | 27 + .../genericTypeArgumentInference1.errors.txt | 2 +- .../compiler/genericTypeArgumentInference1.js | 2 +- .../genericTypeArgumentInference1.symbols | 6 +- .../genericTypeArgumentInference1.types | 2 +- .../compiler/genericTypeAssertions1.js.diff | 18 + .../compiler/genericTypeAssertions2.js.diff | 47 + .../compiler/genericTypeAssertions3.js.diff | 10 + .../compiler/genericTypeAssertions4.js.diff | 55 + .../compiler/genericTypeAssertions6.js.diff | 56 + .../genericTypeAssertions6.symbols.diff | 70 + .../compiler/genericTypeConstraints.js.diff | 56 + .../genericTypeParameterEquivalence2.js.diff | 11 + ...nericTypeReferencesRequireTypeArgs.js.diff | 18 + ...nericTypeUsedWithoutTypeArguments1.js.diff | 13 + .../genericTypeWithCallableMembers.js.diff | 21 +- ...ericTypeWithNonGenericBaseMisMatch.js.diff | 17 + .../genericWithCallSignatures1.js.diff | 17 +- ...ricWithIndexerOfTypeParameterType1.js.diff | 19 +- ...ConstraintComparableWithCurlyCurly.js.diff | 31 +- .../genericWithOpenTypeParameters1.js.diff | 25 + .../submodule/compiler/generics3.js.diff | 15 +- .../submodule/compiler/generics4.js.diff | 15 +- .../compiler/generics4NoError.js.diff | 14 +- .../genericsAndHigherOrderFunctions.js.diff | 18 + .../genericsManyTypeParameters.types.diff | 20 + ...nericsWithDuplicateTypeParameters1.js.diff | 20 + .../genericsWithoutTypeParameters1.js.diff | 42 +- ...hImpliedReturnTypeAndFunctionClassMerge.js | 4 +- ...iedReturnTypeAndFunctionClassMerge.js.diff | 26 + ...iedReturnTypeAndFunctionClassMerge.symbols | 8 +- ...turnTypeAndFunctionClassMerge.symbols.diff | 11 + ...pliedReturnTypeAndFunctionClassMerge.types | 4 +- .../compiler/getAndSetAsMemberNames.js.diff | 68 +- .../getAndSetNotIdenticalType.js.diff | 24 + .../getAndSetNotIdenticalType2.js.diff | 42 +- .../getAndSetNotIdenticalType3.js.diff | 42 +- .../getParameterNameAtPosition.js.diff | 3 +- .../getParameterNameAtPosition.symbols.diff | 11 + .../compiler/getSetEnumerable.js.diff | 64 + .../getterControlFlowStrictNull.js.diff | 71 + .../getterControlFlowStrictNull.symbols.diff | 29 + .../compiler/getterMissingReturnError.js.diff | 20 + .../getterSetterSubtypeAssignment.types.diff | 20 + ...etterThatThrowsShouldNotNeedReturn.js.diff | 29 + .../compiler/gettersAndSetters.types.diff | 10 + .../gettersAndSettersAccessibility.js.diff | 22 + .../compiler/gettersAndSettersErrors.js.diff | 53 +- .../gettersAndSettersTypesAgree.js.diff | 35 + .../reference/submodule/compiler/global.js | 2 +- .../submodule/compiler/global.symbols | 8 +- .../reference/submodule/compiler/global.types | 2 +- ...lFunctionAugmentationOverload.symbols.diff | 11 + .../globalIsContextualKeyword.js.diff | 24 + .../compiler/globalThis.symbols.diff | 9 + .../compiler/globalThisCapture.js.diff | 13 + .../compiler/grammarAmbiguities1.js.diff | 27 + .../heterogeneousArrayAndOverloads.js.diff | 23 + ...herOrderMappedIndexLookupInference.js.diff | 8 + .../homomorphicMappedTypeNesting.symbols.diff | 11 + ...enericConditionalsWithInferRelated.js.diff | 25 + ...cConditionalsWithInferRelated.symbols.diff | 11 + ...identicalTypesNoDifferByCheckOrder.js.diff | 26 + ...identifierStartAfterNumericLiteral.js.diff | 11 + .../compiler/ignoredJsxAttributes.js.diff | 10 +- .../illegalModifiersOnClassElements.js.diff | 12 +- .../illegalSuperCallsInConstructor.js.diff | 57 +- .../implementArrayInterface.symbols.diff | 11 + .../implementClausePrecedingExtends.js.diff | 38 +- ...mplementGenericWithMismatchedTypes.js.diff | 29 +- ...mplementInterfaceAnyMemberWithVoid.js.diff | 16 + .../implementPublicPropertyAsPrivate.js.diff | 12 +- .../implementsClauseAlreadySeen.js.diff | 22 + .../implementsInClassExpression.js.diff | 15 + .../implementsIncorrectlyNoAssertion.js.diff | 12 +- .../compiler/implicitAnyAmbients.errors.txt | 4 +- .../submodule/compiler/implicitAnyAmbients.js | 4 +- .../compiler/implicitAnyAmbients.symbols | 4 +- .../compiler/implicitAnyAmbients.types | 4 +- .../implicitAnyAnyReturningFunction.js.diff | 27 + .../compiler/implicitAnyCastedValue.js.diff | 70 +- ...clareFunctionExprWithoutFormalType.js.diff | 24 + ...nyDeclareFunctionWithoutFormalType.js.diff | 29 + ...plicitAnyDeclareMemberWithoutType2.js.diff | 15 +- ...tAnyDeclareTypePropertyWithoutType.js.diff | 17 + .../implicitAnyFromCircularInference.js.diff | 42 +- ...licitAnyFromCircularInference.symbols.diff | 11 + ...unctionInvocationWithAnyArguements.js.diff | 26 + ...itAnyFunctionReturnNullOrUndefined.js.diff | 26 + .../compiler/implicitAnyGenerics.js.diff | 27 +- ...GetAndSetAccessorWithAnyReturnType.js.diff | 64 +- ...implicitAnyInAmbientDeclaration.errors.txt | 2 +- .../implicitAnyInAmbientDeclaration.js | 2 +- .../implicitAnyInAmbientDeclaration.symbols | 4 +- .../implicitAnyInAmbientDeclaration.types | 2 +- .../compiler/implicitAnyInCatch.js.diff | 19 + .../compiler/implicitAnyWidenToAny.js.diff | 15 +- .../compiler/implicitConstParameters.js.diff | 57 + .../implicitConstParameters.types.diff | 6 + .../compiler/implicitIndexSignatures.js.diff | 97 + ...edNodeFormatEmit1(module=commonjs).js.diff | 23 + ...liedNodeFormatEmit1(module=esnext).js.diff | 28 + ...edNodeFormatEmit1(module=preserve).js.diff | 26 + ...edNodeFormatEmit2(module=commonjs).js.diff | 23 + ...liedNodeFormatEmit2(module=esnext).js.diff | 28 + ...edNodeFormatEmit2(module=preserve).js.diff | 26 + ...edNodeFormatEmit3(module=commonjs).js.diff | 23 + ...liedNodeFormatEmit3(module=esnext).js.diff | 28 + ...edNodeFormatEmit3(module=preserve).js.diff | 26 + ...edNodeFormatEmit4(module=commonjs).js.diff | 23 + ...liedNodeFormatEmit4(module=esnext).js.diff | 28 + ...edNodeFormatEmit4(module=preserve).js.diff | 26 + ...sAnExternalModuleInsideAnInternalModule.js | 4 +- ...ternalModuleInsideAnInternalModule.symbols | 14 +- ...ExternalModuleInsideAnInternalModule.types | 4 +- .../compiler/importAliasFromNamespace.js.diff | 15 +- .../importAliasFromNamespace.types.diff | 11 + .../importAliasInModuleAugmentation.js.diff | 11 + .../compiler/importAliasWithDottedName.js | 6 +- .../importAliasWithDottedName.js.diff | 11 + .../importAliasWithDottedName.symbols | 10 +- .../compiler/importAliasWithDottedName.types | 6 +- .../compiler/importAnImport.errors.txt | 4 +- .../submodule/compiler/importAnImport.js | 4 +- .../submodule/compiler/importAnImport.symbols | 18 +- .../submodule/compiler/importAnImport.types | 4 +- ...AndVariableDeclarationConflict1.errors.txt | 2 +- .../importAndVariableDeclarationConflict1.js | 2 +- ...ortAndVariableDeclarationConflict1.symbols | 2 +- ...mportAndVariableDeclarationConflict1.types | 2 +- .../importAndVariableDeclarationConflict2.js | 2 +- ...ortAndVariableDeclarationConflict2.js.diff | 15 +- ...ortAndVariableDeclarationConflict2.symbols | 2 +- ...mportAndVariableDeclarationConflict2.types | 2 +- ...AndVariableDeclarationConflict3.errors.txt | 2 +- .../importAndVariableDeclarationConflict3.js | 2 +- ...ortAndVariableDeclarationConflict3.symbols | 2 +- ...mportAndVariableDeclarationConflict3.types | 2 +- ...AndVariableDeclarationConflict4.errors.txt | 2 +- .../importAndVariableDeclarationConflict4.js | 2 +- ...ortAndVariableDeclarationConflict4.symbols | 2 +- ...mportAndVariableDeclarationConflict4.types | 2 +- .../compiler/importAsBaseClass.js.diff | 41 +- .../submodule/compiler/importDecl.js | 4 +- .../submodule/compiler/importDecl.js.diff | 54 +- .../submodule/compiler/importDecl.symbols | 4 +- .../submodule/compiler/importDecl.types | 4 +- .../importDeclWithDeclareModifier.errors.txt | 2 +- .../compiler/importDeclWithDeclareModifier.js | 2 +- .../importDeclWithDeclareModifier.symbols | 4 +- .../importDeclWithDeclareModifier.types | 2 +- ...DeclareModifierInAmbientContext.errors.txt | 2 +- ...DeclWithDeclareModifierInAmbientContext.js | 2 +- ...ithDeclareModifierInAmbientContext.symbols | 6 +- ...lWithDeclareModifierInAmbientContext.types | 2 +- ...portModifierAndExportAssignment.errors.txt | 2 +- ...clWithExportModifierAndExportAssignment.js | 2 +- ...hExportModifierAndExportAssignment.symbols | 4 +- ...ithExportModifierAndExportAssignment.types | 2 +- ...xportAssignmentInAmbientContext.errors.txt | 2 +- ...fierAndExportAssignmentInAmbientContext.js | 2 +- ...ndExportAssignmentInAmbientContext.symbols | 6 +- ...rAndExportAssignmentInAmbientContext.types | 2 +- ...tDeclWithExportModifierInAmbientContext.js | 2 +- ...WithExportModifierInAmbientContext.symbols | 6 +- ...clWithExportModifierInAmbientContext.types | 2 +- ...DeclarationInModuleDeclaration1.errors.txt | 2 +- .../importDeclarationInModuleDeclaration1.js | 2 +- ...ortDeclarationInModuleDeclaration1.symbols | 4 +- ...mportDeclarationInModuleDeclaration1.types | 2 +- .../importDeclarationUsedAsTypeQuery.js.diff | 15 +- .../compiler/importEqualsError45874.js.diff | 3 +- .../submodule/compiler/importHelpers.js.diff | 94 +- .../compiler/importHelpers.symbols.diff | 32 +- ...Script(verbatimmodulesyntax=false).js.diff | 25 +- ...aScript(verbatimmodulesyntax=true).js.diff | 25 +- ...importHelpersInAmbientContext.symbols.diff | 35 +- .../importHelpersInIsolatedModules.js.diff | 82 +- ...mportHelpersInIsolatedModules.symbols.diff | 32 +- .../compiler/importHelpersInTsx.js.diff | 8 +- .../compiler/importHelpersInTsx.symbols.diff | 32 +- .../compiler/importHelpersNoHelpers.js.diff | 93 +- ...HelpersNoHelpersForAsyncGenerators.js.diff | 21 +- .../compiler/importHelpersNoModule.js.diff | 82 +- .../compiler/importInTypePosition.js | 6 +- .../compiler/importInTypePosition.js.diff | 17 +- .../compiler/importInTypePosition.symbols | 20 +- .../compiler/importInTypePosition.types | 6 +- .../compiler/importInsideModule.errors.txt | 2 +- .../submodule/compiler/importInsideModule.js | 2 +- .../compiler/importInsideModule.symbols | 6 +- .../compiler/importInsideModule.types | 2 +- .../compiler/importNonExportedMember4.js.diff | 16 + .../compiler/importNonExportedMember5.js.diff | 16 + .../compiler/importNonExportedMember6.js.diff | 16 + .../compiler/importNonExportedMember7.js.diff | 16 + .../importNotElidedWhenNotFound.js.diff | 54 +- .../compiler/importOnAliasedIdentifiers.js | 4 +- .../importOnAliasedIdentifiers.symbols | 14 +- .../importOnAliasedIdentifiers.symbols.diff | 4 +- .../compiler/importOnAliasedIdentifiers.types | 4 +- ...tTypeGenericArrowTypeParenthesized.js.diff | 9 +- .../compiler/importUsedInExtendsList1.js.diff | 41 +- ...dConditionalTypeInstantiation.symbols.diff | 20 + ...sedConditionalTypeInstantiation.types.diff | 16 + .../importedModuleAddToGlobal.errors.txt | 8 +- .../compiler/importedModuleAddToGlobal.js | 6 +- .../importedModuleAddToGlobal.js.diff | 9 +- .../importedModuleAddToGlobal.symbols | 12 +- .../compiler/importedModuleAddToGlobal.types | 6 +- ...NotOperateOnPrimitiveTypes.errors.txt.diff | 20 + .../inDoesNotOperateOnPrimitiveTypes.js.diff | 15 + ...nDoesNotOperateOnPrimitiveTypes.types.diff | 37 +- .../compiler/inKeywordAndIntersection.js.diff | 34 +- ...nKeywordTypeguard(strict=false).types.diff | 49 +- ...inKeywordTypeguard(strict=true).types.diff | 54 +- .../compiler/inOperatorWithGeneric.js.diff | 19 + ...eAssignmentOfIdenticallyNamedTypes.js.diff | 17 +- .../compiler/incompatibleExports1.errors.txt | 4 +- .../compiler/incompatibleExports1.js | 4 +- .../compiler/incompatibleExports1.symbols | 4 +- .../incompatibleExports1.symbols.diff | 11 + .../compiler/incompatibleExports1.types | 4 +- .../incompatibleExports2.symbols.diff | 11 + .../compiler/incompatibleTypes.js.diff | 63 +- .../compiler/incompatibleTypes.types.diff | 11 + .../compiler/incompleteObjectLiteral1.js.diff | 2 +- .../incorrectClassOverloadChain.js.diff | 12 +- ...fTypeArgumentsDuringErrorReporting.js.diff | 11 + .../compiler/incrementOnNullAssertion.js.diff | 17 +- .../compiler/incrementOnTypeParameter.js.diff | 19 +- .../compiler/incrementalConfig.js.diff | 8 + .../compiler/incrementalInvalid.js.diff | 8 + .../incrementalTsBuildInfoFile.js.diff | 8 + .../indexAt(target=esnext).symbols.diff | 11 + .../compiler/indexClassByNumber.js.diff | 15 + .../indexIntoArraySubclass.symbols.diff | 11 + .../submodule/compiler/indexIntoEnum.js | 2 +- .../submodule/compiler/indexIntoEnum.js.diff | 11 + .../submodule/compiler/indexIntoEnum.symbols | 6 +- .../submodule/compiler/indexIntoEnum.types | 2 +- ...dexSignatureMustHaveTypeAnnotation.js.diff | 21 +- .../compiler/indexSignatureTypeCheck2.js.diff | 16 + ...SignatureWithAccessibilityModifier.js.diff | 13 + .../indexSignatureWithInitializer.js.diff | 14 +- .../indexSignatureWithInitializer1.js.diff | 13 + .../indexSignatureWithTrailingComma.js.diff | 13 + ...dexSignatureWithoutTypeAnnotation1.js.diff | 13 + .../submodule/compiler/indexTypeCheck.js.diff | 17 +- ...xTypeNoSubstitutionTemplateLiteral.js.diff | 3 +- .../indexWithUndefinedAndNull.js.diff | 16 + ...thUndefinedAndNullStrictNullChecks.js.diff | 16 + .../compiler/indexWithoutParamType2.js.diff | 12 +- .../indexedAccessCanBeHighOrder.js.diff | 15 + .../indexedAccessConstraints.types.diff | 10 + ...estedSimplifiedSubstituteUnwrapped.js.diff | 38 +- .../indexedAccessNormalization.js.diff | 14 +- ...ssPrivateMemberOfGenericConstraint.js.diff | 21 +- .../compiler/indexedAccessRelation.js.diff | 48 +- .../compiler/indexedAccessRelation.types.diff | 14 + .../indexedAccessTypeConstraints.js.diff | 62 +- .../submodule/compiler/indexer2A.js.diff | 21 + .../submodule/compiler/indexer3.symbols.diff | 14 + .../submodule/compiler/indexerA.js.diff | 23 +- .../compiler/indexerAsOptional.js.diff | 13 + .../compiler/indexerConstraints2.js.diff | 89 +- .../compiler/indexerConstraints2.types.diff | 11 + .../indexerReturningTypeParameter1.js.diff | 20 + .../indexerSignatureWithRestParam.js.diff | 13 + .../compiler/indexingTypesWithNever.js.diff | 17 +- ...criminantAndExcessProperty.errors.txt.diff | 39 + ...irectDiscriminantAndExcessProperty.js.diff | 24 + .../compiler/indirectSelfReference.js.diff | 39 + .../indirectSelfReferenceGeneric.js.diff | 39 + .../indirectTypeParameterReferences.js.diff | 26 +- ...ferFromGenericFunctionReturnTypes1.js.diff | 73 +- ...ferFromGenericFunctionReturnTypes2.js.diff | 95 +- ...FromGenericFunctionReturnTypes3.types.diff | 20 + ...ObjectTypeFromStringLiteralToKeyof.js.diff | 10 + ...ParameterWithMethodCallInitializer.js.diff | 42 + .../inferRestArgumentsMappedTuple.js.diff | 6 +- .../inferSecondaryParameter.symbols.diff | 20 + .../compiler/inferSetterParamType.js.diff | 48 + ...tringLiteralUnionForBindingElement.js.diff | 31 + .../inferTupleFromBindingPattern.js.diff | 8 + ...mentsInSignatureWithRestParameters.js.diff | 30 + .../inferTypeParameterConstraints.js.diff | 46 +- .../inferTypeParameterConstraints.types.diff | 11 + .../inferTypePredicates.errors.txt.diff | 4 +- .../compiler/inferTypePredicates.js.diff | 316 +- .../compiler/inferTypePredicates.symbols.diff | 126 + .../compiler/inferTypePredicates.types.diff | 197 +- ...erenceAndSelfReferentialConstraint.js.diff | 30 +- ...inferenceDoesNotAddUndefinedOrNull.js.diff | 28 +- ...enceDoesNotAddUndefinedOrNull.symbols.diff | 11 + ...AgainstUninstantiatedTypeParameter.js.diff | 44 +- .../inferenceFromParameterlessLambda.js.diff | 8 + ...fNullableObjectTypesWithCommonBase.js.diff | 5 +- .../inferenceOptionalProperties.js.diff | 10 +- .../inferenceOptionalPropertiesStrict.js.diff | 10 +- ...onalPropertiesToIndexSignatures.types.diff | 17 +- ...nferenceShouldFailOnEvolvingArrays.js.diff | 18 +- ...UnionOfObjectsMappedContextualType.js.diff | 8 +- ...OfObjectsMappedContextualType.symbols.diff | 11 + ...erentialTypingObjectLiteralMethod1.js.diff | 8 + ...erentialTypingObjectLiteralMethod2.js.diff | 8 + ...nferentialTypingUsingApparentType1.js.diff | 8 + ...nferentialTypingUsingApparentType2.js.diff | 8 + ...nferentialTypingUsingApparentType3.js.diff | 42 +- ...entialTypingWithFunctionTypeNested.js.diff | 8 + ...WithFunctionTypeSyntacticScenarios.js.diff | 11 + ...edFunctionReturnTypeIsEmptyType.types.diff | 11 + ...nferredNonidentifierTypesGetQuotes.js.diff | 13 + .../inferredRestTypeFixedOnce.js.diff | 10 + .../inferredReturnTypeIncorrectReuse1.js.diff | 14 + .../inferringAnyFunctionType1.js.diff | 8 + .../inferringAnyFunctionType2.js.diff | 8 + .../inferringAnyFunctionType3.js.diff | 8 + .../inferringAnyFunctionType4.js.diff | 8 + .../inferringAnyFunctionType5.js.diff | 8 + ...nTypeFromConstructSignatureGeneric.js.diff | 68 + .../compiler/infiniteConstraints.js.diff | 10 +- .../infinitelyExpandingOverloads.js.diff | 44 +- .../infinitelyExpandingOverloads.symbols.diff | 15 + ...nitelyExpandingTypesNonGenericBase.js.diff | 50 +- .../inheritFromGenericTypeParameter.js.diff | 30 + ...vatePropertiesFromDifferentOrigins.js.diff | 21 +- ...amePrivatePropertiesFromSameOrigin.js.diff | 47 +- ...ePropertiesWithDifferentVisibility.js.diff | 21 +- .../submodule/compiler/inheritance.js.diff | 108 +- .../submodule/compiler/inheritance1.js.diff | 90 +- ...eGrandParentPrivateMemberCollision.js.diff | 50 + ...ateMemberCollisionWithPublicMember.js.diff | 50 + ...icMemberCollisionWithPrivateMember.js.diff | 50 + ...ceMemberAccessorOverridingAccessor.js.diff | 65 + ...anceMemberAccessorOverridingMethod.js.diff | 56 + ...ceMemberAccessorOverridingProperty.js.diff | 52 +- ...itanceMemberFuncOverridingAccessor.js.diff | 57 + ...eritanceMemberFuncOverridingMethod.js.diff | 46 + ...itanceMemberFuncOverridingProperty.js.diff | 43 +- ...ceMemberPropertyOverridingAccessor.js.diff | 59 +- ...anceMemberPropertyOverridingMethod.js.diff | 42 +- ...ceMemberPropertyOverridingProperty.js.diff | 38 +- ...ritanceOfGenericConstructorMethod1.js.diff | 40 + ...ceOfGenericConstructorMethod1.symbols.diff | 26 + .../inheritanceOfGenericConstructorMethod2.js | 4 +- ...ritanceOfGenericConstructorMethod2.js.diff | 64 + ...ritanceOfGenericConstructorMethod2.symbols | 16 +- ...heritanceOfGenericConstructorMethod2.types | 4 +- ...ceStaticAccessorOverridingAccessor.js.diff | 65 + ...anceStaticAccessorOverridingMethod.js.diff | 57 + ...ceStaticAccessorOverridingProperty.js.diff | 52 +- ...itanceStaticFuncOverridingAccessor.js.diff | 57 + ...icFuncOverridingAccessorOfFuncType.js.diff | 52 + ...eritanceStaticFuncOverridingMethod.js.diff | 46 + ...itanceStaticFuncOverridingProperty.js.diff | 43 +- ...icFuncOverridingPropertyOfFuncType.js.diff | 43 +- ...FunctionOverridingInstanceProperty.js.diff | 43 +- ...inheritanceStaticMembersCompatible.js.diff | 38 +- ...heritanceStaticMembersIncompatible.js.diff | 38 +- ...ceStaticPropertyOverridingAccessor.js.diff | 54 +- ...anceStaticPropertyOverridingMethod.js.diff | 42 +- ...ceStaticPropertyOverridingProperty.js.diff | 38 +- ...dConstructorPropertyContextualType.js.diff | 35 + ...inheritedConstructorWithRestParams.js.diff | 45 + ...nheritedConstructorWithRestParams2.js.diff | 58 + ...tedFunctionAssignmentCompatibility.js.diff | 9 + ...nctionAssignmentCompatibility.symbols.diff | 11 + ...inheritedGenericCallSignature.symbols.diff | 10 + ...nheritedModuleMembersForClodule.errors.txt | 2 +- .../inheritedModuleMembersForClodule.js | 2 +- .../inheritedModuleMembersForClodule.js.diff | 62 + .../inheritedModuleMembersForClodule.symbols | 8 +- .../inheritedModuleMembersForClodule.types | 2 +- ...initializePropertiesWithRenamedLet.js.diff | 26 + ...structuringAssignmentTypes.errors.txt.diff | 15 + ...alizedDestructuringAssignmentTypes.js.diff | 9 + ...dDestructuringAssignmentTypes.symbols.diff | 13 + ...zedDestructuringAssignmentTypes.types.diff | 11 +- .../initializerWithThisPropertyAccess.js.diff | 82 +- ...ConditionalHasSimilarAssignability.js.diff | 19 + ...sAssignableToConstraintSameAsAlias.js.diff | 17 +- .../compiler/innerAliases.errors.txt | 10 +- .../submodule/compiler/innerAliases.js | 10 +- .../submodule/compiler/innerAliases.js.diff | 39 + .../submodule/compiler/innerAliases.symbols | 30 +- .../submodule/compiler/innerAliases.types | 10 +- .../submodule/compiler/innerAliases2.js | 4 +- .../submodule/compiler/innerAliases2.js.diff | 19 + .../submodule/compiler/innerAliases2.symbols | 26 +- .../submodule/compiler/innerAliases2.types | 4 +- .../compiler/innerBoundLambdaEmit.js | 2 +- .../compiler/innerBoundLambdaEmit.js.diff | 17 + .../compiler/innerBoundLambdaEmit.symbols | 6 +- .../innerBoundLambdaEmit.symbols.diff | 13 + .../compiler/innerBoundLambdaEmit.types | 2 +- .../submodule/compiler/innerExtern.js | 6 +- .../submodule/compiler/innerExtern.js.diff | 20 +- .../submodule/compiler/innerExtern.symbols | 12 +- .../submodule/compiler/innerExtern.types | 6 +- .../reference/submodule/compiler/innerFunc.js | 2 +- .../submodule/compiler/innerFunc.symbols | 4 +- .../submodule/compiler/innerFunc.types | 2 +- .../compiler/innerModExport1.errors.txt | 2 +- .../submodule/compiler/innerModExport1.js | 2 +- .../compiler/innerModExport1.symbols | 2 +- .../submodule/compiler/innerModExport1.types | 2 +- .../compiler/innerModExport2.errors.txt | 2 +- .../submodule/compiler/innerModExport2.js | 2 +- .../compiler/innerModExport2.symbols | 2 +- .../submodule/compiler/innerModExport2.types | 2 +- .../innerTypeArgumentInference.symbols.diff | 21 + .../innerTypeArgumentInference.types.diff | 15 + .../instanceAndStaticDeclarations1.js.diff | 36 +- ...nstanceAndStaticDeclarations1.symbols.diff | 11 + .../compiler/instanceOfAssignability.js.diff | 138 +- .../instanceOfAssignability.symbols.diff | 34 + .../instanceOfAssignability.types.diff | 37 +- .../compiler/instanceSubtypeCheck2.js.diff | 38 +- ...instanceofNarrowReadonlyArray.symbols.diff | 11 + .../compiler/instanceofOperator.errors.txt | 2 +- .../instanceofOperator.errors.txt.diff | 2 +- .../submodule/compiler/instanceofOperator.js | 2 +- .../compiler/instanceofOperator.js.diff | 16 + .../compiler/instanceofOperator.symbols | 10 +- .../compiler/instanceofOperator.types | 2 +- ...ceofWithStructurallyIdenticalTypes.js.diff | 92 +- .../instantiateContextualTypes.types.diff | 37 +- ...ntiateContextuallyTypedGenericThis.js.diff | 13 + .../instantiateCrossFileMerge.js.diff | 8 + .../instantiatedBaseTypeConstraints.js.diff | 16 + ...stantiatedReturnTypeContravariance.js.diff | 49 + .../instantiatedTypeAliasDisplay.js.diff | 9 +- ...nstantiationExpressionErrorNoCrash.js.diff | 20 + .../submodule/compiler/intTypeCheck.js.diff | 18 + .../compiler/interMixingModulesInterfaces0.js | 4 +- .../interMixingModulesInterfaces0.js.diff | 11 + .../interMixingModulesInterfaces0.symbols | 22 +- .../interMixingModulesInterfaces0.types | 4 +- .../compiler/interMixingModulesInterfaces1.js | 4 +- .../interMixingModulesInterfaces1.js.diff | 11 + .../interMixingModulesInterfaces1.symbols | 22 +- .../interMixingModulesInterfaces1.types | 4 +- .../compiler/interMixingModulesInterfaces2.js | 4 +- .../interMixingModulesInterfaces2.js.diff | 11 + .../interMixingModulesInterfaces2.symbols | 14 +- .../interMixingModulesInterfaces2.types | 4 +- .../compiler/interMixingModulesInterfaces3.js | 4 +- .../interMixingModulesInterfaces3.js.diff | 11 + .../interMixingModulesInterfaces3.symbols | 8 +- .../interMixingModulesInterfaces3.types | 4 +- .../compiler/interMixingModulesInterfaces4.js | 4 +- .../interMixingModulesInterfaces4.js.diff | 11 + .../interMixingModulesInterfaces4.symbols | 18 +- .../interMixingModulesInterfaces4.types | 4 +- .../compiler/interMixingModulesInterfaces5.js | 4 +- .../interMixingModulesInterfaces5.js.diff | 11 + .../interMixingModulesInterfaces5.symbols | 12 +- .../interMixingModulesInterfaces5.types | 4 +- .../interfaceAssignmentCompat.errors.txt | 2 +- .../compiler/interfaceAssignmentCompat.js | 2 +- .../interfaceAssignmentCompat.js.diff | 11 + .../interfaceAssignmentCompat.symbols | 12 +- .../compiler/interfaceAssignmentCompat.types | 2 +- .../compiler/interfaceClassMerging.js.diff | 48 +- .../compiler/interfaceClassMerging2.js.diff | 58 +- .../compiler/interfaceContextualType.js.diff | 25 +- .../compiler/interfaceDeclaration1.js.diff | 15 + .../compiler/interfaceDeclaration2.js | 2 +- .../compiler/interfaceDeclaration2.js.diff | 15 + .../compiler/interfaceDeclaration2.symbols | 6 +- .../compiler/interfaceDeclaration2.types | 2 +- .../compiler/interfaceDeclaration4.errors.txt | 2 +- .../compiler/interfaceDeclaration4.js | 2 +- .../compiler/interfaceDeclaration4.js.diff | 41 +- .../compiler/interfaceDeclaration4.symbols | 24 +- .../compiler/interfaceDeclaration4.types | 2 +- .../compiler/interfaceExtendsClass1.js.diff | 69 +- .../interfaceExtendsClassWithPrivate1.js.diff | 50 +- .../interfaceExtendsClassWithPrivate2.js.diff | 84 +- .../compiler/interfaceImplementation1.js.diff | 32 +- .../compiler/interfaceImplementation2.js.diff | 12 +- .../compiler/interfaceImplementation3.js.diff | 15 +- .../compiler/interfaceImplementation4.js.diff | 15 +- .../compiler/interfaceImplementation5.js.diff | 88 + .../compiler/interfaceImplementation7.js.diff | 15 + .../compiler/interfaceImplementation8.js.diff | 97 +- .../compiler/interfaceInReopenedModule.js | 4 +- .../interfaceInReopenedModule.js.diff | 12 +- .../interfaceInReopenedModule.symbols | 8 +- .../compiler/interfaceInReopenedModule.types | 4 +- .../compiler/interfaceInheritance.js.diff | 15 +- ...ceMergeWithNonGenericTypeArguments.js.diff | 43 + .../interfaceNameAsIdentifier.errors.txt | 2 +- .../compiler/interfaceNameAsIdentifier.js | 2 +- .../interfaceNameAsIdentifier.symbols | 4 +- .../compiler/interfaceNameAsIdentifier.types | 2 +- ...nterfacePropertiesWithSameName2.errors.txt | 2 +- .../interfacePropertiesWithSameName2.js | 2 +- .../interfacePropertiesWithSameName2.symbols | 12 +- .../interfacePropertiesWithSameName2.types | 2 +- .../interfacePropertiesWithSameName3.js.diff | 21 +- .../compiler/interfaceSubtyping.js.diff | 16 +- .../interfaceWithMultipleDeclarations.js.diff | 13 + .../submodule/compiler/interfacedecl.js.diff | 15 + .../interfacedeclWithIndexerErrors.js.diff | 14 + .../submodule/compiler/internalAliasClass.js | 4 +- .../compiler/internalAliasClass.js.diff | 16 + .../compiler/internalAliasClass.symbols | 14 +- .../compiler/internalAliasClass.types | 4 +- ...alAliasClassInsideLocalModuleWithExport.js | 6 +- ...asClassInsideLocalModuleWithExport.js.diff | 27 + ...asClassInsideLocalModuleWithExport.symbols | 24 +- ...liasClassInsideLocalModuleWithExport.types | 6 +- ...liasClassInsideLocalModuleWithoutExport.js | 6 +- ...lassInsideLocalModuleWithoutExport.js.diff | 27 + ...lassInsideLocalModuleWithoutExport.symbols | 16 +- ...sClassInsideLocalModuleWithoutExport.types | 6 +- ...lModuleWithoutExportAccessError.errors.txt | 6 +- ...sideLocalModuleWithoutExportAccessError.js | 6 +- ...ocalModuleWithoutExportAccessError.js.diff | 27 + ...ocalModuleWithoutExportAccessError.symbols | 20 +- ...eLocalModuleWithoutExportAccessError.types | 6 +- ...liasClassInsideTopLevelModuleWithExport.js | 2 +- ...lassInsideTopLevelModuleWithExport.js.diff | 15 +- ...lassInsideTopLevelModuleWithExport.symbols | 6 +- ...sClassInsideTopLevelModuleWithExport.types | 2 +- ...sClassInsideTopLevelModuleWithoutExport.js | 2 +- ...sInsideTopLevelModuleWithoutExport.js.diff | 18 +- ...sInsideTopLevelModuleWithoutExport.symbols | 6 +- ...assInsideTopLevelModuleWithoutExport.types | 2 +- .../submodule/compiler/internalAliasEnum.js | 4 +- .../compiler/internalAliasEnum.js.diff | 11 + .../compiler/internalAliasEnum.symbols | 14 +- .../compiler/internalAliasEnum.types | 4 +- ...nalAliasEnumInsideLocalModuleWithExport.js | 4 +- ...iasEnumInsideLocalModuleWithExport.js.diff | 11 + ...iasEnumInsideLocalModuleWithExport.symbols | 14 +- ...AliasEnumInsideLocalModuleWithExport.types | 4 +- ...AliasEnumInsideLocalModuleWithoutExport.js | 4 +- ...EnumInsideLocalModuleWithoutExport.js.diff | 11 + ...EnumInsideLocalModuleWithoutExport.symbols | 14 +- ...asEnumInsideLocalModuleWithoutExport.types | 4 +- ...lModuleWithoutExportAccessError.errors.txt | 4 +- ...sideLocalModuleWithoutExportAccessError.js | 4 +- ...ocalModuleWithoutExportAccessError.js.diff | 11 + ...ocalModuleWithoutExportAccessError.symbols | 14 +- ...eLocalModuleWithoutExportAccessError.types | 4 +- .../compiler/internalAliasFunction.js | 4 +- .../compiler/internalAliasFunction.symbols | 14 +- .../compiler/internalAliasFunction.types | 4 +- ...liasFunctionInsideLocalModuleWithExport.js | 4 +- ...unctionInsideLocalModuleWithExport.symbols | 14 +- ...sFunctionInsideLocalModuleWithExport.types | 4 +- ...sFunctionInsideLocalModuleWithoutExport.js | 4 +- ...tionInsideLocalModuleWithoutExport.symbols | 14 +- ...nctionInsideLocalModuleWithoutExport.types | 4 +- ...lModuleWithoutExportAccessError.errors.txt | 4 +- ...sideLocalModuleWithoutExportAccessError.js | 4 +- ...ocalModuleWithoutExportAccessError.symbols | 14 +- ...eLocalModuleWithoutExportAccessError.types | 4 +- ...nctionInsideTopLevelModuleWithoutExport.js | 2 +- ...nInsideTopLevelModuleWithoutExport.symbols | 6 +- ...ionInsideTopLevelModuleWithoutExport.types | 2 +- .../internalAliasInitializedModule.js | 6 +- .../internalAliasInitializedModule.js.diff | 19 + .../internalAliasInitializedModule.symbols | 24 +- .../internalAliasInitializedModule.types | 6 +- ...zedModuleInsideLocalModuleWithoutExport.js | 6 +- ...duleInsideLocalModuleWithoutExport.js.diff | 19 + ...duleInsideLocalModuleWithoutExport.symbols | 24 +- ...ModuleInsideLocalModuleWithoutExport.types | 6 +- ...lModuleWithoutExportAccessError.errors.txt | 6 +- ...sideLocalModuleWithoutExportAccessError.js | 6 +- ...ocalModuleWithoutExportAccessError.js.diff | 19 + ...ocalModuleWithoutExportAccessError.symbols | 24 +- ...eLocalModuleWithoutExportAccessError.types | 6 +- ...zedModuleInsideTopLevelModuleWithExport.js | 4 +- ...duleInsideTopLevelModuleWithExport.js.diff | 12 +- ...duleInsideTopLevelModuleWithExport.symbols | 16 +- ...ModuleInsideTopLevelModuleWithExport.types | 4 +- .../compiler/internalAliasInterface.js | 4 +- .../compiler/internalAliasInterface.symbols | 12 +- .../compiler/internalAliasInterface.types | 4 +- ...InterfaceInsideTopLevelModuleWithExport.js | 2 +- ...faceInsideTopLevelModuleWithExport.symbols | 6 +- ...erfaceInsideTopLevelModuleWithExport.types | 2 +- .../internalAliasUninitializedModule.js | 6 +- .../internalAliasUninitializedModule.symbols | 18 +- .../internalAliasUninitializedModule.types | 6 +- ...alizedModuleInsideLocalModuleWithExport.js | 6 +- ...dModuleInsideLocalModuleWithExport.symbols | 18 +- ...zedModuleInsideLocalModuleWithExport.types | 6 +- ...zedModuleInsideLocalModuleWithoutExport.js | 6 +- ...duleInsideLocalModuleWithoutExport.symbols | 18 +- ...ModuleInsideLocalModuleWithoutExport.types | 6 +- ...ModuleInsideTopLevelModuleWithoutExport.js | 4 +- ...eInsideTopLevelModuleWithoutExport.symbols | 12 +- ...uleInsideTopLevelModuleWithoutExport.types | 4 +- .../submodule/compiler/internalAliasVar.js | 4 +- .../compiler/internalAliasVar.symbols | 8 +- .../submodule/compiler/internalAliasVar.types | 4 +- ...lModuleWithoutExportAccessError.errors.txt | 4 +- ...sideLocalModuleWithoutExportAccessError.js | 4 +- ...ocalModuleWithoutExportAccessError.symbols | 8 +- ...eLocalModuleWithoutExportAccessError.types | 4 +- ...iasVarInsideTopLevelModuleWithoutExport.js | 2 +- ...rInsideTopLevelModuleWithoutExport.symbols | 2 +- ...VarInsideTopLevelModuleWithoutExport.types | 2 +- .../internalAliasWithDottedNameEmit.js | 4 +- .../internalAliasWithDottedNameEmit.symbols | 18 +- .../internalAliasWithDottedNameEmit.types | 4 +- ...WithClassNotReferencingInstance.errors.txt | 4 +- ...leMergedWithClassNotReferencingInstance.js | 4 +- ...gedWithClassNotReferencingInstance.js.diff | 14 +- ...gedWithClassNotReferencingInstance.symbols | 6 +- ...ergedWithClassNotReferencingInstance.types | 4 +- ...thClassNotReferencingInstanceNoConflict.js | 4 +- ...ssNotReferencingInstanceNoConflict.js.diff | 15 +- ...ssNotReferencingInstanceNoConflict.symbols | 8 +- ...lassNotReferencingInstanceNoConflict.types | 4 +- ...tedModuleNotReferencingInstance.errors.txt | 4 +- ...nstantiatedModuleNotReferencingInstance.js | 4 +- ...tiatedModuleNotReferencingInstance.symbols | 6 +- ...antiatedModuleNotReferencingInstance.types | 4 +- ...WithClassNotReferencingInstance.errors.txt | 4 +- ...leMergedWithClassNotReferencingInstance.js | 4 +- ...gedWithClassNotReferencingInstance.js.diff | 12 +- ...gedWithClassNotReferencingInstance.symbols | 6 +- ...ergedWithClassNotReferencingInstance.types | 4 +- ...thClassNotReferencingInstanceNoConflict.js | 4 +- ...ssNotReferencingInstanceNoConflict.js.diff | 12 +- ...ssNotReferencingInstanceNoConflict.symbols | 8 +- ...lassNotReferencingInstanceNoConflict.types | 4 +- ...dModuleNotReferencingInstanceNoConflict.js | 4 +- ...leNotReferencingInstanceNoConflict.symbols | 6 +- ...duleNotReferencingInstanceNoConflict.types | 4 +- ...fTypeVariableHasApparentSignatures.js.diff | 12 + .../intersectionPropertyCheck.js.diff | 13 +- .../intersectionSatisfiesConstraint.js.diff | 13 +- .../intersectionTypeInference1.js.diff | 7 +- .../intersectionTypeNormalization.js.diff | 12 + .../intersectionTypeNormalization.types.diff | 14 + ...intersectionsAndOptionalProperties.js.diff | 12 +- .../intersectionsOfLargeUnions.js.diff | 13 +- .../intersectionsOfLargeUnions2.js.diff | 15 +- .../submodule/compiler/intrinsics.errors.txt | 2 +- .../submodule/compiler/intrinsics.js | 2 +- .../submodule/compiler/intrinsics.js.diff | 25 + .../submodule/compiler/intrinsics.symbols | 2 +- .../submodule/compiler/intrinsics.types | 2 +- .../invalidContinueInDownlevelAsync.js.diff | 48 +- ...alidOptionalChainFromNewExpression.js.diff | 17 + .../compiler/invalidReferenceSyntax1.js.diff | 13 + .../compiler/invalidStaticField.js.diff | 23 +- ...invalidSymbolInTypeParameter1.symbols.diff | 10 + ...dThisEmitInContextualObjectLiteral.js.diff | 20 +- .../compiler/invalidTypeNames.js.diff | 13 + .../invariantGenericErrorElaboration.js.diff | 6 +- ...ationExpressionInFunctionParameter.js.diff | 10 + ...NonGenericMethodWithTypeArguments1.js.diff | 15 + ...NonGenericMethodWithTypeArguments2.js.diff | 14 +- .../reference/submodule/compiler/ipromise2.js | 2 +- .../submodule/compiler/ipromise2.symbols | 34 +- .../submodule/compiler/ipromise2.types | 2 +- .../submodule/compiler/ipromise2.types.diff | 2 +- .../reference/submodule/compiler/ipromise4.js | 2 +- .../submodule/compiler/ipromise4.symbols | 34 +- .../submodule/compiler/ipromise4.types | 2 +- .../submodule/compiler/ipromise4.types.diff | 2 +- .../submodule/compiler/isArray.symbols.diff | 10 + .../compiler/isDeclarationVisibleNodeKinds.js | 18 +- .../isDeclarationVisibleNodeKinds.js.diff | 33 + .../isDeclarationVisibleNodeKinds.symbols | 36 +- ...isDeclarationVisibleNodeKinds.symbols.diff | 11 + .../isDeclarationVisibleNodeKinds.types | 18 +- ...tedDeclarationErrorsExpressions.types.diff | 20 + ...solatedDeclarationErrorsObjects.types.diff | 13 + .../isolatedDeclarationsAddUndefined.js.diff | 42 +- .../isolatedDeclarationsAddUndefined2.js.diff | 44 +- ...atedDeclarationsAddUndefined2.symbols.diff | 45 + ...olatedModulesExportDeclarationType.js.diff | 11 +- ...xportImportUninstantiatedNamespace.js.diff | 14 + ...tedModulesGlobalNamespacesAndEnums.js.diff | 7 +- ...isolatedModulesImportExportElision.js.diff | 38 +- .../isolatedModulesReExportType.js.diff | 16 +- .../compiler/javascriptCommonjsModule.js.diff | 25 +- ...ascriptThisAssignmentInStaticBlock.js.diff | 47 +- ...ptThisAssignmentInStaticBlock.symbols.diff | 18 + ...rationEmitExportedClassWithExtends.js.diff | 50 +- .../jsEnumTagOnObjectFrozen.symbols.diff | 11 +- .../jsFileAlternativeUseOfOverloadTag.js.diff | 25 +- .../jsFileCompilationAwaitModifier.js.diff | 68 +- ...ationsWithJsFileReferenceWithNoOut.js.diff | 16 + ...tionsWithJsFileReferenceWithOutDir.js.diff | 16 + .../jsFileCompilationModuleSyntax.errors.txt | 8 +- .../jsFileCompilationModuleSyntax.symbols | 2 +- .../jsFileCompilationModuleSyntax.types | 2 +- ...ationsWithJsFileReferenceWithNoOut.js.diff | 16 + ...ompilationTypeArgumentSyntaxOfCall.js.diff | 11 + ...WithDeclarationEmitPathSameAsInput.js.diff | 13 + .../jsFileCompilationWithMapFileAsJs.js.diff | 14 + ...FileCompilationWithMapFileAsJs.js.map.diff | 8 + ...pilationWithMapFileAsJs.sourcemap.txt.diff | 69 + ...WithMapFileAsJsWithInlineSourceMap.js.diff | 15 + ...AsJsWithInlineSourceMap.sourcemap.txt.diff | 79 + ...mpilationWithMapFileAsJsWithOutDir.js.diff | 16 + ...ationWithMapFileAsJsWithOutDir.js.map.diff | 3 +- ...thMapFileAsJsWithOutDir.sourcemap.txt.diff | 70 +- .../jsFileCompilationWithoutOut.js.diff | 13 + .../compiler/jsFileFunctionOverloads.js.diff | 25 +- .../compiler/jsFileFunctionOverloads2.js.diff | 25 +- .../compiler/jsFileMethodOverloads.js.diff | 43 +- .../compiler/jsFileMethodOverloads2.js.diff | 43 +- ...licitAnyNoCascadingReferenceErrors.js.diff | 35 +- .../compiler/jsdocInTypeScript.js.diff | 30 +- .../jsdocParameterParsingInvalidName.js.diff | 20 + .../submodule/compiler/jsdocTypeCast.js.diff | 14 +- .../jsdocTypecastNoTypeNoCrash.js.diff | 8 + .../submodule/compiler/json.stringify.js.diff | 9 + .../compiler/json.stringify.symbols.diff | 42 + .../jsxAttributeMissingInitializer.js.diff | 10 + .../jsxCallElaborationCheckNoCrash1.js.diff | 10 +- .../jsxCallbackWithDestructuring.js.diff | 37 + .../jsxChildrenArrayWrongType.js.diff | 2 +- .../jsxChildrenArrayWrongType.types.diff | 11 + .../jsxChildrenGenericContextualTypes.js.diff | 26 +- ...ndividualErrorElaborations.errors.txt.diff | 33 + ...hildrenIndividualErrorElaborations.js.diff | 24 +- ...drenIndividualErrorElaborations.types.diff | 11 + ...fusableWithMultipleChildrenNoError.js.diff | 35 +- .../compiler/jsxChildrenWrongType.types.diff | 11 + ...plexSignatureHasApplicabilityError.js.diff | 9 +- ...ignatureHasApplicabilityError.symbols.diff | 29 + ...xSignatureHasApplicabilityError.types.diff | 25 + .../compiler/jsxComponentTypeErrors.js.diff | 50 +- .../jsxComponentTypeErrors.symbols.diff | 7 +- .../jsxElementClassTooManyParams.js.diff | 13 +- .../submodule/compiler/jsxElementType.js.diff | 108 +- .../compiler/jsxElementType.symbols.diff | 20 +- .../compiler/jsxElementTypeLiteral.js.diff | 11 +- .../jsxElementTypeLiteralWithGeneric.js.diff | 8 +- .../compiler/jsxElementsAsIdentifierNames.js | 2 +- .../jsxElementsAsIdentifierNames.symbols | 4 +- .../jsxElementsAsIdentifierNames.types | 2 +- ...essionNotCountedAsChild(jsx=react).js.diff | 2 +- ...onNotCountedAsChild(jsx=react-jsx).js.diff | 2 +- ...otCountedAsChild(jsx=react-jsxdev).js.diff | 5 +- .../jsxExcessPropsAndAssignability.js.diff | 12 +- .../jsxFactoryIdentifierAsParameter.js | 2 +- .../jsxFactoryIdentifierAsParameter.js.map | 2 +- ...sxFactoryIdentifierAsParameter.js.map.diff | 4 +- ...FactoryIdentifierAsParameter.sourcemap.txt | 2 +- ...ryIdentifierAsParameter.sourcemap.txt.diff | 2 +- .../jsxFactoryIdentifierAsParameter.symbols | 4 +- .../jsxFactoryIdentifierAsParameter.types | 2 +- ...ryIdentifierWithAbsentParameter.errors.txt | 2 +- ...jsxFactoryIdentifierWithAbsentParameter.js | 2 +- ...actoryIdentifierWithAbsentParameter.js.map | 2 +- ...yIdentifierWithAbsentParameter.js.map.diff | 4 +- ...dentifierWithAbsentParameter.sourcemap.txt | 2 +- ...fierWithAbsentParameter.sourcemap.txt.diff | 2 +- ...ctoryIdentifierWithAbsentParameter.symbols | 4 +- ...FactoryIdentifierWithAbsentParameter.types | 2 +- ...oryQualifiedNameResolutionError.errors.txt | 2 +- .../jsxFactoryQualifiedNameResolutionError.js | 2 +- ...FactoryQualifiedNameResolutionError.js.map | 2 +- ...ryQualifiedNameResolutionError.js.map.diff | 4 +- ...QualifiedNameResolutionError.sourcemap.txt | 2 +- ...fiedNameResolutionError.sourcemap.txt.diff | 2 +- ...actoryQualifiedNameResolutionError.symbols | 4 +- ...xFactoryQualifiedNameResolutionError.types | 2 +- ...actoryQualifiedNameWithEs5.errors.txt.diff | 20 + .../jsxFactoryQualifiedNameWithEs5.js.diff | 21 + .../jsxFactoryQualifiedNameWithEs5.types.diff | 11 - .../jsxFragmentFactoryNoUnusedLocals.js.diff | 11 +- .../compiler/jsxHasLiteralType.js.diff | 32 +- ...ideEffectsNonExtantNoError.errors.txt.diff | 17 + ...portForSideEffectsNonExtantNoError.js.diff | 3 +- .../compiler/jsxImportInAttribute.js.diff | 3 +- .../jsxImportSourceNonPragmaComment.js.diff | 18 +- .../compiler/jsxInExtendsClause.js.diff | 42 + ...InferenceProducesLiteralAsExpected.js.diff | 20 +- ...enceProducesLiteralAsExpected.symbols.diff | 2 +- ...ntrinsicElementsTypeArgumentErrors.js.diff | 27 +- .../compiler/jsxIntrinsicUnions.js.diff | 6 +- .../compiler/jsxIntrinsicUnions.symbols.diff | 11 + ...rrorWhenTagExpectsTooManyArguments.js.diff | 14 +- ...ocalNamespaceIndexSignatureNoCrash.js.diff | 21 + .../jsxMultilineAttributeStringValues.js.diff | 14 + .../jsxMultilineAttributeValuesReact.js.diff | 10 +- ...IgnoredWhenReactJsx(jsx=react-jsx).js.diff | 4 +- ...oredWhenReactJsx(jsx=react-jsxdev).js.diff | 13 +- .../jsxNamespaceGlobalReexport.js.diff | 2 +- ...ceGlobalReexportMissingAliasTarget.js.diff | 2 +- ...amespaceImplicitImportJSXNamespace.js.diff | 2 +- ...gPickedOverGlobalOne(jsx=preserve).js.diff | 9 + ...PickedOverGlobalOne(jsx=react-jsx).js.diff | 2 +- ...spaceFromPragmaPickedOverGlobalOne.js.diff | 2 +- ...enAttributeReactJsx(jsx=react-jsx).js.diff | 4 +- ...ttributeReactJsx(jsx=react-jsxdev).js.diff | 11 +- .../jsxNamespacePrefixIntrinsics.js.diff | 18 + .../compiler/jsxNamespaceReexports.js.diff | 15 +- ...NestedWithinTernaryParsesCorrectly.js.diff | 13 + .../compiler/jsxPartialSpread.js.diff | 10 +- .../jsxRuntimePragma(jsx=preserve).js.diff | 30 +- .../jsxRuntimePragma(jsx=react).js.diff | 10 +- .../jsxRuntimePragma(jsx=react-jsx).js.diff | 10 +- ...jsxRuntimePragma(jsx=react-jsxdev).js.diff | 18 +- .../jsxSpreadFirstUnionNoErrors.js.diff | 17 +- .../submodule/compiler/jsxViaImport.2.js | 4 +- .../submodule/compiler/jsxViaImport.2.js.diff | 36 +- .../submodule/compiler/jsxViaImport.2.symbols | 16 +- .../submodule/compiler/jsxViaImport.2.types | 4 +- .../compiler/jsxViaImport.errors.txt | 4 +- .../submodule/compiler/jsxViaImport.js | 4 +- .../submodule/compiler/jsxViaImport.js.diff | 36 +- .../submodule/compiler/jsxViaImport.symbols | 14 +- .../submodule/compiler/jsxViaImport.types | 4 +- ...ofGenericExtendingClassDoubleLayer.js.diff | 57 +- ...ericExtendingClassDoubleLayer.symbols.diff | 11 + .../keyofIsLiteralContexualType.js.diff | 15 + ...ordExpressionInternalComments.symbols.diff | 22 + ...ywordExpressionInternalComments.types.diff | 11 + .../submodule/compiler/knockout.errors.txt | 2 +- .../reference/submodule/compiler/knockout.js | 2 +- .../submodule/compiler/knockout.symbols | 6 +- .../submodule/compiler/knockout.types | 2 +- .../submodule/compiler/lambdaASIEmit.js.diff | 13 + .../submodule/compiler/lambdaArgCrash.js.diff | 52 +- .../compiler/lambdaExpression.js.diff | 12 + .../compiler/lambdaParamTypes.js.diff | 27 + ...thTupleArgsHasCorrectAssignability.js.diff | 16 +- .../compiler/lambdaPropSelf.errors.txt | 2 +- .../submodule/compiler/lambdaPropSelf.js | 2 +- .../submodule/compiler/lambdaPropSelf.js.diff | 33 +- .../submodule/compiler/lambdaPropSelf.symbols | 2 +- .../submodule/compiler/lambdaPropSelf.types | 2 +- .../compiler/largeControlFlowGraph.js.diff | 6 +- .../compiler/largeTupleTypes.symbols.diff | 50 + .../lastPropertyInLiteralWins.js.diff | 17 + .../lateBoundAssignmentCandidateJS1.js.diff | 14 +- ...BoundDestructuringImplicitAnyError.js.diff | 45 + .../letAndVarRedeclaration.errors.txt | 6 +- .../compiler/letAndVarRedeclaration.js | 6 +- .../compiler/letAndVarRedeclaration.symbols | 6 +- .../compiler/letAndVarRedeclaration.types | 6 +- .../compiler/letAsIdentifier.js.diff | 11 + .../letAsIdentifierInStrictMode.js.diff | 8 + .../compiler/letConstInCaseClauses.js.diff | 45 + .../letConstMatchingParameterNames.js.diff | 18 + .../compiler/letDeclarations-es5-1.js.diff | 18 + .../compiler/letDeclarations-es5.js.diff | 22 + .../letDeclarations-scopes.errors.txt | 2 +- .../compiler/letDeclarations-scopes.js | 2 +- .../compiler/letDeclarations-scopes.symbols | 2 +- .../compiler/letDeclarations-scopes.types | 2 +- .../letDeclarations-validContexts.errors.txt | 4 +- .../compiler/letDeclarations-validContexts.js | 4 +- .../letDeclarations-validContexts.symbols | 4 +- .../letDeclarations-validContexts.types | 4 +- .../submodule/compiler/letDeclarations2.js | 2 +- .../compiler/letDeclarations2.symbols | 2 +- .../submodule/compiler/letDeclarations2.types | 2 +- .../letInConstDeclarations_ES5.js.diff | 12 + ...tInLetConstDeclOfForOfAndForIn_ES5.js.diff | 32 + .../compiler/letInLetDeclarations_ES5.js.diff | 12 + .../compiler/letInNonStrictMode.js.diff | 10 + .../compiler/letInVarDeclOfForOf_ES5.js.diff | 16 + .../compiler/letKeepNamesOfTopLevelItems.js | 2 +- .../letKeepNamesOfTopLevelItems.js.diff | 17 + .../letKeepNamesOfTopLevelItems.symbols | 2 +- .../letKeepNamesOfTopLevelItems.types | 2 +- .../letShadowedByNameInNestedScope.js.diff | 11 + .../submodule/compiler/libMembers.errors.txt | 2 +- .../compiler/libMembers.errors.txt.diff | 18 + .../submodule/compiler/libMembers.js | 2 +- .../submodule/compiler/libMembers.js.diff | 16 + .../submodule/compiler/libMembers.symbols | 10 +- .../compiler/libMembers.symbols.diff | 11 + .../submodule/compiler/libMembers.types | 2 +- .../libTypeScriptOverrideSimple.js.diff | 11 + .../libTypeScriptOverrideSimpleConfig.js.diff | 11 + .../libTypeScriptSubfileResolving.js.diff | 11 + ...ibTypeScriptSubfileResolvingConfig.js.diff | 11 + .../compiler/library_ArraySlice.symbols.diff | 26 + ...brary_DatePrototypeProperties.symbols.diff | 354 + .../compiler/library_StringSlice.symbols.diff | 26 + .../reference/submodule/compiler/lift.js.diff | 48 +- .../compiler/limitDeepInstantiations.js.diff | 6 +- .../submodule/compiler/listFailure.js | 2 +- .../submodule/compiler/listFailure.js.diff | 51 +- .../submodule/compiler/listFailure.symbols | 6 +- .../submodule/compiler/listFailure.types | 2 +- ...ralFreshnessPropagationOnNarrowing.js.diff | 82 + ...eshnessPropagationOnNarrowing.symbols.diff | 20 + ...FreshnessPropagationOnNarrowing.types.diff | 67 + .../literalIntersectionYieldsLiteral.js.diff | 8 + ...ningWithCompoundLikeAssignments.types.diff | 24 + .../literalsInComputedProperties1.js.diff | 52 +- .../compiler/localClassesInLoop.js.diff | 22 + .../compiler/localImportNameVsGlobalName.js | 4 +- .../localImportNameVsGlobalName.js.diff | 11 + .../localImportNameVsGlobalName.symbols | 18 +- .../localImportNameVsGlobalName.types | 4 +- .../compiler/localRequireFunction.js.diff | 10 + ...ocalTypeParameterInferencePriority.js.diff | 46 +- ...ypeParameterInferencePriority.symbols.diff | 11 + .../submodule/compiler/m7Bugs.js.diff | 43 +- .../manyCompilerErrorsInTheTwoFiles.js.diff | 4 +- .../submodule/compiler/mapGroupBy.types.diff | 25 + .../compiler/mapOnTupleTypes01.js.diff | 49 + .../compiler/mapOnTupleTypes02.js.diff | 10 + .../mappedToToIndexSignatureInference.js.diff | 8 + .../mappedTypeAsStringTemplate.js.diff | 9 + .../mappedTypeContextualTypesApplied.js.diff | 21 +- .../mappedTypeGenericIndexedAccess.js.diff | 33 +- ...InstantiationPreservesHomomorphism.js.diff | 10 +- ...edTypeGenericWithKnownKeys.errors.txt.diff | 22 + .../mappedTypeGenericWithKnownKeys.types.diff | 45 + .../mappedTypeIndexedAccess.errors.txt.diff | 20 + .../compiler/mappedTypeIndexedAccess.js.diff | 13 +- .../mappedTypeIndexedAccess.types.diff | 11 + ...ppedTypeIndexedAccessConstraint.types.diff | 36 +- .../compiler/mappedTypeMultiInference.js.diff | 11 + ...ppedTypeNestedGenericInstantiation.js.diff | 6 +- ...mappedTypeNotMistakenlyHomomorphic.js.diff | 12 + ...pedTypeNotMistakenlyHomomorphic.types.diff | 11 + .../mappedTypePartialConstraints.js.diff | 39 +- ...artialNonHomomorphicBaseConstraint.js.diff | 18 + ...ppedTypeRecursiveInference.errors.txt.diff | 53 + .../mappedTypeRecursiveInference.js.diff | 22 + .../mappedTypeRecursiveInference.types.diff | 36 + ...ClauseAndLateBoundProperty.errors.txt.diff | 16 + ...ithAsClauseAndLateBoundProperty.types.diff | 15 + ...eWithAsClauseAndLateBoundProperty2.js.diff | 36 + ...thAsClauseAndLateBoundProperty2.types.diff | 15 + .../mappedTypeWithCombinedTypeMappers.js.diff | 3 +- .../matchReturnTypeInAllBranches.js.diff | 29 +- .../submodule/compiler/maxConstraints.js.diff | 9 + .../submodule/compiler/memberScope.errors.txt | 4 +- .../submodule/compiler/memberScope.js | 4 +- .../submodule/compiler/memberScope.js.diff | 16 + .../submodule/compiler/memberScope.symbols | 6 +- .../submodule/compiler/memberScope.types | 4 +- .../memberVariableDeclarations1.js.diff | 34 +- .../mergeMultipleInterfacesReexported.js.diff | 11 + .../mergeSymbolReexportInterface.js.diff | 10 + ...olReexportedTypeAliasInstantiation.js.diff | 10 + .../mergedClassNamespaceRecordCast.js.diff | 28 + .../compiler/mergedDeclarationExports.js.diff | 14 + .../submodule/compiler/mergedDeclarations1.js | 2 +- .../compiler/mergedDeclarations1.symbols | 2 +- .../compiler/mergedDeclarations1.types | 2 +- .../compiler/mergedDeclarations2.errors.txt | 2 +- .../submodule/compiler/mergedDeclarations2.js | 2 +- .../compiler/mergedDeclarations2.symbols | 2 +- .../compiler/mergedDeclarations2.types | 2 +- .../compiler/mergedDeclarations3.errors.txt | 20 +- .../submodule/compiler/mergedDeclarations3.js | 20 +- .../compiler/mergedDeclarations3.js.diff | 42 + .../compiler/mergedDeclarations3.symbols | 52 +- .../compiler/mergedDeclarations3.types | 20 +- .../submodule/compiler/mergedDeclarations4.js | 6 +- .../compiler/mergedDeclarations4.js.diff | 11 + .../compiler/mergedDeclarations4.symbols | 34 +- .../compiler/mergedDeclarations4.types | 6 +- .../compiler/mergedDeclarations5.js.diff | 42 + .../compiler/mergedDeclarations7.js.diff | 3 +- ...edInterfaceFromMultipleFiles1.symbols.diff | 20 + .../mergedModuleDeclarationCodeGen.js | 8 +- .../mergedModuleDeclarationCodeGen.js.diff | 34 +- .../mergedModuleDeclarationCodeGen.symbols | 18 +- .../mergedModuleDeclarationCodeGen.types | 8 +- .../mergedModuleDeclarationCodeGen2.js | 4 +- .../mergedModuleDeclarationCodeGen2.symbols | 20 +- .../mergedModuleDeclarationCodeGen2.types | 4 +- .../mergedModuleDeclarationCodeGen3.js | 4 +- .../mergedModuleDeclarationCodeGen3.symbols | 16 +- .../mergedModuleDeclarationCodeGen3.types | 4 +- .../mergedModuleDeclarationCodeGen4.js | 12 +- .../mergedModuleDeclarationCodeGen4.js.diff | 29 +- .../mergedModuleDeclarationCodeGen4.symbols | 32 +- .../mergedModuleDeclarationCodeGen4.types | 12 +- .../mergedModuleDeclarationCodeGen5.js | 4 +- .../mergedModuleDeclarationCodeGen5.js.diff | 13 +- .../mergedModuleDeclarationCodeGen5.symbols | 20 +- .../mergedModuleDeclarationCodeGen5.types | 4 +- ...dModuleDeclarationWithSharedExportedVar.js | 4 +- ...leDeclarationWithSharedExportedVar.symbols | 4 +- ...duleDeclarationWithSharedExportedVar.types | 4 +- .../compiler/metadataImportType.js.diff | 6 +- .../compiler/metadataOfClassFromAlias.js.diff | 24 +- .../metadataOfClassFromAlias2.js.diff | 24 +- .../compiler/metadataOfClassFromModule.js | 2 +- .../metadataOfClassFromModule.js.diff | 17 +- .../metadataOfClassFromModule.symbols | 6 +- .../compiler/metadataOfClassFromModule.types | 2 +- .../compiler/metadataOfEventAlias.js.diff | 6 +- .../compiler/metadataOfStringLiteral.js.diff | 6 +- .../metadataOfStringLiteral.types.diff | 9 + .../compiler/metadataOfUnion.js.diff | 23 +- .../compiler/metadataOfUnion.types.diff | 20 + .../compiler/metadataOfUnionWithNull.js.diff | 15 +- ...adataReferencedWithinFilteredUnion.js.diff | 28 +- .../compiler/methodChainError.js.diff | 20 +- .../compiler/methodContainingLocalFunction.js | 2 +- .../methodContainingLocalFunction.js.diff | 79 +- .../methodContainingLocalFunction.symbols | 4 +- .../methodContainingLocalFunction.types | 2 +- .../methodSignatureDeclarationEmit1.js.diff | 19 + ...mismatchedClassConstructorVariable.js.diff | 20 + ...plicitTypeParameterAndArgumentType.js.diff | 22 + .../mismatchedGenericArguments1.js.diff | 32 + ...missingCommaInTemplateStringsArray.js.diff | 14 + .../compiler/missingDiscriminants2.errors.txt | 41 + .../compiler/missingDiscriminants2.symbols | 103 + .../compiler/missingDiscriminants2.types | 113 + .../missingFunctionImplementation.js.diff | 90 + .../missingImportAfterModuleImport.js.diff | 17 +- ...missingPropertiesOfClassExpression.js.diff | 40 + .../missingReturnStatement.errors.txt | 2 +- .../compiler/missingReturnStatement.js | 2 +- .../compiler/missingReturnStatement.js.diff | 18 + .../compiler/missingReturnStatement.symbols | 4 +- .../compiler/missingReturnStatement.types | 2 +- .../compiler/missingReturnStatement1.js.diff | 18 + .../submodule/compiler/missingSelf.js.diff | 34 + .../compiler/missingTypeArguments1.js.diff | 104 +- .../compiler/missingTypeArguments2.js.diff | 19 + .../compiler/missingTypeArguments3.js | 2 +- .../compiler/missingTypeArguments3.symbols | 18 +- .../compiler/missingTypeArguments3.types | 2 +- .../submodule/compiler/mixedExports.js | 8 +- .../submodule/compiler/mixedExports.symbols | 22 +- .../submodule/compiler/mixedExports.types | 8 +- ...mixedStaticAndInstanceClassMembers.js.diff | 32 + .../mixinIntersectionIsValidbaseType.js.diff | 66 + ...ixinIntersectionIsValidbaseType.types.diff | 34 +- .../compiler/mixinPrivateAndProtected.js.diff | 143 +- .../mixingApparentTypeOverrides.js.diff | 80 +- .../mixingFunctionAndAmbientModule1.js | 22 +- .../mixingFunctionAndAmbientModule1.symbols | 50 +- .../mixingFunctionAndAmbientModule1.types | 22 +- .../mixingStaticAndInstanceOverloads.js.diff | 53 + .../submodule/compiler/modFunctionCrash.js | 2 +- .../compiler/modFunctionCrash.symbols | 8 +- .../submodule/compiler/modFunctionCrash.types | 2 +- .../compiler/modifierOnParameter1.js.diff | 14 + .../compiler/modifierParenCast.js.diff | 17 + .../modifiersInObjectLiterals.js.diff | 11 + ...rizeLibrary_Dom.asynciterable.symbols.diff | 13 + ...larizeLibrary_Dom.asynciterable.types.diff | 19 + ...SymbolWithOutES6WellknownSymbolLib.js.diff | 9 + ...ibES6ArrayLibES6WellknownSymbolLib.js.diff | 9 + ...eLibrary_Worker.asynciterable.symbols.diff | 13 + ...izeLibrary_Worker.asynciterable.types.diff | 19 + ...larizeLibrary_Worker.iterable.symbols.diff | 11 + .../compiler/moduleAliasInterface.js | 12 +- .../compiler/moduleAliasInterface.js.diff | 70 +- .../compiler/moduleAliasInterface.symbols | 50 +- .../compiler/moduleAliasInterface.types | 12 +- .../compiler/moduleAndInterfaceSharingName.js | 4 +- .../moduleAndInterfaceSharingName.symbols | 16 +- .../moduleAndInterfaceSharingName.types | 4 +- .../moduleAndInterfaceSharingName2.errors.txt | 4 +- .../moduleAndInterfaceSharingName2.js | 4 +- .../moduleAndInterfaceSharingName2.symbols | 16 +- .../moduleAndInterfaceSharingName2.types | 4 +- .../moduleAndInterfaceSharingName3.js | 4 +- .../moduleAndInterfaceSharingName3.symbols | 16 +- .../moduleAndInterfaceSharingName3.types | 4 +- .../moduleAndInterfaceSharingName4.js | 4 +- .../moduleAndInterfaceSharingName4.symbols | 10 +- .../moduleAndInterfaceSharingName4.types | 4 +- .../moduleAndInterfaceWithSameName.errors.txt | 12 +- .../moduleAndInterfaceWithSameName.js | 12 +- .../moduleAndInterfaceWithSameName.js.diff | 28 + .../moduleAndInterfaceWithSameName.symbols | 22 +- .../moduleAndInterfaceWithSameName.types | 12 +- .../compiler/moduleAsBaseType.errors.txt | 2 +- .../submodule/compiler/moduleAsBaseType.js | 2 +- .../compiler/moduleAsBaseType.js.diff | 37 + .../compiler/moduleAsBaseType.symbols | 4 +- .../submodule/compiler/moduleAsBaseType.types | 2 +- .../moduleAssignmentCompat1.errors.txt | 4 +- .../compiler/moduleAssignmentCompat1.js | 4 +- .../compiler/moduleAssignmentCompat1.js.diff | 35 + .../compiler/moduleAssignmentCompat1.symbols | 8 +- .../compiler/moduleAssignmentCompat1.types | 4 +- .../moduleAssignmentCompat2.errors.txt | 4 +- .../compiler/moduleAssignmentCompat2.js | 4 +- .../compiler/moduleAssignmentCompat2.js.diff | 35 + .../compiler/moduleAssignmentCompat2.symbols | 8 +- .../compiler/moduleAssignmentCompat2.types | 4 +- .../moduleAssignmentCompat3.errors.txt | 4 +- .../compiler/moduleAssignmentCompat3.js | 4 +- .../compiler/moduleAssignmentCompat3.symbols | 4 +- .../compiler/moduleAssignmentCompat3.types | 4 +- .../moduleAssignmentCompat4.errors.txt | 8 +- .../compiler/moduleAssignmentCompat4.js | 8 +- .../compiler/moduleAssignmentCompat4.js.diff | 33 + .../compiler/moduleAssignmentCompat4.symbols | 16 +- .../compiler/moduleAssignmentCompat4.types | 8 +- ...moduleAugmentationDeclarationEmit1.js.diff | 19 +- ...moduleAugmentationDeclarationEmit2.js.diff | 13 +- ...onDoesNamespaceEnumMergeOfReexport.js.diff | 3 +- ...ionEnumClassMergeOfReexportIsError.js.diff | 15 +- ...leAugmentationExtendAmbientModule1.js.diff | 8 +- ...leAugmentationExtendAmbientModule2.js.diff | 13 +- ...oduleAugmentationExtendFileModule1.js.diff | 16 +- ...oduleAugmentationExtendFileModule2.js.diff | 10 +- .../moduleAugmentationGlobal1.js.diff | 23 +- .../moduleAugmentationGlobal1.symbols.diff | 13 + .../moduleAugmentationGlobal2.js.diff | 25 + .../moduleAugmentationGlobal2.symbols.diff | 13 + .../moduleAugmentationGlobal3.js.diff | 27 + .../moduleAugmentationGlobal3.symbols.diff | 13 + ...duleAugmentationImportsAndExports1.js.diff | 35 +- ...duleAugmentationImportsAndExports2.js.diff | 35 +- ...duleAugmentationImportsAndExports3.js.diff | 35 +- ...duleAugmentationImportsAndExports4.js.diff | 36 +- ...duleAugmentationImportsAndExports5.js.diff | 39 +- ...duleAugmentationImportsAndExports6.js.diff | 39 +- ...moduleAugmentationInAmbientModule1.js.diff | 6 +- ...moduleAugmentationInAmbientModule2.js.diff | 3 +- ...moduleAugmentationInAmbientModule3.js.diff | 3 +- ...moduleAugmentationInAmbientModule4.js.diff | 3 +- ...moduleAugmentationInAmbientModule5.js.diff | 41 + ...eAugmentationInAmbientModule5.symbols.diff | 13 + .../compiler/moduleAugmentationNoNewNames.js | 2 +- .../moduleAugmentationNoNewNames.js.diff | 8 +- .../moduleAugmentationNoNewNames.symbols | 2 +- .../moduleAugmentationNoNewNames.types | 2 +- .../moduleClassArrayCodeGenTest.js.diff | 24 + .../submodule/compiler/moduleCodeGenTest3.js | 2 +- .../compiler/moduleCodeGenTest3.symbols | 8 +- .../compiler/moduleCodeGenTest3.types | 2 +- .../compiler/moduleCodeGenTest5.js.diff | 31 +- .../submodule/compiler/moduleCodegenTest4.js | 2 +- .../compiler/moduleCodegenTest4.symbols | 8 +- .../compiler/moduleCodegenTest4.types | 2 +- .../compiler/moduleCrashBug1.errors.txt | 4 +- .../submodule/compiler/moduleCrashBug1.js | 4 +- .../compiler/moduleCrashBug1.js.diff | 15 + .../compiler/moduleCrashBug1.symbols | 8 +- .../submodule/compiler/moduleCrashBug1.types | 4 +- ...xportStarShadowingGlobalIsNameable.js.diff | 10 + .../moduleDuplicateIdentifiers.js.diff | 24 +- .../moduleElementsInWrongContext.errors.txt | 4 +- .../compiler/moduleElementsInWrongContext.js | 2 +- .../moduleElementsInWrongContext.js.diff | 15 +- .../moduleElementsInWrongContext.symbols | 4 +- .../moduleElementsInWrongContext.types | 2 +- .../moduleElementsInWrongContext.types.diff | 11 - .../moduleElementsInWrongContext2.errors.txt | 4 +- .../compiler/moduleElementsInWrongContext2.js | 2 +- .../moduleElementsInWrongContext2.js.diff | 15 +- .../moduleElementsInWrongContext2.symbols | 4 +- .../moduleElementsInWrongContext2.types | 2 +- .../moduleElementsInWrongContext2.types.diff | 2 +- .../moduleElementsInWrongContext3.errors.txt | 6 +- .../compiler/moduleElementsInWrongContext3.js | 4 +- .../moduleElementsInWrongContext3.js.diff | 11 +- .../moduleElementsInWrongContext3.symbols | 6 +- .../moduleElementsInWrongContext3.types | 4 +- .../moduleExportsUnaryExpression.js.diff | 11 + .../submodule/compiler/moduleIdentifiers.js | 2 +- .../compiler/moduleIdentifiers.symbols | 4 +- .../compiler/moduleIdentifiers.types | 2 +- .../compiler/moduleImport.errors.txt | 4 +- .../submodule/compiler/moduleImport.js | 4 +- .../submodule/compiler/moduleImport.symbols | 20 +- .../submodule/compiler/moduleImport.types | 4 +- .../compiler/moduleInTypePosition1.js.diff | 18 +- .../moduleMemberWithoutTypeAnnotation1.js | 8 +- ...moduleMemberWithoutTypeAnnotation1.js.diff | 82 +- ...moduleMemberWithoutTypeAnnotation1.symbols | 32 +- .../moduleMemberWithoutTypeAnnotation1.types | 8 +- .../moduleMemberWithoutTypeAnnotation2.js | 4 +- ...moduleMemberWithoutTypeAnnotation2.js.diff | 11 + ...moduleMemberWithoutTypeAnnotation2.symbols | 8 +- .../moduleMemberWithoutTypeAnnotation2.types | 4 +- .../submodule/compiler/moduleMerge.js.diff | 34 + .../compiler/moduleNewExportBug.errors.txt | 2 +- .../submodule/compiler/moduleNewExportBug.js | 2 +- .../compiler/moduleNewExportBug.js.diff | 17 + .../compiler/moduleNewExportBug.symbols | 4 +- .../compiler/moduleNewExportBug.types | 2 +- .../submodule/compiler/moduleNoEmit.js | 2 +- .../submodule/compiler/moduleNoEmit.symbols | 2 +- .../submodule/compiler/moduleNoEmit.types | 2 +- .../compiler/moduleNoneErrors.js.diff | 12 +- .../compiler/moduleOuterQualification.js | 4 +- .../compiler/moduleOuterQualification.symbols | 12 +- .../compiler/moduleOuterQualification.types | 4 +- .../compiler/modulePrologueCommonjs.js.diff | 14 + .../compiler/moduleProperty1.errors.txt | 4 +- .../submodule/compiler/moduleProperty1.js | 4 +- .../compiler/moduleProperty1.symbols | 4 +- .../submodule/compiler/moduleProperty1.types | 4 +- .../compiler/moduleProperty2.errors.txt | 4 +- .../submodule/compiler/moduleProperty2.js | 4 +- .../compiler/moduleProperty2.symbols | 6 +- .../submodule/compiler/moduleProperty2.types | 4 +- .../compiler/moduleRedifinitionErrors.js | 2 +- .../compiler/moduleRedifinitionErrors.js.diff | 13 + .../compiler/moduleRedifinitionErrors.symbols | 2 +- .../compiler/moduleRedifinitionErrors.types | 2 +- .../compiler/moduleReopenedTypeOtherBlock.js | 4 +- .../moduleReopenedTypeOtherBlock.js.diff | 27 + .../moduleReopenedTypeOtherBlock.symbols | 8 +- .../moduleReopenedTypeOtherBlock.types | 4 +- .../compiler/moduleReopenedTypeSameBlock.js | 4 +- .../moduleReopenedTypeSameBlock.js.diff | 27 + .../moduleReopenedTypeSameBlock.symbols | 14 +- .../moduleReopenedTypeSameBlock.types | 4 +- ...WithExtensions_unexpected2.errors.txt.diff | 18 + .../moduleResolutionWithRequire.js.diff | 11 + ...duleResolutionWithRequireAndImport.js.diff | 14 + ...solutionWithSuffixes_empty.errors.txt.diff | 24 + ...nWithSuffixes_notSpecified.errors.txt.diff | 23 + ...ResolutionWithSuffixes_one.errors.txt.diff | 27 + ...utionWithSuffixes_oneBlank.errors.txt.diff | 25 + ...onWithSuffixes_oneNotFound.errors.txt.diff | 19 + ...xes_one_dirModuleWithIndex.errors.txt.diff | 26 + ...uffixes_one_externalModule.errors.txt.diff | 41 + ...xes_one_externalModulePath.errors.txt.diff | 41 + ...fixes_one_externalTSModule.errors.txt.diff | 28 + ...ithSuffixes_one_jsonModule.errors.txt.diff | 35 + ...Suffixes_threeLastIsBlank1.errors.txt.diff | 29 + ...Suffixes_threeLastIsBlank2.errors.txt.diff | 27 + ...Suffixes_threeLastIsBlank3.errors.txt.diff | 25 + ...Suffixes_threeLastIsBlank4.errors.txt.diff | 19 + .../moduleResolutionWithSymlinks.js.diff | 22 +- ...utionWithSymlinks_preserveSymlinks.js.diff | 3 +- ...eResolutionWithSymlinks_withOutDir.js.diff | 21 +- .../submodule/compiler/moduleScopingBug.js | 2 +- .../compiler/moduleScopingBug.js.diff | 20 + .../compiler/moduleScopingBug.symbols | 2 +- .../submodule/compiler/moduleScopingBug.types | 2 +- ...SharesNameWithImportDeclarationInsideIt.js | 4 +- ...sNameWithImportDeclarationInsideIt.symbols | 20 +- ...resNameWithImportDeclarationInsideIt.types | 4 +- ...haresNameWithImportDeclarationInsideIt2.js | 4 +- ...NameWithImportDeclarationInsideIt2.symbols | 20 +- ...esNameWithImportDeclarationInsideIt2.types | 4 +- ...eWithImportDeclarationInsideIt3.errors.txt | 6 +- ...haresNameWithImportDeclarationInsideIt3.js | 6 +- ...NameWithImportDeclarationInsideIt3.js.diff | 11 +- ...NameWithImportDeclarationInsideIt3.symbols | 22 +- ...esNameWithImportDeclarationInsideIt3.types | 6 +- ...haresNameWithImportDeclarationInsideIt4.js | 4 +- ...NameWithImportDeclarationInsideIt4.symbols | 22 +- ...esNameWithImportDeclarationInsideIt4.types | 4 +- ...eWithImportDeclarationInsideIt5.errors.txt | 6 +- ...haresNameWithImportDeclarationInsideIt5.js | 6 +- ...NameWithImportDeclarationInsideIt5.js.diff | 11 +- ...NameWithImportDeclarationInsideIt5.symbols | 18 +- ...esNameWithImportDeclarationInsideIt5.types | 6 +- ...haresNameWithImportDeclarationInsideIt6.js | 4 +- ...NameWithImportDeclarationInsideIt6.symbols | 14 +- ...esNameWithImportDeclarationInsideIt6.types | 4 +- .../submodule/compiler/moduleSymbolMerging.js | 6 +- .../compiler/moduleSymbolMerging.symbols | 14 +- .../compiler/moduleSymbolMerging.types | 6 +- .../compiler/moduleUnassignedVariable.js | 2 +- .../compiler/moduleUnassignedVariable.symbols | 2 +- .../compiler/moduleUnassignedVariable.types | 2 +- .../moduleVariableArrayIndexer.errors.txt | 2 +- .../compiler/moduleVariableArrayIndexer.js | 2 +- .../moduleVariableArrayIndexer.symbols | 2 +- .../compiler/moduleVariableArrayIndexer.types | 2 +- .../submodule/compiler/moduleVariables.js | 6 +- .../compiler/moduleVariables.symbols | 6 +- .../submodule/compiler/moduleVariables.types | 6 +- .../compiler/moduleVisibilityTest1.js | 10 +- .../compiler/moduleVisibilityTest1.js.diff | 59 +- .../compiler/moduleVisibilityTest1.symbols | 32 +- .../compiler/moduleVisibilityTest1.types | 10 +- .../compiler/moduleVisibilityTest2.errors.txt | 10 +- .../compiler/moduleVisibilityTest2.js | 10 +- .../compiler/moduleVisibilityTest2.js.diff | 61 +- .../compiler/moduleVisibilityTest2.symbols | 32 +- .../compiler/moduleVisibilityTest2.types | 10 +- .../compiler/moduleVisibilityTest3.errors.txt | 4 +- .../compiler/moduleVisibilityTest3.js | 4 +- .../compiler/moduleVisibilityTest3.js.diff | 24 +- .../compiler/moduleVisibilityTest3.symbols | 16 +- .../compiler/moduleVisibilityTest3.types | 4 +- .../compiler/moduleVisibilityTest4.errors.txt | 2 +- .../compiler/moduleVisibilityTest4.js | 2 +- .../compiler/moduleVisibilityTest4.js.diff | 18 + .../compiler/moduleVisibilityTest4.symbols | 6 +- .../compiler/moduleVisibilityTest4.types | 2 +- .../moduleWithNoValuesAsType.errors.txt | 8 +- .../compiler/moduleWithNoValuesAsType.js | 8 +- .../compiler/moduleWithNoValuesAsType.symbols | 14 +- .../compiler/moduleWithNoValuesAsType.types | 8 +- .../compiler/moduleWithTryStatement1.js | 2 +- .../compiler/moduleWithTryStatement1.symbols | 2 +- .../compiler/moduleWithTryStatement1.types | 2 +- .../moduleWithValuesAsType.errors.txt | 2 +- .../compiler/moduleWithValuesAsType.js | 2 +- .../compiler/moduleWithValuesAsType.symbols | 2 +- .../compiler/moduleWithValuesAsType.types | 2 +- ..._augmentExistingAmbientVariable.errors.txt | 6 +- .../module_augmentExistingAmbientVariable.js | 2 +- ...ule_augmentExistingAmbientVariable.symbols | 2 +- ...odule_augmentExistingAmbientVariable.types | 2 +- .../module_augmentExistingVariable.errors.txt | 6 +- .../module_augmentExistingVariable.js | 2 +- .../module_augmentExistingVariable.symbols | 2 +- .../module_augmentExistingVariable.types | 2 +- .../module_augmentUninstantiatedModule2.js | 42 +- ...odule_augmentUninstantiatedModule2.js.diff | 10 + ...odule_augmentUninstantiatedModule2.symbols | 53 +- .../module_augmentUninstantiatedModule2.types | 34 +- ...le_augmentUninstantiatedModule2.types.diff | 18 - .../submodule/compiler/moduledecl.js | 46 +- .../submodule/compiler/moduledecl.js.diff | 161 +- .../submodule/compiler/moduledecl.symbols | 126 +- .../compiler/moduledecl.symbols.diff | 36 +- .../submodule/compiler/moduledecl.types | 46 +- .../submodule/compiler/moduledecl.types.diff | 4 +- .../compiler/multiImportExport.js.diff | 17 +- ...ltiLineContextDiagnosticWithPretty.js.diff | 11 + ...pertyAccessAndArrowFunctionIndent1.js.diff | 14 + .../submodule/compiler/multiModuleClodule1.js | 4 +- .../compiler/multiModuleClodule1.js.diff | 23 + .../compiler/multiModuleClodule1.symbols | 10 +- .../compiler/multiModuleClodule1.types | 4 +- .../submodule/compiler/multiModuleFundule1.js | 4 +- .../compiler/multiModuleFundule1.symbols | 10 +- .../compiler/multiModuleFundule1.types | 4 +- .../multiSignatureTypeInference.symbols.diff | 11 + ...(exactoptionalpropertytypes=false).symbols | 49 + ...s2(exactoptionalpropertytypes=false).types | 32 + ...ptionalpropertytypes=true).errors.txt.diff | 34 + ...2(exactoptionalpropertytypes=true).symbols | 49 + ...es2(exactoptionalpropertytypes=true).types | 32 + .../multipleClassPropertyModifiers.js.diff | 12 +- ...ltipleClassPropertyModifiersErrors.js.diff | 12 +- .../compiler/multipleExports.errors.txt | 4 +- .../submodule/compiler/multipleExports.js | 4 +- .../compiler/multipleExports.js.diff | 7 +- .../compiler/multipleExports.symbols | 4 +- .../submodule/compiler/multipleExports.types | 4 +- .../multipleInferenceContexts.js.diff | 11 +- .../compiler/multipleInheritance.js.diff | 127 +- .../submodule/compiler/multivar.errors.txt | 2 +- .../reference/submodule/compiler/multivar.js | 2 +- .../submodule/compiler/multivar.js.diff | 37 +- .../submodule/compiler/multivar.symbols | 2 +- .../submodule/compiler/multivar.types | 2 +- ...mutuallyRecursiveGenericBaseTypes2.js.diff | 40 + .../mutuallyRecursiveInference.js.diff | 57 +- .../nameCollisionWithBlockScopedVariable1.js | 4 +- ...eCollisionWithBlockScopedVariable1.symbols | 8 +- ...ameCollisionWithBlockScopedVariable1.types | 4 +- .../compiler/nameCollisions.errors.txt | 22 +- .../submodule/compiler/nameCollisions.js | 10 +- .../submodule/compiler/nameCollisions.js.diff | 69 +- .../submodule/compiler/nameCollisions.symbols | 12 +- .../submodule/compiler/nameCollisions.types | 10 +- ...ameCollisionsInPropertyAssignments.js.diff | 8 + ...nExpressionAssignedToClassProperty.js.diff | 17 +- .../namedImportNonExistentName.js.diff | 8 +- .../namespaceDisambiguationInUnion.js.diff | 14 + ...ithFunctionWithOverloadsUsage.symbols.diff | 11 + ...rgedWithFunctionDefaultExport.symbols.diff | 11 + .../submodule/compiler/namespaces1.js | 4 +- .../submodule/compiler/namespaces1.symbols | 16 +- .../submodule/compiler/namespaces1.types | 4 +- .../submodule/compiler/namespaces2.js | 4 +- .../submodule/compiler/namespaces2.js.diff | 19 + .../submodule/compiler/namespaces2.symbols | 20 +- .../submodule/compiler/namespaces2.types | 4 +- .../compiler/namespacesDeclaration1.js | 4 +- .../compiler/namespacesDeclaration1.symbols | 8 +- .../compiler/namespacesDeclaration1.types | 4 +- .../namespacesDeclaration2.errors.txt | 2 +- .../compiler/namespacesDeclaration2.js | 2 +- .../compiler/namespacesDeclaration2.js.diff | 11 + .../compiler/namespacesDeclaration2.symbols | 4 +- .../compiler/namespacesDeclaration2.types | 2 +- .../narrowByBooleanComparison.symbols.diff | 20 + .../narrowByBooleanComparison.types.diff | 20 + ...ClauseExpressionInSwitchTrue1.symbols.diff | 20 + ...ByClauseExpressionInSwitchTrue1.types.diff | 19 + ...ClauseExpressionInSwitchTrue3.symbols.diff | 20 + .../compiler/narrowByEquality.js.diff | 11 +- .../compiler/narrowByInstanceof.js.diff | 60 +- .../compiler/narrowByInstanceof.symbols.diff | 22 + .../compiler/narrowByInstanceof.types.diff | 40 +- ...ParenthesizedSwitchExpression.symbols.diff | 14 + ...ByParenthesizedSwitchExpression.types.diff | 32 +- ...uncheckedindexedaccess=false).symbols.diff | 11 + ...ouncheckedindexedaccess=true).symbols.diff | 11 + ...uncheckedindexedaccess=false).symbols.diff | 11 + ...ouncheckedindexedaccess=true).symbols.diff | 11 + ...narrowCommaOperatorNestedWithinLHS.js.diff | 25 + ...rowCommaOperatorNestedWithinLHS.types.diff | 9 +- .../compiler/narrowTypeByInstanceof.js.diff | 46 + .../narrowUnknownByTypeofObject.types.diff | 10 + .../compiler/narrowedConstInMethod.js.diff | 30 + .../compiler/narrowedImports.js.diff | 6 +- ...ssignmentReadonlyRespectsAssertion.js.diff | 18 +- ...mentReadonlyRespectsAssertion.symbols.diff | 25 + .../narrowingByDiscriminantInLoop.js.diff | 18 +- ...narrowingByDiscriminantInLoop.symbols.diff | 38 + .../narrowingByDiscriminantInLoop.types.diff | 38 + .../narrowingByTypeofInSwitch.js.diff | 118 + .../narrowingByTypeofInSwitch.symbols.diff | 20 + .../narrowingByTypeofInSwitch.types.diff | 209 +- ...rrowingConstrainedTypeParameter.types.diff | 11 + .../compiler/narrowingDestructuring.js.diff | 49 + .../narrowingDestructuring.types.diff | 24 +- ...ClauseAfterCaseClauseWithReturn.types.diff | 11 +- .../compiler/narrowingMutualSubtypes.js.diff | 63 +- .../narrowingMutualSubtypes.symbols.diff | 19 + .../narrowingMutualSubtypes.types.diff | 29 +- .../compiler/narrowingOfDottedNames.js.diff | 123 +- .../narrowingOfQualifiedNames.js.diff | 43 +- .../narrowingOfQualifiedNames.symbols.diff | 26 + .../narrowingOfQualifiedNames.types.diff | 26 +- .../narrowingOrderIndependent.js.diff | 26 +- .../narrowingOrderIndependent.types.diff | 11 + .../compiler/narrowingRestGenericCall.js.diff | 12 + .../compiler/narrowingTruthyObject.types.diff | 74 + .../narrowingTypeofDiscriminant.types.diff | 49 +- .../narrowingTypeofFunction.types.diff | 27 +- .../compiler/narrowingTypeofObject.types.diff | 19 + .../narrowingTypeofParenthesized1.types.diff | 22 + .../narrowingTypeofUndefined1.types.diff | 20 + .../narrowingTypeofUndefined2.js.diff | 21 +- .../narrowingTypeofUndefined2.symbols.diff | 26 + .../narrowingTypeofUndefined2.types.diff | 6 +- .../narrowingUnionToNeverAssigment.js.diff | 7 +- .../compiler/narrowingUnionToUnion.js.diff | 76 +- .../compiler/narrowingUnionToUnion.types.diff | 44 +- .../compiler/narrowingUnionWithBang.js.diff | 27 + .../narrowingUnionWithBang.types.diff | 46 + .../narrowingWithNonNullExpression.js.diff | 7 +- ...arrowingWithNonNullExpression.symbols.diff | 13 + .../narrowingWithNonNullExpression.types.diff | 4 +- .../compiler/nativeToBoxedTypes.symbols.diff | 20 + ...yIdenticalGenericLambdasAssignable.js.diff | 15 + .../nestedBlockScopedBindings1.js.diff | 58 + .../nestedBlockScopedBindings10.js.diff | 17 + .../nestedBlockScopedBindings11.js.diff | 20 + .../nestedBlockScopedBindings12.js.diff | 20 + .../nestedBlockScopedBindings13.js.diff | 20 + .../nestedBlockScopedBindings14.js.diff | 22 + .../nestedBlockScopedBindings15.js.diff | 47 + .../nestedBlockScopedBindings16.js.diff | 53 + .../nestedBlockScopedBindings2.js.diff | 150 + .../nestedBlockScopedBindings3.js.diff | 108 + .../nestedBlockScopedBindings4.js.diff | 77 + .../nestedBlockScopedBindings5.js.diff | 123 + .../nestedBlockScopedBindings6.js.diff | 141 + .../nestedBlockScopedBindings7.js.diff | 18 + .../nestedBlockScopedBindings8.js.diff | 20 + .../nestedBlockScopedBindings9.js.diff | 19 + .../nestedExcessPropertyChecking.js.diff | 37 +- .../compiler/nestedFreshLiteral.js.diff | 10 + .../nestedGenericSpreadInference.js.diff | 3 +- .../nestedGlobalNamespaceInClass.js.diff | 13 +- .../compiler/nestedLoopTypeGuards.types.diff | 37 + ...nestedLoopWithOnlyInnerLetCaptured.js.diff | 19 + .../submodule/compiler/nestedLoops.js.diff | 44 + .../compiler/nestedLoops.symbols.diff | 16 + .../nestedModulePrivateAccess.js.diff | 11 + ...tedRecursiveArraysOrObjectsError01.js.diff | 11 + ...cursiveArraysOrObjectsError01.symbols.diff | 11 + .../compiler/nestedRecursiveLambda.js.diff | 15 + .../submodule/compiler/nestedSelf.js | 2 +- .../submodule/compiler/nestedSelf.js.diff | 21 +- .../submodule/compiler/nestedSelf.symbols | 6 +- .../submodule/compiler/nestedSelf.types | 2 +- .../compiler/nestedSuperCallEmit.js.diff | 58 + .../compiler/nestedThisContainer.js.diff | 16 + .../nestedTypeVariableInfersLiteral.js.diff | 19 + ...nestedTypeVariableInfersLiteral.types.diff | 49 + ...erAsDiscriminantType(strict=false).js.diff | 40 +- ...sDiscriminantType(strict=false).types.diff | 14 + ...verAsDiscriminantType(strict=true).js.diff | 40 +- ...AsDiscriminantType(strict=true).types.diff | 14 +- .../compiler/newAbstractInstance.js.diff | 14 + .../compiler/newAbstractInstance2.js.diff | 13 +- .../reference/submodule/compiler/newArrays.js | 2 +- .../submodule/compiler/newArrays.js.diff | 29 +- .../submodule/compiler/newArrays.symbols | 8 +- .../submodule/compiler/newArrays.symbols.diff | 11 + .../submodule/compiler/newArrays.types | 2 +- ...LexicalEnvironmentForConvertedLoop.js.diff | 22 + .../newNamesInGlobalAugmentations1.js | 2 +- .../newNamesInGlobalAugmentations1.symbols | 6 +- ...ewNamesInGlobalAugmentations1.symbols.diff | 11 + .../newNamesInGlobalAugmentations1.types | 2 +- .../compiler/newOnInstanceSymbol.js.diff | 15 + .../submodule/compiler/newOperator.errors.txt | 2 +- .../submodule/compiler/newOperator.js | 2 +- .../submodule/compiler/newOperator.js.diff | 30 +- .../submodule/compiler/newOperator.symbols | 10 +- .../compiler/newOperator.symbols.diff | 39 + .../submodule/compiler/newOperator.types | 2 +- ...OnExportOfPrivateInMergedNamespace.js.diff | 16 + ...rcularitySelfReferentialGetter1.types.diff | 11 +- ...rcularitySelfReferentialGetter2.types.diff | 39 +- ...sionThisExpressionAndClassInGlobal.js.diff | 15 + ...isExpressionAndLocalVarInAccessors.js.diff | 96 + ...ExpressionAndLocalVarInConstructor.js.diff | 38 + ...hisExpressionAndLocalVarInFunction.js.diff | 9 + ...nThisExpressionAndLocalVarInLambda.js.diff | 15 + ...nThisExpressionAndLocalVarInMethod.js.diff | 37 + ...hisExpressionAndLocalVarInProperty.js.diff | 36 +- ...lisionThisExpressionAndVarInGlobal.js.diff | 8 + ...ExpressionInFunctionAndVarInGlobal.js.diff | 10 + .../noConstraintInReturnType1.js.diff | 18 + .../compiler/noCrashOnImportShadowing.js.diff | 9 +- .../submodule/compiler/noCrashOnMixin.js.diff | 72 + .../submodule/compiler/noCrashOnNoLib.js.diff | 25 + .../noCrashOnParameterNamedRequire.js.diff | 10 + .../compiler/noCrashOnThisTypeUsage.js.diff | 30 +- .../noCrashOnThisTypeUsage.symbols.diff | 20 + .../submodule/compiler/noEmitHelpers.js.diff | 22 + .../submodule/compiler/noEmitHelpers2.js.diff | 17 +- .../compiler/noErrorTruncation.js.diff | 3 +- .../compiler/noErrorsInCallback.js.diff | 19 +- ...citAnyDestructuringInPrivateMethod.js.diff | 21 + ...yDestructuringParameterDeclaration.js.diff | 38 + ...icitAnyDestructuringVarDeclaration.js.diff | 18 + ...citAnyDestructuringVarDeclaration2.js.diff | 26 + .../compiler/noImplicitAnyForIn.types.diff | 11 + .../noImplicitAnyForMethodParameters.js.diff | 24 + ...nContextuallyTypesFunctionParamter.js.diff | 8 + ...extuallyTypesFunctionParamter.symbols.diff | 11 + ...ntextuallyTypesFunctionParamter.types.diff | 13 + .../compiler/noImplicitAnyLoopCrash.js.diff | 14 + .../noImplicitAnyMissingGetAccessor.js.diff | 50 +- .../noImplicitAnyMissingSetAccessor.js.diff | 47 + .../compiler/noImplicitAnyModule.errors.txt | 2 +- .../submodule/compiler/noImplicitAnyModule.js | 2 +- .../compiler/noImplicitAnyModule.symbols | 4 +- .../compiler/noImplicitAnyModule.types | 2 +- .../noImplicitAnyNamelessParameter.js.diff | 14 + ...citAnyParametersInAmbientModule.errors.txt | 2 +- .../noImplicitAnyParametersInAmbientModule.js | 2 +- ...plicitAnyParametersInAmbientModule.symbols | 4 +- ...ImplicitAnyParametersInAmbientModule.types | 2 +- ...plicitAnyParametersInBareFunctions.js.diff | 52 + .../noImplicitAnyParametersInClass.js.diff | 135 +- ...noImplicitAnyParametersInModule.errors.txt | 2 +- .../noImplicitAnyParametersInModule.js | 2 +- .../noImplicitAnyParametersInModule.js.diff | 53 + .../noImplicitAnyParametersInModule.symbols | 4 +- .../noImplicitAnyParametersInModule.types | 2 +- ...noImplicitAnyStringIndexerOnObject.js.diff | 126 + ...nyUnionNormalizedObjectLiteral1.types.diff | 10 + .../noImplicitAnyWithOverloads.js.diff | 8 + .../noImplicitReturnInConstructors.js.diff | 15 + .../compiler/noImplicitSymbolToString.js.diff | 53 + .../compiler/noImplicitThisBigThis.js.diff | 79 + .../compiler/noImplicitThisFunctions.js.diff | 25 + ...rUnionExcessPropertyCheck1.errors.txt.diff | 37 + ...oInferUnionExcessPropertyCheck1.types.diff | 10 +- .../noIterationTypeErrorsInCFA.types.diff | 20 +- .../compiler/noRepeatedPropertyNames.js.diff | 22 + ...titutionTemplateStringLiteralTypes.js.diff | 8 + .../noTypeArgumentOnReturnType1.js.diff | 18 + .../compiler/noUncheckedIndexAccess.js.diff | 34 + ...usedLocals_destructuringAssignment.js.diff | 32 +- ...ocals_destructuringAssignment.symbols.diff | 16 + ...potentialPredicateUnusedParam.symbols.diff | 10 + .../noUnusedLocals_selfReference.js.diff | 43 + .../compiler/noUnusedLocals_writeOnly.js.diff | 31 +- .../noUnusedLocals_writeOnly.symbols.diff | 8 + .../noUnusedLocals_writeOnlyProperty.js.diff | 17 +- ...als_writeOnlyProperty_dynamicNames.js.diff | 26 +- .../nodeModuleReexportFromDottedPath.js.diff | 3 +- .../compiler/nonArrayRestArgs.js.diff | 15 + ...ExportedElementsOfMergedModules.errors.txt | 8 +- .../nonExportedElementsOfMergedModules.js | 8 +- ...nonExportedElementsOfMergedModules.js.diff | 27 + ...nonExportedElementsOfMergedModules.symbols | 12 +- .../nonExportedElementsOfMergedModules.types | 8 +- ...cClassExtendingGenericClassWithAny.js.diff | 38 +- .../nonIdenticalTypeConstraints.js.diff | 57 +- .../nonIdenticalTypeConstraints.symbols.diff | 56 + .../nonInferrableTypePropagation1.js.diff | 6 +- .../nonInferrableTypePropagation2.js.diff | 8 + ...nonInferrableTypePropagation2.symbols.diff | 38 + .../nonMergedDeclarationsAndOverloads.js.diff | 19 +- .../compiler/nonNullFullInference.js.diff | 28 + .../compiler/nonNullMappedType.js.diff | 3 +- ...rExtendingStringAssignableToString.js.diff | 7 +- .../compiler/nonNullReferenceMatching.js.diff | 30 +- .../nonNullReferenceMatching.types.diff | 110 + .../compiler/nonNullableReduction.js.diff | 11 +- .../nonNullableReductionNonStrict.js.diff | 11 +- .../compiler/nonNullableTypes1.js.diff | 38 +- .../compiler/nonNullableTypes1.types.diff | 11 + ...jectUnionNestedExcessPropertyCheck.js.diff | 14 + .../nonexistentPropertyOnUnion.symbols.diff | 11 + ...ertyUnavailableOnPromisedType.symbols.diff | 11 + ...nditionalNotPartiallyComputed.symbols.diff | 16 + ...lAssertionPropegatesContextualType.js.diff | 3 +- ...rictTemplateWithNotOctalPrintsAsIs.js.diff | 8 + .../normalizedIntersectionTooComplex.js.diff | 6 +- ...ormalizedIntersectionTooComplex.types.diff | 36 +- .../reference/submodule/compiler/null.js.diff | 16 + .../compiler/nullableFunctionError.js.diff | 9 + .../numberAssignableToEnumInsideUnion.js.diff | 10 + .../numberVsBigIntOperations.types.diff | 64 + .../compiler/numericClassMembers1.js.diff | 38 +- .../compiler/numericEnumMappedType.js.diff | 25 +- .../compiler/numericIndexerConstraint.js.diff | 12 +- .../numericIndexerConstraint.symbols.diff | 9 + .../numericIndexerConstraint1.js.diff | 17 + .../numericIndexerConstraint2.js.diff | 18 + .../numericIndexerConstraint3.js.diff | 47 +- .../numericIndexerConstraint4.js.diff | 38 +- .../numericIndexerConstraint5.symbols.diff | 11 + .../numericIndexerTyping1.symbols.diff | 11 + .../compiler/numericIndexerTyping2.js.diff | 40 + .../numericIndexerTyping2.symbols.diff | 11 + .../compiler/numericMethodName1.js.diff | 12 +- .../objectAssignLikeNonUnionResult.js.diff | 12 + ...bjectAssignLikeNonUnionResult.symbols.diff | 10 + ...ngPatternContextuallyTypesArgument.js.diff | 8 + ...attern_restElementWithPropertyName.js.diff | 8 + ...ationExpressionInFunctionParameter.js.diff | 18 +- ...tCreationOfElementAccessExpression.js.diff | 179 +- .../submodule/compiler/objectFreeze.js.diff | 26 + .../objectFreezeLiteralsDontWiden.js.diff | 14 + .../compiler/objectFromEntries.symbols.diff | 11 + .../compiler/objectGroupBy.types.diff | 25 + ...objectInstantiationFromUnionSpread.js.diff | 13 +- ...ectInstantiationFromUnionSpread.types.diff | 64 + .../objectLitArrayDeclNoNew.errors.txt | 2 +- .../compiler/objectLitArrayDeclNoNew.js | 2 +- .../compiler/objectLitArrayDeclNoNew.js.diff | 15 +- .../compiler/objectLitArrayDeclNoNew.symbols | 8 +- .../compiler/objectLitArrayDeclNoNew.types | 2 +- .../objectLitIndexerContextualType.js.diff | 25 + .../objectLitPropertyScoping.symbols.diff | 11 + .../objectLiteralArraySpecialization.js.diff | 8 + ...eralComputedNameNoDeclarationError.js.diff | 22 + ...bjectLiteralDeclarationGeneration1.js.diff | 16 + .../objectLiteralEnumPropertyNames.js.diff | 98 + ...ectLiteralExcessProperties.errors.txt.diff | 27 + .../objectLiteralExcessProperties.js.diff | 26 + .../objectLiteralExcessProperties.types.diff | 38 +- .../objectLiteralFreshnessWithSpread.js.diff | 10 + ...bjectLiteralFreshnessWithSpread.types.diff | 11 + ...LiteralFunctionArgContextualTyping.js.diff | 12 + ...iteralFunctionArgContextualTyping2.js.diff | 12 + .../objectLiteralMemberWithModifiers1.js.diff | 8 + ...jectLiteralMemberWithQuestionMark1.js.diff | 8 + .../objectLiteralThisWidenedOnUse.js.diff | 15 + .../objectLiteralWithSemicolons1.js.diff | 8 + .../objectLiteralWithSemicolons2.js.diff | 13 + .../objectLiteralWithSemicolons3.js.diff | 12 +- .../objectLiteralWithSemicolons4.js.diff | 9 + .../objectLiteralWithSemicolons5.js.diff | 2 +- ...ectLiteralsAgainstUnionsOfArrays01.js.diff | 10 + ...LiteralsAgainstUnionsOfArrays01.types.diff | 11 + .../compiler/objectMembersOnTypes.js.diff | 16 + ...WithinMethodWithinObjectWithSpread.js.diff | 12 + .../observableInferenceCanBeMade.types.diff | 11 +- .../octalLiteralAndEscapeSequence.js.diff | 90 +- .../omitTypeHelperModifiers01.js.diff | 13 +- .../omittedExpressionForOfLoop.types.diff | 19 + ...onsAvailableOnPromisedType.errors.txt.diff | 21 + .../operationsAvailableOnPromisedType.js.diff | 127 +- ...ationsAvailableOnPromisedType.symbols.diff | 37 + .../optionalArgsWithDefaultValues.js.diff | 37 + ...ationExpression1(target=es2019).types.diff | 11 + ...ationExpression1(target=es2020).types.diff | 11 + .../optionalConstructorArgInSuper.js.diff | 43 + ...ionalFunctionArgAssignability.symbols.diff | 45 + .../compiler/optionalParamArgsTest.js.diff | 97 +- .../compiler/optionalParamInOverride.js.diff | 41 + ...tionalParamReferencingOtherParams1.js.diff | 12 + ...tionalParamReferencingOtherParams2.js.diff | 13 + ...tionalParamReferencingOtherParams3.js.diff | 13 + ...eterInDestructuringWithInitializer.js.diff | 78 +- .../optionalParameterProperty.js.diff | 46 +- .../optionalParameterRetainsNull.js.diff | 12 + ...onalParamterAndVariableDeclaration.js.diff | 15 + ...nalParamterAndVariableDeclaration2.js.diff | 15 + .../optionalPropertiesInClasses.js.diff | 30 +- .../compiler/optionalPropertiesTest.js.diff | 11 + .../compiler/optionalSetterParam.js.diff | 19 + ...tionsCompositeWithIncrementalFalse.js.diff | 11 + ...FileWithoutIncrementalAndComposite.js.diff | 8 + .../submodule/compiler/out-flag.js.diff | 27 + .../submodule/compiler/out-flag.js.map.diff | 4 +- .../compiler/out-flag.sourcemap.txt.diff | 219 +- .../overEagerReturnTypeSpecialization.js.diff | 11 +- .../submodule/compiler/overload1.errors.txt | 2 +- .../reference/submodule/compiler/overload1.js | 2 +- .../submodule/compiler/overload1.js.diff | 53 + .../submodule/compiler/overload1.symbols | 12 +- .../submodule/compiler/overload1.types | 2 +- .../submodule/compiler/overload2.js.diff | 16 + .../compiler/overloadAssignmentCompat.js.diff | 16 + .../overloadAssignmentCompat.types.diff | 19 + .../compiler/overloadCallTest.js.diff | 19 + .../compiler/overloadConsecutiveness.js.diff | 21 + .../overloadEquivalenceWithStatics.js.diff | 18 + ...rMatchesImplementationElaboaration.js.diff | 17 + ...verloadGenericFunctionWithRestArgs.js.diff | 31 +- .../overloadModifiersMustAgree.js.diff | 16 + .../overloadOnConstAsTypeAnnotation.js.diff | 8 + .../overloadOnConstConstraintChecks1.js.diff | 75 + .../overloadOnConstConstraintChecks2.js.diff | 51 + .../overloadOnConstConstraintChecks3.js.diff | 50 +- .../overloadOnConstConstraintChecks4.js.diff | 67 +- ...BaseWithBadImplementationInDerived.js.diff | 16 + .../overloadOnConstInCallback1.js.diff | 21 + ...jectLiteralImplementingAnInterface.js.diff | 8 + .../overloadOnConstInheritance4.js.diff | 16 + ...overloadOnConstNoAnyImplementation.js.diff | 13 + ...verloadOnConstNoAnyImplementation2.js.diff | 31 + ...adOnConstNoNonSpecializedSignature.js.diff | 15 + ...rloadOnConstNoStringImplementation.js.diff | 13 + ...loadOnConstNoStringImplementation2.js.diff | 31 + ...verloadOnConstantsInvalidOverload1.js.diff | 66 + .../overloadOnGenericArity.symbols.diff | 10 + ...adOnGenericClassAndNonGenericClass.js.diff | 60 +- ...oadResolutionOnDefaultConstructor1.js.diff | 18 + .../overloadResolutionOverCTLambda.js.diff | 8 + .../overloadResolutionOverNonCTLambdas.js | 2 +- ...overloadResolutionOverNonCTLambdas.js.diff | 29 + ...overloadResolutionOverNonCTLambdas.symbols | 4 +- ...oadResolutionOverNonCTLambdas.symbols.diff | 13 + .../overloadResolutionOverNonCTLambdas.types | 2 +- ...rloadResolutionOverNonCTLambdas.types.diff | 23 + .../overloadResolutionOverNonCTObjectLit.js | 2 +- ...erloadResolutionOverNonCTObjectLit.symbols | 10 +- ...overloadResolutionOverNonCTObjectLit.types | 2 +- .../overloadResolutionWithAny.symbols.diff | 11 + .../compiler/overloadReturnTypes.js.diff | 16 + .../compiler/overloadReturnTypes.types.diff | 10 + ...acksWithDifferingOptionalityOnArgs.js.diff | 10 + ...ructorFixesInferencesAppropriately.js.diff | 23 +- ...erloadedStaticMethodSpecialization.js.diff | 18 + .../compiler/overloadingOnConstants1.js.diff | 66 + .../compiler/overloadingOnConstants2.js.diff | 52 +- ...tionWithConstraintCheckingDeferred.js.diff | 23 + ...rentContainersDisagreeOnAmbient.errors.txt | 4 +- ...sInDifferentContainersDisagreeOnAmbient.js | 4 +- ...fferentContainersDisagreeOnAmbient.symbols | 8 +- ...DifferentContainersDisagreeOnAmbient.types | 4 +- .../overloadsWithComputedNames.js.diff | 71 + .../overloadsWithComputedNames.types.diff | 39 +- .../overloadsWithConstraints.symbols.diff | 11 + .../overloadsWithProvisionalErrors.js.diff | 12 + .../compiler/overloadsWithinClasses.js.diff | 37 + .../overrideBaseIntersectionMethod.js.diff | 78 +- .../overridingPrivateStaticMembers.js.diff | 38 +- .../submodule/compiler/overshifts.js.diff | 6 +- .../paramPropertiesInSignatures.js.diff | 14 +- .../parameterDecoratorsEmitCrash.js.diff | 42 +- ...arameterDestructuringObjectLiteral.js.diff | 15 + .../compiler/parameterListAsTupleType.js.diff | 39 + .../parameterNamesInTypeParameterList.js.diff | 47 + ...parameterPropertyInConstructor1.errors.txt | 2 +- .../parameterPropertyInConstructor1.js | 2 +- .../parameterPropertyInConstructor1.symbols | 4 +- .../parameterPropertyInConstructor1.types | 2 +- ...parameterPropertyInConstructor2.errors.txt | 2 +- ...eterPropertyInConstructor2.errors.txt.diff | 2 +- .../parameterPropertyInConstructor2.js | 2 +- .../parameterPropertyInConstructor2.js.diff | 16 +- .../parameterPropertyInConstructor2.symbols | 4 +- .../parameterPropertyInConstructor2.types | 2 +- .../parameterPropertyInConstructor3.js.diff | 14 +- .../parameterPropertyInConstructor4.js.diff | 17 +- ...PropertyInConstructorWithPrologues.js.diff | 259 +- ...rPropertyInitializerInInitializers.js.diff | 16 +- ...arameterPropertyOutsideConstructor.js.diff | 16 + ...rPropertyReferencingOtherParameter.js.diff | 16 +- .../parameterReferenceInInitializer1.js.diff | 16 +- .../parameterReferenceInInitializer2.js.diff | 11 + ...parameterReferencesOtherParameter1.js.diff | 24 +- ...parameterReferencesOtherParameter2.js.diff | 24 +- ...pesWhenAppropriatelyContextualized.js.diff | 20 + .../parenthesizedArrowExpressionASI.js.diff | 11 + .../parenthesizedAsyncArrowFunction.js.diff | 32 +- ...zedSatisfiesExpressionWithComments.js.diff | 4 +- ...rrowFunctionWithFunctionReturnType.js.diff | 8 + .../parseEntityNameWithReservedWord.js.diff | 8 + .../parseErrorInHeritageClause1.js.diff | 30 + .../parseErrorIncorrectReturnToken.js.diff | 8 +- ...rseGenericArrowRatherThanLeftShift.js.diff | 8 + .../compiler/parseInvalidNames.errors.txt | 32 +- .../submodule/compiler/parseInvalidNames.js | 8 +- .../compiler/parseInvalidNames.symbols | 4 +- .../compiler/parseInvalidNames.types | 8 +- .../parseInvalidNonNullableTypes.js.diff | 14 +- .../parseInvalidNullableTypes.js.diff | 22 +- .../parseObjectLiteralsWithoutTypes.js.diff | 12 + .../parseReplacementCharacter.js.diff | 10 + ...aryExpressionNoTypeAssertionInJsx4.js.diff | 13 + .../parserConstructorDeclaration12.js.diff | 21 + .../compiler/parserIsClassMemberStart.js.diff | 12 +- ...PrivateIdentifierInArrayAssignment.js.diff | 9 + ...versWhenHittingUnexpectedSemicolon.js.diff | 17 +- ...scriminatedUnionMemberHasGoodError.js.diff | 11 + ...tialOfLargeAPIIsAbleToBeWorkedWith.js.diff | 19 +- .../compiler/partiallyAmbientClodule.js | 2 +- .../compiler/partiallyAmbientClodule.js.diff | 13 + .../compiler/partiallyAmbientClodule.symbols | 4 +- .../compiler/partiallyAmbientClodule.types | 2 +- .../compiler/partiallyAmbientFundule.js | 2 +- .../compiler/partiallyAmbientFundule.symbols | 4 +- .../compiler/partiallyAmbientFundule.types | 2 +- .../partiallyDiscriminantedUnions.js.diff | 35 +- ...partiallyDiscriminantedUnions.symbols.diff | 32 + .../partiallyDiscriminantedUnions.types.diff | 14 + .../compiler/pathsValidation1.js.diff | 8 + .../compiler/pathsValidation2.js.diff | 8 + .../compiler/pathsValidation3.js.diff | 8 + .../compiler/pathsValidation5.errors.txt.diff | 11 +- ...calInterfacesWithGenericSignatures.js.diff | 119 + .../pickOfLargeObjectUnionWorks.js.diff | 8 + .../compiler/pinnedComments1.js.diff | 9 +- ...tentiallyUnassignedVariableInCatch.js.diff | 6 +- ...allyUnassignedVariableInCatch.symbols.diff | 11 + .../compiler/predicateSemantics.js.diff | 117 + .../compiler/predicateSemantics.types.diff | 45 +- ...erLiteralAssignToNumberLiteralType.js.diff | 10 + .../prespecializedGenericMembers1.js.diff | 26 + .../prettyFileWithErrorsAndTabs.js.diff | 14 + .../compiler/primitiveConstraints2.js.diff | 21 + .../compiler/primitiveMembers.js.diff | 59 + .../compiler/primitiveMembers.symbols.diff | 29 + .../compiler/primitiveTypeAsClassName.js.diff | 13 + .../compiler/primitiveTypeAsmoduleName.js | 2 +- .../primitiveTypeAsmoduleName.symbols | 2 +- .../compiler/primitiveTypeAsmoduleName.types | 2 +- .../compiler/primitiveUnionDetection.js.diff | 5 +- .../compiler/privacyAccessorDeclFile.js | 8 +- .../compiler/privacyAccessorDeclFile.js.diff | 3479 +++++++ .../compiler/privacyAccessorDeclFile.symbols | 208 +- .../compiler/privacyAccessorDeclFile.types | 8 +- .../privacyCannotNameAccessorDeclFile.js | 4 +- .../privacyCannotNameAccessorDeclFile.js.diff | 303 +- .../privacyCannotNameAccessorDeclFile.symbols | 12 +- .../privacyCannotNameAccessorDeclFile.types | 4 +- .../privacyCannotNameVarTypeDeclFile.js | 4 +- .../privacyCannotNameVarTypeDeclFile.js.diff | 83 +- .../privacyCannotNameVarTypeDeclFile.symbols | 12 +- .../privacyCannotNameVarTypeDeclFile.types | 4 +- .../privacyCheckAnonymousFunctionParameter.js | 2 +- ...acyCheckAnonymousFunctionParameter.js.diff | 11 + ...acyCheckAnonymousFunctionParameter.symbols | 6 +- ...ivacyCheckAnonymousFunctionParameter.types | 2 +- ...rtAssignmentOnExportedGenericInterface1.js | 2 +- ...ignmentOnExportedGenericInterface1.symbols | 6 +- ...ssignmentOnExportedGenericInterface1.types | 2 +- ...duleExportAssignmentOfGenericClass.js.diff | 17 +- .../privacyCheckTypeOfInvisibleModuleError.js | 4 +- ...acyCheckTypeOfInvisibleModuleError.js.diff | 11 + ...acyCheckTypeOfInvisibleModuleError.symbols | 10 +- ...ivacyCheckTypeOfInvisibleModuleError.types | 4 +- ...rivacyCheckTypeOfInvisibleModuleNoError.js | 4 +- ...yCheckTypeOfInvisibleModuleNoError.js.diff | 11 + ...yCheckTypeOfInvisibleModuleNoError.symbols | 8 +- ...acyCheckTypeOfInvisibleModuleNoError.types | 4 +- .../submodule/compiler/privacyClass.js | 4 +- .../submodule/compiler/privacyClass.js.diff | 401 + .../submodule/compiler/privacyClass.symbols | 32 +- .../submodule/compiler/privacyClass.types | 4 +- ...ivacyClassExtendsClauseDeclFile.errors.txt | 6 +- .../privacyClassExtendsClauseDeclFile.js | 6 +- .../privacyClassExtendsClauseDeclFile.js.diff | 348 + .../privacyClassExtendsClauseDeclFile.symbols | 48 +- .../privacyClassExtendsClauseDeclFile.types | 6 +- .../privacyClassImplementsClauseDeclFile.js | 6 +- ...ivacyClassImplementsClauseDeclFile.js.diff | 197 + ...ivacyClassImplementsClauseDeclFile.symbols | 50 +- ...privacyClassImplementsClauseDeclFile.types | 6 +- .../submodule/compiler/privacyFunc.js | 2 +- .../submodule/compiler/privacyFunc.js.diff | 271 + .../submodule/compiler/privacyFunc.symbols | 60 +- .../submodule/compiler/privacyFunc.types | 2 +- ...FunctionCannotNameParameterTypeDeclFile.js | 4 +- ...ionCannotNameParameterTypeDeclFile.js.diff | 351 +- ...ionCannotNameParameterTypeDeclFile.symbols | 12 +- ...ctionCannotNameParameterTypeDeclFile.types | 4 +- ...acyFunctionCannotNameReturnTypeDeclFile.js | 4 +- ...nctionCannotNameReturnTypeDeclFile.js.diff | 244 +- ...nctionCannotNameReturnTypeDeclFile.symbols | 12 +- ...FunctionCannotNameReturnTypeDeclFile.types | 4 +- .../privacyFunctionParameterDeclFile.js | 8 +- .../privacyFunctionParameterDeclFile.js.diff | 1033 +- .../privacyFunctionParameterDeclFile.symbols | 224 +- .../privacyFunctionParameterDeclFile.types | 8 +- .../privacyFunctionReturnTypeDeclFile.js | 8 +- .../privacyFunctionReturnTypeDeclFile.js.diff | 1674 ++++ .../privacyFunctionReturnTypeDeclFile.symbols | 256 +- .../privacyFunctionReturnTypeDeclFile.types | 8 +- .../submodule/compiler/privacyGloClass.js | 2 +- .../compiler/privacyGloClass.js.diff | 184 + .../compiler/privacyGloClass.symbols | 16 +- .../submodule/compiler/privacyGloClass.types | 2 +- .../submodule/compiler/privacyGloGetter.js | 2 +- .../compiler/privacyGloGetter.js.diff | 194 + .../compiler/privacyGloGetter.symbols | 20 +- .../submodule/compiler/privacyGloGetter.types | 2 +- .../submodule/compiler/privacyGloImport.js | 20 +- .../compiler/privacyGloImport.js.diff | 61 +- .../compiler/privacyGloImport.symbols | 96 +- .../submodule/compiler/privacyGloImport.types | 20 +- .../privacyGloImportParseErrors.errors.txt | 20 +- .../compiler/privacyGloImportParseErrors.js | 20 +- .../privacyGloImportParseErrors.js.diff | 51 +- .../privacyGloImportParseErrors.symbols | 100 +- .../privacyGloImportParseErrors.types | 20 +- .../submodule/compiler/privacyGloInterface.js | 4 +- .../compiler/privacyGloInterface.js.diff | 35 + .../compiler/privacyGloInterface.symbols | 52 +- .../compiler/privacyGloInterface.types | 4 +- .../submodule/compiler/privacyGloVar.js | 2 +- .../submodule/compiler/privacyGloVar.js.diff | 74 +- .../submodule/compiler/privacyGloVar.symbols | 52 +- .../submodule/compiler/privacyGloVar.types | 2 +- .../submodule/compiler/privacyImport.js | 56 +- .../submodule/compiler/privacyImport.js.diff | 119 +- .../submodule/compiler/privacyImport.symbols | 200 +- .../submodule/compiler/privacyImport.types | 40 +- .../privacyImportParseErrors.errors.txt | 40 +- .../compiler/privacyImportParseErrors.js | 40 +- .../compiler/privacyImportParseErrors.js.diff | 97 +- .../compiler/privacyImportParseErrors.symbols | 232 +- .../compiler/privacyImportParseErrors.types | 40 +- .../submodule/compiler/privacyInterface.js | 8 +- .../compiler/privacyInterface.js.diff | 64 + .../compiler/privacyInterface.symbols | 104 +- .../submodule/compiler/privacyInterface.types | 8 +- .../privacyInterfaceExtendsClauseDeclFile.js | 6 +- ...vacyInterfaceExtendsClauseDeclFile.symbols | 50 +- ...rivacyInterfaceExtendsClauseDeclFile.types | 6 +- ...yLocalInternalReferenceImportWithExport.js | 16 +- ...lInternalReferenceImportWithExport.js.diff | 69 +- ...lInternalReferenceImportWithExport.symbols | 102 +- ...calInternalReferenceImportWithExport.types | 16 +- ...ientExternalModuleImportWithExport.js.diff | 26 +- .../privacyTypeParameterOfFunction.js.diff | 174 + .../privacyTypeParameterOfFunctionDeclFile.js | 4 +- ...acyTypeParameterOfFunctionDeclFile.js.diff | 583 ++ ...acyTypeParameterOfFunctionDeclFile.symbols | 96 +- ...ivacyTypeParameterOfFunctionDeclFile.types | 4 +- .../privacyTypeParametersOfClass.js.diff | 100 + .../privacyTypeParametersOfClassDeclFile.js | 4 +- ...ivacyTypeParametersOfClassDeclFile.js.diff | 346 + ...ivacyTypeParametersOfClassDeclFile.symbols | 16 +- ...privacyTypeParametersOfClassDeclFile.types | 4 +- .../privacyTypeParametersOfInterface.js.diff | 36 + ...rivacyTypeParametersOfInterfaceDeclFile.js | 4 +- ...yTypeParametersOfInterfaceDeclFile.js.diff | 102 + ...yTypeParametersOfInterfaceDeclFile.symbols | 48 +- ...acyTypeParametersOfInterfaceDeclFile.types | 4 +- .../submodule/compiler/privacyVar.js | 4 +- .../submodule/compiler/privacyVar.js.diff | 134 +- .../submodule/compiler/privacyVar.symbols | 104 +- .../submodule/compiler/privacyVar.types | 4 +- .../submodule/compiler/privacyVarDeclFile.js | 8 +- .../compiler/privacyVarDeclFile.js.diff | 382 +- .../compiler/privacyVarDeclFile.symbols | 128 +- .../compiler/privacyVarDeclFile.types | 8 +- .../compiler/privateAccessInSubclass1.js.diff | 43 +- ...ivateFieldAssignabilityFromUnknown.js.diff | 12 +- ...ClassExpressionDeclaration.errors.txt.diff | 35 + ...FieldsInClassExpressionDeclaration.js.diff | 20 +- .../compiler/privateInstanceVisibility.js | 2 +- .../privateInstanceVisibility.js.diff | 37 +- .../privateInstanceVisibility.symbols | 6 +- .../compiler/privateInstanceVisibility.types | 2 +- .../privateInterfaceProperties.js.diff | 21 +- .../submodule/compiler/privateNameJsx.js.diff | 19 +- .../compiler/privatePropertyInUnion.js.diff | 9 +- .../compiler/privateVisibility.errors.txt | 2 +- .../submodule/compiler/privateVisibility.js | 2 +- .../compiler/privateVisibility.js.diff | 34 +- .../compiler/privateVisibility.symbols | 8 +- .../compiler/privateVisibility.types | 2 +- .../compiler/privateVisibles.js.diff | 17 +- .../compiler/promiseChaining.js.diff | 23 +- .../compiler/promiseChaining1.js.diff | 23 +- .../compiler/promiseChaining1.symbols.diff | 11 + .../compiler/promiseChaining2.js.diff | 23 +- .../compiler/promiseChaining2.symbols.diff | 11 + .../promiseDefinitionTest.errors.txt.diff | 18 + .../compiler/promiseDefinitionTest.js.diff | 44 +- .../promiseDefinitionTest.symbols.diff | 13 + .../promisePermutations.errors.txt.diff | 23 +- .../compiler/promisePermutations.js.diff | 30 + .../compiler/promisePermutations.symbols.diff | 319 + .../promisePermutations2.errors.txt.diff | 23 +- .../compiler/promisePermutations2.js.diff | 30 +- .../promisePermutations2.symbols.diff | 260 + .../promisePermutations3.errors.txt.diff | 40 +- .../compiler/promisePermutations3.js.diff | 30 +- .../promisePermutations3.symbols.diff | 319 + .../compiler/promiseTest.symbols.diff | 50 + .../submodule/compiler/promiseType.types.diff | 88 + .../compiler/promiseTypeInference.js.diff | 8 + .../compiler/promiseTypeStrictNull.types.diff | 88 + .../compiler/promiseWithResolvers.types.diff | 11 + .../submodule/compiler/promises.symbols.diff | 42 + .../promisesWithConstraints.symbols.diff | 53 + .../propTypeValidatorInference.js.diff | 32 +- .../propTypeValidatorInference.types.diff | 31 +- ...propagationOfPromiseInitialization.js.diff | 15 + .../submodule/compiler/properties.js.diff | 32 + .../submodule/compiler/properties.js.map.diff | 4 +- .../compiler/properties.sourcemap.txt.diff | 292 +- .../compiler/propertiesAndIndexers.js.diff | 40 +- ...opertiesAndIndexersForNumericNames.js.diff | 12 +- ...AccessExpressionInnerComments.symbols.diff | 68 + .../propertyAccessOnObjectLiteral.js.diff | 18 + .../compiler/propertyAccessibility1.js.diff | 12 +- .../compiler/propertyAccessibility2.js.diff | 6 +- .../propertyNamesWithStringLiteral.js | 2 +- .../propertyNamesWithStringLiteral.js.diff | 15 +- .../propertyNamesWithStringLiteral.symbols | 2 +- .../propertyNamesWithStringLiteral.types | 2 +- .../compiler/propertyOrdering.js.diff | 40 +- .../compiler/propertyOrdering2.js.diff | 20 +- .../propertyOverridingPrototype.js.diff | 44 +- .../propertyParameterWithQuestionMark.js.diff | 17 +- .../compiler/propertyWrappedInTry.js.diff | 16 + ...otectedAccessThroughContextualThis.js.diff | 24 +- .../compiler/protectedMembers.js.diff | 216 +- .../protectedMembersThisParameter.js.diff | 176 +- .../protoAsIndexInIndexExpression.js.diff | 12 +- .../submodule/compiler/protoInIndexer.js.diff | 15 + ...typeInstantiatedWithBaseConstraint.js.diff | 12 +- ...erProtectedSetterFromThisParameter.js.diff | 66 + ...ImplementedAsPrivateInDerivedClass.js.diff | 12 +- .../compiler/qualifiedModuleLocals.errors.txt | 2 +- .../compiler/qualifiedModuleLocals.js | 2 +- .../compiler/qualifiedModuleLocals.symbols | 4 +- .../compiler/qualifiedModuleLocals.types | 2 +- ...arations-entity-names-referencing-a-var.js | 4 +- ...ons-entity-names-referencing-a-var.symbols | 6 +- ...tions-entity-names-referencing-a-var.types | 4 +- ...-does-not-affect-class-heritage.errors.txt | 2 +- ...solution-does-not-affect-class-heritage.js | 2 +- ...ion-does-not-affect-class-heritage.js.diff | 34 + ...ion-does-not-affect-class-heritage.symbols | 2 +- ...ution-does-not-affect-class-heritage.types | 2 +- .../submodule/compiler/qualify.errors.txt | 22 +- .../compiler/qualify.errors.txt.diff | 20 + .../reference/submodule/compiler/qualify.js | 22 +- .../submodule/compiler/qualify.js.diff | 38 +- .../submodule/compiler/qualify.symbols | 62 +- .../submodule/compiler/qualify.types | 22 +- ...rsectionCheckCorrectlyCachesErrors.js.diff | 20 + ...nfoTypeAtReturnPositionsInaccurate.js.diff | 118 +- ...TypeAtReturnPositionsInaccurate.types.diff | 12 +- .../compiler/quotedAccessorName1.js.diff | 19 + .../compiler/quotedAccessorName2.js.diff | 19 + .../compiler/quotedFunctionName1.js.diff | 15 + .../compiler/quotedFunctionName2.js.diff | 15 + .../compiler/quotedPropertyName1.js.diff | 12 +- .../compiler/quotedPropertyName2.js.diff | 6 +- .../compiler/quotedPropertyName3.js.diff | 22 +- .../raiseErrorOnParameterProperty.js.diff | 15 +- .../ramdaToolsNoInfinite2.symbols.diff | 29 + .../compiler/ramdaToolsNoInfinite2.types.diff | 33 +- .../compiler/reachabilityChecks1.errors.txt | 24 +- .../submodule/compiler/reachabilityChecks1.js | 20 +- .../compiler/reachabilityChecks1.js.diff | 64 + .../compiler/reachabilityChecks1.symbols | 24 +- .../compiler/reachabilityChecks1.types | 20 +- .../compiler/reachabilityChecks2.errors.txt | 8 +- .../submodule/compiler/reachabilityChecks2.js | 4 +- .../compiler/reachabilityChecks2.symbols | 6 +- .../compiler/reachabilityChecks2.types | 4 +- .../compiler/reachabilityChecks3.js.diff | 17 + .../reactDefaultPropsInferenceSuccess.js.diff | 127 +- .../compiler/reactHOCSpreadprops.js.diff | 41 +- ...usedInNewJSXEmit(jsx=react-jsxdev).js.diff | 3 +- .../reactReadonlyHOCAssignabilityReal.js.diff | 41 +- ...dInferenceAllowsAssignment.errors.txt.diff | 28 + ...eDeferredInferenceAllowsAssignment.js.diff | 77 +- ...rredInferenceAllowsAssignment.symbols.diff | 11 + .../reactSFCAndFunctionResolvable.js.diff | 14 +- .../reactSFCAndFunctionResolvable.types.diff | 39 + ...eactTagNameComponentWithPropsNoOOM.js.diff | 10 +- ...actTagNameComponentWithPropsNoOOM2.js.diff | 10 +- ...ransitiveImportHasValidDeclaration.js.diff | 4 +- ...ignmentInSubclassOfClassExpression.js.diff | 41 + ...t32ArrayAssignableWithFloat32Array.js.diff | 12 +- ...rayAssignableWithFloat32Array.symbols.diff | 38 + .../readonlyInDeclarationFile.js.diff | 108 +- .../readonlyInNonPropertyParameters.js.diff | 26 + .../compiler/readonlyMembers.js.diff | 66 +- ...nlyPropertySubtypeRelationDirected.js.diff | 66 + .../readonlyTupleAndArrayElaboration.js.diff | 82 + ...donlyTupleAndArrayElaboration.symbols.diff | 29 + .../compiler/reassignStaticProp.js.diff | 6 +- .../compiler/reboundBaseClassSymbol.js | 2 +- .../compiler/reboundBaseClassSymbol.symbols | 2 +- .../compiler/reboundBaseClassSymbol.types | 2 +- .../reboundIdentifierOnImportAlias.errors.txt | 4 +- .../reboundIdentifierOnImportAlias.js | 4 +- .../reboundIdentifierOnImportAlias.symbols | 4 +- .../reboundIdentifierOnImportAlias.types | 4 +- .../reference/submodule/compiler/rectype.js | 2 +- .../submodule/compiler/rectype.symbols | 12 +- .../submodule/compiler/rectype.types | 2 +- .../recursiveArrayNotCircular.js.diff | 19 + .../compiler/recursiveBaseCheck.errors.txt | 2 +- .../submodule/compiler/recursiveBaseCheck.js | 2 +- .../compiler/recursiveBaseCheck.symbols | 8 +- .../compiler/recursiveBaseCheck.types | 2 +- .../compiler/recursiveBaseCheck2.errors.txt | 4 +- .../submodule/compiler/recursiveBaseCheck2.js | 4 +- .../compiler/recursiveBaseCheck2.symbols | 42 +- .../compiler/recursiveBaseCheck2.types | 4 +- .../compiler/recursiveBaseCheck3.js.diff | 40 + .../compiler/recursiveBaseCheck4.js.diff | 31 + .../compiler/recursiveBaseCheck5.js.diff | 14 + .../compiler/recursiveBaseCheck6.js.diff | 31 + .../recursiveBaseConstructorCreation1.js.diff | 40 + .../compiler/recursiveClassBaseType.js.diff | 59 +- ...ssInstantiationsWithDefaultConstructors.js | 2 +- ...tantiationsWithDefaultConstructors.js.diff | 42 +- ...tantiationsWithDefaultConstructors.symbols | 6 +- ...nstantiationsWithDefaultConstructors.types | 2 +- .../recursiveClassReferenceTest.errors.txt | 8 +- .../compiler/recursiveClassReferenceTest.js | 8 +- .../recursiveClassReferenceTest.js.diff | 120 +- .../recursiveClassReferenceTest.js.map | 4 +- .../recursiveClassReferenceTest.js.map.diff | 8 +- .../recursiveClassReferenceTest.sourcemap.txt | 358 +- ...rsiveClassReferenceTest.sourcemap.txt.diff | 1969 ++-- .../recursiveClassReferenceTest.symbols | 70 +- .../recursiveClassReferenceTest.types | 8 +- .../compiler/recursiveCloduleReference.js | 2 +- .../recursiveCloduleReference.js.diff | 16 + .../recursiveCloduleReference.symbols | 2 +- .../compiler/recursiveCloduleReference.types | 2 +- ...ecursiveComplicatedClasses.errors.txt.diff | 45 + .../recursiveComplicatedClasses.js.diff | 69 +- .../recursiveComplicatedClasses.symbols.diff | 27 + .../recursiveComplicatedClasses.types.diff | 11 + .../recursiveConditionalCrash3.js.diff | 15 +- .../recursiveConditionalCrash3.symbols.diff | 20 + ...veConditionalEvaluationNonInfinite.js.diff | 10 + .../recursiveExcessPropertyChecks.js.diff | 4 +- .../compiler/recursiveFieldSetting.js.diff | 40 +- .../compiler/recursiveFunctionTypes.js.diff | 18 + .../compiler/recursiveFunctionTypes1.js.diff | 15 + .../recursiveGenericMethodCall.symbols.diff | 21 + .../recursiveGenericMethodCall.types.diff | 15 + .../compiler/recursiveGenericUnionType1.js | 4 +- .../recursiveGenericUnionType1.symbols | 18 +- .../compiler/recursiveGenericUnionType1.types | 4 +- .../compiler/recursiveGenericUnionType2.js | 4 +- .../recursiveGenericUnionType2.symbols | 18 +- .../compiler/recursiveGenericUnionType2.types | 4 +- .../compiler/recursiveGetterAccess.js.diff | 19 + .../recursiveIdenticalOverloadResolution.js | 2 +- ...cursiveIdenticalOverloadResolution.symbols | 12 +- ...recursiveIdenticalOverloadResolution.types | 2 +- .../compiler/recursiveInferenceBug.js.diff | 10 + .../compiler/recursiveInheritance3.js.diff | 15 +- .../submodule/compiler/recursiveMods.js | 4 +- .../submodule/compiler/recursiveMods.js.diff | 16 +- .../submodule/compiler/recursiveMods.symbols | 20 +- .../submodule/compiler/recursiveMods.types | 4 +- .../compiler/recursiveProperties.js.diff | 32 + .../recursiveResolveTypeMembers.symbols.diff | 11 + .../recursiveReverseMappedType.js.diff | 16 +- ...ecursiveSpecializationOfSignatures.js.diff | 22 +- .../recursiveTupleTypeInference.js.diff | 7 +- .../recursiveTupleTypeInference.types.diff | 14 + .../compiler/recursiveTupleTypes1.js.diff | 12 + .../compiler/recursiveTupleTypes2.js.diff | 12 + ...SpreadConditionalReturnNotCircular.js.diff | 12 + ...dConditionalReturnNotCircular.symbols.diff | 29 + .../recursiveTypeComparison2.errors.txt | 2 +- .../compiler/recursiveTypeComparison2.js | 2 +- .../compiler/recursiveTypeComparison2.symbols | 10 +- .../compiler/recursiveTypeComparison2.types | 2 +- ...erConstraintReferenceLacksTypeArgs.js.diff | 13 + ...ursiveTypeParameterReferenceError1.js.diff | 21 +- .../compiler/recursiveTypeRelations.js.diff | 30 +- .../recursiveTypeRelations.symbols.diff | 14 + .../recursiveTypeRelations.types.diff | 32 + ...sivelySpecializedConstructorDeclaration.js | 6 +- ...ySpecializedConstructorDeclaration.js.diff | 42 +- ...ySpecializedConstructorDeclaration.symbols | 12 +- ...elySpecializedConstructorDeclaration.types | 4 +- .../compiler/redefineArray.errors.txt.diff | 13 + .../compiler/redefineArray.symbols.diff | 11 + .../reexportDefaultIsCallable.js.diff | 32 +- .../reexportMissingDefault4.errors.txt.diff | 16 - .../reexportMissingDefault4.types.diff | 8 - .../compiler/reexportMissingDefault7.js.diff | 11 + .../compiler/reexportMissingDefault8.js.diff | 11 +- ...xportWrittenCorrectlyInDeclaration.js.diff | 38 +- .../compiler/reexportedMissingAlias.js.diff | 29 +- .../referenceSatisfiesExpression.js.diff | 35 + ...renceTypesPreferedToPathIfPossible.js.diff | 4 +- ...OpenBracketInCharClass(target=es5).js.diff | 11 + ...racketInCharClass(target=es5).symbols.diff | 11 + .../regExpWithSlashInCharClass.symbols.diff | 24 + .../regExpWithSlashInCharClass.types.diff | 35 + ...ularExpressionGroupNameSuggestions.js.diff | 8 + ...ularExpressionScanning(target=es5).js.diff | 11 + ...xpressionScanning(target=es5).symbols.diff | 11 + ...PropertyValueExpressionSuggestions.js.diff | 8 + ...relatedViaDiscriminatedTypeNoError.js.diff | 48 +- .../relationalOperatorComparable.js.diff | 33 + .../compiler/requireOfJsonFile.js.diff | 11 +- .../requireOfJsonFileNonRelative.js.diff | 11 +- ...lativeWithoutExtensionResolvesToTs.js.diff | 3 +- .../compiler/requireOfJsonFileTypes.js.diff | 18 +- ...nFileWithAlwaysStrictWithoutErrors.js.diff | 11 +- ...OfJsonFileWithComputedPropertyName.js.diff | 17 +- .../requireOfJsonFileWithDeclaration.js.diff | 11 +- .../requireOfJsonFileWithEmptyObject.js.diff | 5 +- ...fJsonFileWithEmptyObjectWithErrors.js.diff | 11 +- .../requireOfJsonFileWithErrors.js.diff | 11 +- ...duleNodeResolutionEmitNone.errors.txt.diff | 2 + .../requireOfJsonFileWithNoContent.js.diff | 11 +- .../requireOfJsonFileWithSourceMap.js.diff | 12 +- ...OfJsonFileWithSourceMap.sourcemap.txt.diff | 16 +- ...equireOfJsonFileWithTraillingComma.js.diff | 11 +- .../requireOfJsonFileWithoutAllowJs.js.diff | 11 +- .../requireOfJsonFileWithoutExtension.js.diff | 11 +- ...onFileWithoutExtensionResolvesToTs.js.diff | 12 +- .../requireOfJsonFileWithoutOutDir.js.diff | 11 +- ...leWithoutResolveJsonModule.errors.txt.diff | 62 +- ...OfJsonFileWithoutResolveJsonModule.js.diff | 17 +- ...nFileWithoutResolveJsonModule.symbols.diff | 12 - ...sonFileWithoutResolveJsonModule.types.diff | 47 - .../requiredInitializedParameter1.js.diff | 30 + .../requiredInitializedParameter2.js.diff | 17 + .../requiredInitializedParameter3.js.diff | 20 + .../requiredInitializedParameter4.js.diff | 20 + ...edMappedTypeModifierTrumpsVariance.js.diff | 15 +- .../reservedNameOnInterfaceImport.errors.txt | 2 +- .../compiler/reservedNameOnInterfaceImport.js | 2 +- .../reservedNameOnInterfaceImport.symbols | 6 +- .../reservedNameOnInterfaceImport.types | 2 +- .../compiler/reservedNameOnModuleImport.js | 4 +- .../reservedNameOnModuleImport.symbols | 10 +- .../compiler/reservedNameOnModuleImport.types | 4 +- ...NameOnModuleImportWithInterface.errors.txt | 4 +- ...reservedNameOnModuleImportWithInterface.js | 4 +- ...vedNameOnModuleImportWithInterface.symbols | 12 +- ...ervedNameOnModuleImportWithInterface.types | 4 +- .../compiler/reservedWords2.errors.txt | 12 +- .../submodule/compiler/reservedWords2.js | 4 +- .../submodule/compiler/reservedWords2.js.diff | 32 + .../submodule/compiler/reservedWords2.symbols | 2 +- .../submodule/compiler/reservedWords2.types | 4 +- .../compiler/reservedWords2.types.diff | 10 + .../submodule/compiler/reservedWords3.js.diff | 16 + ...nCandidateFromPackageJsonField2.errors.txt | 25 + ...esolutionCandidateFromPackageJsonField2.js | 21 + ...tionCandidateFromPackageJsonField2.symbols | 17 + ...lutionCandidateFromPackageJsonField2.types | 18 + ...aceNameWithSameLetDeclarationName1.js.diff | 8 + ...aceNameWithSameLetDeclarationName2.js.diff | 10 + ...NameWithSameLetDeclarationName2.types.diff | 12 + ...veModuleNameWithSameLetDeclarationName1.js | 2 +- ...uleNameWithSameLetDeclarationName1.js.diff | 8 + ...uleNameWithSameLetDeclarationName1.symbols | 6 +- ...oduleNameWithSameLetDeclarationName1.types | 2 +- ...peAliasWithSameLetDeclarationName1.js.diff | 15 + ...arationWhenInBaseTypeResolution.errors.txt | 132 +- ...lassDeclarationWhenInBaseTypeResolution.js | 132 +- ...eclarationWhenInBaseTypeResolution.js.diff | 5875 ++++++++++++ ...eclarationWhenInBaseTypeResolution.symbols | 5920 ++++++------ ...sDeclarationWhenInBaseTypeResolution.types | 132 +- .../compiler/restArgAssignmentCompat.js.diff | 17 + .../compiler/restArgMissingName.js.diff | 13 + .../compiler/restElementAssignable.js.diff | 26 +- .../restElementWithNumberPropertyName.js.diff | 8 + ...stElementWithNumberPropertyName.types.diff | 11 + .../compiler/restIntersection.js.diff | 8 + .../restInvalidArgumentType.types.diff | 11 + .../compiler/restParamAsOptional.js.diff | 20 + .../compiler/restParamModifier.js.diff | 14 + .../compiler/restParamModifier2.js.diff | 18 +- ...stParameterAssignmentCompatibility.js.diff | 50 + .../restParameterNoTypeAnnotation.js.diff | 15 + .../compiler/restParameterNotLast.js.diff | 8 + .../restParameterTypeInstantiation.js.diff | 14 +- .../restParameterWithBindingPattern1.js.diff | 15 + ...stParameterWithBindingPattern1.js.map.diff | 4 +- ...eterWithBindingPattern1.sourcemap.txt.diff | 123 +- .../restParameterWithBindingPattern2.js.diff | 15 + ...stParameterWithBindingPattern2.js.map.diff | 4 +- ...eterWithBindingPattern2.sourcemap.txt.diff | 123 +- .../restParameterWithBindingPattern3.js.diff | 46 + ...estParameterWithBindingPattern3.types.diff | 17 + .../submodule/compiler/restParameters.js.diff | 34 + .../restParamsWithNonRestParams.js.diff | 30 + .../compiler/restTypeRetainsMappyness.js.diff | 11 + .../submodule/compiler/restUnion.js.diff | 16 + .../compiler/returnInConstructor1.js.diff | 125 +- .../returnInfiniteIntersection.js.diff | 12 + .../returnTypeParameterWithModules.js | 4 +- .../returnTypeParameterWithModules.symbols | 14 +- ...eturnTypeParameterWithModules.symbols.diff | 19 + .../returnTypeParameterWithModules.types | 4 +- ...cateIsInstantiateInContextOfTarget.js.diff | 50 +- .../compiler/returnTypeTypeArguments.js.diff | 91 +- .../compiler/returnValueInSetter.js.diff | 22 + .../compiler/reuseInnerModuleMember.js | 6 +- .../compiler/reuseInnerModuleMember.symbols | 10 +- .../compiler/reuseInnerModuleMember.types | 6 +- ...everseMappedContravariantInference.js.diff | 3 +- ...verseMappedPartiallyInferableTypes.js.diff | 62 +- ...appedTypeContextualTypeNotCircular.js.diff | 13 + ...TypeIntersectionConstraint.errors.txt.diff | 74 + ...seMappedTypeIntersectionConstraint.js.diff | 52 +- ...pedTypeIntersectionConstraint.symbols.diff | 48 + ...appedTypeIntersectionConstraint.types.diff | 28 +- ...reverseMappedTypeLimitedConstraint.js.diff | 13 + ...everseMappedTypeRecursiveInference.js.diff | 6 +- .../submodule/compiler/satisfiesEmit.js.diff | 3 +- .../compiler/scopeCheckClassProperty.js.diff | 25 +- ...ckExtendedClassInsidePublicMethod2.js.diff | 45 +- ...ckExtendedClassInsideStaticMethod1.js.diff | 45 +- .../scopeCheckInsidePublicMethod1.js.diff | 17 +- .../scopeCheckInsideStaticMethod1.js.diff | 19 +- .../scopeCheckStaticInitializer.js.diff | 23 +- .../submodule/compiler/scopeTests.js.diff | 48 +- .../submodule/compiler/selfInCallback.js.diff | 24 +- .../submodule/compiler/selfInLambdas.js.diff | 41 +- .../submodule/compiler/selfRef.js.diff | 12 +- .../submodule/compiler/selfReference.js.diff | 8 + ...selfReferencesInFunctionParameters.js.diff | 34 + .../compiler/selfReferencingFile.js.diff | 13 + .../compiler/selfReferencingFile2.js.diff | 13 + .../compiler/selfReferencingFile3.js.diff | 13 + .../selfReferencingSpreadInLoop.js.diff | 23 + .../semicolonsInModuleDeclarations.errors.txt | 2 +- .../semicolonsInModuleDeclarations.js | 2 +- .../semicolonsInModuleDeclarations.symbols | 6 +- .../semicolonsInModuleDeclarations.types | 2 +- .../submodule/compiler/separate1-2.js | 2 +- .../submodule/compiler/separate1-2.symbols | 4 +- .../submodule/compiler/separate1-2.types | 2 +- .../compiler/setterBeforeGetter.js.diff | 32 +- .../compiler/setterWithReturn.js.diff | 32 + .../compiler/shadowPrivateMembers.js.diff | 41 + .../compiler/shadowingViaLocalValue.js.diff | 18 + ...owingViaLocalValueOrBindingElement.js.diff | 20 + .../shorthand-property-es5-es6.js.diff | 13 + ...xportedEntity02_targetES5_CommonJS.js.diff | 10 + ...PropertyAssignmentsInDestructuring.js.diff | 218 + .../shorthandPropertyUndefined.js.diff | 8 + ...tPrintNullEscapesIntoOctalLiterals.js.diff | 16 + ...kedsideeffectimports=true).errors.txt.diff | 25 + ...kedsideeffectimports=true).errors.txt.diff | 25 + ...kedsideeffectimports=true).errors.txt.diff | 25 + ...gantureIsSubTypeIfTheyAreIdentical.js.diff | 18 + ...tantiationWithRecursiveConstraints.js.diff | 22 +- .../signatureLengthMismatchCall.js.diff | 8 + .../signatureLengthMismatchInOverload.js.diff | 8 + .../compiler/silentNeverPropagation.js.diff | 6 +- ...arameterReferencedInObjectLiteral1.js.diff | 8 + .../simpleRecursionWithBaseCase1.js.diff | 14 + ...alWithInteriorConditionalIsRelated.js.diff | 7 + ...ectedDeepObjectLiteralElaborations.js.diff | 13 + .../submodule/compiler/sourceMap-Comments.js | 2 +- .../compiler/sourceMap-Comments.js.diff | 25 +- .../compiler/sourceMap-Comments.js.map | 4 +- .../compiler/sourceMap-Comments.js.map.diff | 8 +- .../compiler/sourceMap-Comments.sourcemap.txt | 50 +- .../sourceMap-Comments.sourcemap.txt.diff | 403 +- .../compiler/sourceMap-Comments.symbols | 6 +- .../compiler/sourceMap-Comments.types | 2 +- .../compiler/sourceMap-FileWithComments.js | 2 +- .../sourceMap-FileWithComments.js.diff | 22 +- .../sourceMap-FileWithComments.js.map | 4 +- .../sourceMap-FileWithComments.js.map.diff | 8 +- .../sourceMap-FileWithComments.sourcemap.txt | 20 +- ...rceMap-FileWithComments.sourcemap.txt.diff | 590 +- .../sourceMap-FileWithComments.symbols | 18 +- .../sourceMap-FileWithComments.symbols.diff | 11 + .../compiler/sourceMap-FileWithComments.types | 2 +- .../sourceMap-StringLiteralWithNewLine.js | 2 +- .../sourceMap-StringLiteralWithNewLine.js.map | 4 +- ...ceMap-StringLiteralWithNewLine.js.map.diff | 8 +- ...Map-StringLiteralWithNewLine.sourcemap.txt | 20 +- ...tringLiteralWithNewLine.sourcemap.txt.diff | 18 +- ...sourceMap-StringLiteralWithNewLine.symbols | 2 +- .../sourceMap-StringLiteralWithNewLine.types | 2 +- ...alModuleWithCommentPrecedingStatement01.js | 2 +- ...duleWithCommentPrecedingStatement01.js.map | 4 +- ...ithCommentPrecedingStatement01.js.map.diff | 8 +- ...hCommentPrecedingStatement01.sourcemap.txt | 20 +- ...entPrecedingStatement01.sourcemap.txt.diff | 18 +- ...uleWithCommentPrecedingStatement01.symbols | 4 +- ...oduleWithCommentPrecedingStatement01.types | 2 +- .../compiler/sourceMapSample.errors.txt | 2 +- .../submodule/compiler/sourceMapSample.js | 2 +- .../compiler/sourceMapSample.js.diff | 30 +- .../submodule/compiler/sourceMapSample.js.map | 4 +- .../compiler/sourceMapSample.js.map.diff | 8 +- .../compiler/sourceMapSample.sourcemap.txt | 50 +- .../sourceMapSample.sourcemap.txt.diff | 572 +- .../compiler/sourceMapSample.symbols | 6 +- .../submodule/compiler/sourceMapSample.types | 2 +- .../compiler/sourceMapValidationClass.js.diff | 48 +- .../sourceMapValidationClass.js.map.diff | 4 +- ...ourceMapValidationClass.sourcemap.txt.diff | 566 +- ...idationClassWithDefaultConstructor.js.diff | 12 +- ...ionClassWithDefaultConstructor.js.map.diff | 4 +- ...sWithDefaultConstructor.sourcemap.txt.diff | 72 +- ...onstructorAndCapturedThisStatement.js.diff | 15 +- ...ructorAndCapturedThisStatement.js.map.diff | 4 +- ...ndCapturedThisStatement.sourcemap.txt.diff | 159 +- ...DefaultConstructorAndExtendsClause.js.diff | 44 +- ...ultConstructorAndExtendsClause.js.map.diff | 4 +- ...tructorAndExtendsClause.sourcemap.txt.diff | 242 +- .../compiler/sourceMapValidationClasses.js | 2 +- .../sourceMapValidationClasses.js.diff | 30 +- .../sourceMapValidationClasses.js.map | 4 +- .../sourceMapValidationClasses.js.map.diff | 8 +- .../sourceMapValidationClasses.sourcemap.txt | 50 +- ...rceMapValidationClasses.sourcemap.txt.diff | 585 +- .../sourceMapValidationClasses.symbols | 4 +- .../compiler/sourceMapValidationClasses.types | 2 +- .../sourceMapValidationDecorators.js.diff | 57 +- .../sourceMapValidationDecorators.js.map.diff | 4 +- ...MapValidationDecorators.sourcemap.txt.diff | 1752 ++-- ...sourceMapValidationDecorators.symbols.diff | 18 + ...estructuringForArrayBindingPattern.js.diff | 161 + ...ucturingForArrayBindingPattern.js.map.diff | 4 +- ...gForArrayBindingPattern.sourcemap.txt.diff | 4095 +++++++- ...ructuringForArrayBindingPattern.types.diff | 50 + ...structuringForArrayBindingPattern2.js.diff | 172 + ...cturingForArrayBindingPattern2.js.map.diff | 4 +- ...ForArrayBindingPattern2.sourcemap.txt.diff | 5726 ++++++++++- ...ucturingForArrayBindingPattern2.types.diff | 50 + ...orArrayBindingPatternDefaultValues.js.diff | 143 + ...rayBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 4682 ++++++++- ...rrayBindingPatternDefaultValues.types.diff | 53 + ...rArrayBindingPatternDefaultValues2.js.diff | 173 + ...ayBindingPatternDefaultValues2.js.map.diff | 4 +- ...ngPatternDefaultValues2.sourcemap.txt.diff | 6258 +++++++++++- ...rayBindingPatternDefaultValues2.types.diff | 49 + ...structuringForObjectBindingPattern.js.diff | 87 + ...cturingForObjectBindingPattern.js.map.diff | 4 +- ...ForObjectBindingPattern.sourcemap.txt.diff | 2418 ++++- ...tructuringForObjectBindingPattern2.js.diff | 174 + ...turingForObjectBindingPattern2.js.map.diff | 4 +- ...orObjectBindingPattern2.sourcemap.txt.diff | 5787 ++++++++++- ...rObjectBindingPatternDefaultValues.js.diff | 87 + ...ectBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 3359 ++++++- ...ObjectBindingPatternDefaultValues2.js.diff | 236 + ...ctBindingPatternDefaultValues2.js.map.diff | 4 +- ...ngPatternDefaultValues2.sourcemap.txt.diff | 8445 ++++++++++++++++- ...tructuringForOfArrayBindingPattern.js.diff | 191 + ...turingForOfArrayBindingPattern.js.map.diff | 4 +- ...orOfArrayBindingPattern.sourcemap.txt.diff | 4568 ++++++++- ...cturingForOfArrayBindingPattern.types.diff | 50 + ...ructuringForOfArrayBindingPattern2.js.diff | 200 + ...uringForOfArrayBindingPattern2.js.map.diff | 4 +- ...rOfArrayBindingPattern2.sourcemap.txt.diff | 4667 ++++++++- ...turingForOfArrayBindingPattern2.types.diff | 50 + ...OfArrayBindingPatternDefaultValues.js.diff | 170 + ...rayBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 5106 +++++++++- ...rrayBindingPatternDefaultValues.types.diff | 53 + ...fArrayBindingPatternDefaultValues2.js.diff | 197 + ...ayBindingPatternDefaultValues2.js.map.diff | 4 +- ...ngPatternDefaultValues2.sourcemap.txt.diff | 5016 +++++++++- ...rayBindingPatternDefaultValues2.types.diff | 49 + ...ructuringForOfObjectBindingPattern.js.diff | 104 + ...uringForOfObjectBindingPattern.js.map.diff | 4 +- ...rOfObjectBindingPattern.sourcemap.txt.diff | 3113 +++++- ...ucturingForOfObjectBindingPattern2.js.diff | 197 + ...ringForOfObjectBindingPattern2.js.map.diff | 4 +- ...OfObjectBindingPattern2.sourcemap.txt.diff | 6122 +++++++++++- ...fObjectBindingPatternDefaultValues.js.diff | 104 + ...ectBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 4044 +++++++- ...ObjectBindingPatternDefaultValues2.js.diff | 251 + ...ctBindingPatternDefaultValues2.js.map.diff | 4 +- ...ngPatternDefaultValues2.sourcemap.txt.diff | 8126 +++++++++++++++- ...arameterNestedObjectBindingPattern.js.diff | 22 + ...eterNestedObjectBindingPattern.js.map.diff | 4 +- ...tedObjectBindingPattern.sourcemap.txt.diff | 591 +- ...dObjectBindingPatternDefaultValues.js.diff | 22 + ...ectBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 995 +- ...uringParameterObjectBindingPattern.js.diff | 22 + ...gParameterObjectBindingPattern.js.map.diff | 4 +- ...terObjectBindingPattern.sourcemap.txt.diff | 467 +- ...rObjectBindingPatternDefaultValues.js.diff | 22 + ...ectBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 595 +- ...uringParametertArrayBindingPattern.js.diff | 27 + ...gParametertArrayBindingPattern.js.map.diff | 4 +- ...tertArrayBindingPattern.sourcemap.txt.diff | 618 +- ...ngParametertArrayBindingPattern.types.diff | 10 + ...ringParametertArrayBindingPattern2.js.diff | 27 + ...ParametertArrayBindingPattern2.js.map.diff | 4 +- ...ertArrayBindingPattern2.sourcemap.txt.diff | 633 +- ...gParametertArrayBindingPattern2.types.diff | 10 + ...rtArrayBindingPatternDefaultValues.js.diff | 27 + ...rayBindingPatternDefaultValues.js.map.diff | 4 +- ...ingPatternDefaultValues.sourcemap.txt.diff | 984 +- ...rrayBindingPatternDefaultValues.types.diff | 10 + ...tArrayBindingPatternDefaultValues2.js.diff | 22 + ...ayBindingPatternDefaultValues2.js.map.diff | 4 +- ...ngPatternDefaultValues2.sourcemap.txt.diff | 787 +- ...rayBindingPatternDefaultValues2.types.diff | 10 + ...tionDestructuringVariableStatement.js.diff | 15 + ...DestructuringVariableStatement.js.map.diff | 8 + ...turingVariableStatement.sourcemap.txt.diff | 280 + ...ionDestructuringVariableStatement1.js.diff | 27 + ...estructuringVariableStatement1.js.map.diff | 8 + ...uringVariableStatement1.sourcemap.txt.diff | 999 ++ ...riableStatementArrayBindingPattern.js.diff | 21 + ...leStatementArrayBindingPattern.js.map.diff | 8 + ...mentArrayBindingPattern.sourcemap.txt.diff | 496 + ...bleStatementArrayBindingPattern.types.diff | 9 + ...iableStatementArrayBindingPattern2.js.diff | 21 + ...eStatementArrayBindingPattern2.js.map.diff | 8 + ...entArrayBindingPattern2.sourcemap.txt.diff | 513 + ...leStatementArrayBindingPattern2.types.diff | 9 + ...iableStatementArrayBindingPattern3.js.diff | 70 + ...eStatementArrayBindingPattern3.js.map.diff | 4 +- ...entArrayBindingPattern3.sourcemap.txt.diff | 2204 ++++- ...leStatementArrayBindingPattern3.types.diff | 48 + ...iableStatementArrayBindingPattern4.js.diff | 9 + ...eStatementArrayBindingPattern4.js.map.diff | 8 + ...entArrayBindingPattern4.sourcemap.txt.diff | 78 + ...iableStatementArrayBindingPattern5.js.diff | 11 + ...eStatementArrayBindingPattern5.js.map.diff | 8 + ...entArrayBindingPattern5.sourcemap.txt.diff | 168 + ...iableStatementArrayBindingPattern6.js.diff | 9 + ...eStatementArrayBindingPattern6.js.map.diff | 8 + ...entArrayBindingPattern6.sourcemap.txt.diff | 97 + ...iableStatementArrayBindingPattern7.js.diff | 9 + ...eStatementArrayBindingPattern7.js.map.diff | 8 + ...entArrayBindingPattern7.sourcemap.txt.diff | 114 + ...ntArrayBindingPatternDefaultValues.js.diff | 21 + ...rayBindingPatternDefaultValues.js.map.diff | 8 + ...ingPatternDefaultValues.sourcemap.txt.diff | 709 ++ ...rrayBindingPatternDefaultValues.types.diff | 10 + ...tArrayBindingPatternDefaultValues2.js.diff | 19 + ...ayBindingPatternDefaultValues2.js.map.diff | 8 + ...ngPatternDefaultValues2.sourcemap.txt.diff | 740 ++ ...rayBindingPatternDefaultValues2.types.diff | 10 + ...tArrayBindingPatternDefaultValues3.js.diff | 65 + ...ayBindingPatternDefaultValues3.js.map.diff | 4 +- ...ngPatternDefaultValues3.sourcemap.txt.diff | 2596 ++++- ...rayBindingPatternDefaultValues3.types.diff | 50 + ...ringVariableStatementDefaultValues.js.diff | 15 + ...VariableStatementDefaultValues.js.map.diff | 8 + ...eStatementDefaultValues.sourcemap.txt.diff | 378 + ...tatementNestedObjectBindingPattern.js.diff | 15 + ...mentNestedObjectBindingPattern.js.map.diff | 8 + ...tedObjectBindingPattern.sourcemap.txt.diff | 447 + ...ectBindingPatternWithDefaultValues.js.diff | 15 + ...indingPatternWithDefaultValues.js.map.diff | 8 + ...atternWithDefaultValues.sourcemap.txt.diff | 858 ++ ...ableStatementObjectBindingPattern1.js.diff | 9 + ...StatementObjectBindingPattern1.js.map.diff | 8 + ...ntObjectBindingPattern1.sourcemap.txt.diff | 77 + ...ableStatementObjectBindingPattern2.js.diff | 11 + ...StatementObjectBindingPattern2.js.map.diff | 8 + ...ntObjectBindingPattern2.sourcemap.txt.diff | 191 + ...ableStatementObjectBindingPattern3.js.diff | 9 + ...StatementObjectBindingPattern3.js.map.diff | 8 + ...ntObjectBindingPattern3.sourcemap.txt.diff | 96 + ...ableStatementObjectBindingPattern4.js.diff | 9 + ...StatementObjectBindingPattern4.js.map.diff | 8 + ...ntObjectBindingPattern4.sourcemap.txt.diff | 141 + ...ValidationExportAssignmentCommonjs.js.diff | 12 +- ...dationExportAssignmentCommonjs.js.map.diff | 4 +- ...xportAssignmentCommonjs.sourcemap.txt.diff | 87 +- .../sourceMapValidationForIn.symbols.diff | 38 + ...ceMapValidationFunctionExpressions.js.diff | 15 + ...pValidationFunctionExpressions.js.map.diff | 4 +- ...tionFunctionExpressions.sourcemap.txt.diff | 128 +- ...lidationFunctionPropertyAssignment.js.diff | 9 + ...tionFunctionPropertyAssignment.js.map.diff | 4 +- ...ctionPropertyAssignment.sourcemap.txt.diff | 34 +- .../sourceMapValidationFunctions.js.diff | 26 + .../sourceMapValidationFunctions.js.map.diff | 4 +- ...eMapValidationFunctions.sourcemap.txt.diff | 303 +- .../compiler/sourceMapValidationImport.js | 2 +- .../sourceMapValidationImport.js.diff | 9 +- .../compiler/sourceMapValidationImport.js.map | 4 +- .../sourceMapValidationImport.js.map.diff | 8 +- .../sourceMapValidationImport.sourcemap.txt | 24 +- ...urceMapValidationImport.sourcemap.txt.diff | 192 +- .../sourceMapValidationImport.symbols | 8 +- .../compiler/sourceMapValidationImport.types | 2 +- ...idationLambdaSpanningMultipleLines.js.diff | 11 + ...ionLambdaSpanningMultipleLines.js.map.diff | 8 + ...daSpanningMultipleLines.sourcemap.txt.diff | 77 + .../compiler/sourceMapValidationModule.js | 6 +- .../sourceMapValidationModule.js.diff | 11 + .../compiler/sourceMapValidationModule.js.map | 4 +- .../sourceMapValidationModule.js.map.diff | 8 +- .../sourceMapValidationModule.sourcemap.txt | 64 +- ...urceMapValidationModule.sourcemap.txt.diff | 61 +- .../sourceMapValidationModule.symbols | 10 +- .../compiler/sourceMapValidationModule.types | 6 +- ...pValidationVarInDownLevelGenerator.js.diff | 16 + ...idationVarInDownLevelGenerator.js.map.diff | 4 +- ...VarInDownLevelGenerator.sourcemap.txt.diff | 125 +- .../sourceMapValidationWithComments.js.diff | 25 + ...ourceMapValidationWithComments.js.map.diff | 4 +- ...pValidationWithComments.sourcemap.txt.diff | 468 +- ...ithCaseSensitiveFileNamesAndOutDir.js.diff | 23 + ...aseSensitiveFileNamesAndOutDir.js.map.diff | 9 + ...itiveFileNamesAndOutDir.sourcemap.txt.diff | 136 + ...ilesWithFileEndingWithInterface.errors.txt | 4 +- ...leFilesWithFileEndingWithInterface.symbols | 6 +- ...esWithFileEndingWithInterface.symbols.diff | 11 + ...ipleFilesWithFileEndingWithInterface.types | 4 +- ...NonCaseSensitiveFileNamesAndOutDir.js.diff | 23 + ...aseSensitiveFileNamesAndOutDir.js.map.diff | 14 + ...itiveFileNamesAndOutDir.sourcemap.txt.diff | 136 + .../sourcemapValidationDuplicateNames.js | 4 +- .../sourcemapValidationDuplicateNames.js.diff | 16 + .../sourcemapValidationDuplicateNames.js.map | 4 +- ...rcemapValidationDuplicateNames.js.map.diff | 8 +- ...emapValidationDuplicateNames.sourcemap.txt | 36 +- ...alidationDuplicateNames.sourcemap.txt.diff | 176 +- .../sourcemapValidationDuplicateNames.symbols | 4 +- .../sourcemapValidationDuplicateNames.types | 4 +- .../compiler/specedNoStackBlown.symbols.diff | 36 + .../specialIntersectionsInMappedTypes.js.diff | 6 +- .../compiler/specializationError.symbols.diff | 44 + .../compiler/specializationOfExportedClass.js | 2 +- .../specializationOfExportedClass.js.diff | 16 + .../specializationOfExportedClass.symbols | 8 +- .../specializationOfExportedClass.types | 2 +- ...alizationsShouldNotAffectEachOther.js.diff | 11 + .../specializedInheritedConstructors1.js.diff | 51 +- .../specializedLambdaTypeArguments.js.diff | 12 +- ...cializedOverloadWithRestParameters.js.diff | 44 + ...lizedSignatureAsCallbackParameter1.js.diff | 10 + .../spellingSuggestionGlobal2.js.diff | 9 + .../spellingSuggestionGlobal3.js.diff | 9 + .../spellingSuggestionJSXAttribute.js.diff | 33 +- .../spellingSuggestionModule.errors.txt | 4 +- .../compiler/spellingSuggestionModule.js | 2 +- .../compiler/spellingSuggestionModule.symbols | 4 +- .../compiler/spellingSuggestionModule.types | 2 +- .../submodule/compiler/spliceTuples.js.diff | 39 + .../spreadBooleanRespectsFreshness.js.diff | 17 + ...preadBooleanRespectsFreshness.symbols.diff | 11 + .../spreadBooleanRespectsFreshness.types.diff | 11 + .../spreadExpressionContextualType.js.diff | 10 +- ...ressionContextualTypeWithNamespace.js.diff | 26 +- ...sionContextualTypeWithNamespace.types.diff | 76 + .../spreadIdenticalTypesRemoved.types.diff | 12 +- .../compiler/spreadIntersection.types.diff | 11 + .../compiler/spreadIntersectionJsx.js.diff | 31 +- .../spreadInvalidArgumentType.types.diff | 13 + .../spreadObjectNoCircular1.types.diff | 19 +- ...(exactoptionalpropertytypes=false).js.diff | 36 +- ...s(exactoptionalpropertytypes=true).js.diff | 36 +- ...dexDoesNotAddUndefinedToLocalIndex.js.diff | 9 +- ...tLiteralAssignableToIndexSignature.js.diff | 24 +- ...teralAssignableToIndexSignature.types.diff | 38 + ...neratorMakesRequiredParams.errors.txt.diff | 11 + ...msFromGeneratorMakesRequiredParams.js.diff | 37 + ...romGeneratorMakesRequiredParams.types.diff | 9 + .../compiler/spreadParameterTupleType.js.diff | 24 + ...spreadTupleAccessedByTypeParameter.js.diff | 12 + ...eadTupleAccessedByTypeParameter.types.diff | 9 + .../spreadTypeRemovesReadonly.js.diff | 11 + .../spreadsAndContextualTupleTypes.types.diff | 38 + .../compiler/spyComparisonChecking.js.diff | 14 + .../spyComparisonChecking.symbols.diff | 29 + .../stackDepthLimitCastingType.js.diff | 3 +- .../compiler/staticAndMemberFunctions.js.diff | 17 + ...ousTypeNotReferencingTypeParameter.js.diff | 184 +- ...peNotReferencingTypeParameter.symbols.diff | 56 + ...TypeNotReferencingTypeParameter.types.diff | 25 +- .../compiler/staticAsIdentifier.js.diff | 89 +- .../compiler/staticClassMemberError.js.diff | 24 +- .../compiler/staticClassProps.js.diff | 10 +- .../staticFieldWithInterfaceContext.js.diff | 143 +- .../submodule/compiler/staticGetter1.js.diff | 22 + .../submodule/compiler/staticGetter2.js.diff | 19 + .../compiler/staticGetterAndSetter.js.diff | 21 + ...exSignatureAndNormalIndexSignature.js.diff | 13 + .../compiler/staticInheritance.js.diff | 47 +- .../compiler/staticInstanceResolution.js.diff | 23 + .../staticInstanceResolution2.js.diff | 23 + .../staticInstanceResolution3.js.diff | 19 +- .../staticInstanceResolution4.js.diff | 16 + .../staticInterfaceAssignmentCompat.js.diff | 19 + .../staticMemberAccessOffDerivedType1.js.diff | 40 +- .../staticMemberExportAccess.errors.txt | 2 +- .../compiler/staticMemberExportAccess.js | 2 +- .../compiler/staticMemberExportAccess.js.diff | 23 + .../compiler/staticMemberExportAccess.symbols | 2 +- .../compiler/staticMemberExportAccess.types | 2 +- ...blicMemberOfAnotherClassAssignment.js.diff | 27 + ...aticMemberWithStringAndNumberNames.js.diff | 14 +- ...cMethodReferencingTypeArgument1.errors.txt | 2 +- .../staticMethodReferencingTypeArgument1.js | 2 +- ...aticMethodReferencingTypeArgument1.js.diff | 25 +- ...aticMethodReferencingTypeArgument1.symbols | 14 +- ...staticMethodReferencingTypeArgument1.types | 2 +- ...TypeParameterExtendsClauseDeclFile.js.diff | 54 + ...hodsReferencingClassTypeParameters.js.diff | 15 + .../staticMismatchBecauseOfPrototype.js.diff | 33 +- .../staticModifierAlreadySeen.js.diff | 15 +- .../compiler/staticMustPrecedePublic.js.diff | 12 +- .../compiler/staticOffOfInstance1.js.diff | 20 + .../compiler/staticOffOfInstance2.js.diff | 21 + .../compiler/staticPropSuper.js.diff | 110 +- .../compiler/staticPrototypeProperty.js.diff | 23 +- .../staticPrototypePropertyOnClass.js.diff | 41 + .../compiler/staticVisibility.js.diff | 46 +- .../compiler/staticVisibility2.js.diff | 14 +- .../submodule/compiler/statics.errors.txt | 2 +- .../reference/submodule/compiler/statics.js | 2 +- .../submodule/compiler/statics.js.diff | 38 +- .../submodule/compiler/statics.symbols | 44 +- .../submodule/compiler/statics.types | 2 +- .../staticsInConstructorBodies.js.diff | 10 +- .../staticsNotInScopeInClodule.errors.txt | 2 +- .../compiler/staticsNotInScopeInClodule.js | 2 +- .../staticsNotInScopeInClodule.js.diff | 6 +- .../staticsNotInScopeInClodule.symbols | 2 +- .../compiler/staticsNotInScopeInClodule.types | 2 +- .../strictBooleanMemberAssignability.js.diff | 11 +- .../compiler/strictFunctionTypes1.js.diff | 32 +- .../strictFunctionTypes1.symbols.diff | 10 + .../compiler/strictFunctionTypes1.types.diff | 13 +- .../strictFunctionTypesErrors.js.diff | 21 + .../strictModeEnumMemberNameReserved.js.diff | 8 + .../compiler/strictModeInConstructor.js.diff | 140 +- .../compiler/strictModeReservedWord.js.diff | 51 +- ...ModeReservedWordInClassDeclaration.js.diff | 98 +- ...ictModeReservedWordInDestructuring.js.diff | 18 + ...ReservedWordInModuleDeclaration.errors.txt | 28 +- ...rictModeReservedWordInModuleDeclaration.js | 8 +- ...odeReservedWordInModuleDeclaration.symbols | 22 +- ...tModeReservedWordInModuleDeclaration.types | 8 +- .../strictModeUseContextualKeyword.js.diff | 22 + .../strictNullEmptyDestructuring.js.diff | 28 + .../strictNullEmptyDestructuring.symbols.diff | 43 + .../compiler/strictNullLogicalAndOr.js.diff | 17 + .../strictNullLogicalAndOr.symbols.diff | 30 + .../strictNullNotNullIndexTypeNoLib.js.diff | 44 +- ...rictNullNotNullIndexTypeShouldWork.js.diff | 44 +- .../strictOptionalProperties1.js.diff | 81 +- .../strictOptionalProperties1.types.diff | 66 + .../strictSubtypeAndNarrowing.js.diff | 45 +- .../strictSubtypeAndNarrowing.symbols.diff | 11 + .../strictSubtypeAndNarrowing.types.diff | 27 +- .../strictTypeofUnionNarrowing.types.diff | 38 +- .../stringIndexerAndConstructor.js.diff | 16 + .../stringIndexerAssignments2.js.diff | 33 +- .../stringLiteralObjectLiteralDeclaration1.js | 2 +- ...ngLiteralObjectLiteralDeclaration1.symbols | 2 +- ...ringLiteralObjectLiteralDeclaration1.types | 2 +- .../stringMappingAssignability.js.diff | 6 +- .../submodule/compiler/stripInternal1.js.diff | 19 +- .../submodule/compiler/structural1.js | 2 +- .../submodule/compiler/structural1.symbols | 6 +- .../submodule/compiler/structural1.types | 2 +- .../structuralTypeInDeclareFileForModule.js | 2 +- ...ructuralTypeInDeclareFileForModule.symbols | 4 +- ...structuralTypeInDeclareFileForModule.types | 2 +- ...ClassCanAccessProtectedConstructor.js.diff | 67 +- .../subclassThisTypeAssignable01.js.diff | 21 + .../subclassThisTypeAssignable02.js.diff | 18 +- .../compiler/subclassUint8Array.symbols.diff | 9 + ...assWithPolymorphicThisIsAssignable.js.diff | 19 + ...itutionTypeNoMergeOfAssignableType.js.diff | 9 + ...stitutionTypesInIndexedAccessTypes.js.diff | 7 +- ...typeReductionUnionConstraints.symbols.diff | 13 + ...ubtypeReductionUnionConstraints.types.diff | 38 + .../compiler/subtypeRelationForNever.js.diff | 8 + .../compiler/subtypingTransitivity.js.diff | 52 +- .../submodule/compiler/super.js.diff | 86 + .../submodule/compiler/super1.errors.txt | 2 +- .../reference/submodule/compiler/super1.js | 2 +- .../submodule/compiler/super1.js.diff | 166 + .../submodule/compiler/super1.symbols | 8 +- .../reference/submodule/compiler/super1.types | 2 +- .../submodule/compiler/super2.js.diff | 117 + .../submodule/compiler/superAccess.js.diff | 49 +- .../submodule/compiler/superAccess2.js.diff | 77 +- .../compiler/superAccessCastedCall.js.diff | 61 +- .../compiler/superAccessInFatArrow1.js | 2 +- .../compiler/superAccessInFatArrow1.js.diff | 58 + .../compiler/superAccessInFatArrow1.symbols | 8 +- .../compiler/superAccessInFatArrow1.types | 2 +- .../compiler/superCallArgsMustMatch.js.diff | 45 +- .../compiler/superCallAssignResult.js.diff | 43 + ...omClassThatDerivesFromGenericType1.js.diff | 32 + ...omClassThatDerivesFromGenericType2.js.diff | 32 + ...ithIncorrectNumberOfTypeArguments1.js.diff | 39 +- ...correctNumberOfTypeArguments1.symbols.diff | 10 + ...GenericTypeButWithNoTypeArguments1.js.diff | 39 +- ...icTypeButWithNoTypeArguments1.symbols.diff | 10 + ...onGenericTypeButWithTypeArguments1.js.diff | 39 +- ...ericTypeButWithTypeArguments1.symbols.diff | 10 + ...perCallFromClassThatHasNoBaseType1.js.diff | 23 +- ...llFromClassThatHasNoBaseType1.symbols.diff | 10 + .../compiler/superCallFromFunction1.js.diff | 9 + .../superCallFromFunction1.symbols.diff | 10 + .../superCallInNonStaticMethod.js.diff | 112 +- .../compiler/superCallInStaticMethod.js.diff | 105 + .../superCallInsideClassDeclaration.js.diff | 57 + .../superCallInsideClassExpression.js.diff | 57 + ...rCallInsideObjectLiteralExpression.js.diff | 46 + .../superCallOutsideConstructor.js.diff | 61 +- .../superCallWithCommentEmit01.js.diff | 41 +- .../superCallWithMissingBaseClass.js.diff | 42 + .../compiler/superCallsInConstructor.js.diff | 64 +- .../compiler/superElementAccess.js.diff | 76 +- .../submodule/compiler/superErrors.js.diff | 101 +- ...superHasMethodsFromMergedInterface.js.diff | 45 + .../compiler/superInCatchBlock1.js.diff | 49 + .../compiler/superInConstructorParam1.js.diff | 46 + .../submodule/compiler/superInLambdas.js.diff | 154 +- .../superInObjectLiterals_ES5.js.diff | 113 + .../submodule/compiler/superNewCall1.js.diff | 42 +- .../compiler/superNewCall1.symbols.diff | 11 + .../compiler/superNoModifiersCrash.js.diff | 48 + .../compiler/superPropertyAccess.js.diff | 76 +- .../compiler/superPropertyAccess1.js.diff | 81 + .../compiler/superPropertyAccess2.js.diff | 81 + ...ComputedPropertiesOfNestedType_ES5.js.diff | 57 + .../superPropertyAccessInSuperCall01.js.diff | 45 + .../compiler/superPropertyAccess_ES5.js.diff | 90 +- ...yElementNoUnusedLexicalThisCapture.js.diff | 62 + .../superWithGenericSpecialization.js.diff | 46 +- .../compiler/superWithGenerics.js.diff | 32 + .../compiler/superWithTypeArgument.js.diff | 40 + .../compiler/superWithTypeArgument2.js.diff | 41 +- .../compiler/superWithTypeArgument3.js.diff | 49 +- ...ect-literal-getters-and-setters.errors.txt | 2 +- ...side-object-literal-getters-and-setters.js | 2 +- ...object-literal-getters-and-setters.js.diff | 67 + ...object-literal-getters-and-setters.symbols | 2 +- ...e-object-literal-getters-and-setters.types | 2 +- .../compiler/switchAssignmentCompat.js.diff | 16 + ...sesEvenWhenNonMatchingClausesExist.js.diff | 29 + .../switchCasesExpressionTypeMismatch.js.diff | 16 + .../switchComparableCompatForBrands.js.diff | 15 +- ...switchComparableCompatForBrands.types.diff | 11 + ...mbolLinkDeclarationEmitModuleNames.js.diff | 22 +- ...matchingPolyfillsWorkTogether.symbols.diff | 18 + .../taggedPrimitiveNarrowing.types.diff | 19 + ...mplateStringWithSymbolExpression01.js.diff | 10 +- ...dTemplateStringsHexadecimalEscapes.js.diff | 19 + ...TemplateStringsWithCurriedFunction.js.diff | 27 +- ...plateStringsWithCurriedFunction.types.diff | 20 + ...mplateStringsWithMultilineTemplate.js.diff | 22 + ...dTemplateStringsWithUnicodeEscapes.js.diff | 19 + ...mplateStringsWithWhitespaceEscapes.js.diff | 19 + ...aggedTemplateWithoutDeclaredHelper.js.diff | 13 + .../taggedTemplatesInDifferentScopes.js.diff | 35 + .../taggedTemplatesInModuleAndGlobal.js.diff | 39 + .../tailRecursiveConditionalTypes.types.diff | 11 + ...s6DecoratorMetadataImportNotElided.js.diff | 29 +- .../compiler/targetTypeBaseCalls.js.diff | 42 + ...ngOfConstantBindingWithInitializer.js.diff | 18 + .../templateLiteralEscapeSequence.js.diff | 265 +- .../templateLiteralIntersection.js.diff | 8 + .../templateLiteralIntersection4.js.diff | 7 +- ...mplateLiteralsAndDecoratorMetadata.js.diff | 10 +- .../compiler/templateLiteralsInTypes.js.diff | 3 +- .../templateLiteralsSourceMap.js.diff | 9 + .../templateLiteralsSourceMap.js.map.diff | 8 + ...mplateLiteralsSourceMap.sourcemap.txt.diff | 79 + ...sArrayTypeDefinedInES5Mode.errors.txt.diff | 4 +- ...teStringsArrayTypeDefinedInES5Mode.js.diff | 22 + ...ArrayTypeNotDefinedES5Mode.errors.txt.diff | 4 +- ...eStringsArrayTypeNotDefinedES5Mode.js.diff | 15 + .../ternaryExpressionSourceMap.js.diff | 9 + .../ternaryExpressionSourceMap.js.map.diff | 8 + ...naryExpressionSourceMap.sourcemap.txt.diff | 119 + .../submodule/compiler/testContainerList.js | 2 +- .../compiler/testContainerList.js.diff | 15 +- .../compiler/testContainerList.symbols | 4 +- .../compiler/testContainerList.types | 2 +- ...signmentInNamespaceDeclaration1.errors.txt | 8 +- .../thisAssignmentInNamespaceDeclaration1.js | 2 +- ...sAssignmentInNamespaceDeclaration1.symbols | 2 +- ...hisAssignmentInNamespaceDeclaration1.types | 2 +- .../submodule/compiler/thisBinding.errors.txt | 2 +- .../submodule/compiler/thisBinding.js | 2 +- .../submodule/compiler/thisBinding.js.diff | 39 +- .../submodule/compiler/thisBinding.symbols | 8 +- .../submodule/compiler/thisBinding.types | 2 +- .../submodule/compiler/thisBinding2.js.diff | 34 +- .../submodule/compiler/thisCapture1.js.diff | 23 +- ...nalOnMethodReturnOfGenericInstance.js.diff | 57 +- ...nInCallExpressionWithTypeArguments.js.diff | 18 + .../thisExpressionInIndexExpression.js.diff | 10 + .../thisExpressionOfGenericObject.js.diff | 18 +- .../compiler/thisInAccessors.js.diff | 83 + ...nArrowFunctionInStaticInitializer1.js.diff | 10 +- .../thisInConstructorParameter1.js.diff | 15 +- .../thisInConstructorParameter2.js.diff | 37 +- .../thisInGenericStaticMembers.js.diff | 44 + .../compiler/thisInInnerFunctions.js.diff | 32 +- .../submodule/compiler/thisInLambda.js.diff | 38 +- .../compiler/thisInModule.errors.txt | 2 +- .../submodule/compiler/thisInModule.js | 2 +- .../submodule/compiler/thisInModule.symbols | 2 +- .../submodule/compiler/thisInModule.types | 2 +- .../compiler/thisInModuleFunction1.js | 2 +- .../compiler/thisInModuleFunction1.symbols | 8 +- .../compiler/thisInModuleFunction1.types | 2 +- .../submodule/compiler/thisInObjectJs.js.diff | 11 + .../compiler/thisInOuterClassBody.js.diff | 44 +- .../thisInPropertyBoundDeclarations.js.diff | 67 +- ...isInPropertyBoundDeclarations.symbols.diff | 11 + .../compiler/thisInStaticMethod1.js.diff | 16 +- .../submodule/compiler/thisInStatics.js.diff | 30 + .../compiler/thisInSuperCall.js.diff | 80 +- .../compiler/thisInSuperCall1.js.diff | 49 +- .../compiler/thisInSuperCall2.js.diff | 68 +- .../compiler/thisInSuperCall3.js.diff | 50 +- .../thisInTupleTypeParameterConstraints.js | 3 - ...hisInTupleTypeParameterConstraints.js.diff | 9 + ...hisInTupleTypeParameterConstraints.symbols | 60 +- ...TupleTypeParameterConstraints.symbols.diff | 57 +- .../thisInTupleTypeParameterConstraints.types | 2 - ...InTupleTypeParameterConstraints.types.diff | 8 +- ...xOnExistingReadonlyFieldIsNotNever.js.diff | 54 +- .../submodule/compiler/thisKeyword.errors.txt | 2 +- .../submodule/compiler/thisKeyword.js | 2 +- .../submodule/compiler/thisKeyword.symbols | 2 +- .../submodule/compiler/thisKeyword.types | 2 +- .../thisPredicateInObjectLiteral.js.diff | 17 +- ...ncedInFunctionInsideArrowFunction1.js.diff | 14 + .../compiler/thisShadowingErrorSpans.js.diff | 18 +- .../compiler/thisTypeAsConstraint.js.diff | 16 + .../compiler/thisWhenTypeCheckFails.js.diff | 23 + ...side-enum-should-not-be-allowed.errors.txt | 2 +- .../this_inside-enum-should-not-be-allowed.js | 2 +- ..._inside-enum-should-not-be-allowed.js.diff | 3 +- ..._inside-enum-should-not-be-allowed.symbols | 4 +- ...is_inside-enum-should-not-be-allowed.types | 2 +- ...side-object-literal-getters-and-setters.js | 2 +- ...object-literal-getters-and-setters.symbols | 2 +- ...e-object-literal-getters-and-setters.types | 2 +- ...entsInGenericFunctionTypedArgument.js.diff | 11 + .../compiler/tooManyTypeParameters1.js.diff | 18 + .../tooManyTypeParameters1.symbols.diff | 13 + .../reference/submodule/compiler/topLevel.js | 2 +- .../submodule/compiler/topLevel.js.diff | 30 +- .../submodule/compiler/topLevel.symbols | 2 +- .../submodule/compiler/topLevel.types | 2 +- .../topLevelBlockExpando.symbols.diff | 39 +- .../compiler/topLevelLambda.errors.txt | 2 +- .../submodule/compiler/topLevelLambda.js | 2 +- .../submodule/compiler/topLevelLambda.js.diff | 10 + .../submodule/compiler/topLevelLambda.symbols | 2 +- .../submodule/compiler/topLevelLambda.types | 2 +- .../compiler/topLevelLambda2.js.diff | 10 + .../compiler/topLevelLambda3.js.diff | 9 + .../compiler/trackedSymbolsNoCrash.js.diff | 15 +- .../trackedSymbolsNoCrash.symbols.diff | 13 + ...ngCommaInHeterogenousArrayLiteral1.js.diff | 22 + .../compiler/trailingCommasES5.types.diff | 13 + ...rowInBlockScopedLoopVarInitializer.js.diff | 17 + .../transformNestedGeneratorsWithTry.js.diff | 78 +- ...enthesizesConditionalSubexpression.js.diff | 12 + .../transitiveTypeArgumentInference1.js.diff | 15 + ...eSlashReferenceAbsoluteWindowsPath.js.diff | 12 + ...ngExports(module=commonjs).errors.txt.diff | 21 - ...ithMissingExports(module=commonjs).js.diff | 8 + ...lSubtypeReductionNoStructuralCheck.js.diff | 23 + ...SubtypeReductionNoStructuralCheck2.js.diff | 23 + .../truthinessCallExpressionCoercion.js.diff | 58 +- ...thinessCallExpressionCoercion.symbols.diff | 11 + .../truthinessCallExpressionCoercion1.js.diff | 64 +- ...hinessCallExpressionCoercion1.symbols.diff | 11 + .../truthinessCallExpressionCoercion2.js.diff | 68 +- ...uthinessCallExpressionCoercion2.types.diff | 29 +- .../tryCatchFinallyControlFlow.js.diff | 162 +- .../tryCatchFinallyControlFlow.types.diff | 30 +- ...eQuickinfoTypesSameAsObjectLiteral.js.diff | 11 + .../tsxAttributesHasInferrableIndex.js.diff | 14 +- ...xAttributesHasInferrableIndex.symbols.diff | 11 + .../compiler/tsxDefaultImports.js.diff | 9 +- .../tsxDiscriminantPropertyInference.js.diff | 17 + ...sxDiscriminantPropertyInference.types.diff | 4 +- .../compiler/tsxFragmentChildrenCheck.js.diff | 42 +- ...InferenceShouldNotYieldAnyOnUnions.js.diff | 16 + .../compiler/tsxInvokeComponentType.js.diff | 9 +- .../compiler/tsxNoTypeAnnotatedSFC.js.diff | 6 +- .../tsxNotUsingApparentTypeOfSFC.js.diff | 46 +- ...psInferenceSucceedsOnIntersections.js.diff | 3 +- ...xResolveExternalModuleExportsTypes.js.diff | 9 + .../tsxSpreadDoesNotReportExcessProps.js.diff | 34 +- .../tsxStatelessComponentDefaultProps.js.diff | 7 +- ...sxUnionMemberChecksFilterDataProps.js.diff | 6 +- .../submodule/compiler/tupleTypes.js.diff | 13 + .../twiceNestedKeyofIndexInference.js.diff | 16 + .../typeAliasDeclarationEmit3.js.diff | 11 + .../typeAliasDeclareKeywordNewlines.js.diff | 19 + .../typeAliasDoesntMakeModuleInstantiated.js | 2 +- ...eAliasDoesntMakeModuleInstantiated.symbols | 4 +- ...sDoesntMakeModuleInstantiated.symbols.diff | 11 + ...ypeAliasDoesntMakeModuleInstantiated.types | 2 +- .../typeAliasFunctionTypeSharedSymbol.js.diff | 32 + .../compiler/typeArgInference2.types.diff | 13 + .../compiler/typeArgInferenceWithNull.js.diff | 8 + ...ArgumentConstraintResolution1.symbols.diff | 46 + ...ultUsesConstraintOnCircularDefault.js.diff | 25 + .../typeArgumentInferenceOrdering.js.diff | 12 +- ...ReferencedTypeAliasToTypeLiteral01.js.diff | 8 + ...ReferencedTypeAliasToTypeLiteral02.js.diff | 8 + ...typeAssertionToGenericFunctionType.js.diff | 13 + .../compiler/typeCheckExportsVariable.js.diff | 9 + .../typeCheckObjectLiteralMethodBody.js.diff | 8 + .../typeCheckReturnExpression.js.diff | 8 + .../compiler/typeCheckTypeArgument.js.diff | 25 + ...ConstraintsWithConstructSignatures.js.diff | 21 +- ...typeGuardConstructorClassAndNumber.js.diff | 19 +- ...uardConstructorClassAndNumber.symbols.diff | 11 + ...eGuardConstructorClassAndNumber.types.diff | 7 +- .../typeGuardConstructorDerivedClass.js.diff | 123 +- ...ConstructorNarrowPrimitivesInUnion.js.diff | 11 + ...ructorNarrowPrimitivesInUnion.symbols.diff | 20 + ...structorNarrowPrimitivesInUnion.types.diff | 50 + ...eGuardConstructorPrimitiveTypes.types.diff | 112 + ...peGuardNarrowByMutableUntypedField.js.diff | 9 + .../typeGuardNarrowByUntypedField.js.diff | 9 + ...IndexedAccessOfKnownProperty1.symbols.diff | 38 + ...wsIndexedAccessOfKnownProperty1.types.diff | 20 +- ...rowsIndexedAccessOfKnownProperty10.js.diff | 12 +- ...rrowsIndexedAccessOfKnownProperty2.js.diff | 10 +- ...rrowsIndexedAccessOfKnownProperty3.js.diff | 10 +- ...rrowsIndexedAccessOfKnownProperty4.js.diff | 16 +- ...rrowsIndexedAccessOfKnownProperty5.js.diff | 24 +- ...rrowsIndexedAccessOfKnownProperty6.js.diff | 16 +- .../typeGuardOnContainerTypeNoHang.types.diff | 11 + .../typeIdentityConsidersBrands.js.diff | 42 +- .../typeInferenceCacheInvalidation.js.diff | 23 +- ...typeInferenceConflictingCandidates.js.diff | 8 + .../typeInferenceFBoundedTypeParams.js.diff | 18 + .../compiler/typeInferenceFixEarly.js.diff | 8 + .../typeInferenceLiteralUnion.js.diff | 28 +- .../typeInferenceLiteralUnion.symbols.diff | 20 + .../typeInferenceLiteralUnion.types.diff | 22 +- .../typeInferenceReturnTypeCallback.js.diff | 37 + .../typeInferenceTypePredicate.js.diff | 8 + .../typeInferenceTypePredicate2.js.diff | 10 + .../typeInferenceWithExcessProperties.js.diff | 10 +- .../typeInferenceWithTypeAnnotation.js.diff | 8 + .../compiler/typeLiteralCallback.js.diff | 10 + .../submodule/compiler/typeMatch1.js.diff | 24 +- .../submodule/compiler/typeMatch2.js.diff | 48 +- .../submodule/compiler/typeName1.js.diff | 15 +- .../compiler/typeOfOperator1.types.diff | 15 + .../compiler/typeOfPrototype.js.diff | 10 +- .../compiler/typeOfSuperCall.js.diff | 42 + .../compiler/typeOfThisInStatics.js.diff | 31 + .../typeParamExtendsOtherTypeParam.js.diff | 26 +- .../compiler/typeParameterAsBaseClass.js.diff | 37 + .../typeParameterAssignmentCompat1.js.diff | 21 + ...peParameterConstraintInstantiation.js.diff | 3 +- .../typeParameterConstraints1.symbols.diff | 18 + .../typeParameterDiamond3.errors.txt.diff | 20 + .../typeParameterDiamond4.errors.txt.diff | 21 + .../compiler/typeParameterDiamond4.types.diff | 24 +- .../typeParameterExplicitlyExtendsAny.js.diff | 19 + .../typeParameterExtendingUnion1.js.diff | 54 +- .../typeParameterExtendingUnion2.js.diff | 54 +- .../typeParameterExtendsPrimitive.js.diff | 31 + ...typeParameterFixingWithConstraints.js.diff | 8 + ...ixingWithContextSensitiveArguments.js.diff | 12 + ...xingWithContextSensitiveArguments2.js.diff | 8 + ...xingWithContextSensitiveArguments3.js.diff | 8 + ...xingWithContextSensitiveArguments4.js.diff | 8 + ...xingWithContextSensitiveArguments5.js.diff | 8 + .../typeParameterInConstraint1.js.diff | 13 + .../compiler/typeParameterLeak.js.diff | 8 +- .../compiler/typeParameterLeak.types.diff | 20 + ...ypeParameterListWithTrailingComma1.js.diff | 13 + ...ParameterWithInvalidConstraintType.js.diff | 22 + ...metersAndParametersInComputedNames.js.diff | 16 + .../typeParametersInStaticAccessors.js.diff | 25 + .../typeParametersInStaticMethods.js.diff | 16 + .../typeParametersInStaticProperties.js.diff | 12 +- ...peParametersShouldNotBeEqual2.symbols.diff | 14 + ...atedWithDefaultWhenCheckingDefault.js.diff | 27 +- .../typePredicateFreshLiteralWidening.js.diff | 29 + ...PredicateFreshLiteralWidening.symbols.diff | 11 + .../compiler/typePredicateInLoop.js.diff | 13 +- .../compiler/typePredicateInherit.js.diff | 88 + ...typePredicateTopLevelTypeParameter.js.diff | 12 +- .../typePredicateWithThisParameter.types.diff | 26 + ...ePredicatesCanNarrowByDiscriminant.js.diff | 8 +- .../typePredicatesInUnion3.types.diff | 31 +- .../typePredicatesOptionalChaining1.js.diff | 7 +- .../typePredicatesOptionalChaining2.js.diff | 11 +- ...typePredicatesOptionalChaining2.types.diff | 17 +- .../compiler/typeReferenceDirectives4.js.diff | 13 + .../compiler/typeReferenceDirectives6.js.diff | 13 + .../compiler/typeReferenceDirectives7.js.diff | 6 +- .../compiler/typeReferenceDirectives9.js.diff | 12 +- .../compiler/typeUsedAsValueError.js.diff | 29 + .../compiler/typeValueConflict1.errors.txt | 4 +- .../submodule/compiler/typeValueConflict1.js | 4 +- .../compiler/typeValueConflict1.js.diff | 46 + .../compiler/typeValueConflict1.symbols | 10 +- .../compiler/typeValueConflict1.types | 4 +- .../compiler/typeValueConflict2.errors.txt | 6 +- .../submodule/compiler/typeValueConflict2.js | 6 +- .../compiler/typeValueConflict2.js.diff | 60 + .../compiler/typeValueConflict2.symbols | 18 +- .../compiler/typeValueConflict2.types | 6 +- .../compiler/typeVariableTypeGuards.js.diff | 75 +- .../typeVariableTypeGuards.types.diff | 10 + .../compiler/typedArrays-es5.js.diff | 55 + .../compiler/typedArrays-es5.symbols.diff | 83 + .../compiler/typedArrays-es6.symbols.diff | 11 + .../compiler/typedArraysSubarray.symbols.diff | 83 + .../typedGenericPrototypeMember.js.diff | 16 + .../typeofAmbientExternalModules.js.diff | 23 +- .../submodule/compiler/typeofClass.js.diff | 15 +- .../compiler/typeofExternalModules.js.diff | 23 +- .../compiler/typeofInternalModules.errors.txt | 8 +- .../compiler/typeofInternalModules.js | 6 +- .../compiler/typeofInternalModules.js.diff | 15 +- .../compiler/typeofInternalModules.symbols | 28 +- .../compiler/typeofInternalModules.types | 6 +- .../compiler/typeofObjectInference.js.diff | 41 + .../submodule/compiler/typeofProperty.js.diff | 42 +- .../compiler/typeofStrictNull.js.diff | 10 + .../compiler/typeofStripsFreshness.js.diff | 14 + .../compiler/typeofUnknownSymbol.types.diff | 11 + .../typeofUsedBeforeBlockScoped.js.diff | 12 +- .../compiler/umdGlobalConflict.js.diff | 8 + ...calledFunctionChecksInConditional2.js.diff | 56 + ...ledFunctionChecksInConditional2.types.diff | 10 +- .../compiler/undeclaredBase.errors.txt | 6 +- .../submodule/compiler/undeclaredBase.js | 2 +- .../submodule/compiler/undeclaredBase.js.diff | 34 + .../submodule/compiler/undeclaredBase.symbols | 4 +- .../submodule/compiler/undeclaredBase.types | 2 +- .../compiler/undeclaredMethod.errors.txt | 2 +- .../submodule/compiler/undeclaredMethod.js | 2 +- .../compiler/undeclaredMethod.js.diff | 18 + .../compiler/undeclaredMethod.symbols | 10 +- .../submodule/compiler/undeclaredMethod.types | 2 +- ...ignableToGenericMappedIntersection.js.diff | 8 +- .../undefinedTypeArgument1.symbols.diff | 9 + .../compiler/undefinedTypeAssignment1.js.diff | 11 + .../compiler/undefinedTypeAssignment4.js.diff | 15 +- .../submodule/compiler/underscoreMapFirst.js | 2 +- .../compiler/underscoreMapFirst.js.diff | 37 + .../compiler/underscoreMapFirst.symbols | 10 +- .../compiler/underscoreMapFirst.types | 2 +- .../compiler/underscoreTest1.errors.txt | 2 +- .../submodule/compiler/underscoreTest1.js | 2 +- .../compiler/underscoreTest1.js.diff | 88 + .../compiler/underscoreTest1.symbols | 12 +- .../compiler/underscoreTest1.symbols.diff | 277 + .../submodule/compiler/underscoreTest1.types | 2 +- .../underscoreThisInDerivedClass01.js.diff | 53 + .../underscoreThisInDerivedClass02.js.diff | 46 + ...unexpectedStatementBlockTerminator.js.diff | 21 + .../unexportedInstanceClassVariables.js.diff | 25 + ...nicodeEscapesInNames01(target=es5).js.diff | 188 +- ...deEscapesInNames01(target=es5).js.map.diff | 40 +- ...esInNames01(target=es5).sourcemap.txt.diff | 1274 +-- ...capesInNames02(target=es5).errors.txt.diff | 166 +- ...nicodeEscapesInNames02(target=es5).js.diff | 79 +- ...deEscapesInNames02(target=es5).js.map.diff | 4 +- ...esInNames02(target=es5).sourcemap.txt.diff | 928 +- ...eEscapesInNames02(target=es5).symbols.diff | 83 +- ...odeEscapesInNames02(target=es5).types.diff | 120 + ...ErrorMessageOnMatchingDiscriminant.js.diff | 7 +- ...ckNoApparentPropTypeMismatchErrors.js.diff | 10 + ...oApparentPropTypeMismatchErrors.types.diff | 4 +- ...ionExcessPropsWithPartialMember.types.diff | 4 +- .../unionOfArraysFilterCall.symbols.diff | 47 + .../unionOfArraysFilterCall.types.diff | 163 + .../compiler/unionOfClassCalls.js.diff | 60 +- .../compiler/unionOfClassCalls.symbols.diff | 20 + .../compiler/unionOfClassCalls.types.diff | 62 +- .../compiler/unionOfEnumInference.types.diff | 13 +- ...onOfFunctionAndSignatureIsCallable.js.diff | 19 + ...unctionAndSignatureIsCallable.symbols.diff | 11 + ...fFunctionAndSignatureIsCallable.types.diff | 3 +- .../unionPropertyExistence.errors.txt.diff | 36 + .../unionPropertyExistence.types.diff | 39 + ...tedAndIntersectionProperty.errors.txt.diff | 17 + ...OfProtectedAndIntersectionProperty.js.diff | 26 +- ...tectedAndIntersectionProperty.symbols.diff | 10 + .../unionReductionMutualSubtypes.js.diff | 9 +- .../unionRelationshipCheckPasses.js.diff | 3 +- .../unionSubtypeReductionErrors.js.diff | 15 +- ...ionTypeWithIndexAndMethodSignature.js.diff | 3 +- .../unionTypeWithIndexedLiteralType.js.diff | 8 + ...TypeWithRecursiveSubtypeReduction1.js.diff | 39 +- ...eWithRecursiveSubtypeReduction1.types.diff | 19 + ...RecursiveSubtypeReduction2.errors.txt.diff | 48 + ...TypeWithRecursiveSubtypeReduction2.js.diff | 42 +- ...eWithRecursiveSubtypeReduction2.types.diff | 11 + .../compiler/unionWithIndexSignature.js.diff | 11 + .../unionWithIndexSignature.symbols.diff | 30 + .../unionWithIndexSignature.types.diff | 8 +- ...owsIndexInObjectWithIndexSignature.js.diff | 15 + .../compiler/uniqueSymbolJs2.js.diff | 16 +- ...niqueSymbolPropertyDeclarationEmit.js.diff | 13 +- ...opertiesAreAssignableToObjectUnion.js.diff | 10 + .../unknownSymbolInGenericReturnType.js.diff | 22 + ...nownSymbolInGenericReturnType.symbols.diff | 11 + .../compiler/unknownSymbols1.js.diff | 73 +- .../compiler/unknownSymbols2.errors.txt | 4 +- .../submodule/compiler/unknownSymbols2.js | 4 +- .../compiler/unknownSymbols2.js.diff | 11 +- .../compiler/unknownSymbols2.symbols | 4 +- .../submodule/compiler/unknownSymbols2.types | 4 +- .../compiler/unknownTypeArgOnCall.js.diff | 20 + .../unmatchedParameterPositions.js.diff | 6 +- .../unqualifiedCallToClassStatic1.js.diff | 8 +- ...arations(preserveconstenums=false).js.diff | 52 +- ...larations(preserveconstenums=true).js.diff | 66 +- .../unreachableFlowAfterFinally.js.diff | 11 + .../unreachableSwitchTypeofAny.js.diff | 11 + .../unreachableSwitchTypeofAny.types.diff | 11 + .../unreachableSwitchTypeofUnknown.js.diff | 11 + .../unreachableSwitchTypeofUnknown.types.diff | 11 + .../unspecializedConstraints.errors.txt | 2 +- .../compiler/unspecializedConstraints.js | 2 +- .../compiler/unspecializedConstraints.js.diff | 222 +- .../compiler/unspecializedConstraints.symbols | 8 +- .../compiler/unspecializedConstraints.types | 2 +- .../untypedArgumentInLambdaExpression.js.diff | 10 + ...onCallsWithTypeParameters1.errors.txt.diff | 20 + ...edFunctionCallsWithTypeParameters1.js.diff | 50 +- ...ctionCallsWithTypeParameters1.symbols.diff | 29 + .../unusedClassesinModule1.errors.txt | 2 +- .../compiler/unusedClassesinModule1.js | 2 +- .../compiler/unusedClassesinModule1.js.diff | 17 + .../compiler/unusedClassesinModule1.symbols | 4 +- .../compiler/unusedClassesinModule1.types | 2 +- .../unusedClassesinNamespace1.js.diff | 14 + .../unusedClassesinNamespace2.js.diff | 22 + .../unusedClassesinNamespace3.js.diff | 23 + .../unusedClassesinNamespace4.js.diff | 48 + .../unusedClassesinNamespace5.js.diff | 29 +- .../compiler/unusedDestructuring.js.diff | 24 + .../unusedDestructuringParameters.js.diff | 21 + .../compiler/unusedGetterInClass.js.diff | 27 +- .../unusedIdentifiersConsolidated1.js.diff | 128 +- .../compiler/unusedImportDeclaration.js.diff | 15 +- .../submodule/compiler/unusedImports1.js.diff | 16 + .../compiler/unusedImports10.errors.txt | 4 +- .../submodule/compiler/unusedImports10.js | 4 +- .../compiler/unusedImports10.js.diff | 18 + .../compiler/unusedImports10.symbols | 8 +- .../submodule/compiler/unusedImports10.types | 4 +- .../compiler/unusedImports11.js.diff | 14 +- .../compiler/unusedImports12.js.diff | 16 + .../submodule/compiler/unusedImports2.js.diff | 17 +- .../submodule/compiler/unusedImports3.js.diff | 18 +- .../submodule/compiler/unusedImports4.js.diff | 18 +- .../submodule/compiler/unusedImports5.js.diff | 18 +- .../submodule/compiler/unusedImports6.js.diff | 18 + .../submodule/compiler/unusedImports7.js.diff | 18 + .../submodule/compiler/unusedImports8.js.diff | 18 +- .../submodule/compiler/unusedImports9.js.diff | 18 + .../unusedInterfaceinNamespace4.js.diff | 15 + .../unusedInterfaceinNamespace5.js.diff | 15 + .../unusedInvalidTypeArguments.js.diff | 81 +- .../compiler/unusedLocalProperty.js.diff | 21 +- .../unusedLocalsAndObjectSpread.js.diff | 37 + .../unusedLocalsAndObjectSpread2.js.diff | 16 + .../unusedLocalsAndParameters.js.diff | 107 + .../unusedLocalsAndParametersDeferred.js.diff | 224 +- ...alsAndParametersOverloadSignatures.js.diff | 23 + ...ocalsAndParametersTypeAliases.symbols.diff | 11 + ...dLocalsAndParametersTypeAliases.types.diff | 11 + .../compiler/unusedLocalsInMethod1.js.diff | 18 + .../compiler/unusedLocalsInMethod2.js.diff | 18 + .../compiler/unusedLocalsInMethod3.js.diff | 19 + .../compiler/unusedLocalsInMethod4.js.diff | 134 + ...unusedLocalsStartingWithUnderscore.js.diff | 23 + .../unusedLocalsinConstructor1.js.diff | 15 + .../unusedLocalsinConstructor2.js.diff | 17 + .../compiler/unusedModuleInModule.errors.txt | 8 +- .../compiler/unusedModuleInModule.js | 4 +- .../compiler/unusedModuleInModule.symbols | 6 +- .../compiler/unusedModuleInModule.types | 4 +- ...usedMultipleParameter1InContructor.js.diff | 16 + ...usedMultipleParameter2InContructor.js.diff | 16 + ...ipleParameters1InMethodDeclaration.js.diff | 19 + ...ipleParameters2InMethodDeclaration.js.diff | 19 + .../unusedNamespaceInModule.errors.txt | 2 +- .../compiler/unusedNamespaceInModule.js | 2 +- .../compiler/unusedNamespaceInModule.symbols | 4 +- .../compiler/unusedNamespaceInModule.types | 2 +- .../compiler/unusedParameterProperty1.js.diff | 16 +- .../compiler/unusedParameterProperty2.js.diff | 16 +- .../unusedParametersInLambda1.js.diff | 20 + .../unusedParametersInLambda2.js.diff | 21 + .../compiler/unusedParametersThis.js.diff | 53 +- .../unusedParametersWithUnderscore.js.diff | 36 + .../unusedParametersWithUnderscore.types.diff | 18 + .../unusedParametersinConstructor1.js.diff | 14 + .../unusedParametersinConstructor2.js.diff | 15 + .../unusedParametersinConstructor3.js.diff | 15 + .../compiler/unusedPrivateMembers.js.diff | 133 +- .../unusedPrivateMethodInClass1.js.diff | 18 + .../unusedPrivateMethodInClass2.js.diff | 25 + .../unusedPrivateMethodInClass3.js.diff | 31 + .../unusedPrivateMethodInClass4.js.diff | 31 + .../unusedPrivateVariableInClass1.js.diff | 12 +- .../unusedPrivateVariableInClass2.js.diff | 12 +- .../unusedPrivateVariableInClass3.js.diff | 12 +- .../unusedPrivateVariableInClass4.js.diff | 17 +- .../unusedPrivateVariableInClass5.js.diff | 14 +- .../compiler/unusedSemicolonInClass.js.diff | 14 + .../compiler/unusedSetterInClass.js.diff | 23 +- .../compiler/unusedSetterInClass2.js.diff | 24 + .../unusedSingleParameterInContructor.js.diff | 15 + ...SingleParameterInMethodDeclaration.js.diff | 18 + .../compiler/unusedSwitchStatement.js.diff | 24 + .../unusedTypeParameterInLambda1.js.diff | 20 + .../unusedTypeParameterInLambda2.js.diff | 22 + .../unusedTypeParameterInLambda3.js.diff | 12 +- .../unusedTypeParameterInMethod1.js.diff | 21 + .../unusedTypeParameterInMethod2.js.diff | 21 + .../unusedTypeParameterInMethod3.js.diff | 21 + .../unusedTypeParameterInMethod4.js.diff | 16 + .../unusedTypeParameterInMethod5.js.diff | 12 +- .../compiler/unusedTypeParameters1.js.diff | 13 + .../compiler/unusedTypeParameters2.js.diff | 17 +- .../compiler/unusedTypeParameters3.js.diff | 17 +- .../compiler/unusedTypeParameters5.js.diff | 12 +- .../compiler/unusedTypeParameters6.js.diff | 14 + .../compiler/unusedTypeParameters7.js.diff | 12 +- .../compiler/unusedTypeParameters8.js.diff | 14 + .../compiler/unusedTypeParameters9.js.diff | 22 +- ...ametersCheckedByNoUnusedParameters.js.diff | 18 + ...rametersNotCheckedByNoUnusedLocals.js.diff | 18 + ...unusedTypeParametersWithUnderscore.js.diff | 18 + ...blesWithUnderscoreInBindingElement.js.diff | 72 + ...VariablesWithUnderscoreInForOfLoop.js.diff | 49 + .../compiler/unusedVariablesinBlocks1.js.diff | 13 + .../compiler/unusedVariablesinBlocks2.js.diff | 13 + .../unusedVariablesinForLoop2.js.diff | 10 + .../unusedVariablesinForLoop3.js.diff | 11 + .../unusedVariablesinForLoop4.js.diff | 12 + .../unusedVariablesinNamespaces1.js.diff | 9 + .../unusedVariablesinNamespaces2.js.diff | 24 + .../unusedVariablesinNamespaces3.js.diff | 25 + .../unwitnessedTypeParameterVariance.js.diff | 7 +- ...useBeforeDeclaration_destructuring.js.diff | 13 + ...eDeclaration_propertyAssignment.types.diff | 13 +- .../useBeforeDeclaration_superClass.js.diff | 96 +- .../useUnknownInCatchVariables01.types.diff | 19 + ...ngModuleWithExportImportInValuePosition.js | 6 +- ...uleWithExportImportInValuePosition.js.diff | 18 +- ...uleWithExportImportInValuePosition.symbols | 22 +- ...oduleWithExportImportInValuePosition.types | 6 +- .../compiler/validUseOfThisInSuper.js.diff | 41 +- .../varArgConstructorMemberParameter.js.diff | 54 +- .../compiler/varArgParamTypeCheck.js.diff | 31 + .../compiler/varArgWithNoParamName.js.diff | 13 + .../submodule/compiler/varAsID.js.diff | 21 +- .../submodule/compiler/varBlock.errors.txt | 8 +- .../reference/submodule/compiler/varBlock.js | 8 +- .../submodule/compiler/varBlock.symbols | 8 +- .../submodule/compiler/varBlock.types | 8 +- ...thImportInDifferentPartOfModule.errors.txt | 4 +- ...flictsWithImportInDifferentPartOfModule.js | 4 +- ...sWithImportInDifferentPartOfModule.symbols | 8 +- ...ctsWithImportInDifferentPartOfModule.types | 4 +- .../submodule/compiler/vararg.errors.txt | 2 +- .../reference/submodule/compiler/vararg.js | 2 +- .../submodule/compiler/vararg.js.diff | 51 + .../submodule/compiler/vararg.symbols | 8 +- .../reference/submodule/compiler/vararg.types | 2 +- .../reference/submodule/compiler/vardecl.js | 2 +- .../submodule/compiler/vardecl.js.diff | 37 +- .../submodule/compiler/vardecl.symbols | 2 +- .../submodule/compiler/vardecl.types | 2 +- ...onEmitUniqueSymbolPartialStatement.js.diff | 12 +- ...rResolvedDuringContextualTyping.errors.txt | 8 +- ...eclaratorResolvedDuringContextualTyping.js | 8 +- ...atorResolvedDuringContextualTyping.js.diff | 45 +- ...atorResolvedDuringContextualTyping.symbols | 32 +- ...aratorResolvedDuringContextualTyping.types | 8 +- .../varianceAnnotationValidation.js.diff | 19 +- .../compiler/varianceMeasurement.js.diff | 38 +- ...oOrderIndexSignatureRelationsAlign.js.diff | 104 +- ...OrderIndexSignatureRelationsAlign2.js.diff | 104 +- ...atedlyPropegatesWithUnreliableFlag.js.diff | 14 + .../verbatim-declarations-parameters.js.diff | 33 +- .../reference/submodule/compiler/visSyntax.js | 2 +- .../submodule/compiler/visSyntax.js.diff | 16 + .../submodule/compiler/visSyntax.symbols | 4 +- .../submodule/compiler/visSyntax.types | 2 +- .../visibilityOfTypeParameters.js.diff | 20 + .../submodule/compiler/voidArrayLit.js.diff | 13 + .../compiler/voidIsInitialized.js.diff | 10 +- .../compiler/voidIsInitialized.types.diff | 19 + .../vueLikeDataAndPropsInference.js.diff | 18 + .../vueLikeDataAndPropsInference2.js.diff | 18 + .../submodule/compiler/weakType.js.diff | 33 + .../weakTypeAndPrimitiveNarrowing.js.diff | 15 +- .../weakTypeAndPrimitiveNarrowing.types.diff | 4 +- .../compiler/webworkerIterable.symbols.diff | 11 + .../submodule/compiler/widenedTypes.js.diff | 11 + .../compiler/withStatementErrors.errors.txt | 2 +- .../submodule/compiler/withStatementErrors.js | 2 +- .../compiler/withStatementErrors.js.diff | 14 + .../compiler/withStatementErrors.symbols | 2 +- .../compiler/withStatementErrors.types | 2 +- .../yieldInForInInDownlevelGenerator.js.diff | 69 + ...entFunctionWithTheSameNameAndCommonRoot.js | 2 +- ...nctionWithTheSameNameAndCommonRoot.symbols | 2 +- ...FunctionWithTheSameNameAndCommonRoot.types | 2 +- ...duleAndAmbientWithSameNameAndCommonRoot.js | 6 +- ...ndAmbientWithSameNameAndCommonRoot.symbols | 18 +- ...eAndAmbientWithSameNameAndCommonRoot.types | 6 +- ...onAmbientClassWithSameNameAndCommonRoot.js | 6 +- ...ientClassWithSameNameAndCommonRoot.js.diff | 18 +- ...ientClassWithSameNameAndCommonRoot.symbols | 18 +- ...mbientClassWithSameNameAndCommonRoot.types | 6 +- ...entFunctionWithTheSameNameAndCommonRoot.js | 2 +- ...nctionWithTheSameNameAndCommonRoot.symbols | 2 +- ...FunctionWithTheSameNameAndCommonRoot.types | 2 +- .../conformance/ArrowFunction1.js.diff | 9 + .../conformance/ArrowFunction4.js.diff | 9 + ...emberThatUsesClassTypeParameter.errors.txt | 8 +- ...hModuleMemberThatUsesClassTypeParameter.js | 8 +- ...leMemberThatUsesClassTypeParameter.js.diff | 57 +- ...leMemberThatUsesClassTypeParameter.symbols | 12 +- ...duleMemberThatUsesClassTypeParameter.types | 8 +- ...lassStaticFunctionOfTheSameName.errors.txt | 2 +- ...GenericClassStaticFunctionOfTheSameName.js | 2 +- ...icClassStaticFunctionOfTheSameName.js.diff | 19 +- ...icClassStaticFunctionOfTheSameName.symbols | 4 +- ...ericClassStaticFunctionOfTheSameName.types | 2 +- ...lassStaticFunctionOfTheSameName.errors.txt | 2 +- ...GenericClassStaticFunctionOfTheSameName.js | 2 +- ...icClassStaticFunctionOfTheSameName.js.diff | 19 +- ...icClassStaticFunctionOfTheSameName.symbols | 4 +- ...ericClassStaticFunctionOfTheSameName.types | 2 +- ...unctionUsingClassPrivateStatics.errors.txt | 2 +- ...dStaticFunctionUsingClassPrivateStatics.js | 2 +- ...icFunctionUsingClassPrivateStatics.js.diff | 19 +- ...icFunctionUsingClassPrivateStatics.symbols | 4 +- ...aticFunctionUsingClassPrivateStatics.types | 2 +- ...dExportedFunctionThatShareAName.errors.txt | 6 +- ...nctionAndExportedFunctionThatShareAName.js | 6 +- ...nAndExportedFunctionThatShareAName.js.diff | 37 +- ...nAndExportedFunctionThatShareAName.symbols | 16 +- ...ionAndExportedFunctionThatShareAName.types | 6 +- ...ionAndNonExportedFunctionThatShareAName.js | 6 +- ...dNonExportedFunctionThatShareAName.js.diff | 36 +- ...dNonExportedFunctionThatShareAName.symbols | 16 +- ...AndNonExportedFunctionThatShareAName.types | 6 +- ...bleAndExportedVarThatShareAName.errors.txt | 6 +- ...ticVariableAndExportedVarThatShareAName.js | 6 +- ...riableAndExportedVarThatShareAName.js.diff | 28 +- ...riableAndExportedVarThatShareAName.symbols | 12 +- ...VariableAndExportedVarThatShareAName.types | 6 +- ...VariableAndNonExportedVarThatShareAName.js | 6 +- ...bleAndNonExportedVarThatShareAName.js.diff | 28 +- ...bleAndNonExportedVarThatShareAName.symbols | 12 +- ...iableAndNonExportedVarThatShareAName.types | 6 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 12 +- ...ClassAndModuleWithSameNameAndCommonRoot.js | 8 +- ...AndModuleWithSameNameAndCommonRoot.js.diff | 32 +- ...AndModuleWithSameNameAndCommonRoot.symbols | 38 +- ...ssAndModuleWithSameNameAndCommonRoot.types | 8 +- ...uleWithSameNameAndCommonRootES6.errors.txt | 12 +- ...ssAndModuleWithSameNameAndCommonRootES6.js | 8 +- ...ModuleWithSameNameAndCommonRootES6.symbols | 38 +- ...ndModuleWithSameNameAndCommonRootES6.types | 8 +- .../conformance/ES3For-ofTypeCheck1.js.diff | 10 + .../conformance/ES3For-ofTypeCheck2.js.diff | 10 + .../conformance/ES3For-ofTypeCheck4.js.diff | 10 + .../conformance/ES3For-ofTypeCheck6.js.diff | 10 + .../submodule/conformance/ES5For-of1.js.diff | 12 + .../conformance/ES5For-of1.js.map.diff | 8 + .../conformance/ES5For-of1.sourcemap.txt.diff | 161 + .../submodule/conformance/ES5For-of10.js.diff | 15 + .../submodule/conformance/ES5For-of11.js.diff | 10 + .../submodule/conformance/ES5For-of12.js.diff | 10 + .../submodule/conformance/ES5For-of13.js.diff | 12 + .../conformance/ES5For-of13.js.map.diff | 8 + .../ES5For-of13.sourcemap.txt.diff | 151 + .../submodule/conformance/ES5For-of14.js.diff | 11 + .../submodule/conformance/ES5For-of15.js.diff | 17 + .../submodule/conformance/ES5For-of16.js.diff | 19 + .../submodule/conformance/ES5For-of17.js.diff | 19 + .../submodule/conformance/ES5For-of18.js.diff | 16 + .../submodule/conformance/ES5For-of19.js.diff | 19 + .../submodule/conformance/ES5For-of2.js.diff | 11 + .../submodule/conformance/ES5For-of20.js.diff | 18 + .../submodule/conformance/ES5For-of21.js.diff | 14 + .../submodule/conformance/ES5For-of22.js.diff | 13 + .../submodule/conformance/ES5For-of23.js.diff | 12 + .../submodule/conformance/ES5For-of24.js.diff | 12 + .../submodule/conformance/ES5For-of25.js.diff | 12 + .../conformance/ES5For-of25.js.map.diff | 8 + .../ES5For-of25.sourcemap.txt.diff | 128 + .../submodule/conformance/ES5For-of26.js.diff | 12 + .../conformance/ES5For-of26.js.map.diff | 8 + .../ES5For-of26.sourcemap.txt.diff | 206 + .../submodule/conformance/ES5For-of27.js.diff | 12 + .../submodule/conformance/ES5For-of28.js.diff | 12 + .../submodule/conformance/ES5For-of29.js.diff | 12 + .../submodule/conformance/ES5For-of3.js.diff | 12 + .../conformance/ES5For-of3.js.map.diff | 8 + .../conformance/ES5For-of3.sourcemap.txt.diff | 135 + .../submodule/conformance/ES5For-of30.js.diff | 15 + .../submodule/conformance/ES5For-of31.js.diff | 14 + .../submodule/conformance/ES5For-of33.js.diff | 34 + .../conformance/ES5For-of33.js.map.diff | 8 + .../ES5For-of33.sourcemap.txt.diff | 203 + .../submodule/conformance/ES5For-of34.js.diff | 37 + .../conformance/ES5For-of34.js.map.diff | 4 +- .../ES5For-of34.sourcemap.txt.diff | 273 +- .../submodule/conformance/ES5For-of35.js.diff | 36 + .../conformance/ES5For-of35.js.map.diff | 8 + .../ES5For-of35.sourcemap.txt.diff | 266 + .../submodule/conformance/ES5For-of36.js.diff | 52 + .../conformance/ES5For-of36.js.map.diff | 8 + .../ES5For-of36.sourcemap.txt.diff | 273 + .../submodule/conformance/ES5For-of37.js.diff | 64 + .../submodule/conformance/ES5For-of4.js.diff | 12 + .../submodule/conformance/ES5For-of5.js.diff | 11 + .../submodule/conformance/ES5For-of6.js.diff | 15 + .../submodule/conformance/ES5For-of7.js.diff | 16 + .../submodule/conformance/ES5For-of8.js.diff | 12 + .../conformance/ES5For-of8.js.map.diff | 4 +- .../conformance/ES5For-of8.sourcemap.txt.diff | 180 +- .../submodule/conformance/ES5For-of9.js.diff | 15 + .../conformance/ES5For-ofTypeCheck1.js.diff | 10 + .../ES5For-ofTypeCheck10.errors.txt.diff | 29 + .../conformance/ES5For-ofTypeCheck10.js.diff | 29 + .../ES5For-ofTypeCheck10.symbols.diff | 12 + .../ES5For-ofTypeCheck10.types.diff | 15 + .../conformance/ES5For-ofTypeCheck11.js.diff | 10 + .../conformance/ES5For-ofTypeCheck12.js.diff | 10 + .../conformance/ES5For-ofTypeCheck13.js.diff | 14 + .../conformance/ES5For-ofTypeCheck14.js.diff | 10 + .../conformance/ES5For-ofTypeCheck2.js.diff | 10 + .../conformance/ES5For-ofTypeCheck3.js.diff | 10 + .../conformance/ES5For-ofTypeCheck4.js.diff | 10 + .../conformance/ES5For-ofTypeCheck5.js.diff | 10 + .../conformance/ES5For-ofTypeCheck6.js.diff | 10 + .../conformance/ES5For-ofTypeCheck7.js.diff | 10 + .../conformance/ES5For-ofTypeCheck8.js.diff | 10 + .../conformance/ES5For-ofTypeCheck9.js.diff | 10 + .../conformance/ES5SymbolProperty1.js.diff | 15 + .../ES5SymbolProperty1.symbols.diff | 35 + .../conformance/ES5SymbolProperty2.errors.txt | 2 +- .../ES5SymbolProperty2.errors.txt.diff | 20 + .../conformance/ES5SymbolProperty2.js | 2 +- .../conformance/ES5SymbolProperty2.js.diff | 18 + .../conformance/ES5SymbolProperty2.symbols | 2 +- .../ES5SymbolProperty2.symbols.diff | 9 + .../conformance/ES5SymbolProperty2.types | 2 +- .../conformance/ES5SymbolProperty2.types.diff | 19 + .../ES5SymbolProperty3.errors.txt.diff | 18 + .../conformance/ES5SymbolProperty3.js.diff | 16 + .../ES5SymbolProperty3.symbols.diff | 26 + .../conformance/ES5SymbolProperty3.types.diff | 33 + .../ES5SymbolProperty4.errors.txt.diff | 18 + .../conformance/ES5SymbolProperty4.js.diff | 16 + .../ES5SymbolProperty4.symbols.diff | 31 + .../conformance/ES5SymbolProperty4.types.diff | 34 + .../ES5SymbolProperty5.errors.txt.diff | 16 + .../conformance/ES5SymbolProperty5.js.diff | 16 + .../ES5SymbolProperty5.symbols.diff | 31 + .../conformance/ES5SymbolProperty5.types.diff | 35 + .../ES5SymbolProperty6.errors.txt.diff | 18 + .../conformance/ES5SymbolProperty6.js.diff | 16 + .../ES5SymbolProperty6.symbols.diff | 16 + .../conformance/ES5SymbolProperty6.types.diff | 25 + .../ES5SymbolProperty7.errors.txt.diff | 18 + .../conformance/ES5SymbolProperty7.js.diff | 16 + .../ES5SymbolProperty7.symbols.diff | 31 + .../conformance/ES5SymbolProperty7.types.diff | 34 + .../submodule/conformance/ES5for-of32.js.diff | 12 + .../EnumAndModuleWithSameNameAndCommonRoot.js | 2 +- ...AndModuleWithSameNameAndCommonRoot.js.diff | 18 +- ...AndModuleWithSameNameAndCommonRoot.symbols | 8 +- ...umAndModuleWithSameNameAndCommonRoot.types | 2 +- ...ichExtendsInterfaceWithInaccessibleType.js | 2 +- ...tendsInterfaceWithInaccessibleType.js.diff | 22 +- ...tendsInterfaceWithInaccessibleType.symbols | 10 +- ...ExtendsInterfaceWithInaccessibleType.types | 2 +- ...sClassHeritageListMemberTypeAnnotations.js | 2 +- ...sHeritageListMemberTypeAnnotations.js.diff | 54 +- ...sHeritageListMemberTypeAnnotations.symbols | 10 +- ...assHeritageListMemberTypeAnnotations.types | 2 +- ...naccessibleTypeInIndexerTypeAnnotations.js | 2 +- ...ssibleTypeInIndexerTypeAnnotations.js.diff | 23 +- ...ssibleTypeInIndexerTypeAnnotations.symbols | 8 +- ...cessibleTypeInIndexerTypeAnnotations.types | 2 +- ...accessibleTypeInTypeParameterConstraint.js | 2 +- ...sibleTypeInTypeParameterConstraint.js.diff | 59 +- ...sibleTypeInTypeParameterConstraint.symbols | 14 +- ...essibleTypeInTypeParameterConstraint.types | 2 +- ...TypesInParameterAndReturnTypeAnnotation.js | 2 +- ...InParameterAndReturnTypeAnnotation.js.diff | 27 +- ...InParameterAndReturnTypeAnnotation.symbols | 10 +- ...esInParameterAndReturnTypeAnnotation.types | 2 +- ...ccessibleTypesInParameterTypeAnnotation.js | 2 +- ...ibleTypesInParameterTypeAnnotation.js.diff | 27 +- ...ibleTypesInParameterTypeAnnotation.symbols | 10 +- ...ssibleTypesInParameterTypeAnnotation.types | 2 +- ...InaccessibleTypesInReturnTypeAnnotation.js | 2 +- ...essibleTypesInReturnTypeAnnotation.js.diff | 27 +- ...essibleTypesInReturnTypeAnnotation.symbols | 10 +- ...ccessibleTypesInReturnTypeAnnotation.types | 2 +- ...sClassHeritageListMemberTypeAnnotations.js | 2 +- ...sHeritageListMemberTypeAnnotations.symbols | 10 +- ...assHeritageListMemberTypeAnnotations.types | 2 +- ...naccessibleTypeInIndexerTypeAnnotations.js | 2 +- ...ssibleTypeInIndexerTypeAnnotations.symbols | 8 +- ...cessibleTypeInIndexerTypeAnnotations.types | 2 +- ...accessibleTypeInTypeParameterConstraint.js | 2 +- ...sibleTypeInTypeParameterConstraint.symbols | 10 +- ...essibleTypeInTypeParameterConstraint.types | 2 +- ...WithAccessibleTypesOnItsExportedMembers.js | 4 +- ...ccessibleTypesOnItsExportedMembers.js.diff | 36 +- ...ccessibleTypesOnItsExportedMembers.symbols | 16 +- ...hAccessibleTypesOnItsExportedMembers.types | 4 +- ...hAccessibleTypesInMemberTypeAnnotations.js | 2 +- ...ssibleTypesInMemberTypeAnnotations.js.diff | 18 +- ...ssibleTypesInMemberTypeAnnotations.symbols | 10 +- ...cessibleTypesInMemberTypeAnnotations.types | 2 +- ...sibleTypesInNestedMemberTypeAnnotations.js | 2 +- ...TypesInNestedMemberTypeAnnotations.js.diff | 17 +- ...TypesInNestedMemberTypeAnnotations.symbols | 12 +- ...leTypesInNestedMemberTypeAnnotations.types | 2 +- ...cTypeWithInaccessibleTypeAsTypeArgument.js | 2 +- ...WithInaccessibleTypeAsTypeArgument.js.diff | 12 +- ...WithInaccessibleTypeAsTypeArgument.symbols | 8 +- ...naccessibleTypeAsTypeArgument.symbols.diff | 16 + ...peWithInaccessibleTypeAsTypeArgument.types | 2 +- ...iableWithAccessibleTypeInTypeAnnotation.js | 2 +- ...WithAccessibleTypeInTypeAnnotation.symbols | 6 +- ...leWithAccessibleTypeInTypeAnnotation.types | 2 +- ...bleWithInaccessibleTypeInTypeAnnotation.js | 2 +- ...thInaccessibleTypeInTypeAnnotation.symbols | 8 +- ...WithInaccessibleTypeInTypeAnnotation.types | 2 +- ...ModuleWithSameNameAndCommonRoot.errors.txt | 14 +- ...ctionAndModuleWithSameNameAndCommonRoot.js | 10 +- ...AndModuleWithSameNameAndCommonRoot.js.diff | 11 + ...AndModuleWithSameNameAndCommonRoot.symbols | 42 +- ...onAndModuleWithSameNameAndCommonRoot.types | 10 +- ...oduleWithSameNameAndDifferentCommonRoot.js | 6 +- ...WithSameNameAndDifferentCommonRoot.js.diff | 11 + ...WithSameNameAndDifferentCommonRoot.symbols | 18 +- ...leWithSameNameAndDifferentCommonRoot.types | 6 +- .../FunctionDeclaration8_es6.js.diff | 9 + .../InvalidNonInstantiatedModule.errors.txt | 2 +- .../InvalidNonInstantiatedModule.js | 2 +- .../InvalidNonInstantiatedModule.symbols | 4 +- .../InvalidNonInstantiatedModule.types | 2 +- ...dClassWithSameNameAndCommonRoot.errors.txt | 16 +- ...ModuleAndClassWithSameNameAndCommonRoot.js | 8 +- ...eAndClassWithSameNameAndCommonRoot.js.diff | 28 +- ...eAndClassWithSameNameAndCommonRoot.symbols | 22 +- ...uleAndClassWithSameNameAndCommonRoot.types | 8 +- .../ModuleAndEnumWithSameNameAndCommonRoot.js | 2 +- ...leAndEnumWithSameNameAndCommonRoot.js.diff | 18 +- ...leAndEnumWithSameNameAndCommonRoot.symbols | 8 +- ...duleAndEnumWithSameNameAndCommonRoot.types | 2 +- ...nctionWithSameNameAndCommonRoot.errors.txt | 18 +- ...uleAndFunctionWithSameNameAndCommonRoot.js | 10 +- ...dFunctionWithSameNameAndCommonRoot.js.diff | 20 + ...dFunctionWithSameNameAndCommonRoot.symbols | 18 +- ...AndFunctionWithSameNameAndCommonRoot.types | 10 +- ...thExportedAndNonExportedClasses.errors.txt | 2 +- ...ModuleWithExportedAndNonExportedClasses.js | 2 +- ...eWithExportedAndNonExportedClasses.js.diff | 42 +- ...eWithExportedAndNonExportedClasses.symbols | 8 +- ...uleWithExportedAndNonExportedClasses.types | 2 +- ...WithExportedAndNonExportedEnums.errors.txt | 2 +- .../ModuleWithExportedAndNonExportedEnums.js | 2 +- ...uleWithExportedAndNonExportedEnums.js.diff | 17 + ...uleWithExportedAndNonExportedEnums.symbols | 10 +- ...oduleWithExportedAndNonExportedEnums.types | 2 +- ...ExportedAndNonExportedFunctions.errors.txt | 2 +- ...duleWithExportedAndNonExportedFunctions.js | 2 +- ...ithExportedAndNonExportedFunctions.symbols | 8 +- ...eWithExportedAndNonExportedFunctions.types | 2 +- ...portedAndNonExportedImportAlias.errors.txt | 6 +- ...leWithExportedAndNonExportedImportAlias.js | 6 +- ...hExportedAndNonExportedImportAlias.js.diff | 15 +- ...hExportedAndNonExportedImportAlias.symbols | 32 +- ...ithExportedAndNonExportedImportAlias.types | 6 +- ...ExportedAndNonExportedVariables.errors.txt | 2 +- ...duleWithExportedAndNonExportedVariables.js | 2 +- ...ithExportedAndNonExportedVariables.symbols | 2 +- ...eWithExportedAndNonExportedVariables.types | 2 +- ...itializedExportInInternalModule.errors.txt | 4 +- .../NonInitializedExportInInternalModule.js | 4 +- ...nInitializedExportInInternalModule.js.diff | 39 + ...nInitializedExportInInternalModule.symbols | 4 +- ...NonInitializedExportInInternalModule.types | 4 +- .../submodule/conformance/Protected1.js.diff | 13 + .../conformance/Protected2.errors.txt | 2 +- .../submodule/conformance/Protected2.js | 2 +- .../submodule/conformance/Protected2.symbols | 2 +- .../submodule/conformance/Protected2.types | 2 +- .../submodule/conformance/Protected3.js.diff | 14 + .../submodule/conformance/Protected4.js.diff | 15 + .../submodule/conformance/Protected5.js.diff | 15 + .../submodule/conformance/Protected6.js.diff | 15 + .../submodule/conformance/Protected7.js.diff | 15 + .../submodule/conformance/Protected9.js.diff | 14 +- .../conformance/TemplateExpression1.js.diff | 8 + ...ortedAndNonExportedClassesOfTheSameName.js | 12 +- ...AndNonExportedClassesOfTheSameName.js.diff | 60 +- ...AndNonExportedClassesOfTheSameName.symbols | 38 +- ...edAndNonExportedClassesOfTheSameName.types | 12 +- ...edAndNonExportedInterfacesOfTheSameName.js | 10 +- ...NonExportedInterfacesOfTheSameName.symbols | 52 +- ...ndNonExportedInterfacesOfTheSameName.types | 10 +- ...tedAndNonExportedLocalVarsOfTheSameName.js | 8 +- ...dNonExportedLocalVarsOfTheSameName.js.diff | 32 +- ...dNonExportedLocalVarsOfTheSameName.symbols | 38 +- ...AndNonExportedLocalVarsOfTheSameName.types | 8 +- ...ithExportedClassesOfTheSameName.errors.txt | 10 +- ...rgeEachWithExportedClassesOfTheSameName.js | 10 +- ...chWithExportedClassesOfTheSameName.js.diff | 51 +- ...chWithExportedClassesOfTheSameName.symbols | 24 +- ...EachWithExportedClassesOfTheSameName.types | 10 +- ...EachWithExportedInterfacesOfTheSameName.js | 10 +- ...ithExportedInterfacesOfTheSameName.symbols | 58 +- ...hWithExportedInterfacesOfTheSameName.types | 10 +- ...hExportedLocalVarsOfTheSameName.errors.txt | 8 +- ...eEachWithExportedLocalVarsOfTheSameName.js | 8 +- ...WithExportedLocalVarsOfTheSameName.js.diff | 32 +- ...WithExportedLocalVarsOfTheSameName.symbols | 18 +- ...chWithExportedLocalVarsOfTheSameName.types | 8 +- ...rgeEachWithExportedModulesOfTheSameName.js | 12 +- ...chWithExportedModulesOfTheSameName.js.diff | 37 +- ...chWithExportedModulesOfTheSameName.symbols | 36 +- ...EachWithExportedModulesOfTheSameName.types | 12 +- ...esWithTheSameNameAndDifferentCommonRoot.js | 12 +- ...hTheSameNameAndDifferentCommonRoot.js.diff | 40 +- ...hTheSameNameAndDifferentCommonRoot.symbols | 36 +- ...ithTheSameNameAndDifferentCommonRoot.types | 12 +- ...ModulesWithTheSameNameAndSameCommonRoot.js | 8 +- ...esWithTheSameNameAndSameCommonRoot.js.diff | 32 +- ...esWithTheSameNameAndSameCommonRoot.symbols | 38 +- ...ulesWithTheSameNameAndSameCommonRoot.types | 8 +- .../TypeGuardWithArrayUnion.js.diff | 15 +- .../TypeGuardWithArrayUnion.symbols.diff | 11 + .../TypeGuardWithArrayUnion.types.diff | 11 +- .../TypeGuardWithEnumUnion.types.diff | 55 +- .../abstractPropertyInitializer.js.diff | 11 +- .../accessibilityModifiers.js.diff | 148 +- .../conformance/accessorWithES5.js.diff | 41 + ...thMismatchedAccessibilityModifiers.js.diff | 90 + .../accessorsAreNotContextuallyTyped.js.diff | 29 + .../accessorsOverrideProperty7.js.diff | 45 +- .../additionOperatorWithAnyAndEveryType.js | 2 +- ...dditionOperatorWithAnyAndEveryType.js.diff | 25 +- ...dditionOperatorWithAnyAndEveryType.symbols | 4 +- .../additionOperatorWithAnyAndEveryType.types | 2 +- ...eratorWithConstrainedTypeParameter.js.diff | 12 + ...tionOperatorWithInvalidOperands.errors.txt | 2 +- .../additionOperatorWithInvalidOperands.js | 2 +- ...dditionOperatorWithInvalidOperands.js.diff | 19 +- ...dditionOperatorWithInvalidOperands.symbols | 4 +- .../additionOperatorWithInvalidOperands.types | 2 +- ...torWithNullValueAndInvalidOperator.js.diff | 8 + .../additionOperatorWithTypeParameter.js.diff | 10 + ...thUndefinedValueAndInvalidOperands.js.diff | 8 + ...(moduleresolution=bundler).errors.txt.diff | 11 - ...phAndLineSeparatorsInStringLiteral.js.diff | 20 + .../submodule/conformance/ambient.js.diff | 15 +- .../conformance/ambientDeclarations.js | 4 +- .../conformance/ambientDeclarations.symbols | 4 +- .../conformance/ambientDeclarations.types | 4 +- .../conformance/ambientErrors.errors.txt | 4 +- .../submodule/conformance/ambientErrors.js | 4 +- .../conformance/ambientErrors.symbols | 6 +- .../submodule/conformance/ambientErrors.types | 4 +- ...tExternalModuleInsideNonAmbient.errors.txt | 2 +- .../ambientExternalModuleInsideNonAmbient.js | 2 +- ...ientExternalModuleInsideNonAmbient.symbols | 4 +- ...mbientExternalModuleInsideNonAmbient.types | 2 +- .../conformance/ambientInsideNonAmbient.js | 8 +- .../ambientInsideNonAmbient.symbols | 8 +- .../conformance/ambientInsideNonAmbient.types | 8 +- ...hReservedIdentifierInDottedPath.errors.txt | 20 +- ...ationWithReservedIdentifierInDottedPath.js | 8 +- ...WithReservedIdentifierInDottedPath.symbols | 14 +- ...onWithReservedIdentifierInDottedPath.types | 8 +- .../anyAsGenericFunctionCall.js.diff | 12 +- .../anyAssignabilityInInheritance.js | 4 +- .../anyAssignabilityInInheritance.js.diff | 39 +- .../anyAssignabilityInInheritance.symbols | 4 +- ...anyAssignabilityInInheritance.symbols.diff | 24 + .../anyAssignabilityInInheritance.types | 4 +- .../anyAssignableToEveryType.js.diff | 15 +- .../anyAssignableToEveryType.symbols.diff | 38 + .../conformance/anyAssignableToEveryType2.js | 4 +- .../anyAssignableToEveryType2.js.diff | 34 +- .../anyAssignableToEveryType2.symbols | 4 +- .../anyAssignableToEveryType2.symbols.diff | 20 + .../anyAssignableToEveryType2.types | 4 +- .../conformance/apparentTypeSubtyping.js.diff | 58 +- .../apparentTypeSubtyping.symbols.diff | 42 + .../conformance/apparentTypeSupertype.js.diff | 38 +- .../apparentTypeSupertype.symbols.diff | 11 + ...argumentExpressionContextualTyping.js.diff | 34 + ...ityAndOrderCompatibility01.errors.txt.diff | 47 + .../arityAndOrderCompatibility01.js.diff | 15 + .../arityAndOrderCompatibility01.symbols.diff | 11 + .../arrayAssignmentPatternWithAny.js.diff | 8 + .../conformance/arrayLiteral.symbols.diff | 34 + ...yLiteralExpressionContextualTyping.js.diff | 28 + .../arrayLiteralInference.types.diff | 20 + .../conformance/arrayLiteralSpread.js.diff | 46 + .../arrayLiteralSpreadES5iterable.js.diff | 62 + .../arrayLiteralWidened.types.diff | 19 + ...LiteralWithMultipleBestCommonTypes.js.diff | 14 + .../conformance/arrayLiterals.js.diff | 72 +- .../conformance/arrayLiterals.symbols.diff | 11 + .../conformance/arrayLiterals.types.diff | 24 +- .../conformance/arrayLiterals2ES5.js.diff | 65 + .../arrayLiterals2ES5.symbols.diff | 20 + .../conformance/arrayLiterals2ES5.types.diff | 38 + .../conformance/arrayLiterals2ES6.types.diff | 38 + .../conformance/arrayLiterals3.js.diff | 36 + .../conformance/arrayLiterals3.symbols.diff | 20 + .../conformance/arrayLiterals3.types.diff | 23 + ...arrayLiteralsWithRecursiveGenerics.js.diff | 50 +- ...ayLiteralsWithRecursiveGenerics.types.diff | 12 + .../conformance/arrayOfFunctionTypes3.js.diff | 20 +- .../arrayTypeOfFunctionTypes.symbols.diff | 11 + .../arrayTypeOfFunctionTypes2.symbols.diff | 11 + .../arrayTypeOfTypeOf.symbols.diff | 19 + .../arrowFunctionContexts.errors.txt | 6 +- .../conformance/arrowFunctionContexts.js | 6 +- .../conformance/arrowFunctionContexts.js.diff | 143 +- .../conformance/arrowFunctionContexts.symbols | 6 +- .../conformance/arrowFunctionContexts.types | 6 +- .../arrowFunctionExpressions.js.diff | 153 +- .../arrowFunctionExpressions.types.diff | 26 + ...ctionWithParameterNameAsync_es2017.js.diff | 8 + ...FunctionWithParameterNameAsync_es5.js.diff | 8 + ...FunctionWithParameterNameAsync_es6.js.diff | 8 + .../conformance/asOperator1.symbols.diff | 11 + .../submodule/conformance/asOperator3.js.diff | 26 + .../conformance/asOperatorASI.js.diff | 24 + .../asOperatorContextualType.js.diff | 8 + ...reventsParsingAsAmbientExternalModule02.js | 2 +- ...tsParsingAsAmbientExternalModule02.symbols | 2 +- ...entsParsingAsAmbientExternalModule02.types | 2 +- ...asiPreventsParsingAsNamespace04.errors.txt | 8 + .../asiPreventsParsingAsNamespace04.js | 4 +- .../asiPreventsParsingAsNamespace04.js.diff | 9 + .../asiPreventsParsingAsNamespace04.symbols | 4 +- .../asiPreventsParsingAsNamespace04.types | 6 +- .../asiPreventsParsingAsNamespace05.js.diff | 8 +- .../assertionTypePredicates1.js.diff | 205 +- .../assertionTypePredicates1.types.diff | 93 +- .../assertionTypePredicates2.js.diff | 15 +- .../assignAnyToEveryType.errors.txt | 2 +- .../conformance/assignAnyToEveryType.js | 2 +- .../conformance/assignAnyToEveryType.js.diff | 15 +- .../conformance/assignAnyToEveryType.symbols | 2 +- .../conformance/assignAnyToEveryType.types | 2 +- .../conformance/assignEveryTypeToAny.js.diff | 23 +- .../assignFromStringInterface.symbols.diff | 11 + ...assignFromStringInterface2.errors.txt.diff | 23 + .../assignFromStringInterface2.symbols.diff | 63 + ...assignmentCompatWithCallSignatures.js.diff | 29 +- ...ssignmentCompatWithCallSignatures2.js.diff | 38 +- ...tCompatWithCallSignatures3.errors.txt.diff | 7 +- ...ssignmentCompatWithCallSignatures3.js.diff | 63 +- ...mentCompatWithCallSignatures3.symbols.diff | 74 + ...gnmentCompatWithCallSignatures4.errors.txt | 6 +- .../assignmentCompatWithCallSignatures4.js | 6 +- ...ssignmentCompatWithCallSignatures4.js.diff | 78 +- ...ssignmentCompatWithCallSignatures4.symbols | 44 +- ...mentCompatWithCallSignatures4.symbols.diff | 34 + .../assignmentCompatWithCallSignatures4.types | 6 +- ...ssignmentCompatWithCallSignatures5.js.diff | 63 +- ...ssignmentCompatWithCallSignatures6.js.diff | 63 +- ...llSignaturesWithOptionalParameters.js.diff | 68 +- ...thCallSignaturesWithRestParameters.js.diff | 103 +- ...nmentCompatWithConstructSignatures.js.diff | 14 +- ...mentCompatWithConstructSignatures2.js.diff | 25 +- ...atWithConstructSignatures3.errors.txt.diff | 7 +- ...mentCompatWithConstructSignatures3.js.diff | 63 +- ...ompatWithConstructSignatures3.symbols.diff | 74 + ...tCompatWithConstructSignatures4.errors.txt | 6 +- ...ssignmentCompatWithConstructSignatures4.js | 6 +- ...mentCompatWithConstructSignatures4.js.diff | 78 +- ...mentCompatWithConstructSignatures4.symbols | 44 +- ...ompatWithConstructSignatures4.symbols.diff | 34 + ...gnmentCompatWithConstructSignatures4.types | 6 +- ...mentCompatWithConstructSignatures5.js.diff | 63 +- ...mentCompatWithConstructSignatures6.js.diff | 63 +- ...mpatWithDiscriminatedUnion.errors.txt.diff | 37 + ...gnmentCompatWithDiscriminatedUnion.js.diff | 69 + ...tCompatWithDiscriminatedUnion.symbols.diff | 13 + ...entCompatWithDiscriminatedUnion.types.diff | 70 +- .../assignmentCompatWithEnumIndexer.js.diff | 8 + ...ignaturesWithOptionalParameters.errors.txt | 6 +- ...ricCallSignaturesWithOptionalParameters.js | 6 +- ...llSignaturesWithOptionalParameters.js.diff | 121 +- ...llSignaturesWithOptionalParameters.symbols | 86 +- ...CallSignaturesWithOptionalParameters.types | 6 +- ...ignmentCompatWithNumericIndexer.errors.txt | 2 +- ...ntCompatWithNumericIndexer.errors.txt.diff | 38 + .../assignmentCompatWithNumericIndexer.js | 2 +- ...assignmentCompatWithNumericIndexer.js.diff | 51 +- ...assignmentCompatWithNumericIndexer.symbols | 8 +- .../assignmentCompatWithNumericIndexer.types | 2 +- ...gnmentCompatWithNumericIndexer2.errors.txt | 2 +- ...tCompatWithNumericIndexer2.errors.txt.diff | 38 + .../assignmentCompatWithNumericIndexer2.js | 2 +- ...ssignmentCompatWithNumericIndexer2.symbols | 8 +- .../assignmentCompatWithNumericIndexer2.types | 2 +- ...gnmentCompatWithNumericIndexer3.errors.txt | 2 +- .../assignmentCompatWithNumericIndexer3.js | 2 +- ...ssignmentCompatWithNumericIndexer3.js.diff | 53 +- ...ssignmentCompatWithNumericIndexer3.symbols | 6 +- .../assignmentCompatWithNumericIndexer3.types | 2 +- .../assignmentCompatWithObjectMembers.js | 4 +- .../assignmentCompatWithObjectMembers.js.diff | 46 +- .../assignmentCompatWithObjectMembers.symbols | 14 +- .../assignmentCompatWithObjectMembers.types | 4 +- ...assignmentCompatWithObjectMembers2.js.diff | 24 +- ...assignmentCompatWithObjectMembers3.js.diff | 24 +- ...ignmentCompatWithObjectMembers4.errors.txt | 4 +- .../assignmentCompatWithObjectMembers4.js | 4 +- ...assignmentCompatWithObjectMembers4.js.diff | 125 +- ...assignmentCompatWithObjectMembers4.symbols | 24 +- .../assignmentCompatWithObjectMembers4.types | 4 +- ...assignmentCompatWithObjectMembers5.js.diff | 15 +- ...tWithObjectMembersAccessibility.errors.txt | 4 +- ...entCompatWithObjectMembersAccessibility.js | 4 +- ...mpatWithObjectMembersAccessibility.js.diff | 64 +- ...mpatWithObjectMembersAccessibility.symbols | 14 +- ...CompatWithObjectMembersAccessibility.types | 4 +- ...ompatWithObjectMembersNumericNames.js.diff | 24 +- ...patWithObjectMembersOptionality.errors.txt | 4 +- ...nmentCompatWithObjectMembersOptionality.js | 4 +- ...CompatWithObjectMembersOptionality.js.diff | 52 +- ...CompatWithObjectMembersOptionality.symbols | 12 +- ...ntCompatWithObjectMembersOptionality.types | 4 +- ...atWithObjectMembersOptionality2.errors.txt | 4 +- ...mentCompatWithObjectMembersOptionality2.js | 4 +- ...ompatWithObjectMembersOptionality2.js.diff | 52 +- ...ompatWithObjectMembersOptionality2.symbols | 12 +- ...tCompatWithObjectMembersOptionality2.types | 4 +- ...ObjectMembersStringNumericNames.errors.txt | 4 +- ...mpatWithObjectMembersStringNumericNames.js | 4 +- ...ithObjectMembersStringNumericNames.js.diff | 46 +- ...ithObjectMembersStringNumericNames.symbols | 12 +- ...jectMembersStringNumericNames.symbols.diff | 4 +- ...tWithObjectMembersStringNumericNames.types | 4 +- ...signmentCompatWithStringIndexer.errors.txt | 2 +- ...entCompatWithStringIndexer.errors.txt.diff | 53 + .../assignmentCompatWithStringIndexer.js | 2 +- .../assignmentCompatWithStringIndexer.js.diff | 64 +- .../assignmentCompatWithStringIndexer.symbols | 12 +- .../assignmentCompatWithStringIndexer.types | 2 +- ...ignmentCompatWithStringIndexer2.errors.txt | 2 +- ...ntCompatWithStringIndexer2.errors.txt.diff | 53 + .../assignmentCompatWithStringIndexer2.js | 2 +- ...assignmentCompatWithStringIndexer2.symbols | 12 +- .../assignmentCompatWithStringIndexer2.types | 2 +- ...ignmentCompatWithStringIndexer3.errors.txt | 2 +- .../assignmentCompatWithStringIndexer3.js | 2 +- ...assignmentCompatWithStringIndexer3.js.diff | 15 +- ...assignmentCompatWithStringIndexer3.symbols | 6 +- .../assignmentCompatWithStringIndexer3.types | 2 +- ...signmentGenericLookupTypeNarrowing.js.diff | 16 + .../assignmentLHSIsValue.errors.txt | 2 +- .../conformance/assignmentLHSIsValue.js | 2 +- .../conformance/assignmentLHSIsValue.js.diff | 71 + .../conformance/assignmentLHSIsValue.symbols | 4 +- .../conformance/assignmentLHSIsValue.types | 2 +- ...nmentToParenthesizedIdentifiers.errors.txt | 6 +- .../assignmentToParenthesizedIdentifiers.js | 6 +- ...signmentToParenthesizedIdentifiers.js.diff | 35 + ...signmentToParenthesizedIdentifiers.symbols | 34 +- ...assignmentToParenthesizedIdentifiers.types | 6 +- .../assignmentTypeNarrowing.js.diff | 39 + .../assignmentTypeNarrowing.symbols.diff | 11 + .../conformance/assignments.errors.txt | 2 +- .../submodule/conformance/assignments.js | 2 +- .../submodule/conformance/assignments.js.diff | 12 +- .../submodule/conformance/assignments.symbols | 2 +- .../submodule/conformance/assignments.types | 2 +- .../asyncAliasReturnType_es5.js.diff | 5 +- .../asyncArrowFunction10_es5.js.diff | 10 +- .../asyncArrowFunction11_es5.js.diff | 61 +- .../asyncArrowFunction1_es5.js.diff | 8 +- .../asyncArrowFunction2_es5.js.diff | 9 + .../asyncArrowFunction3_es5.js.diff | 10 + .../asyncArrowFunction4_es5.js.diff | 9 + .../asyncArrowFunction5_es5.js.diff | 8 +- .../asyncArrowFunction6_es5.js.diff | 19 +- .../asyncArrowFunction7_es5.js.diff | 29 +- .../asyncArrowFunction8_es5.js.diff | 18 +- .../asyncArrowFunction9_es5.js.diff | 11 + ...ArrowFunctionCapturesArguments_es5.js.diff | 30 +- ...asyncArrowFunctionCapturesThis_es5.js.diff | 24 +- ...syncAwaitIsolatedModules_es2017.errors.txt | 2 +- .../asyncAwaitIsolatedModules_es2017.js | 2 +- .../asyncAwaitIsolatedModules_es2017.symbols | 4 +- .../asyncAwaitIsolatedModules_es2017.types | 2 +- .../asyncAwaitIsolatedModules_es5.errors.txt | 2 +- .../asyncAwaitIsolatedModules_es5.js | 2 +- .../asyncAwaitIsolatedModules_es5.js.diff | 176 +- .../asyncAwaitIsolatedModules_es5.symbols | 4 +- .../asyncAwaitIsolatedModules_es5.types | 2 +- .../asyncAwaitIsolatedModules_es6.errors.txt | 2 +- .../asyncAwaitIsolatedModules_es6.js | 2 +- .../asyncAwaitIsolatedModules_es6.symbols | 4 +- .../asyncAwaitIsolatedModules_es6.types | 2 +- .../asyncAwaitNestedClasses_es5.js.diff | 41 +- .../conformance/asyncAwait_es2017.js | 2 +- .../conformance/asyncAwait_es2017.symbols | 4 +- .../conformance/asyncAwait_es2017.types | 2 +- .../submodule/conformance/asyncAwait_es5.js | 2 +- .../conformance/asyncAwait_es5.js.diff | 192 +- .../conformance/asyncAwait_es5.symbols | 4 +- .../conformance/asyncAwait_es5.types | 2 +- .../submodule/conformance/asyncAwait_es6.js | 2 +- .../conformance/asyncAwait_es6.symbols | 4 +- .../conformance/asyncAwait_es6.types | 2 +- .../conformance/asyncClass_es5.js.diff | 8 +- .../conformance/asyncConstructor_es5.js.diff | 12 +- .../asyncFunctionDeclaration10_es5.js.diff | 9 +- .../asyncFunctionDeclaration11_es5.js.diff | 5 +- .../asyncFunctionDeclaration12_es5.js.diff | 4 +- .../asyncFunctionDeclaration13_es5.js.diff | 6 +- .../asyncFunctionDeclaration14_es5.js.diff | 6 +- .../asyncFunctionDeclaration15_es5.js.diff | 106 +- .../asyncFunctionDeclaration1_es5.js.diff | 5 +- .../asyncFunctionDeclaration3_es5.js.diff | 10 + .../asyncFunctionDeclaration5_es5.js.diff | 5 +- .../asyncFunctionDeclaration6_es5.js.diff | 9 +- .../asyncFunctionDeclaration7_es5.js.diff | 14 +- .../asyncFunctionDeclaration8_es5.js.diff | 9 + .../asyncFunctionDeclaration9_es5.js.diff | 15 +- ...onDeclarationCapturesArguments_es5.js.diff | 31 +- .../conformance/asyncGetter_es5.js.diff | 18 +- .../asyncImportedPromise_es5.js.diff | 73 +- .../asyncMethodWithSuper_es5.js.diff | 104 +- .../conformance/asyncModule_es5.errors.txt | 2 +- .../submodule/conformance/asyncModule_es5.js | 2 +- .../conformance/asyncModule_es5.symbols | 2 +- .../conformance/asyncModule_es5.types | 2 +- .../conformance/asyncModule_es6.errors.txt | 2 +- .../submodule/conformance/asyncModule_es6.js | 2 +- .../conformance/asyncModule_es6.symbols | 2 +- .../conformance/asyncModule_es6.types | 2 +- .../conformance/asyncMultiFile_es5.js.diff | 31 +- .../asyncQualifiedReturnType_es5.js.diff | 20 +- .../conformance/asyncSetter_es5.js.diff | 18 +- ...ncUnParenthesizedArrowFunction_es5.js.diff | 15 +- .../conformance/asyncUseStrict_es5.js.diff | 12 +- .../asyncWithVarShadowing_es6.types.diff | 10 + ...TypeAssignmentCompatIndexSignature.js.diff | 10 + ...ssignmentCompatIndexSignature.symbols.diff | 11 + ...tedTypeBracketAccessIndexSignature.js.diff | 8 + ...peBracketAccessIndexSignature.symbols.diff | 11 + .../autoAccessor1(target=es5).js.diff | 46 +- .../autoAccessor3(target=es5).js.diff | 46 +- .../autoAccessor4(target=es5).js.diff | 46 +- .../autoAccessor5(target=es5).js.diff | 77 +- ...edModifiers(target=es2017).errors.txt.diff | 19 +- ...edModifiers(target=esnext).errors.txt.diff | 19 +- .../awaitBinaryExpression1_es5.js.diff | 17 +- .../awaitBinaryExpression2_es5.js.diff | 17 +- .../awaitBinaryExpression3_es5.js.diff | 17 +- .../awaitBinaryExpression4_es5.js.diff | 17 +- .../awaitBinaryExpression5_es5.js.diff | 19 +- .../awaitCallExpression1_es5.js.diff | 12 +- .../awaitCallExpression2_es5.js.diff | 18 +- .../awaitCallExpression3_es5.js.diff | 19 +- .../awaitCallExpression4_es5.js.diff | 17 +- .../awaitCallExpression5_es5.js.diff | 12 +- .../awaitCallExpression6_es5.js.diff | 18 +- .../awaitCallExpression7_es5.js.diff | 19 +- .../awaitCallExpression8_es5.js.diff | 17 +- .../awaitClassExpression_es5.js.diff | 21 +- .../conformance/awaitUnion_es5.js.diff | 28 +- .../conformance/awaitUnion_es5.types.diff | 20 + .../conformance/awaitUnion_es6.types.diff | 20 + ...aitUsingDeclarations.1(target=es5).js.diff | 695 +- ...aitUsingDeclarations.2(target=es5).js.diff | 60 +- ...aitUsingDeclarations.3(target=es5).js.diff | 54 +- ...UsingDeclarationsInFor(target=es5).js.diff | 86 +- ...clarationsInForAwaitOf(target=es5).js.diff | 127 +- ...arationsInForAwaitOf.3(target=es5).js.diff | 141 +- ...gDeclarationsInForOf.1(target=es5).js.diff | 85 +- ...gDeclarationsInForOf.5(target=es5).js.diff | 101 +- ...CommonTypeOfConditionalExpressions.js.diff | 67 +- ...ommonTypeOfConditionalExpressions2.js.diff | 52 +- .../bestCommonTypeOfTuple2.js.diff | 89 +- .../conformance/binaryIntegerLiteral.js.diff | 50 + .../binaryIntegerLiteralError.js.diff | 18 + ...wiseNotOperatorWithAnyOtherType.errors.txt | 2 +- .../bitwiseNotOperatorWithAnyOtherType.js | 2 +- ...bitwiseNotOperatorWithAnyOtherType.js.diff | 27 +- ...bitwiseNotOperatorWithAnyOtherType.symbols | 2 +- .../bitwiseNotOperatorWithAnyOtherType.types | 2 +- .../bitwiseNotOperatorWithBooleanType.js | 2 +- .../bitwiseNotOperatorWithBooleanType.js.diff | 19 +- .../bitwiseNotOperatorWithBooleanType.symbols | 2 +- .../bitwiseNotOperatorWithBooleanType.types | 2 +- .../bitwiseNotOperatorWithNumberType.js | 2 +- .../bitwiseNotOperatorWithNumberType.js.diff | 28 +- .../bitwiseNotOperatorWithNumberType.symbols | 2 +- .../bitwiseNotOperatorWithNumberType.types | 2 +- .../bitwiseNotOperatorWithStringType.js | 2 +- .../bitwiseNotOperatorWithStringType.js.diff | 28 +- .../bitwiseNotOperatorWithStringType.symbols | 2 +- .../bitwiseNotOperatorWithStringType.types | 2 +- .../conformance/bivariantInferences.js.diff | 3 +- .../bivariantInferences.symbols.diff | 23 + .../bivariantInferences.types.diff | 20 +- .../booleanLiteralTypes1.types.diff | 4 +- .../booleanLiteralTypes2.types.diff | 4 +- .../conformance/bundlerCommonJS.errors.txt | 35 + .../submodule/conformance/bundlerCommonJS.js | 45 + .../conformance/bundlerCommonJS.js.diff | 17 + .../conformance/bundlerCommonJS.trace.json | 55 + ...,moduleresolution=bundler).errors.txt.diff | 4 +- ...,moduleresolution=bundler).errors.txt.diff | 4 +- ...,moduleresolution=bundler).errors.txt.diff | 4 +- .../bundlerImportESM(module=esnext).js.diff | 11 + .../bundlerImportESM(module=preserve).js.diff | 10 + .../bundlerOptionsCompat.errors.txt | 16 + .../bundlerOptionsCompat.errors.txt.diff | 30 +- .../bundlerRelative1(module=esnext).js.diff | 13 + .../bundlerRelative1(module=preserve).js.diff | 12 + ...rSyntaxRestrictions(module=esnext).js.diff | 10 +- ...yntaxRestrictions(module=preserve).js.diff | 14 +- .../submodule/conformance/callChain.3.js.diff | 14 +- .../submodule/conformance/callChain.js.diff | 50 +- .../callChainWithSuper(target=es5).js.diff | 39 +- ...WithIncorrectNumberOfTypeArguments.js.diff | 45 + ...nericFunctionWithZeroTypeArguments.js.diff | 41 + ...onGenericFunctionWithTypeArguments.js.diff | 41 + .../conformance/callOverload.js.diff | 24 + .../conformance/callOverload.symbols.diff | 11 + ...atureAssignabilityInInheritance.errors.txt | 4 +- ...callSignatureAssignabilityInInheritance.js | 4 +- ...ignatureAssignabilityInInheritance.symbols | 12 +- ...lSignatureAssignabilityInInheritance.types | 4 +- ...gnatureAssignabilityInInheritance2.js.diff | 60 +- ...reAssignabilityInInheritance2.symbols.diff | 72 + ...tureAssignabilityInInheritance3.errors.txt | 6 +- ...allSignatureAssignabilityInInheritance3.js | 6 +- ...gnatureAssignabilityInInheritance3.js.diff | 62 +- ...gnatureAssignabilityInInheritance3.symbols | 72 +- ...reAssignabilityInInheritance3.symbols.diff | 35 + ...SignatureAssignabilityInInheritance3.types | 6 +- ...gnatureAssignabilityInInheritance4.js.diff | 60 +- ...gnatureAssignabilityInInheritance5.js.diff | 60 +- ...reAssignabilityInInheritance5.symbols.diff | 61 + ...gnatureAssignabilityInInheritance6.js.diff | 60 +- ...ithOptionalParameterAndInitializer.js.diff | 57 + ...ureWithoutReturnTypeAnnotationInference.js | 8 +- ...thoutReturnTypeAnnotationInference.js.diff | 44 +- ...thoutReturnTypeAnnotationInference.symbols | 20 +- ...WithoutReturnTypeAnnotationInference.types | 8 +- ...utReturnTypeAnnotationInference.types.diff | 25 + ...AccessibilityModifiersOnParameters.js.diff | 38 + ...lSignaturesWithDuplicateParameters.js.diff | 38 + ...llSignaturesWithOptionalParameters.js.diff | 38 + ...lSignaturesWithOptionalParameters2.js.diff | 19 +- ...ignaturesWithParameterInitializers.js.diff | 57 + ...gnaturesWithParameterInitializers2.js.diff | 33 +- .../conformance/callWithMissingVoid.js.diff | 62 +- .../callWithMissingVoid.types.diff | 87 +- .../conformance/callWithSpread.js.diff | 122 + .../conformance/callWithSpread.symbols.diff | 11 + .../conformance/callWithSpread2.js.diff | 54 + .../conformance/callWithSpread3.js.diff | 55 + .../conformance/callWithSpread4.types.diff | 18 +- .../conformance/callWithSpread5.js.diff | 19 + .../conformance/callbackOnConstructor.js.diff | 15 +- .../callbackTagVariadicType.js.diff | 5 +- .../canFollowGetSetKeyword.errors.txt.diff | 25 + .../canFollowGetSetKeyword.js.diff | 78 +- .../conformance/castingTuple.js.diff | 79 +- .../catchClauseWithTypeAnnotation.js.diff | 81 + .../submodule/conformance/chained.js.diff | 21 +- .../submodule/conformance/chained2.js.diff | 20 +- .../checkJsdocSatisfiesTag15.js.diff | 12 +- .../conformance/checkJsdocTypeTag1.js.diff | 23 + .../conformance/checkJsdocTypeTag2.js.diff | 23 + ...checkJsdocTypeTagOnObjectProperty1.js.diff | 42 + ...checkJsdocTypeTagOnObjectProperty2.js.diff | 30 + .../checkJsdocTypedefOnlySourceFile.js.diff | 8 +- .../checkJsxChildrenCanBeTupleType.js.diff | 34 +- .../checkJsxChildrenProperty1.js.diff | 13 +- .../conformance/checkJsxChildrenProperty10.js | 2 +- .../checkJsxChildrenProperty10.js.diff | 26 +- .../checkJsxChildrenProperty10.symbols | 4 +- .../checkJsxChildrenProperty10.types | 2 +- .../conformance/checkJsxChildrenProperty11.js | 2 +- .../checkJsxChildrenProperty11.js.diff | 26 +- .../checkJsxChildrenProperty11.symbols | 4 +- .../checkJsxChildrenProperty11.types | 2 +- .../checkJsxChildrenProperty12.js.diff | 56 +- .../checkJsxChildrenProperty13.js.diff | 51 +- .../checkJsxChildrenProperty14.js.diff | 57 +- .../checkJsxChildrenProperty14.types.diff | 11 + ...checkJsxChildrenProperty15.errors.txt.diff | 26 + .../checkJsxChildrenProperty15.js.diff | 15 +- .../checkJsxChildrenProperty2.js.diff | 39 +- .../checkJsxChildrenProperty3.js.diff | 51 +- .../checkJsxChildrenProperty4.js.diff | 55 +- .../checkJsxChildrenProperty5.js.diff | 50 +- .../checkJsxChildrenProperty6.js.diff | 61 +- .../checkJsxChildrenProperty6.types.diff | 11 + .../checkJsxChildrenProperty7.errors.txt.diff | 28 + .../checkJsxChildrenProperty7.js.diff | 50 +- .../checkJsxChildrenProperty7.types.diff | 11 + .../checkJsxChildrenProperty8.js.diff | 52 +- .../checkJsxChildrenProperty8.types.diff | 11 + .../checkJsxChildrenProperty9.js.diff | 8 +- ...kJsxGenericTagHasCorrectInferences.js.diff | 11 +- ...eckJsxIntersectionElementPropsType.js.diff | 31 +- ...ckJsxSubtleSkipContextSensitiveBug.js.diff | 70 +- ...SFXContextualTypeInferredCorrectly.js.diff | 14 +- ...ContextualTypeInferredCorrectly.types.diff | 11 + .../circularImportAlias.errors.txt | 4 +- .../conformance/circularImportAlias.js | 4 +- .../conformance/circularImportAlias.js.diff | 44 +- .../conformance/circularImportAlias.symbols | 22 +- .../conformance/circularImportAlias.types | 4 +- .../circularIndexedAccessErrors.js.diff | 27 +- .../conformance/circularReference.errors.txt | 4 +- .../conformance/circularReference.js | 4 +- .../conformance/circularReference.js.diff | 33 +- .../conformance/circularReference.symbols | 36 +- .../conformance/circularReference.types | 4 +- ...circularTypeAliasForUnionWithClass.js.diff | 28 +- .../conformance/classAbstractAccessor.js.diff | 27 + .../classAbstractAsIdentifier.js.diff | 16 + ...ctAssignabilityConstructorFunction.js.diff | 16 + ...ssAbstractClinterfaceAssignability.js.diff | 15 +- .../classAbstractConstructor.js.diff | 14 + ...ssAbstractConstructorAssignability.js.diff | 49 + .../classAbstractCrashedOnce.js.diff | 44 + .../conformance/classAbstractExtends.js.diff | 68 + .../classAbstractFactoryFunction.js.diff | 40 + .../conformance/classAbstractGeneric.js.diff | 91 +- ...lassAbstractImportInstantiation.errors.txt | 2 +- .../classAbstractImportInstantiation.js | 2 +- .../classAbstractImportInstantiation.js.diff | 12 +- .../classAbstractImportInstantiation.symbols | 8 +- .../classAbstractImportInstantiation.types | 2 +- .../classAbstractInAModule.errors.txt | 2 +- .../conformance/classAbstractInAModule.js | 2 +- .../classAbstractInAModule.js.diff | 43 + .../classAbstractInAModule.symbols | 10 +- .../conformance/classAbstractInAModule.types | 2 +- .../classAbstractInheritance1.js.diff | 107 + .../classAbstractInheritance2.js.diff | 46 + .../classAbstractInstantiations1.js.diff | 49 + .../classAbstractInstantiations2.js.diff | 101 +- .../classAbstractManyKeywords.js.diff | 36 + .../classAbstractMergedDeclaration.errors.txt | 4 +- .../classAbstractMergedDeclaration.js | 4 +- .../classAbstractMergedDeclaration.js.diff | 65 + .../classAbstractMergedDeclaration.symbols | 10 +- .../classAbstractMergedDeclaration.types | 4 +- ...ssAbstractMethodInNonAbstractClass.js.diff | 22 + ...ssAbstractMethodWithImplementation.js.diff | 15 + .../classAbstractMixedWithModifiers.js.diff | 13 + .../classAbstractOverloads.js.diff | 23 +- .../classAbstractOverrideWithAbstract.js.diff | 79 + .../classAbstractProperties.js.diff | 12 +- .../classAbstractSingleLineDecl.js.diff | 34 + .../classAbstractSuperCalls.js.diff | 78 + .../classAbstractUsingAbstractMethod1.js.diff | 51 + ...classAbstractUsingAbstractMethods2.js.diff | 104 + .../classAndInterfaceMerge.d.symbols | 16 +- .../classAndInterfaceMerge.d.types | 4 +- .../classAndInterfaceWithSameName.js | 2 +- .../classAndInterfaceWithSameName.js.diff | 21 +- .../classAndInterfaceWithSameName.symbols | 6 +- .../classAndInterfaceWithSameName.types | 2 +- .../classAndVariableWithSameName.errors.txt | 2 +- .../classAndVariableWithSameName.js | 2 +- .../classAndVariableWithSameName.js.diff | 21 +- .../classAndVariableWithSameName.symbols | 4 +- .../classAndVariableWithSameName.types | 2 +- .../classAppearsToHaveMembersOfObject.js.diff | 15 +- .../classBodyWithStatements.js.diff | 30 +- .../classConstructorAccessibility.errors.txt | 2 +- .../classConstructorAccessibility.js | 2 +- .../classConstructorAccessibility.js.diff | 104 +- .../classConstructorAccessibility.symbols | 6 +- .../classConstructorAccessibility.types | 2 +- .../classConstructorAccessibility2.js.diff | 162 +- .../classConstructorAccessibility3.js.diff | 84 +- .../classConstructorAccessibility4.js.diff | 87 + .../classConstructorAccessibility5.js.diff | 49 + ...sConstructorOverloadsAccessibility.js.diff | 45 + ...ConstructorParametersAccessibility.js.diff | 65 +- ...onstructorParametersAccessibility2.js.diff | 65 +- ...onstructorParametersAccessibility3.js.diff | 57 +- .../conformance/classDeclarationLoop.js.diff | 23 +- .../classDoesNotDependOnBaseTypes.js.diff | 40 + .../classDoesNotDependOnBaseTypes.types.diff | 10 + .../classDoesNotDependOnPrivateMember.js | 2 +- .../classDoesNotDependOnPrivateMember.js.diff | 14 +- .../classDoesNotDependOnPrivateMember.symbols | 6 +- .../classDoesNotDependOnPrivateMember.types | 2 +- .../submodule/conformance/classExpression.js | 2 +- .../conformance/classExpression.js.diff | 32 + .../conformance/classExpression.symbols | 2 +- .../conformance/classExpression.types | 2 +- .../conformance/classExpression1.js.diff | 13 + .../conformance/classExpression2.js.diff | 37 + .../conformance/classExpression3.js.diff | 58 +- .../conformance/classExpression4.js.diff | 20 + .../conformance/classExpression5.js.diff | 18 + .../conformance/classExpressionLoop.js.diff | 23 +- .../classExtendingBuiltinType.js.diff | 111 + .../classExtendingBuiltinType.symbols.diff | 41 + .../conformance/classExtendingClass.js.diff | 75 +- .../classExtendingClassLikeType.js.diff | 104 + .../classExtendingNonConstructor.js.diff | 88 + .../conformance/classExtendingNull.js.diff | 60 +- .../classExtendingOptionalChain.js.diff | 50 + .../classExtendingPrimitive.js.diff | 167 + .../classExtendingPrimitive2.js.diff | 37 + .../classExtendsEveryObjectType.errors.txt | 2 +- .../classExtendsEveryObjectType.js | 2 +- .../classExtendsEveryObjectType.js.diff | 82 +- .../classExtendsEveryObjectType.symbols | 6 +- .../classExtendsEveryObjectType.types | 2 +- .../classExtendsEveryObjectType2.js.diff | 36 +- .../conformance/classExtendsItself.js.diff | 48 + .../classExtendsItselfIndirectly.js.diff | 84 +- .../classExtendsItselfIndirectly2.errors.txt | 10 +- .../classExtendsItselfIndirectly2.js | 10 +- .../classExtendsItselfIndirectly2.js.diff | 93 +- .../classExtendsItselfIndirectly2.symbols | 38 +- .../classExtendsItselfIndirectly2.types | 10 +- .../classExtendsItselfIndirectly3.js.diff | 159 +- ...endsShadowedConstructorFunction.errors.txt | 2 +- ...classExtendsShadowedConstructorFunction.js | 2 +- ...ExtendsShadowedConstructorFunction.js.diff | 38 +- ...ExtendsShadowedConstructorFunction.symbols | 2 +- ...ssExtendsShadowedConstructorFunction.types | 2 +- ...assExtendsValidConstructorFunction.js.diff | 32 + ...lassImplementsMergedClassInterface.js.diff | 39 +- .../conformance/classInsideBlock.js.diff | 14 + .../classIsSubtypeOfBaseType.js.diff | 49 +- .../classPropertyAsPrivate.js.diff | 40 +- .../classPropertyAsProtected.js.diff | 40 +- .../classPropertyIsPublicByDefault.js.diff | 40 +- .../classStaticBlock1(target=es5).js.diff | 23 +- .../classStaticBlock10(target=es5).js.diff | 45 +- .../classStaticBlock18(target=es5).js.diff | 18 +- .../conformance/classStaticBlock19.js.diff | 17 +- .../classStaticBlock2(target=es5).js.diff | 40 +- .../conformance/classStaticBlock20.js.diff | 30 +- .../conformance/classStaticBlock21.js.diff | 17 +- ...lassStaticBlock24(module=commonjs).js.diff | 15 +- .../classStaticBlock24(module=es2015).js.diff | 18 +- .../classStaticBlock24(module=es2020).js.diff | 18 +- .../classStaticBlock24(module=es2022).js.diff | 18 +- .../classStaticBlock24(module=esnext).js.diff | 18 +- .../conformance/classStaticBlock27.js.diff | 13 +- .../conformance/classStaticBlock28.js.diff | 15 +- .../classStaticBlock5(target=es5).js.diff | 45 +- .../conformance/classStaticBlock6.js.diff | 232 +- .../classStaticBlock7.errors.txt.diff | 15 + .../conformance/classStaticBlock7.js.diff | 128 +- .../conformance/classStaticBlock7.types.diff | 20 + .../conformance/classStaticBlock8.js.diff | 84 +- .../classStaticBlock9(target=es5).js.diff | 8 +- .../classStaticBlockUseBeforeDef3.types.diff | 22 + ...classWithBaseClassButNoConstructor.js.diff | 89 +- .../classWithConstructors.errors.txt | 4 +- .../conformance/classWithConstructors.js | 4 +- .../conformance/classWithConstructors.js.diff | 92 + .../conformance/classWithConstructors.symbols | 16 +- .../conformance/classWithConstructors.types | 4 +- .../conformance/classWithEmptyBody.js.diff | 34 + .../classWithNoConstructorOrBaseClass.js.diff | 24 +- ...PublicMembersEquivalentToInterface.js.diff | 28 +- ...ublicMembersEquivalentToInterface2.js.diff | 28 +- .../classWithOptionalParameter.js.diff | 27 +- .../classWithPredefinedTypesAsNames.js.diff | 34 + .../classWithPredefinedTypesAsNames2.js.diff | 14 + .../classWithPrivateProperty.js.diff | 20 +- .../classWithProtectedProperty.js.diff | 58 +- .../classWithPublicProperty.js.diff | 20 +- .../classWithSemicolonClassElement1.js.diff | 14 + .../classWithSemicolonClassElement2.js.diff | 17 + ...arameterBindingPattern(target=es5).js.diff | 14 +- ...InParameterInitializer(target=es5).js.diff | 16 +- .../classWithStaticMembers.js.diff | 55 +- ...classWithTwoConstructorDefinitions.js.diff | 24 + .../classWithoutExplicitConstructor.js.diff | 21 +- ...assWithoutExplicitConstructor.symbols.diff | 11 + ...peratorWithSecondOperandObjectType.js.diff | 15 +- ...orWithSecondOperandObjectType.symbols.diff | 20 + ...orWithSecondOperandStringType.symbols.diff | 20 + .../conformance/commonJSAliasedExport.js.diff | 9 +- .../commonJSImportAsPrimaryExpression.js.diff | 10 +- .../commonJSImportClassTypeReference.js.diff | 22 +- ...monJSImportExportedClassExpression.js.diff | 23 +- ...onJSImportNestedClassTypeReference.js.diff | 22 +- .../commonJSImportNotAsPrimaryExpression.js | 2 +- ...mmonJSImportNotAsPrimaryExpression.js.diff | 10 +- ...mmonJSImportNotAsPrimaryExpression.symbols | 8 +- ...SImportNotAsPrimaryExpression.symbols.diff | 2 +- ...commonJSImportNotAsPrimaryExpression.types | 2 +- .../commonTypeIntersection.js.diff | 10 + ...arisonOperatorWithIdenticalObjects.js.diff | 92 +- ...RelationshipObjectsOnCallSignature.js.diff | 50 +- ...nshipObjectsOnConstructorSignature.js.diff | 50 +- ...elationshipObjectsOnIndexSignature.js.diff | 50 +- ...ObjectsOnInstantiatedCallSignature.js.diff | 50 +- ...OnInstantiatedConstructorSignature.js.diff | 50 +- ...ithNoRelationshipObjectsOnProperty.js.diff | 42 +- ...isonOperatorWithNumberOperand.symbols.diff | 11 + ...orWithSubtypeObjectOnCallSignature.js.diff | 41 +- ...ubtypeObjectOnConstructorSignature.js.diff | 41 +- ...rWithSubtypeObjectOnIndexSignature.js.diff | 41 +- ...eObjectOnInstantiatedCallSignature.js.diff | 41 +- ...OnInstantiatedConstructorSignature.js.diff | 41 +- ...peratorWithSubtypeObjectOnProperty.js.diff | 79 +- .../compoundAssignmentLHSIsValue.errors.txt | 2 +- .../compoundAssignmentLHSIsValue.js | 2 +- .../compoundAssignmentLHSIsValue.js.diff | 106 + .../compoundAssignmentLHSIsValue.symbols | 4 +- .../compoundAssignmentLHSIsValue.types | 2 +- ...onentiationAssignmentLHSIsValue.errors.txt | 2 +- ...poundExponentiationAssignmentLHSIsValue.js | 2 +- ...ExponentiationAssignmentLHSIsValue.js.diff | 99 + ...ExponentiationAssignmentLHSIsValue.symbols | 4 +- ...ndExponentiationAssignmentLHSIsValue.types | 2 +- .../computedPropertyNames10_ES5.js.diff | 36 + .../computedPropertyNames11_ES5.js.diff | 80 + .../computedPropertyNames12_ES5.js.diff | 18 +- .../computedPropertyNames13_ES5.js.diff | 35 + .../computedPropertyNames14_ES5.js.diff | 25 + .../computedPropertyNames15_ES5.js.diff | 19 + .../computedPropertyNames16_ES5.js.diff | 79 + .../computedPropertyNames17_ES5.js.diff | 49 + .../computedPropertyNames18_ES5.js.diff | 14 + .../computedPropertyNames19_ES5.errors.txt | 2 +- .../computedPropertyNames19_ES5.js | 2 +- .../computedPropertyNames19_ES5.js.diff | 14 + .../computedPropertyNames19_ES5.symbols | 2 +- .../computedPropertyNames19_ES5.types | 2 +- .../computedPropertyNames19_ES6.errors.txt | 2 +- .../computedPropertyNames19_ES6.js | 2 +- .../computedPropertyNames19_ES6.symbols | 2 +- .../computedPropertyNames19_ES6.types | 2 +- .../computedPropertyNames1_ES5.js.diff | 24 + .../computedPropertyNames20_ES5.js.diff | 13 + .../computedPropertyNames21_ES5.js.diff | 20 + .../computedPropertyNames22_ES5.js.diff | 25 + .../computedPropertyNames23_ES5.js.diff | 21 + .../computedPropertyNames24_ES5.js.diff | 43 + .../computedPropertyNames25_ES5.js.diff | 56 + .../computedPropertyNames26_ES5.js.diff | 44 + .../computedPropertyNames27_ES5.js.diff | 39 + .../computedPropertyNames28_ES5.js.diff | 48 + .../computedPropertyNames29_ES5.js.diff | 31 + .../computedPropertyNames2_ES5.js.diff | 41 + .../computedPropertyNames30_ES5.js.diff | 54 + .../computedPropertyNames31_ES5.js.diff | 62 + .../computedPropertyNames32_ES5.js.diff | 20 + .../computedPropertyNames33_ES5.js.diff | 25 + .../computedPropertyNames34_ES5.js.diff | 25 + .../computedPropertyNames36_ES5.js.diff | 44 +- .../computedPropertyNames37_ES5.js.diff | 44 +- .../computedPropertyNames38_ES5.js.diff | 44 +- .../computedPropertyNames39_ES5.js.diff | 44 +- .../computedPropertyNames3_ES5.js.diff | 41 + .../computedPropertyNames3_ES5.symbols.diff | 11 + .../computedPropertyNames40_ES5.js.diff | 35 +- .../computedPropertyNames41_ES5.js.diff | 33 +- .../computedPropertyNames42_ES5.js.diff | 30 +- .../computedPropertyNames43_ES5.js.diff | 68 +- .../computedPropertyNames44_ES5.js.diff | 66 +- .../computedPropertyNames45_ES5.js.diff | 66 +- .../computedPropertyNames46_ES5.js.diff | 13 + .../computedPropertyNames47_ES5.js.diff | 20 + .../computedPropertyNames48_ES5.js.diff | 30 + .../computedPropertyNames49_ES5.js.diff | 66 + .../computedPropertyNames4_ES5.js.diff | 36 + .../computedPropertyNames50_ES5.js.diff | 62 + .../computedPropertyNames51_ES5.js.diff | 18 + .../computedPropertyNames5_ES5.js.diff | 24 + .../computedPropertyNames6_ES5.js.diff | 20 + .../computedPropertyNames7_ES5.js.diff | 17 + .../computedPropertyNames8_ES5.js.diff | 18 + .../computedPropertyNames9_ES5.js.diff | 18 + ...dPropertyNamesContextualType10_ES5.js.diff | 15 + ...edPropertyNamesContextualType1_ES5.js.diff | 15 + ...edPropertyNamesContextualType2_ES5.js.diff | 15 + ...edPropertyNamesContextualType3_ES5.js.diff | 15 + ...edPropertyNamesContextualType4_ES5.js.diff | 15 + ...edPropertyNamesContextualType5_ES5.js.diff | 15 + ...edPropertyNamesContextualType6_ES5.js.diff | 22 + ...ropertyNamesContextualType6_ES5.types.diff | 14 + ...ropertyNamesContextualType6_ES6.types.diff | 14 + ...edPropertyNamesContextualType7_ES5.js.diff | 21 + ...ropertyNamesContextualType7_ES5.types.diff | 14 + ...ropertyNamesContextualType7_ES6.types.diff | 14 + ...edPropertyNamesContextualType8_ES5.js.diff | 15 + ...edPropertyNamesContextualType9_ES5.js.diff | 15 + ...dPropertyNamesDeclarationEmit1_ES5.js.diff | 30 + ...dPropertyNamesDeclarationEmit2_ES5.js.diff | 30 + ...dPropertyNamesDeclarationEmit5_ES5.js.diff | 30 + ...dPropertyNamesDeclarationEmit6_ES5.js.diff | 22 + ...mputedPropertyNamesOnOverloads_ES5.js.diff | 15 + ...omputedPropertyNamesSourceMap1_ES5.js.diff | 29 + ...tedPropertyNamesSourceMap1_ES5.js.map.diff | 4 +- ...ertyNamesSourceMap1_ES5.sourcemap.txt.diff | 247 +- ...omputedPropertyNamesSourceMap2_ES5.js.diff | 26 + ...tedPropertyNamesSourceMap2_ES5.js.map.diff | 4 +- ...ertyNamesSourceMap2_ES5.sourcemap.txt.diff | 206 +- ...(moduleresolution=bundler).errors.txt.diff | 26 + ...kNull(moduleresolution=bundler).trace.json | 19 + ...ckNull(moduleresolution=node16).errors.txt | 21 + ...l(moduleresolution=node16).errors.txt.diff | 17 + ...ckNull(moduleresolution=node16).trace.json | 19 + ...Null(moduleresolution=nodenext).errors.txt | 21 + ...moduleresolution=nodenext).errors.txt.diff | 17 + ...Null(moduleresolution=nodenext).trace.json | 19 + ...lOperatorConditionIsBooleanType.types.diff | 29 + ...ionalOperatorConditionIsObjectType.js.diff | 37 +- ...OperatorConditionIsObjectType.symbols.diff | 28 + ...alOperatorConditoinIsStringType.types.diff | 29 + ...onditionalOperatorWithIdenticalBCT.js.diff | 81 +- ...itionalOperatorWithIdenticalBCT.types.diff | 11 + ...itionalOperatorWithoutIdenticalBCT.js.diff | 71 +- .../conformance/conditionalTypes1.js.diff | 83 +- .../conditionalTypes1.symbols.diff | 62 + .../conformance/conditionalTypes1.types.diff | 33 +- .../conditionalTypes2.errors.txt.diff | 34 +- .../conformance/conditionalTypes2.js.diff | 68 +- .../conditionalTypes2.symbols.diff | 35 + .../conformance/conditionalTypes2.types.diff | 11 +- .../constAssertions.errors.txt.diff | 30 + .../conformance/constAssertions.js.diff | 42 +- .../conformance/constAssertions.types.diff | 88 +- .../submodule/conformance/constEnum2.js.diff | 11 + .../conformance/constEnum2.symbols.diff | 27 + .../conformance/constEnum3.types.diff | 15 +- .../constLocalsInFunctionExpressions.js.diff | 47 + ...onstLocalsInFunctionExpressions.types.diff | 46 + .../constraintSatisfactionWithAny.js.diff | 41 +- ...constraintSatisfactionWithAny.symbols.diff | 20 + ...straintSatisfactionWithEmptyObject.js.diff | 31 +- ...atureAssignabilityInInheritance.errors.txt | 4 +- ...ructSignatureAssignabilityInInheritance.js | 4 +- ...ignatureAssignabilityInInheritance.symbols | 14 +- ...tSignatureAssignabilityInInheritance.types | 4 +- ...gnatureAssignabilityInInheritance2.js.diff | 60 +- ...reAssignabilityInInheritance2.symbols.diff | 72 + ...tureAssignabilityInInheritance3.errors.txt | 6 +- ...uctSignatureAssignabilityInInheritance3.js | 6 +- ...gnatureAssignabilityInInheritance3.js.diff | 62 +- ...gnatureAssignabilityInInheritance3.symbols | 70 +- ...reAssignabilityInInheritance3.symbols.diff | 35 + ...SignatureAssignabilityInInheritance3.types | 6 +- ...gnatureAssignabilityInInheritance4.js.diff | 60 +- ...gnatureAssignabilityInInheritance5.js.diff | 60 +- ...reAssignabilityInInheritance5.symbols.diff | 61 + ...gnatureAssignabilityInInheritance6.js.diff | 60 +- ...AccessibilityModifiersOnParameters.js.diff | 46 +- ...ccessibilityModifiersOnParameters2.js.diff | 55 +- ...ctSignaturesWithIdenticalOverloads.js.diff | 26 + .../constructSignaturesWithOverloads.js.diff | 26 + ...nstructSignaturesWithOverloads2.errors.txt | 4 +- .../constructSignaturesWithOverloads2.js | 4 +- .../constructSignaturesWithOverloads2.js.diff | 29 + .../constructSignaturesWithOverloads2.symbols | 4 +- .../constructSignaturesWithOverloads2.types | 4 +- ...verloadsThatDifferOnlyByReturnType.js.diff | 24 + .../constructableDecoratorOnClass01.js.diff | 17 +- ...ructorDefaultValuesReferencingThis.js.diff | 64 +- ...FunctionTypeIsAssignableToBaseType.js.diff | 49 +- ...unctionTypeIsAssignableToBaseType2.js.diff | 63 +- .../constructorHasPrototypeProperty.js | 4 +- .../constructorHasPrototypeProperty.js.diff | 67 +- .../constructorHasPrototypeProperty.symbols | 16 +- .../constructorHasPrototypeProperty.types | 4 +- ...torImplementationWithDefaultValues.js.diff | 42 + ...plementationWithDefaultValues.symbols.diff | 11 + ...orImplementationWithDefaultValues2.js.diff | 38 +- ...lementationWithDefaultValues2.symbols.diff | 20 + ...structorOverloadsWithDefaultValues.js.diff | 29 +- ...torOverloadsWithOptionalParameters.js.diff | 29 +- .../constructorParameterProperties.js.diff | 31 +- .../constructorParameterProperties2.js.diff | 47 +- ...tructorParameterShadowsOuterScopes.js.diff | 27 +- ...ctorWithAssignableReturnExpression.js.diff | 55 +- ...onstructorWithExpressionLessReturn.js.diff | 68 +- .../contextualIntersectionType.js.diff | 11 + ...ontextualSignatureInstantiation.types.diff | 48 + .../conformance/contextualThisType.js.diff | 11 + .../contextualTypeWithTuple.js.diff | 31 + ...ualTypeWithUnionTypeCallSignatures.js.diff | 15 +- ...TypeWithUnionTypeCallSignatures.types.diff | 11 + ...alTypeWithUnionTypeIndexSignatures.js.diff | 27 + ...contextualTypeWithUnionTypeMembers.js.diff | 105 + ...xtualTypeWithUnionTypeMembers.symbols.diff | 20 + ...tualTypeWithUnionTypeObjectLiteral.js.diff | 24 + .../contextuallyTypeCommaOperator01.js.diff | 10 + .../contextuallyTypeCommaOperator02.js.diff | 14 + .../contextuallyTypeCommaOperator03.js.diff | 10 + .../contextuallyTypeLogicalAnd01.js.diff | 12 + .../contextuallyTypeLogicalAnd02.js.diff | 16 + .../contextuallyTypeLogicalAnd03.js.diff | 12 + ...ontextuallyTypedBindingInitializer.js.diff | 32 + ...extuallyTypedBindingInitializer.types.diff | 16 + ...BindingInitializerNegative.errors.txt.diff | 18 + ...llyTypedBindingInitializerNegative.js.diff | 32 + ...TypedBindingInitializerNegative.types.diff | 14 + ...ClassExpressionMethodDeclaration01.js.diff | 41 +- ...ClassExpressionMethodDeclaration02.js.diff | 44 +- ...ionExpressionsAndReturnAnnotations.js.diff | 18 + .../conformance/contextuallyTypedIife.js.diff | 97 + .../contextuallyTypedIifeStrict.js.diff | 97 + ...edObjectLiteralMethodDeclaration01.js.diff | 27 + ...pedStringLiteralsInJsxAttributes01.js.diff | 11 + .../conformance/controlFlowAliasing.js.diff | 336 +- .../controlFlowAliasing.types.diff | 356 +- ...(useunknownincatchvariables=false).js.diff | 20 + ...eunknownincatchvariables=false).types.diff | 37 + ...s(useunknownincatchvariables=true).js.diff | 20 + ...seunknownincatchvariables=true).types.diff | 37 + .../controlFlowAssignmentExpression.js.diff | 22 + ...ntrolFlowAssignmentPatternOrder.types.diff | 143 + .../controlFlowBinaryAndExpression.js.diff | 13 + .../controlFlowBinaryOrExpression.js.diff | 13 + ...controlFlowBinaryOrExpression.symbols.diff | 36 + .../controlFlowBinaryOrExpression.types.diff | 37 + .../controlFlowBindingElement.js.diff | 85 + .../controlFlowBindingElement.types.diff | 11 + ...rolFlowBindingPatternOrder.errors.txt.diff | 18 + .../controlFlowBindingPatternOrder.types.diff | 18 + .../controlFlowCommaOperator.js.diff | 13 + .../controlFlowCommaOperator.types.diff | 19 + ...ontrolFlowComputedPropertyNames.types.diff | 29 +- .../controlFlowConditionalExpression.js.diff | 12 + .../controlFlowDeleteOperator.js.diff | 11 + ...ontrolFlowDestructuringDeclaration.js.diff | 75 + .../controlFlowDoWhileStatement.js.diff | 67 + .../controlFlowDoWhileStatement.symbols.diff | 24 + .../controlFlowDoWhileStatement.types.diff | 10 + .../controlFlowElementAccess.js.diff | 16 + .../controlFlowElementAccess2.types.diff | 20 + .../controlFlowForInStatement.js.diff | 18 + .../controlFlowForInStatement.symbols.diff | 13 + .../controlFlowForInStatement2.js.diff | 21 + .../controlFlowForOfStatement.js.diff | 18 + .../controlFlowForOfStatement.symbols.diff | 11 + .../controlFlowForStatement.js.diff | 50 + .../controlFlowForStatement.symbols.diff | 11 + .../controlFlowForStatement.types.diff | 37 + .../controlFlowGenericTypes.js.diff | 114 + .../controlFlowGenericTypes.types.diff | 4 +- .../conformance/controlFlowIIFE.types.diff | 29 +- .../controlFlowIfStatement.js.diff | 39 + .../controlFlowIfStatement.symbols.diff | 20 + .../controlFlowIfStatement.types.diff | 19 + .../conformance/controlFlowInOperator.js.diff | 47 + ...FlowInstanceOfGuardPrimitives.symbols.diff | 20 + ...olFlowInstanceOfGuardPrimitives.types.diff | 10 + ...ntrolFlowInstanceofExtendsFunction.js.diff | 32 + ...FlowInstanceofExtendsFunction.symbols.diff | 28 + ...olFlowInstanceofExtendsFunction.types.diff | 11 + .../conformance/controlFlowIteration.js.diff | 14 + .../controlFlowIterationErrors.js.diff | 87 + .../controlFlowNullishCoalesce.js.diff | 11 +- .../controlFlowNullishCoalesce.types.diff | 11 +- .../controlFlowOptionalChain.js.diff | 53 +- .../controlFlowOptionalChain.symbols.diff | 11 + .../controlFlowOptionalChain.types.diff | 154 +- .../controlFlowOptionalChain3.types.diff | 11 +- .../conformance/controlFlowParameter.js.diff | 40 + .../controlFlowSuperPropertyAccess.js.diff | 43 + .../conformance/controlFlowTruthiness.js.diff | 60 + .../controlFlowTypeofObject.types.diff | 64 + .../controlFlowWhileStatement.js.diff | 94 + .../controlFlowWhileStatement.symbols.diff | 24 + .../controlFlowWhileStatement.types.diff | 10 + .../controlFlowWithTemplateLiterals.js.diff | 14 + ...controlFlowWithTemplateLiterals.types.diff | 20 +- ...ationEmitIdentifierPredicates01.types.diff | 11 + ...fierPredicatesWithPrivateName01.types.diff | 11 + .../declarationEmitReadonly.js.diff | 17 +- .../declarationEmitThisPredicates01.js.diff | 47 + .../declarationEmitThisPredicates02.js.diff | 13 + ...mitThisPredicatesWithPrivateName01.js.diff | 48 + ...mitThisPredicatesWithPrivateName02.js.diff | 13 + ...larationEmitWorkWithInlineComments.js.diff | 43 +- ...sonImport(resolvejsonmodule=false).js.diff | 3 +- ...JsonImport(resolvejsonmodule=true).js.diff | 3 +- .../conformance/declarationFiles.js.diff | 82 +- .../conformance/declarationFiles.symbols.diff | 16 + .../declarationWithNoInitializer.js.diff | 10 + .../declarationsAndAssignments.errors.txt | 2 +- .../conformance/declarationsAndAssignments.js | 2 +- .../declarationsAndAssignments.js.diff | 224 +- .../declarationsAndAssignments.symbols | 2 +- .../declarationsAndAssignments.types | 2 +- .../declarationsAndAssignments.types.diff | 11 + .../decoratedBlockScopedClass1.js.diff | 27 +- .../decoratedBlockScopedClass2.js.diff | 32 +- .../decoratedBlockScopedClass3.js.diff | 56 +- .../conformance/decoratorCallGeneric.js.diff | 10 +- .../decoratorChecksFunctionBodies.js.diff | 12 +- ...InstantiateModulesInFunctionBodies.js.diff | 14 +- .../decoratorMetadata-jsdoc.js.diff | 6 +- .../conformance/decoratorMetadata.js.diff | 36 +- ...ecoratorMetadataWithTypeOnlyImport.js.diff | 36 +- ...coratorMetadataWithTypeOnlyImport2.js.diff | 19 +- .../conformance/decoratorOnClass1.js.diff | 8 +- .../conformance/decoratorOnClass2.js.diff | 8 +- .../conformance/decoratorOnClass3.js.diff | 8 +- .../conformance/decoratorOnClass4.js.diff | 8 +- .../conformance/decoratorOnClass5.js.diff | 8 +- .../conformance/decoratorOnClass8.js.diff | 8 +- .../decoratorOnClass8.symbols.diff | 11 + .../conformance/decoratorOnClass9.js.diff | 54 +- .../decoratorOnClassAccessor1.js.diff | 12 +- .../decoratorOnClassAccessor2.js.diff | 12 +- .../decoratorOnClassAccessor3.js.diff | 12 +- .../decoratorOnClassAccessor4.js.diff | 12 +- .../decoratorOnClassAccessor5.js.diff | 12 +- .../decoratorOnClassAccessor6.js.diff | 12 +- .../decoratorOnClassAccessor7.js.diff | 84 +- .../decoratorOnClassAccessor8.js.diff | 80 +- .../decoratorOnClassConstructor1.js.diff | 14 + .../decoratorOnClassConstructor2.js.diff | 50 +- .../decoratorOnClassConstructor3.js.diff | 48 +- .../decoratorOnClassConstructor4.js.diff | 42 +- ...oratorOnClassConstructorParameter1.js.diff | 9 +- ...rOnClassConstructorParameter1.symbols.diff | 10 + ...oratorOnClassConstructorParameter4.js.diff | 9 +- ...rOnClassConstructorParameter4.symbols.diff | 10 + .../decoratorOnClassMethod1.js.diff | 8 +- .../decoratorOnClassMethod10.errors.txt.diff | 4 +- .../decoratorOnClassMethod10.js.diff | 8 +- .../decoratorOnClassMethod10.symbols.diff | 11 + .../decoratorOnClassMethod11.errors.txt | 2 +- .../conformance/decoratorOnClassMethod11.js | 2 +- .../decoratorOnClassMethod11.js.diff | 10 +- .../decoratorOnClassMethod11.symbols | 4 +- .../decoratorOnClassMethod11.types | 2 +- .../decoratorOnClassMethod12.errors.txt | 2 +- .../conformance/decoratorOnClassMethod12.js | 2 +- .../decoratorOnClassMethod12.js.diff | 39 +- .../decoratorOnClassMethod12.symbols | 6 +- .../decoratorOnClassMethod12.types | 2 +- .../decoratorOnClassMethod2.js.diff | 8 +- .../decoratorOnClassMethod3.js.diff | 8 +- .../decoratorOnClassMethod8.js.diff | 8 +- .../decoratorOnClassMethodOverload1.js.diff | 15 + .../decoratorOnClassMethodOverload2.js.diff | 8 +- .../decoratorOnClassMethodParameter1.js.diff | 8 +- .../decoratorOnClassMethodParameter2.js.diff | 8 +- ...ecoratorOnClassMethodThisParameter.js.diff | 20 +- .../decoratorOnClassProperty1.js.diff | 6 +- .../decoratorOnClassProperty10.js.diff | 6 +- .../decoratorOnClassProperty11.js.diff | 6 +- .../decoratorOnClassProperty12.js.diff | 6 +- .../decoratorOnClassProperty2.js.diff | 6 +- .../decoratorOnClassProperty3.js.diff | 6 +- .../decoratorOnClassProperty6.js.diff | 6 +- .../decoratorOnClassProperty6.symbols.diff | 11 + .../decoratorOnClassProperty7.js.diff | 6 +- .../decoratorOnClassProperty7.symbols.diff | 10 + .../decoratorOnFunctionParameter.js.diff | 12 +- .../decoratorOnImportEquals1.errors.txt | 4 +- .../conformance/decoratorOnImportEquals1.js | 4 +- .../decoratorOnImportEquals1.symbols | 6 +- .../decoratorOnImportEquals1.types | 4 +- .../decoratorOnInternalModule.errors.txt | 2 +- .../conformance/decoratorOnInternalModule.js | 2 +- .../decoratorOnInternalModule.symbols | 2 +- .../decoratorOnInternalModule.types | 2 +- .../decrementOperatorWithAnyOtherType.js | 2 +- .../decrementOperatorWithAnyOtherType.js.diff | 15 +- .../decrementOperatorWithAnyOtherType.symbols | 2 +- .../decrementOperatorWithAnyOtherType.types | 2 +- ...thAnyOtherTypeInvalidOperations.errors.txt | 2 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 2 +- ...rWithAnyOtherTypeInvalidOperations.js.diff | 27 +- ...rWithAnyOtherTypeInvalidOperations.symbols | 2 +- ...torWithAnyOtherTypeInvalidOperations.types | 2 +- .../decrementOperatorWithNumberType.js | 2 +- .../decrementOperatorWithNumberType.js.diff | 15 +- .../decrementOperatorWithNumberType.symbols | 2 +- .../decrementOperatorWithNumberType.types | 2 +- ...WithNumberTypeInvalidOperations.errors.txt | 2 +- ...OperatorWithNumberTypeInvalidOperations.js | 2 +- ...torWithNumberTypeInvalidOperations.js.diff | 32 +- ...torWithNumberTypeInvalidOperations.symbols | 2 +- ...ratorWithNumberTypeInvalidOperations.types | 2 +- ...ratorWithUnsupportedBooleanType.errors.txt | 2 +- ...ementOperatorWithUnsupportedBooleanType.js | 2 +- ...OperatorWithUnsupportedBooleanType.js.diff | 32 +- ...OperatorWithUnsupportedBooleanType.symbols | 2 +- ...ntOperatorWithUnsupportedBooleanType.types | 2 +- ...eratorWithUnsupportedStringType.errors.txt | 2 +- ...rementOperatorWithUnsupportedStringType.js | 2 +- ...tOperatorWithUnsupportedStringType.js.diff | 32 +- ...tOperatorWithUnsupportedStringType.symbols | 2 +- ...entOperatorWithUnsupportedStringType.types | 2 +- .../defaultExportWithOverloads01.js.diff | 13 + .../defaultExportsCannotMerge02.js.diff | 13 +- .../defaultExportsCannotMerge03.js.diff | 13 +- .../defineProperty(target=es5).js.diff | 95 +- .../definiteAssignmentAssertions.js.diff | 82 +- .../definiteAssignmentAssertions.types.diff | 10 + ...nmentAssertionsWithObjectShortHand.js.diff | 13 +- .../deleteOperatorInvalidOperations.js.diff | 15 +- .../deleteOperatorWithAnyOtherType.errors.txt | 2 +- .../deleteOperatorWithAnyOtherType.js | 2 +- .../deleteOperatorWithAnyOtherType.js.diff | 27 +- .../deleteOperatorWithAnyOtherType.symbols | 2 +- .../deleteOperatorWithAnyOtherType.types | 2 +- .../deleteOperatorWithBooleanType.errors.txt | 2 +- .../deleteOperatorWithBooleanType.js | 2 +- .../deleteOperatorWithBooleanType.js.diff | 19 +- .../deleteOperatorWithBooleanType.symbols | 2 +- .../deleteOperatorWithBooleanType.types | 2 +- .../deleteOperatorWithNumberType.errors.txt | 2 +- .../deleteOperatorWithNumberType.js | 2 +- .../deleteOperatorWithNumberType.js.diff | 28 +- .../deleteOperatorWithNumberType.symbols | 2 +- .../deleteOperatorWithNumberType.types | 2 +- .../deleteOperatorWithStringType.errors.txt | 2 +- .../deleteOperatorWithStringType.js | 2 +- .../deleteOperatorWithStringType.js.diff | 28 +- .../deleteOperatorWithStringType.symbols | 2 +- .../deleteOperatorWithStringType.types | 2 +- .../dependentDestructuredVariables.js.diff | 18 +- .../dependentDestructuredVariables.types.diff | 130 +- ...uredVariablesFromNestedPatterns.types.diff | 26 + ...edClassConstructorWithoutSuperCall.js.diff | 96 +- ...FunctionOverridesBaseClassAccessor.js.diff | 57 + ...rivedClassIncludesInheritedMembers.js.diff | 88 +- ...ClassIncludesInheritedMembers.symbols.diff | 11 + ...ndexersWithAssignmentCompatibility.js.diff | 57 + .../derivedClassOverridesPrivates.js.diff | 58 +- ...ivedClassOverridesProtectedMembers.js.diff | 96 +- ...vedClassOverridesProtectedMembers2.js.diff | 123 +- ...vedClassOverridesProtectedMembers3.js.diff | 205 +- ...vedClassOverridesProtectedMembers4.js.diff | 51 +- ...derivedClassOverridesPublicMembers.js.diff | 123 +- ...erivedClassOverridesWithoutSubtype.js.diff | 58 +- .../derivedClassParameterProperties.js.diff | 280 +- ...sSuperCallsInNonConstructorMembers.js.diff | 99 +- .../derivedClassSuperCallsWithThisArg.js.diff | 107 +- .../derivedClassSuperProperties.js.diff | 1192 ++- ...derivedClassSuperStatementPosition.js.diff | 233 +- ...edClassSuperStatementPosition.symbols.diff | 112 + .../derivedClassTransitivity.js.diff | 55 + .../derivedClassTransitivity2.js.diff | 55 + .../derivedClassTransitivity3.js.diff | 55 + .../derivedClassTransitivity4.js.diff | 55 + .../conformance/derivedClassWithAny.js.diff | 165 +- ...InstanceShadowingProtectedInstance.js.diff | 66 +- ...ateInstanceShadowingPublicInstance.js.diff | 69 +- ...vateStaticShadowingProtectedStatic.js.diff | 66 +- ...PrivateStaticShadowingPublicStatic.js.diff | 68 +- ...vedClassWithoutExplicitConstructor.js.diff | 77 +- ...assWithoutExplicitConstructor.symbols.diff | 17 + ...edClassWithoutExplicitConstructor2.js.diff | 80 +- ...ssWithoutExplicitConstructor2.symbols.diff | 35 + ...edClassWithoutExplicitConstructor3.js.diff | 126 +- ...ssWithoutExplicitConstructor3.symbols.diff | 25 + .../derivedGenericClassWithAny.js.diff | 121 +- ...ddenBaseCallViaSuperPropertyAccess.js.diff | 58 + ...vedTypeDoesNotRequireExtendsClause.js.diff | 50 +- ...edUninitializedPropertyDeclaration.js.diff | 202 +- ...ninitializedPropertyDeclaration.types.diff | 11 + ...rayBindingPatternAndAssignment1ES5.js.diff | 59 + ...BindingPatternAndAssignment1ES5.types.diff | 40 + ...ngPatternAndAssignment1ES5iterable.js.diff | 75 + ...atternAndAssignment1ES5iterable.types.diff | 40 + ...BindingPatternAndAssignment1ES6.types.diff | 40 + ...gArrayBindingPatternAndAssignment2.js.diff | 45 + ...yBindingPatternAndAssignment2.symbols.diff | 11 + ...gArrayBindingPatternAndAssignment3.js.diff | 26 + ...gArrayBindingPatternAndAssignment4.js.diff | 19 +- ...rnAndAssignment5SiblingInitializer.js.diff | 29 + .../destructuringAssignabilityCheck.js.diff | 27 +- .../conformance/destructuringCatch.js.diff | 34 + .../destructuringControlFlow.js.diff | 50 +- .../destructuringControlFlow.types.diff | 76 +- ...cturingEvaluationOrder(target=es5).js.diff | 25 + .../destructuringInFunctionType.js.diff | 13 + ...atternWithNestedSpread(target=es5).js.diff | 10 + ...ectBindingPatternAndAssignment1ES5.js.diff | 43 + ...ObjectBindingPatternAndAssignment3.js.diff | 15 +- ...ObjectBindingPatternAndAssignment4.js.diff | 20 + ...ObjectBindingPatternAndAssignment5.js.diff | 13 + ...gPatternAndAssignment6(target=es5).js.diff | 18 + ...gPatternAndAssignment7(target=es5).js.diff | 14 + ...gPatternAndAssignment8(target=es5).js.diff | 19 + ...rnAndAssignment9SiblingInitializer.js.diff | 29 + ...eterDeclaration10(strict=false).types.diff | 14 +- ...meterDeclaration10(strict=true).types.diff | 14 +- ...tructuringParameterDeclaration1ES5.js.diff | 152 + ...cturingParameterDeclaration1ES5.types.diff | 14 +- ...ngParameterDeclaration1ES5iterable.js.diff | 169 + ...arameterDeclaration1ES5iterable.types.diff | 14 +- ...cturingParameterDeclaration1ES6.types.diff | 14 +- ...uringParameterDeclaration2.errors.txt.diff | 28 +- ...destructuringParameterDeclaration2.js.diff | 96 + ...tructuringParameterDeclaration2.types.diff | 11 +- ...ngParameterDeclaration3ES5iterable.js.diff | 110 +- ...ameterDeclaration3ES5iterable.symbols.diff | 38 + ...destructuringParameterDeclaration4.js.diff | 76 +- ...ucturingParameterDeclaration4.symbols.diff | 27 + ...destructuringParameterDeclaration5.js.diff | 89 +- ...destructuringParameterDeclaration6.js.diff | 54 + ...tructuringParameterDeclaration7ES5.js.diff | 20 + ...ngParameterDeclaration7ES5iterable.js.diff | 36 + ...destructuringParameterDeclaration8.js.diff | 12 + .../destructuringParameterProperties1.js.diff | 46 + .../destructuringParameterProperties2.js.diff | 42 +- .../destructuringParameterProperties3.js.diff | 45 +- .../destructuringParameterProperties5.js.diff | 20 + ...estructuringReassignsRightHandSide.js.diff | 15 + .../destructuringSameNames.js.diff | 52 + .../destructuringSpread.errors.txt.diff | 17 + .../conformance/destructuringSpread.js.diff | 17 + .../destructuringSpread.types.diff | 28 + .../destructuringTypeAssertionsES5_1.js.diff | 8 + .../destructuringTypeAssertionsES5_2.js.diff | 8 + .../destructuringTypeAssertionsES5_3.js.diff | 8 + .../destructuringTypeAssertionsES5_4.js.diff | 8 + .../destructuringTypeAssertionsES5_5.js.diff | 8 + .../destructuringTypeAssertionsES5_6.js.diff | 8 + .../destructuringTypeAssertionsES5_7.js.diff | 8 + ...structuringVariableDeclaration1ES5.js.diff | 61 + ...ucturingVariableDeclaration1ES5.types.diff | 10 + ...ingVariableDeclaration1ES5iterable.js.diff | 77 + ...VariableDeclaration1ES5iterable.types.diff | 10 + ...ucturingVariableDeclaration1ES6.types.diff | 10 + .../destructuringVariableDeclaration2.js.diff | 25 + ...structuringVariableDeclaration2.types.diff | 10 + .../conformance/destructuringVoid.js.diff | 8 + .../destructuringVoidStrictNullChecks.js.diff | 8 + ...structuringWithLiteralInitializers.js.diff | 95 + ...tructuringWithLiteralInitializers2.js.diff | 83 +- ...directDependenceBetweenTypeAliases.js.diff | 21 +- ...sallowLineTerminatorBeforeArrow.errors.txt | 2 +- .../disallowLineTerminatorBeforeArrow.js | 2 +- .../disallowLineTerminatorBeforeArrow.js.diff | 107 +- .../disallowLineTerminatorBeforeArrow.symbols | 6 +- .../disallowLineTerminatorBeforeArrow.types | 2 +- .../discriminatedUnionInference.js.diff | 6 +- .../discriminatedUnionTypes1.symbols.diff | 94 + .../discriminatedUnionTypes1.types.diff | 63 + .../discriminatedUnionTypes2.js.diff | 19 +- .../discriminatedUnionTypes2.symbols.diff | 14 + .../discriminatedUnionTypes2.types.diff | 13 +- .../discriminatedUnionTypes3.js.diff | 6 +- .../duplicateExportAssignments.errors.txt | 2 +- .../conformance/duplicateExportAssignments.js | 2 +- .../duplicateExportAssignments.js.diff | 29 +- .../duplicateExportAssignments.symbols | 2 +- .../duplicateExportAssignments.types | 2 +- .../duplicateNumericIndexers.js.diff | 9 +- .../duplicateNumericIndexers.symbols.diff | 32 + ...licatePropertiesInTypeAssertions01.js.diff | 11 +- ...licatePropertiesInTypeAssertions02.js.diff | 11 +- .../duplicatePropertyNames.js.diff | 26 +- .../duplicatePropertyNames.symbols.diff | 38 + .../duplicateStringIndexers.errors.txt | 2 +- .../conformance/duplicateStringIndexers.js | 2 +- .../duplicateStringIndexers.js.diff | 15 + .../duplicateStringIndexers.symbols | 4 +- .../conformance/duplicateStringIndexers.types | 2 +- ...micImportDefer(module=nodenext).types.diff | 27 + ...cImportDeferInvalidStandalone.symbols.diff | 10 + .../conformance/elementAccessChain.3.js.diff | 25 +- .../conformance/emitArrowFunction.js.diff | 26 + .../conformance/emitArrowFunctionAsIs.js.diff | 12 + .../emitArrowFunctionES6.types.diff | 26 + .../emitArrowFunctionThisCapturing.js.diff | 24 + ...tArrowFunctionWhenUsingArguments01.js.diff | 38 + ...tArrowFunctionWhenUsingArguments02.js.diff | 8 + ...tArrowFunctionWhenUsingArguments03.js.diff | 8 + ...tArrowFunctionWhenUsingArguments04.js.diff | 9 + ...tArrowFunctionWhenUsingArguments05.js.diff | 9 + ...tArrowFunctionWhenUsingArguments06.js.diff | 9 + ...tArrowFunctionWhenUsingArguments07.js.diff | 9 + ...tArrowFunctionWhenUsingArguments08.js.diff | 9 + ...tArrowFunctionWhenUsingArguments09.js.diff | 9 + ...tArrowFunctionWhenUsingArguments10.js.diff | 9 + ...tArrowFunctionWhenUsingArguments11.js.diff | 9 + ...tArrowFunctionWhenUsingArguments12.js.diff | 18 + ...tArrowFunctionWhenUsingArguments13.js.diff | 9 + ...tArrowFunctionWhenUsingArguments14.js.diff | 12 + ...wFunctionWhenUsingArguments14.symbols.diff | 11 + ...tArrowFunctionWhenUsingArguments15.js.diff | 12 + ...wFunctionWhenUsingArguments15.symbols.diff | 11 + ...tArrowFunctionWhenUsingArguments16.js.diff | 11 + ...wFunctionWhenUsingArguments16.symbols.diff | 11 + ...tArrowFunctionWhenUsingArguments17.js.diff | 14 + ...wFunctionWhenUsingArguments17.symbols.diff | 11 + ...tArrowFunctionWhenUsingArguments18.js.diff | 13 + ...wFunctionWhenUsingArguments18.symbols.diff | 11 + ...tArrowFunctionWhenUsingArguments19.js.diff | 11 + .../emitArrowFunctionsAsIs.js.diff | 12 + ...ithPropertyAccessInHeritageClause1.js.diff | 40 + ...iationAssignmentWithIndexingOnLHS4.js.diff | 11 + ...nAssignmentWithIndexingOnLHS4.symbols.diff | 14 + .../emitDefaultParametersFunction.js.diff | 30 + ...efaultParametersFunctionExpression.js.diff | 55 + ...tDefaultParametersFunctionProperty.js.diff | 31 + .../emitDefaultParametersMethod.js.diff | 61 + ...entiationOperatorInTempalteString4.js.diff | 42 + ...iationOperatorInTempalteString4.types.diff | 37 + ...ionOperatorInTempalteString4ES6.types.diff | 37 + ...entiationOperatorInTemplateString1.js.diff | 44 + ...iationOperatorInTemplateString1.types.diff | 54 + ...ionOperatorInTemplateString1ES6.types.diff | 54 + ...entiationOperatorInTemplateString2.js.diff | 44 + ...iationOperatorInTemplateString2.types.diff | 54 + ...ionOperatorInTemplateString2ES6.types.diff | 54 + ...entiationOperatorInTemplateString3.js.diff | 44 + ...iationOperatorInTemplateString3.types.diff | 54 + ...ionOperatorInTemplateString3ES6.types.diff | 54 + .../emitRestParametersFunction.js.diff | 20 + ...itRestParametersFunctionExpression.js.diff | 34 + ...emitRestParametersFunctionProperty.js.diff | 14 + .../emitRestParametersMethod.js.diff | 58 + ...r.asyncGenerators.classMethods.es5.js.diff | 526 +- ...enerators.functionDeclarations.es5.js.diff | 297 +- ...Generators.functionExpressions.es5.js.diff | 311 +- ...enerators.objectLiteralMethods.es5.js.diff | 332 +- .../emitter.forAwait(target=es5).js.diff | 603 +- ...mptyArrayBindingPatternParameter01.js.diff | 10 + ...mptyArrayBindingPatternParameter02.js.diff | 10 + ...mptyArrayBindingPatternParameter03.js.diff | 10 + ...mptyArrayBindingPatternParameter04.js.diff | 11 + .../emptyAssignmentPatterns01_ES5.js.diff | 15 + .../emptyAssignmentPatterns01_ES5.types.diff | 10 + ...tyAssignmentPatterns01_ES5iterable.js.diff | 13 + .../emptyAssignmentPatterns02_ES5.js.diff | 15 + ...tyAssignmentPatterns02_ES5iterable.js.diff | 33 + .../emptyAssignmentPatterns03_ES5.js.diff | 13 + ...tyAssignmentPatterns03_ES5iterable.js.diff | 13 + .../emptyAssignmentPatterns04_ES5.js.diff | 15 + ...tyAssignmentPatterns04_ES5iterable.js.diff | 33 + ...ptyObjectBindingPatternParameter01.js.diff | 10 + ...ptyObjectBindingPatternParameter02.js.diff | 10 + ...ptyObjectBindingPatternParameter03.js.diff | 10 + ...ptyObjectBindingPatternParameter04.js.diff | 11 + .../emptyTuplesTypeAssertion01.js.diff | 13 + .../emptyTuplesTypeAssertion02.js.diff | 13 + ...leDeclarationBindingPatterns01_ES5.js.diff | 80 + ...ationBindingPatterns01_ES5iterable.js.diff | 164 + ...leDeclarationBindingPatterns02_ES5.js.diff | 20 + ...ationBindingPatterns02_ES5iterable.js.diff | 37 + .../conformance/enumAssignability.errors.txt | 2 +- .../conformance/enumAssignability.js | 2 +- .../conformance/enumAssignability.js.diff | 15 +- .../conformance/enumAssignability.symbols | 2 +- .../enumAssignability.symbols.diff | 38 + .../conformance/enumAssignability.types | 2 +- .../enumAssignabilityInInheritance.errors.txt | 4 +- .../enumAssignabilityInInheritance.js | 4 +- .../enumAssignabilityInInheritance.js.diff | 37 +- .../enumAssignabilityInInheritance.symbols | 4 +- ...numAssignabilityInInheritance.symbols.diff | 24 + .../enumAssignabilityInInheritance.types | 4 +- .../conformance/enumBasics.types.diff | 24 +- .../enumClassification.symbols.diff | 10 + ...ConstantMemberWithTemplateLiterals.js.diff | 6 +- ...ithTemplateLiteralsEmitDeclaration.js.diff | 2 +- ...orOnConstantBindingWithInitializer.js.diff | 3 +- .../submodule/conformance/enumErrors.js.diff | 4 +- .../conformance/enumErrors.symbols.diff | 20 + ...sNotASubtypeOfAnythingButNumber.errors.txt | 4 +- .../enumIsNotASubtypeOfAnythingButNumber.js | 4 +- ...umIsNotASubtypeOfAnythingButNumber.js.diff | 37 +- ...umIsNotASubtypeOfAnythingButNumber.symbols | 4 +- ...otASubtypeOfAnythingButNumber.symbols.diff | 20 + ...enumIsNotASubtypeOfAnythingButNumber.types | 4 +- .../conformance/enumLiteralTypes1.types.diff | 20 + .../conformance/enumLiteralTypes2.types.diff | 20 + .../submodule/conformance/enumMerging.js | 16 +- .../submodule/conformance/enumMerging.js.diff | 72 +- .../submodule/conformance/enumMerging.symbols | 64 +- .../submodule/conformance/enumMerging.types | 16 +- .../conformance/enumMergingErrors.errors.txt | 18 +- .../conformance/enumMergingErrors.js | 18 +- .../conformance/enumMergingErrors.js.diff | 93 +- .../conformance/enumMergingErrors.symbols | 36 +- .../conformance/enumMergingErrors.types | 18 +- .../enumShadowedInfinityNaN.js.diff | 21 +- .../submodule/conformance/enums.js.diff | 15 + ...CoalescingAssignment(strict=false).js.diff | 11 + ...hCoalescingAssignment(strict=true).js.diff | 11 +- .../conformance/errorSuperCalls.js.diff | 177 +- .../errorSuperPropertyAccess.js.diff | 253 +- .../conformance/es2022IntlAPIs.types.diff | 30 + .../conformance/es2024SharedMemory.types.diff | 10 +- ...odulekindExportClassNameWithObject.js.diff | 14 + .../es6modulekindWithES5Target.js.diff | 36 +- .../es6modulekindWithES5Target11.js.diff | 17 +- .../es6modulekindWithES5Target12.js.diff | 15 +- .../es6modulekindWithES5Target2.js.diff | 12 +- .../es6modulekindWithES5Target3.js.diff | 14 +- .../es6modulekindWithES5Target4.js.diff | 14 + .../es6modulekindWithES5Target6.js.diff | 23 + .../es6modulekindWithES5Target8.js.diff | 10 + ...on-accessors-nonStatic(target=es5).js.diff | 92 +- ...sors-nonStaticAbstract(target=es5).js.diff | 15 + ...ation-accessors-static(target=es5).js.diff | 90 +- ...Declaration-classThisReference.es5.js.diff | 58 +- ...es5,usedefineforclassfields=false).js.diff | 76 +- ...=es5,usedefineforclassfields=true).js.diff | 106 +- ...elds-nonStaticAbstract(target=es5).js.diff | 16 +- ...ields-nonStaticAmbient(target=es5).js.diff | 15 + ...es5,usedefineforclassfields=false).js.diff | 79 +- ...=es5,usedefineforclassfields=true).js.diff | 109 +- ...n-fields-staticAmbient(target=es5).js.diff | 12 +- ...tion-methods-nonStatic(target=es5).js.diff | 58 +- ...hods-nonStaticAbstract(target=es5).js.diff | 15 + ...aration-methods-static(target=es5).js.diff | 56 +- ...ion-multipleDecorators(target=es5).js.diff | 38 +- ...on-parameterDecorators(target=es5).js.diff | 54 + ...es5,usedefineforclassfields=false).js.diff | 42 +- ...=es5,usedefineforclassfields=true).js.diff | 55 +- ...ration-setFunctionName(target=es5).js.diff | 114 +- ...n-simpleTransformation(target=es5).js.diff | 38 +- ...-emitDecoratorMetadata(target=es5).js.diff | 191 +- .../esnextmodulekindWithES5Target.js.diff | 36 +- .../esnextmodulekindWithES5Target11.js.diff | 17 +- .../esnextmodulekindWithES5Target12.js.diff | 15 +- .../esnextmodulekindWithES5Target2.js.diff | 12 +- .../esnextmodulekindWithES5Target3.js.diff | 14 +- .../esnextmodulekindWithES5Target4.js.diff | 14 + .../esnextmodulekindWithES5Target6.js.diff | 23 + .../esnextmodulekindWithES5Target8.js.diff | 10 + .../everyTypeAssignableToAny.js.diff | 15 +- .../everyTypeAssignableToAny.symbols.diff | 38 + .../everyTypeWithAnnotationAndInitializer.js | 2 +- ...ryTypeWithAnnotationAndInitializer.js.diff | 43 +- ...ryTypeWithAnnotationAndInitializer.symbols | 10 +- ...eWithAnnotationAndInitializer.symbols.diff | 13 + ...veryTypeWithAnnotationAndInitializer.types | 2 +- ...AnnotationAndInvalidInitializer.errors.txt | 4 +- ...TypeWithAnnotationAndInvalidInitializer.js | 4 +- ...ithAnnotationAndInvalidInitializer.js.diff | 54 +- ...ithAnnotationAndInvalidInitializer.symbols | 14 +- ...notationAndInvalidInitializer.symbols.diff | 11 + ...eWithAnnotationAndInvalidInitializer.types | 4 +- .../conformance/everyTypeWithInitializer.js | 2 +- .../everyTypeWithInitializer.js.diff | 42 +- .../everyTypeWithInitializer.symbols | 8 +- .../everyTypeWithInitializer.symbols.diff | 11 + .../everyTypeWithInitializer.types | 2 +- .../exhaustiveSwitchStatements1.js.diff | 81 +- .../exhaustiveSwitchStatements1.symbols.diff | 106 + .../exhaustiveSwitchStatements1.types.diff | 74 + ...odulekindExportClassNameWithObject.js.diff | 14 + ...orInTemplateStringWithSyntaxError1.js.diff | 42 + ...nTemplateStringWithSyntaxError1.types.diff | 88 + ...orInTemplateStringWithSyntaxError2.js.diff | 42 + ...nTemplateStringWithSyntaxError2.types.diff | 88 + ...orInTemplateStringWithSyntaxError3.js.diff | 42 + ...nTemplateStringWithSyntaxError3.types.diff | 88 + ...onentiationOperatorSyntaxError2.types.diff | 87 + ...idSimpleUnaryExpressionOperands.types.diff | 107 + ...nOperatorWithTemplateStringInvalid.js.diff | 31 + .../exportAsNamespace1(module=es2015).js.diff | 13 + .../exportAsNamespace1(module=esnext).js.diff | 13 + .../exportAsNamespace2(module=es2015).js.diff | 13 + .../exportAsNamespace2(module=esnext).js.diff | 13 + ...xportAsNamespace3(module=commonjs).js.diff | 11 +- .../exportAsNamespace3(module=es2015).js.diff | 20 + .../exportAsNamespace3(module=esnext).js.diff | 19 + .../exportAsNamespace4(module=es2015).js.diff | 13 + .../exportAsNamespace4(module=esnext).js.diff | 13 + .../exportAssignNonIdentifier.js.diff | 16 + .../exportAssignNonIdentifier.symbols.diff | 12 + .../exportAssignNonIdentifier.types.diff | 11 + .../exportAssignTypes.symbols.diff | 11 + ...rtAssignmentConstrainedGenericType.js.diff | 14 +- .../exportAssignmentGenericType.js.diff | 12 +- .../exportAssignmentMergedModule.js | 6 +- .../exportAssignmentMergedModule.js.diff | 11 +- .../exportAssignmentMergedModule.symbols | 18 +- .../exportAssignmentMergedModule.types | 6 +- .../conformance/exportBinding.js.diff | 20 + .../exportClassNameWithObjectCommonJS.js.diff | 14 + .../submodule/conformance/exportCodeGen.js | 16 +- .../conformance/exportCodeGen.js.diff | 50 +- .../conformance/exportCodeGen.symbols | 24 +- .../submodule/conformance/exportCodeGen.types | 16 +- ...Declaration(isolatedmodules=false).js.diff | 16 + ...tDeclaration(isolatedmodules=true).js.diff | 16 + .../exportDeclaration_moduleSpecifier.js.diff | 16 + .../exportDeclaration_value.js.diff | 11 + .../conformance/exportDeclaredModule.js | 2 +- .../conformance/exportDeclaredModule.symbols | 2 +- .../conformance/exportDeclaredModule.types | 2 +- .../conformance/exportDefault.js.diff | 16 +- .../exportDefaultClassNameWithObject.js.diff | 14 + .../conformance/exportImportAlias.js | 18 +- .../conformance/exportImportAlias.js.diff | 48 +- .../conformance/exportImportAlias.symbols | 70 +- .../conformance/exportImportAlias.types | 18 +- .../conformance/exportNamespace1.js.diff | 16 + .../conformance/exportNamespace10.js.diff | 22 + .../conformance/exportNamespace11.js.diff | 19 +- .../conformance/exportNamespace2.js.diff | 16 + .../conformance/exportNamespace3.js.diff | 16 +- .../conformance/exportNamespace4.js.diff | 16 + .../conformance/exportNamespace5.js.diff | 56 +- .../conformance/exportNamespace6.js.diff | 32 + .../conformance/exportNamespace7.js.diff | 62 +- .../conformance/exportNamespace8.js.diff | 53 +- .../conformance/exportNamespace9.js.diff | 10 +- .../conformance/exportNamespace_js.js.diff | 16 +- ...NonInitializedVariablesCommonJS.errors.txt | 2 +- .../exportNonInitializedVariablesCommonJS.js | 2 +- ...ortNonInitializedVariablesCommonJS.js.diff | 32 + ...ortNonInitializedVariablesCommonJS.symbols | 2 +- ...xportNonInitializedVariablesCommonJS.types | 2 +- ...xportNonInitializedVariablesES6.errors.txt | 2 +- .../exportNonInitializedVariablesES6.js | 2 +- .../exportNonInitializedVariablesES6.symbols | 2 +- .../exportNonInitializedVariablesES6.types | 2 +- ...enStatementNoCrash1(module=esnext).js.diff | 9 + .../conformance/exportNonVisibleType.js.diff | 21 +- .../conformance/exportSpecifiers.js.diff | 15 + .../conformance/exportsAndImports1-es6.js | 4 +- .../exportsAndImports1-es6.symbols | 6 +- .../conformance/exportsAndImports1-es6.types | 4 +- .../conformance/exportsAndImports1.js | 4 +- .../conformance/exportsAndImports1.js.diff | 16 +- .../conformance/exportsAndImports1.symbols | 6 +- .../conformance/exportsAndImports1.types | 4 +- .../conformance/exportsAndImports3-es6.js | 4 +- .../exportsAndImports3-es6.symbols | 6 +- .../conformance/exportsAndImports3-es6.types | 4 +- .../conformance/exportsAndImports3.js | 4 +- .../conformance/exportsAndImports3.js.diff | 13 +- .../conformance/exportsAndImports3.symbols | 6 +- .../conformance/exportsAndImports3.types | 4 +- ...mportsWithContextualKeywordNames01.js.diff | 17 + ...mportsWithContextualKeywordNames02.js.diff | 9 +- .../exportsAndImportsWithUnderscores1.js.diff | 3 +- .../exportsAndImportsWithUnderscores2.js.diff | 3 +- .../exportsAndImportsWithUnderscores3.js.diff | 3 +- .../extendClassExpressionFromModule.js.diff | 39 +- .../extendStringInterface.symbols.diff | 11 + .../conformance/extendsClause.js.diff | 53 + .../filterNamespace_import.js.diff | 39 +- .../fixSignatureCaching.symbols.diff | 68 +- .../fixSignatureCaching.types.diff | 39 +- .../conformance/fluentClasses.js.diff | 66 + .../conformance/for-inStatements.errors.txt | 2 +- .../submodule/conformance/for-inStatements.js | 2 +- .../conformance/for-inStatements.js.diff | 87 +- .../conformance/for-inStatements.symbols | 8 +- .../conformance/for-inStatements.symbols.diff | 11 + .../conformance/for-inStatements.types | 2 +- .../conformance/for-inStatementsArray.js.diff | 61 + .../for-inStatementsArray.symbols.diff | 11 + .../for-inStatementsArrayErrors.js.diff | 21 + .../for-inStatementsArrayErrors.symbols.diff | 11 + ...-inStatementsDestructuring.errors.txt.diff | 16 + .../for-inStatementsDestructuring.js.diff | 8 + .../for-inStatementsDestructuring2.js.diff | 8 + .../for-inStatementsDestructuring4.js.diff | 8 + .../for-inStatementsInvalid.js.diff | 76 + .../for-inStatementsInvalid.symbols.diff | 11 + .../conformance/for-of39.errors.txt.diff | 42 +- .../submodule/conformance/for-of39.types.diff | 34 + .../submodule/conformance/for-of44.types.diff | 29 + ...rAwaitPerIterationBindingDownlevel.js.diff | 145 +- .../submodule/conformance/forStatements.js | 2 +- .../conformance/forStatements.js.diff | 43 +- .../conformance/forStatements.symbols | 10 +- .../conformance/forStatements.symbols.diff | 13 + .../submodule/conformance/forStatements.types | 2 +- ...orStatementsMultipleInvalidDecl.errors.txt | 2 +- .../forStatementsMultipleInvalidDecl.js | 2 +- .../forStatementsMultipleInvalidDecl.js.diff | 68 +- .../forStatementsMultipleInvalidDecl.symbols | 8 +- ...StatementsMultipleInvalidDecl.symbols.diff | 11 + .../forStatementsMultipleInvalidDecl.types | 2 +- .../forStatementsMultipleValidDecl.js.diff | 11 + ...orStatementsMultipleValidDecl.symbols.diff | 11 + .../conformance/forgottenNew.errors.txt | 2 +- .../submodule/conformance/forgottenNew.js | 2 +- .../conformance/forgottenNew.js.diff | 16 + .../conformance/forgottenNew.symbols | 8 +- .../submodule/conformance/forgottenNew.types | 2 +- .../conformance/functionCalls.symbols.diff | 20 + .../functionConstraintSatisfaction.js.diff | 46 +- ...unctionConstraintSatisfaction.symbols.diff | 38 + .../functionConstraintSatisfaction2.js.diff | 41 +- ...nctionConstraintSatisfaction2.symbols.diff | 29 + .../functionConstraintSatisfaction3.js.diff | 38 +- ...unctionExpressionContextualTyping1.js.diff | 74 + ...unctionExpressionContextualTyping2.js.diff | 8 + ...unctionExpressionContextualTyping3.js.diff | 8 + .../functionImplementationErrors.js.diff | 111 +- .../functionImplementationErrors.types.diff | 33 + .../functionImplementations.js.diff | 139 +- .../functionImplementations.types.diff | 20 + .../conformance/functionLiteral.js.diff | 15 + .../functionLiteralForOverloads.js.diff | 14 + .../functionLiteralForOverloads2.js.diff | 25 + .../functionNameConflicts.errors.txt | 2 +- .../conformance/functionNameConflicts.js | 2 +- .../conformance/functionNameConflicts.symbols | 4 +- .../conformance/functionNameConflicts.types | 2 +- .../functionOverloadErrors.errors.txt | 2 +- .../conformance/functionOverloadErrors.js | 2 +- .../functionOverloadErrors.js.diff | 20 + .../functionOverloadErrors.symbols | 8 +- .../functionOverloadErrors.symbols.diff | 20 + .../conformance/functionOverloadErrors.types | 2 +- ...ionWithMultipleReturnStatements.types.diff | 47 + ...ctionWithMultipleReturnStatements2.js.diff | 25 + ...onWithMultipleReturnStatements2.types.diff | 11 + ...ithUseStrictAndSimpleParameterList.js.diff | 121 +- .../generatedContextualTyping.errors.txt | 48 +- .../conformance/generatedContextualTyping.js | 48 +- .../generatedContextualTyping.js.diff | 1636 +++- .../generatedContextualTyping.symbols | 182 +- .../generatedContextualTyping.symbols.diff | 281 + .../generatedContextualTyping.types | 48 +- .../generatorInAmbientContext2.errors.txt | 2 +- .../conformance/generatorInAmbientContext2.js | 2 +- .../generatorInAmbientContext2.symbols | 4 +- .../generatorInAmbientContext2.types | 2 +- .../generatorInAmbientContext4.d.errors.txt | 2 +- .../generatorInAmbientContext4.d.symbols | 4 +- .../generatorInAmbientContext4.d.types | 2 +- .../conformance/generatorInAmbientContext6.js | 2 +- .../generatorInAmbientContext6.symbols | 4 +- .../generatorInAmbientContext6.types | 2 +- .../generatorOverloads1.errors.txt | 2 +- .../conformance/generatorOverloads1.js | 2 +- .../conformance/generatorOverloads1.symbols | 8 +- .../conformance/generatorOverloads1.types | 2 +- .../generatorOverloads2.errors.txt | 2 +- .../conformance/generatorOverloads2.js | 2 +- .../conformance/generatorOverloads2.symbols | 8 +- .../conformance/generatorOverloads2.types | 2 +- .../conformance/generatorOverloads5.js | 2 +- .../conformance/generatorOverloads5.symbols | 8 +- .../conformance/generatorOverloads5.types | 2 +- .../generatorTypeCheck23.types.diff | 11 + .../generatorTypeCheck24.types.diff | 11 + .../generatorTypeCheck52.types.diff | 11 + .../generatorTypeCheck53.types.diff | 11 + .../generatorTypeCheck54.types.diff | 11 + .../generatorTypeCheck63.errors.txt.diff | 19 +- .../generatorYieldContextualType.types.diff | 38 +- .../submodule/conformance/generic.js.diff | 24 +- ...GenericInterfaceWithTheSameName.errors.txt | 10 +- ...icAndNonGenericInterfaceWithTheSameName.js | 10 +- ...NonGenericInterfaceWithTheSameName.symbols | 22 +- ...ndNonGenericInterfaceWithTheSameName.types | 10 +- ...cAndNonGenericInterfaceWithTheSameName2.js | 10 +- ...onGenericInterfaceWithTheSameName2.symbols | 20 +- ...dNonGenericInterfaceWithTheSameName2.types | 10 +- ...edMethodWithOverloadedArguments.errors.txt | 12 +- ...OverloadedMethodWithOverloadedArguments.js | 12 +- ...oadedMethodWithOverloadedArguments.symbols | 110 +- ...rloadedMethodWithOverloadedArguments.types | 12 +- .../genericCallTypeArgumentInference.js.diff | 70 +- ...thConstraintsTypeArgumentInference.js.diff | 120 +- ...traintsTypeArgumentInference2.symbols.diff | 20 + ...ericCallWithFunctionTypedArguments.js.diff | 39 + ...ricCallWithFunctionTypedArguments4.js.diff | 24 +- ...ricCallWithFunctionTypedArguments5.js.diff | 25 + ...cCallWithGenericSignatureArguments.js.diff | 41 + ...WithGenericSignatureArguments.symbols.diff | 41 + ...lWithGenericSignatureArguments2.errors.txt | 4 +- ...nericCallWithGenericSignatureArguments2.js | 4 +- ...CallWithGenericSignatureArguments2.js.diff | 80 + ...CallWithGenericSignatureArguments2.symbols | 16 +- ...ithGenericSignatureArguments2.symbols.diff | 76 + ...icCallWithGenericSignatureArguments2.types | 4 +- ...CallWithGenericSignatureArguments3.js.diff | 42 + .../genericCallWithObjectTypeArgs.js.diff | 33 +- .../genericCallWithObjectTypeArgs2.js.diff | 61 +- ...llWithObjectTypeArgsAndConstraints.js.diff | 33 +- ...lWithObjectTypeArgsAndConstraints2.js.diff | 52 +- ...lWithObjectTypeArgsAndConstraints3.js.diff | 62 +- ...lWithObjectTypeArgsAndConstraints4.js.diff | 38 +- ...lWithObjectTypeArgsAndConstraints5.js.diff | 33 +- ...WithObjectTypeArgsAndIndexers.symbols.diff | 19 + ...jectTypeArgsAndIndexersErrors.symbols.diff | 10 + ...lWithObjectTypeArgsAndInitializers.js.diff | 36 + ...jectTypeArgsAndNumericIndexer.symbols.diff | 31 + ...bjectTypeArgsAndStringIndexer.symbols.diff | 49 + ...WithOverloadedConstructorTypedArguments.js | 4 +- ...verloadedConstructorTypedArguments.symbols | 10 +- ...hOverloadedConstructorTypedArguments.types | 4 +- ...oadedConstructorTypedArguments2.errors.txt | 4 +- ...ithOverloadedConstructorTypedArguments2.js | 4 +- ...erloadedConstructorTypedArguments2.symbols | 8 +- ...OverloadedConstructorTypedArguments2.types | 4 +- ...allWithOverloadedFunctionTypedArguments.js | 4 +- ...thOverloadedFunctionTypedArguments.js.diff | 39 + ...thOverloadedFunctionTypedArguments.symbols | 10 +- ...WithOverloadedFunctionTypedArguments.types | 4 +- ...erloadedFunctionTypedArguments2.errors.txt | 4 +- ...llWithOverloadedFunctionTypedArguments2.js | 4 +- ...hOverloadedFunctionTypedArguments2.js.diff | 29 + ...hOverloadedFunctionTypedArguments2.symbols | 8 +- ...ithOverloadedFunctionTypedArguments2.types | 4 +- .../genericClassExpressionInFunction.js.diff | 109 +- ...ithFunctionTypedMemberArguments.errors.txt | 4 +- ...icClassWithFunctionTypedMemberArguments.js | 4 +- ...ssWithFunctionTypedMemberArguments.js.diff | 104 + ...ssWithFunctionTypedMemberArguments.symbols | 12 +- ...lassWithFunctionTypedMemberArguments.types | 4 +- ...icClassWithObjectTypeArgsAndConstraints.js | 4 +- ...ssWithObjectTypeArgsAndConstraints.js.diff | 66 +- ...ssWithObjectTypeArgsAndConstraints.symbols | 12 +- ...lassWithObjectTypeArgsAndConstraints.types | 4 +- .../genericContextualTypes1.js.diff | 42 +- .../genericFunctionParameters.js.diff | 14 +- .../genericFunctionParameters.symbols.diff | 11 + .../conformance/genericRestArity.js.diff | 6 +- .../genericRestArityStrict.js.diff | 6 +- .../genericRestParameters1.js.diff | 159 +- .../genericRestParameters1.symbols.diff | 11 + .../genericRestParameters1.types.diff | 11 +- .../genericRestParameters2.js.diff | 75 +- .../genericRestParameters2.symbols.diff | 11 + .../genericRestParameters3.js.diff | 52 +- .../genericRestParameters3.symbols.diff | 20 + .../genericRestParameters3.types.diff | 42 +- .../conformance/genericSetterInClassType.js | 2 +- .../genericSetterInClassType.symbols | 6 +- .../genericSetterInClassType.types | 2 +- .../conformance/genericTypeAliases.js.diff | 11 + ...eReferenceWithoutTypeArgument.d.errors.txt | 2 +- ...TypeReferenceWithoutTypeArgument.d.symbols | 8 +- ...icTypeReferenceWithoutTypeArgument.d.types | 2 +- ...ypeReferenceWithoutTypeArgument.errors.txt | 2 +- ...genericTypeReferenceWithoutTypeArgument.js | 2 +- ...icTypeReferenceWithoutTypeArgument.js.diff | 73 +- ...icTypeReferenceWithoutTypeArgument.symbols | 18 +- ...ericTypeReferenceWithoutTypeArgument.types | 2 +- ...peReferenceWithoutTypeArgument2.errors.txt | 2 +- ...enericTypeReferenceWithoutTypeArgument2.js | 2 +- ...cTypeReferenceWithoutTypeArgument2.js.diff | 43 +- ...cTypeReferenceWithoutTypeArgument2.symbols | 10 +- ...ricTypeReferenceWithoutTypeArgument2.types | 2 +- ...peReferenceWithoutTypeArgument3.errors.txt | 2 +- ...enericTypeReferenceWithoutTypeArgument3.js | 2 +- ...cTypeReferenceWithoutTypeArgument3.symbols | 8 +- ...ricTypeReferenceWithoutTypeArgument3.types | 2 +- .../getSetAccessorContextualTyping.js.diff | 61 + .../globalThisAmbientModules.js.diff | 8 + .../globalThisBlockscopedProperties.js.diff | 13 + ...obalThisBlockscopedProperties.symbols.diff | 14 + ...globalThisBlockscopedProperties.types.diff | 9 + .../globalThisReadonlyProperties.js.diff | 10 + .../conformance/heterogeneousArrayLiterals.js | 4 +- .../heterogeneousArrayLiterals.js.diff | 144 +- .../heterogeneousArrayLiterals.symbols | 4 +- .../heterogeneousArrayLiterals.types | 4 +- .../heterogeneousArrayLiterals.types.diff | 80 + .../ifDoWhileStatements.errors.txt | 4 +- .../conformance/ifDoWhileStatements.js | 4 +- .../conformance/ifDoWhileStatements.js.diff | 84 +- .../conformance/ifDoWhileStatements.symbols | 8 +- .../conformance/ifDoWhileStatements.types | 4 +- ...ExtendingClassWithPrivates.errors.txt.diff | 18 + ...nterfaceExtendingClassWithPrivates.js.diff | 48 +- ...faceExtendingClassWithPrivates2.errors.txt | 4 +- ...gAnInterfaceExtendingClassWithPrivates2.js | 4 +- ...terfaceExtendingClassWithPrivates2.js.diff | 166 +- ...terfaceExtendingClassWithPrivates2.symbols | 24 +- ...InterfaceExtendingClassWithPrivates2.types | 4 +- ...tendingClassWithProtecteds.errors.txt.diff | 18 + ...erfaceExtendingClassWithProtecteds.js.diff | 107 +- .../conformance/implementsClause.js.diff | 20 + .../conformance/importAliasIdentifiers.js | 6 +- .../importAliasIdentifiers.js.diff | 35 +- .../importAliasIdentifiers.symbols | 32 +- .../conformance/importAliasIdentifiers.types | 6 +- .../conformance/importAttributes7.js.diff | 39 +- .../importCallExpressionAsyncES5CJS.js.diff | 135 +- .../importCallExpressionES5CJS.js.diff | 42 +- ...CallExpressionInExportEqualsCJS.types.diff | 15 - .../importCallExpressionNestedCJS2.js.diff | 37 +- .../importCallExpressionNestedES20152.js.diff | 37 +- .../importCallExpressionNestedES20202.js.diff | 37 +- ...allExpressionNoModuleKindSpecified.js.diff | 87 +- ...pecifierNotStringTypeError.errors.txt.diff | 19 + ...sionSpecifierNotStringTypeError.types.diff | 11 + .../conformance/importClause_default.js.diff | 21 +- .../importClause_namedImports.js.diff | 22 + .../importClause_namespaceImport.js.diff | 38 +- .../importDefaultNamedType.js.diff | 16 + .../importDefaultNamedType2.js.diff | 16 + .../importDefaultNamedType3.js.diff | 16 + .../conformance/importEquals1.js.diff | 16 +- .../conformance/importEquals2.js.diff | 16 +- .../conformance/importEquals3.js.diff | 17 +- .../importEqualsDeclaration.js.diff | 28 +- ...odule=commonjs,target=es5).errors.txt.diff | 29 + ...rtMeta(module=commonjs,target=es5).js.diff | 80 +- ...le=commonjs,target=esnext).errors.txt.diff | 29 + ...(module=es2020,target=es5).errors.txt.diff | 25 + ...portMeta(module=es2020,target=es5).js.diff | 81 +- ...dule=es2020,target=esnext).errors.txt.diff | 25 + ...(module=esnext,target=es5).errors.txt.diff | 25 + ...portMeta(module=esnext,target=es5).js.diff | 81 +- ...dule=esnext,target=esnext).errors.txt.diff | 25 + .../conformance/importSpecifiers1.js.diff | 15 +- .../submodule/conformance/importStatements.js | 10 +- .../conformance/importStatements.js.diff | 17 +- .../conformance/importStatements.symbols | 40 +- .../conformance/importStatements.types | 10 +- .../importStatementsInterfaces.errors.txt | 12 +- .../conformance/importStatementsInterfaces.js | 12 +- .../importStatementsInterfaces.symbols | 38 +- .../importStatementsInterfaces.symbols.diff | 2 +- .../importStatementsInterfaces.types | 12 +- .../conformance/importTypeAmbient.js.diff | 27 +- .../importTypeAmbientMissing.js.diff | 11 + .../importTypeGenericTypes.js.diff | 34 +- .../conformance/importTypeLocal.js.diff | 34 +- .../importTypeLocalMissing.js.diff | 34 +- .../importWithTypeArguments.js.diff | 2 +- .../importsImplicitlyReadonly.js.diff | 6 +- .../inOperatorWithInvalidOperands.js.diff | 16 + .../incrementOperatorWithAnyOtherType.js | 2 +- .../incrementOperatorWithAnyOtherType.js.diff | 15 +- .../incrementOperatorWithAnyOtherType.symbols | 2 +- .../incrementOperatorWithAnyOtherType.types | 2 +- ...thAnyOtherTypeInvalidOperations.errors.txt | 2 +- ...eratorWithAnyOtherTypeInvalidOperations.js | 2 +- ...rWithAnyOtherTypeInvalidOperations.js.diff | 27 +- ...rWithAnyOtherTypeInvalidOperations.symbols | 2 +- ...torWithAnyOtherTypeInvalidOperations.types | 2 +- .../incrementOperatorWithNumberType.js | 2 +- .../incrementOperatorWithNumberType.js.diff | 15 +- .../incrementOperatorWithNumberType.symbols | 2 +- .../incrementOperatorWithNumberType.types | 2 +- ...WithNumberTypeInvalidOperations.errors.txt | 2 +- ...OperatorWithNumberTypeInvalidOperations.js | 2 +- ...torWithNumberTypeInvalidOperations.js.diff | 32 +- ...torWithNumberTypeInvalidOperations.symbols | 2 +- ...ratorWithNumberTypeInvalidOperations.types | 2 +- ...ratorWithUnsupportedBooleanType.errors.txt | 2 +- ...ementOperatorWithUnsupportedBooleanType.js | 2 +- ...OperatorWithUnsupportedBooleanType.js.diff | 32 +- ...OperatorWithUnsupportedBooleanType.symbols | 2 +- ...ntOperatorWithUnsupportedBooleanType.types | 2 +- ...eratorWithUnsupportedStringType.errors.txt | 2 +- ...rementOperatorWithUnsupportedStringType.js | 2 +- ...tOperatorWithUnsupportedStringType.js.diff | 32 +- ...tOperatorWithUnsupportedStringType.symbols | 2 +- ...entOperatorWithUnsupportedStringType.types | 2 +- .../indexSignatureTypeInference.symbols.diff | 22 + .../conformance/indexSignatures1.js.diff | 33 +- .../conformance/indexSignatures1.types.diff | 13 +- .../conformance/indexersInClassType.js.diff | 20 +- .../indexersInClassType.symbols.diff | 19 +- .../inferFromBindingPattern.js.diff | 27 +- .../submodule/conformance/inferTypes1.js.diff | 41 +- .../conformance/inferTypes1.symbols.diff | 81 + .../submodule/conformance/inferTypes2.js.diff | 13 +- .../inferTypesWithExtends1.symbols.diff | 39 + ...ngClassMembersFromAssignments.symbols.diff | 101 + ...alizerReferencingConstructorLocals.js.diff | 43 +- ...erReferencingConstructorParameters.js.diff | 68 +- .../initializersInDeclarations.errors.txt | 2 +- .../initializersInDeclarations.symbols | 2 +- .../initializersInDeclarations.types | 2 +- ...neJsxFactoryDeclarationsLocalTypes.js.diff | 87 +- ...eJsxFactoryLocalTypeGlobalFallback.js.diff | 3 +- ...ypeParameterShadowingOuterOne.symbols.diff | 23 + ...nerTypeParameterShadowingOuterOne2.js.diff | 55 + ...peParameterShadowingOuterOne2.symbols.diff | 23 + ...tanceMemberAssignsToClassPrototype.js.diff | 29 + .../instanceMemberInitialization.js.diff | 24 +- ...anceMemberWithComputedPropertyName.js.diff | 20 +- ...ropertiesInheritedIntoClassType.errors.txt | 4 +- ...nstancePropertiesInheritedIntoClassType.js | 4 +- ...cePropertiesInheritedIntoClassType.js.diff | 107 +- ...cePropertiesInheritedIntoClassType.symbols | 16 +- ...ancePropertiesInheritedIntoClassType.types | 4 +- .../instancePropertyInClassType.errors.txt | 4 +- .../instancePropertyInClassType.js | 4 +- .../instancePropertyInClassType.js.diff | 66 +- .../instancePropertyInClassType.symbols | 16 +- .../instancePropertyInClassType.types | 4 +- ...tanceofOperatorWithInvalidOperands.js.diff | 18 + .../instanceofOperatorWithLHSIsObject.js.diff | 16 + ...anceofOperatorWithLHSIsObject.symbols.diff | 11 + ...atorWithRHSHasSymbolHasInstance.types.diff | 358 +- ...torWithRHSIsSubtypeOfFunction.symbols.diff | 19 + ...lassWithWrongNumberOfTypeArguments.js.diff | 21 +- ...eGenericClassWithZeroTypeArguments.js.diff | 21 +- ...ateNonGenericTypeWithTypeArguments.js.diff | 15 +- .../conformance/instantiatedModule.js | 6 +- .../conformance/instantiatedModule.js.diff | 29 +- .../conformance/instantiatedModule.symbols | 74 +- .../conformance/instantiatedModule.types | 6 +- .../instantiationExpressionErrors.js.diff | 140 +- .../instantiationExpressions.js.diff | 75 +- .../instantiationExpressions.symbols.diff | 46 + .../instantiationExpressions.types.diff | 45 +- ...rfaceDoesNotDependOnBaseTypes.symbols.diff | 9 + ...terfaceDoesNotDependOnBaseTypes.types.diff | 10 + .../interfaceExtendingClass.js.diff | 28 +- .../interfaceExtendingClass2.js.diff | 27 +- ...nterfaceExtendingClassWithPrivates.js.diff | 15 +- ...terfaceExtendingClassWithPrivates2.js.diff | 33 +- ...erfaceExtendingClassWithProtecteds.js.diff | 15 +- ...rfaceExtendingClassWithProtecteds2.js.diff | 33 +- .../interfaceExtendingOptionalChain.js.diff | 15 + ...interfaceExtendsObjectIntersection.js.diff | 139 +- ...aceExtendsObjectIntersectionErrors.js.diff | 73 +- ...hatIndirectlyInheritsFromItself.errors.txt | 2 +- ...terfaceThatIndirectlyInheritsFromItself.js | 2 +- ...ceThatIndirectlyInheritsFromItself.symbols | 6 +- ...faceThatIndirectlyInheritsFromItself.types | 2 +- .../interfaceWithMultipleBaseTypes.errors.txt | 2 +- .../interfaceWithMultipleBaseTypes.js | 2 +- .../interfaceWithMultipleBaseTypes.symbols | 14 +- .../interfaceWithMultipleBaseTypes.types | 2 +- .../interfaceWithPropertyOfEveryType.js | 2 +- .../interfaceWithPropertyOfEveryType.js.diff | 26 +- .../interfaceWithPropertyOfEveryType.symbols | 2 +- .../interfaceWithPropertyOfEveryType.types | 2 +- ...ithPropertyThatIsPrivateInBaseType.js.diff | 21 +- ...thPropertyThatIsPrivateInBaseType2.js.diff | 24 + .../intersectionAsWeakTypeSource.js.diff | 14 + .../conformance/intersectionNarrowing.js.diff | 9 +- .../intersectionNarrowing.types.diff | 27 +- .../intersectionOfUnionOfUnitTypes.js.diff | 39 +- .../conformance/intersectionReduction.js.diff | 44 + .../intersectionReductionStrict.js.diff | 24 +- .../conformance/intersectionThisTypes.js.diff | 11 + .../intersectionTypeInference3.types.diff | 10 +- .../intersectionTypeMembers.js.diff | 20 +- .../intersectionTypeReadonly.js.diff | 21 + .../intersectionWithIndexSignatures.js.diff | 9 +- .../intersectionWithUnionConstraint.js.diff | 30 +- ...tersectionWithUnionConstraint.symbols.diff | 10 + .../intlDateTimeFormatRangeES2021.js.diff | 8 + .../intlNumberFormatES2020.types.diff | 38 + .../intlNumberFormatES2023.types.diff | 13 + .../intlNumberFormatES5UseGrouping.js.diff | 4 +- .../intraExpressionInferences.js.diff | 274 +- .../intraExpressionInferences.symbols.diff | 38 + .../intraExpressionInferences.types.diff | 58 +- .../conformance/intrinsicKeyword.js.diff | 18 +- .../conformance/intrinsicTypes.js.diff | 11 +- .../conformance/intrinsicTypes.types.diff | 47 +- .../invalidAssignmentsToVoid.errors.txt | 2 +- .../conformance/invalidAssignmentsToVoid.js | 2 +- .../invalidAssignmentsToVoid.js.diff | 15 +- .../invalidAssignmentsToVoid.symbols | 4 +- .../invalidAssignmentsToVoid.types | 2 +- ...tegerLiteralAndOctalIntegerLiteral.js.diff | 20 + .../invalidBooleanAssignments.errors.txt | 2 +- .../conformance/invalidBooleanAssignments.js | 2 +- .../invalidBooleanAssignments.js.diff | 15 +- .../invalidBooleanAssignments.symbols | 4 +- .../invalidBooleanAssignments.types | 2 +- .../invalidDoWhileBreakStatements.js.diff | 11 + .../invalidDoWhileContinueStatements.js.diff | 11 + .../invalidForBreakStatements.js.diff | 11 + .../invalidForContinueStatements.js.diff | 11 + .../invalidForInBreakStatements.js.diff | 11 + .../invalidForInContinueStatements.js.diff | 11 + .../invalidImportAliasIdentifiers.js.diff | 11 +- .../invalidInstantiatedModule.errors.txt | 6 +- .../conformance/invalidInstantiatedModule.js | 4 +- .../invalidInstantiatedModule.js.diff | 15 +- .../invalidInstantiatedModule.symbols | 10 +- .../invalidInstantiatedModule.types | 4 +- ...ModuleWithStatementsOfEveryKind.errors.txt | 30 +- .../invalidModuleWithStatementsOfEveryKind.js | 30 +- ...lidModuleWithStatementsOfEveryKind.js.diff | 201 +- ...lidModuleWithStatementsOfEveryKind.symbols | 72 +- ...validModuleWithStatementsOfEveryKind.types | 30 +- .../invalidModuleWithVarStatements.errors.txt | 12 +- .../invalidModuleWithVarStatements.js | 12 +- .../invalidModuleWithVarStatements.js.diff | 16 + .../invalidModuleWithVarStatements.symbols | 18 +- .../invalidModuleWithVarStatements.types | 12 +- ...lidMultipleVariableDeclarations.errors.txt | 2 +- .../invalidMultipleVariableDeclarations.js | 2 +- ...nvalidMultipleVariableDeclarations.js.diff | 68 +- ...nvalidMultipleVariableDeclarations.symbols | 8 +- ...dMultipleVariableDeclarations.symbols.diff | 11 + .../invalidMultipleVariableDeclarations.types | 2 +- .../invalidNestedModules.errors.txt | 16 +- .../conformance/invalidNestedModules.js | 12 +- .../conformance/invalidNestedModules.js.diff | 43 +- .../conformance/invalidNestedModules.symbols | 28 +- .../conformance/invalidNestedModules.types | 12 +- .../conformance/invalidNewTarget.es5.js.diff | 108 +- .../invalidNumberAssignments.errors.txt | 2 +- .../conformance/invalidNumberAssignments.js | 2 +- .../invalidNumberAssignments.js.diff | 15 +- .../invalidNumberAssignments.symbols | 4 +- .../invalidNumberAssignments.types | 2 +- .../invalidReturnStatements.errors.txt.diff | 20 + .../invalidReturnStatements.js.diff | 47 +- .../invalidReturnStatements.symbols.diff | 11 + .../invalidStringAssignments.errors.txt | 2 +- .../conformance/invalidStringAssignments.js | 2 +- .../invalidStringAssignments.js.diff | 15 +- .../invalidStringAssignments.symbols | 4 +- .../invalidStringAssignments.types | 2 +- ...dSyntaxNamespaceImportWithCommonjs.js.diff | 13 +- ...emplateEscapeSequences(target=es5).js.diff | 53 +- .../conformance/invalidTypeOfTarget.js.diff | 22 + .../invalidUndefinedAssignments.errors.txt | 2 +- .../invalidUndefinedAssignments.js | 2 +- .../invalidUndefinedAssignments.js.diff | 15 +- .../invalidUndefinedAssignments.symbols | 4 +- .../invalidUndefinedAssignments.types | 2 +- .../conformance/invalidUndefinedValues.js | 2 +- .../invalidUndefinedValues.js.diff | 24 +- .../invalidUndefinedValues.symbols | 4 +- .../conformance/invalidUndefinedValues.types | 2 +- .../invalidVoidAssignments.errors.txt | 2 +- .../conformance/invalidVoidAssignments.js | 2 +- .../invalidVoidAssignments.js.diff | 21 +- .../invalidVoidAssignments.symbols | 4 +- .../conformance/invalidVoidAssignments.types | 2 +- .../conformance/invalidVoidValues.errors.txt | 2 +- .../conformance/invalidVoidValues.js | 2 +- .../conformance/invalidVoidValues.js.diff | 21 +- .../conformance/invalidVoidValues.symbols | 4 +- .../conformance/invalidVoidValues.types | 2 +- .../invalidWhileBreakStatements.js.diff | 11 + .../invalidWhileContinueStatements.js.diff | 11 + .../isomorphicMappedTypeInference.js.diff | 166 + .../isomorphicMappedTypeInference.types.diff | 81 +- .../jsDeclarationsClassAccessor.js.diff | 8 +- ...DeclarationsClassExtendsVisibility.js.diff | 47 +- ...assImplementsGenericsSerialization.js.diff | 24 +- ...plementsGenericsSerialization.symbols.diff | 19 + ...jsDeclarationsClassLeadingOptional.js.diff | 19 +- .../jsDeclarationsClassLikeHeuristic.js.diff | 9 +- .../jsDeclarationsClassStatic.js.diff | 30 +- ...tionsClassStaticMethodAugmentation.js.diff | 16 +- .../conformance/jsDeclarationsClasses.js.diff | 356 +- .../jsDeclarationsClassesErr.js.diff | 183 +- .../jsDeclarationsComputedNames.js.diff | 71 +- .../jsDeclarationsCrossfileMerge.js.diff | 3 +- .../conformance/jsDeclarationsDefault.js.diff | 53 +- .../jsDeclarationsDefaultsErr.js.diff | 35 +- .../jsDeclarationsDocCommentsOnConsts.js.diff | 17 +- .../conformance/jsDeclarationsEnumTag.js.diff | 15 +- ...tionsExportAssignedClassExpression.js.diff | 17 +- ...rtAssignedClassExpressionAnonymous.js.diff | 17 +- ...nedClassExpressionAnonymousWithSub.js.diff | 26 +- ...rtAssignedClassExpressionShadowing.js.diff | 43 +- ...ationsExportAssignedClassInstance1.js.diff | 13 +- ...ationsExportAssignedClassInstance2.js.diff | 10 +- ...ationsExportAssignedClassInstance3.js.diff | 10 +- ...clarationsExportAssignedVisibility.js.diff | 26 +- ...tAssignmentExpressionPlusSecondary.js.diff | 3 +- ...onsExportAssignmentWithKeywordName.js.diff | 8 +- ...onsExportDoubleAssignmentInClosure.js.diff | 3 +- .../jsDeclarationsExportForms.js.diff | 31 +- .../jsDeclarationsExportFormsErr.js.diff | 14 +- ...eclarationsExportSpecifierNonlocal.js.diff | 22 +- ...jsDeclarationsExportSubAssignments.js.diff | 12 +- ...jsDeclarationsExportedClassAliases.js.diff | 43 +- ...FunctionClassesCjsExportAssignment.js.diff | 12 +- .../jsDeclarationsFunctionJSDoc.js.diff | 30 +- ...clarationsFunctionLikeClasses.symbols.diff | 7 +- ...jsDeclarationsFunctionLikeClasses2.js.diff | 29 +- ...larationsFunctionLikeClasses2.symbols.diff | 9 +- .../jsDeclarationsFunctions.js.diff | 16 +- .../jsDeclarationsFunctionsCjs.js.diff | 25 +- .../conformance/jsDeclarationsJson.js.diff | 8 +- ...DeclarationsModuleReferenceHasEmit.js.diff | 16 +- ...arationsNonIdentifierInferredNames.js.diff | 6 +- .../jsDeclarationsPackageJson.js.diff | 6 +- .../jsDeclarationsReactComponents.js.diff | 25 +- .../jsDeclarationsReexportAliases.js.diff | 16 +- .../jsDeclarationsReexportedCjsAlias.js.diff | 35 +- ...estArgsWithThisTypeInJSDocFunction.js.diff | 18 +- ...sWithExplicitNoArgumentConstructor.js.diff | 47 +- .../jsDeclarationsThisTypes.js.diff | 49 +- .../jsDeclarationsTypeAliases.js.diff | 29 +- ...onsTypeReassignmentFromDeclaration.js.diff | 6 +- ...nsTypeReassignmentFromDeclaration2.js.diff | 6 +- .../jsDeclarationsTypeReferences.js.diff | 13 +- .../jsDeclarationsTypeReferences2.js.diff | 16 +- .../jsDeclarationsTypeReferences3.js.diff | 3 +- .../jsDeclarationsTypeReferences4.js.diff | 13 +- ...sDeclarationsTypedefAndImportTypes.js.diff | 31 +- ...TypedefPropertyAndExportAssignment.js.diff | 44 +- .../jsdocDisallowedInTypescript.js.diff | 2 +- .../jsdocDisallowedInTypescript.symbols.diff | 37 +- .../conformance/jsdocLinkTag6.js.diff | 44 + ...ParseDotDotDotInJSDocFunction.symbols.diff | 9 + .../jsdocParseErrorsInTypescript.js.diff | 10 + .../jsdocTemplateTagDefault.js.diff | 16 + .../jsdocTemplateTagNameResolution.js.diff | 8 +- .../conformance/jsdocTypeTagCast.js.diff | 56 +- .../conformance/jsxAndTypeAssertion.js.diff | 15 + .../jsxCheckJsxNoTypeArgumentsAllowed.js.diff | 2 +- ...jsTransformChildren(jsx=react-jsx).js.diff | 2 +- ...ransformChildren(jsx=react-jsxdev).js.diff | 5 +- ...ansformCustomImport(jsx=react-jsx).js.diff | 2 +- ...formCustomImport(jsx=react-jsxdev).js.diff | 5 +- ...mCustomImportPragma(jsx=react-jsx).js.diff | 4 +- ...stomImportPragma(jsx=react-jsxdev).js.diff | 10 +- ...CjsTransformKeyProp(jsx=react-jsx).js.diff | 7 +- ...TransformKeyProp(jsx=react-jsxdev).js.diff | 10 +- ...KeyPropCustomImport(jsx=react-jsx).js.diff | 7 +- ...PropCustomImport(jsx=react-jsxdev).js.diff | 10 +- ...pCustomImportPragma(jsx=react-jsx).js.diff | 14 +- ...stomImportPragma(jsx=react-jsxdev).js.diff | 20 +- ...tedSelfClosingChild(jsx=react-jsx).js.diff | 2 +- ...SelfClosingChild(jsx=react-jsxdev).js.diff | 11 +- ...ormSubstitutesNames(jsx=react-jsx).js.diff | 2 +- ...SubstitutesNames(jsx=react-jsxdev).js.diff | 5 +- ...itutesNamesFragment(jsx=react-jsx).js.diff | 2 +- ...tesNamesFragment(jsx=react-jsxdev).js.diff | 5 +- .../conformance/jsxParsingError1.errors.txt | 2 +- .../submodule/conformance/jsxParsingError1.js | 2 +- .../conformance/jsxParsingError1.js.diff | 12 +- .../conformance/jsxParsingError1.symbols | 4 +- .../conformance/jsxParsingError1.types | 2 +- .../conformance/jsxParsingError2.errors.txt | 2 +- .../submodule/conformance/jsxParsingError2.js | 2 +- .../conformance/jsxParsingError2.js.diff | 25 + .../conformance/jsxParsingError2.symbols | 4 +- .../conformance/jsxParsingError2.types | 2 +- .../conformance/jsxParsingError3.errors.txt | 2 +- .../submodule/conformance/jsxParsingError3.js | 2 +- .../conformance/jsxParsingError3.js.diff | 23 + .../conformance/jsxParsingError3.symbols | 4 +- .../conformance/jsxParsingError3.types | 2 +- .../jsxParsingError4(strict=false).js.diff | 10 + .../jsxParsingError4(strict=true).js.diff | 6 +- ...rorImmediateSpreadInAttributeValue.js.diff | 11 + ...jsxSpreadOverwritesAttributeStrict.js.diff | 21 +- .../conformance/keyofAndForIn.js.diff | 50 + .../conformance/keyofAndIndexedAccess.js.diff | 598 +- .../keyofAndIndexedAccess.symbols.diff | 11 + .../keyofAndIndexedAccess.types.diff | 101 +- .../keyofAndIndexedAccess2.types.diff | 29 +- .../keyofAndIndexedAccessErrors.js.diff | 74 +- .../keyofAndIndexedAccessErrors.types.diff | 25 +- .../keyofInferenceIntersectsResults.js.diff | 12 + ...ofInferenceLowerPriorityThanReturn.js.diff | 11 + .../conformance/keyofIntersection.types.diff | 15 + ...ementDeclarationListInLoopNoCrash1.js.diff | 16 +- ...ementDeclarationListInLoopNoCrash2.js.diff | 16 +- ...ementDeclarationListInLoopNoCrash3.js.diff | 60 +- ...ementDeclarationListInLoopNoCrash4.js.diff | 58 + ...DeclarationNoCrash1(module=esnext).js.diff | 10 + .../labeledStatementWithLabel.errors.txt | 4 +- .../conformance/labeledStatementWithLabel.js | 2 +- .../labeledStatementWithLabel.js.diff | 56 +- .../labeledStatementWithLabel.symbols | 2 +- .../labeledStatementWithLabel.types | 2 +- ...abeledStatementWithLabel_es2015.errors.txt | 4 +- .../labeledStatementWithLabel_es2015.js | 2 +- .../labeledStatementWithLabel_es2015.symbols | 2 +- .../labeledStatementWithLabel_es2015.types | 2 +- ...abeledStatementWithLabel_strict.errors.txt | 4 +- .../labeledStatementWithLabel_strict.js | 2 +- .../labeledStatementWithLabel_strict.symbols | 2 +- .../labeledStatementWithLabel_strict.types | 2 +- .../lateBoundClassMemberAssignmentJS.js.diff | 2 +- .../lateBoundClassMemberAssignmentJS2.js.diff | 2 +- .../lateBoundClassMemberAssignmentJS3.js.diff | 2 +- ...cifierGenerationConditions.errors.txt.diff | 39 - ...portsSpecifierGenerationConditions.js.diff | 41 +- ...tsSpecifierGenerationConditions.types.diff | 6 +- .../conformance/literalTypeWidening.js.diff | 166 +- .../literalTypeWidening.symbols.diff | 14 + .../literalTypeWidening.types.diff | 143 +- .../conformance/literalTypes1.js.diff | 17 + .../conformance/literalTypes1.types.diff | 10 +- .../conformance/literalTypes2.js.diff | 223 +- .../conformance/literalTypes2.types.diff | 172 +- .../conformance/literalTypes3.types.diff | 74 +- .../literalTypesAndDestructuring.js.diff | 21 +- .../literalTypesAndDestructuring.types.diff | 20 + .../literalTypesAndTypeAssertions.js.diff | 24 + .../literalTypesAndTypeAssertions.types.diff | 20 + ...teralTypesWidenInParameterPosition.js.diff | 16 +- .../conformance/literals.symbols.diff | 11 + .../submodule/conformance/localTypes1.js.diff | 307 +- .../submodule/conformance/localTypes2.js.diff | 66 +- .../submodule/conformance/localTypes3.js.diff | 66 +- .../submodule/conformance/localTypes4.js.diff | 17 + .../submodule/conformance/localTypes5.js.diff | 30 + .../conformance/localTypes5.symbols.diff | 11 + .../logicalAndOperatorStrictMode.js.diff | 150 + ...icalNotOperatorWithAnyOtherType.errors.txt | 2 +- .../logicalNotOperatorWithAnyOtherType.js | 2 +- ...logicalNotOperatorWithAnyOtherType.js.diff | 27 +- ...logicalNotOperatorWithAnyOtherType.symbols | 2 +- .../logicalNotOperatorWithAnyOtherType.types | 2 +- ...gicalNotOperatorWithBooleanType.errors.txt | 2 +- .../logicalNotOperatorWithBooleanType.js | 2 +- .../logicalNotOperatorWithBooleanType.js.diff | 19 +- .../logicalNotOperatorWithBooleanType.symbols | 2 +- .../logicalNotOperatorWithBooleanType.types | 2 +- ...ogicalNotOperatorWithNumberType.errors.txt | 2 +- .../logicalNotOperatorWithNumberType.js | 2 +- .../logicalNotOperatorWithNumberType.js.diff | 28 +- .../logicalNotOperatorWithNumberType.symbols | 2 +- .../logicalNotOperatorWithNumberType.types | 2 +- ...ogicalNotOperatorWithStringType.errors.txt | 2 +- .../logicalNotOperatorWithStringType.js | 2 +- .../logicalNotOperatorWithStringType.js.diff | 28 +- .../logicalNotOperatorWithStringType.symbols | 2 +- .../logicalNotOperatorWithStringType.types | 2 +- ...OrExpressionIsNotContextuallyTyped.js.diff | 8 + .../logicalOrOperatorWithEveryType.types.diff | 69 + .../looseThisTypeInFunctions.js.diff | 63 +- .../conformance/malformedTags.symbols.diff | 9 + .../mappedTypeAsClauseRelationships.js.diff | 21 + ...ppedTypeAsClauseRelationships.symbols.diff | 38 + .../conformance/mappedTypeAsClauses.js.diff | 16 +- .../mappedTypeAsClauses.symbols.diff | 11 + .../mappedTypeAsClauses.types.diff | 18 +- .../conformance/mappedTypeConstraints.js.diff | 12 +- .../mappedTypeErrors.errors.txt.diff | 22 +- .../conformance/mappedTypeErrors.js.diff | 105 +- .../conformance/mappedTypeErrors.symbols.diff | 17 + .../mappedTypeInferenceErrors.js.diff | 9 +- ...appedTypeOverlappingStringEnumKeys.js.diff | 11 + .../conformance/mappedTypeProperties.js.diff | 25 +- .../mappedTypeProperties.types.diff | 46 +- .../mappedTypeRelationships.js.diff | 25 + .../mappedTypeWithAny.errors.txt.diff | 24 + .../conformance/mappedTypeWithAny.js.diff | 24 +- .../conformance/mappedTypes1.js.diff | 17 + .../conformance/mappedTypes1.symbols.diff | 19 + .../conformance/mappedTypes2.js.diff | 31 + .../conformance/mappedTypes2.symbols.diff | 20 + .../conformance/mappedTypes2.types.diff | 24 + .../conformance/mappedTypes3.js.diff | 37 +- .../conformance/mappedTypes4.js.diff | 13 + .../conformance/mappedTypes4.types.diff | 20 + .../conformance/mappedTypes5.js.diff | 55 +- .../conformance/mappedTypesAndObjects.js.diff | 29 +- .../mappedTypesArraysTuples.js.diff | 33 +- .../mappedTypesArraysTuples.symbols.diff | 83 + ...ionOverloadMixingStaticAndInstance.js.diff | 34 + ...emberFunctionsWithPrivateOverloads.js.diff | 39 + ...memberFunctionsWithPublicOverloads.js.diff | 36 + ...unctionsWithPublicPrivateOverloads.js.diff | 47 + .../mergeClassInterfaceAndModule.js | 8 +- .../mergeClassInterfaceAndModule.symbols | 26 +- .../mergeClassInterfaceAndModule.types | 8 +- .../conformance/mergeThreeInterfaces.js | 2 +- .../conformance/mergeThreeInterfaces.symbols | 10 +- .../conformance/mergeThreeInterfaces.types | 2 +- .../conformance/mergeThreeInterfaces2.js | 16 +- .../conformance/mergeThreeInterfaces2.js.diff | 29 + .../conformance/mergeThreeInterfaces2.symbols | 44 +- .../conformance/mergeThreeInterfaces2.types | 16 +- .../conformance/mergeTwoInterfaces.js | 2 +- .../conformance/mergeTwoInterfaces.symbols | 8 +- .../conformance/mergeTwoInterfaces.types | 2 +- .../conformance/mergeTwoInterfaces2.js | 12 +- .../conformance/mergeTwoInterfaces2.js.diff | 20 + .../conformance/mergeTwoInterfaces2.symbols | 32 +- .../conformance/mergeTwoInterfaces2.types | 12 +- .../conformance/mergedClassInterface.js.diff | 23 + .../mergedInheritedClassInterface.js.diff | 70 +- ...nheritedMembersSatisfyAbstractBase.js.diff | 48 +- ...cesWithConflictingPropertyNames.errors.txt | 10 +- ...dInterfacesWithConflictingPropertyNames.js | 10 +- ...rfacesWithConflictingPropertyNames.symbols | 22 +- ...terfacesWithConflictingPropertyNames.types | 10 +- ...InterfacesWithConflictingPropertyNames2.js | 10 +- ...facesWithConflictingPropertyNames2.symbols | 22 +- ...erfacesWithConflictingPropertyNames2.types | 10 +- ...gedInterfacesWithInheritedPrivates.js.diff | 30 +- ...edInterfacesWithInheritedPrivates2.js.diff | 61 +- ...nterfacesWithInheritedPrivates3.errors.txt | 2 +- .../mergedInterfacesWithInheritedPrivates3.js | 2 +- ...edInterfacesWithInheritedPrivates3.js.diff | 65 +- ...edInterfacesWithInheritedPrivates3.symbols | 6 +- ...rgedInterfacesWithInheritedPrivates3.types | 2 +- .../mergedInterfacesWithMultipleBases.js | 2 +- .../mergedInterfacesWithMultipleBases.js.diff | 59 +- .../mergedInterfacesWithMultipleBases.symbols | 6 +- .../mergedInterfacesWithMultipleBases.types | 2 +- .../mergedInterfacesWithMultipleBases2.js | 2 +- ...mergedInterfacesWithMultipleBases2.js.diff | 95 +- ...mergedInterfacesWithMultipleBases2.symbols | 6 +- .../mergedInterfacesWithMultipleBases2.types | 2 +- ...mergedInterfacesWithMultipleBases3.js.diff | 48 +- ...dInterfacesWithMultipleBases3.symbols.diff | 11 + ...mergedInterfacesWithMultipleBases4.js.diff | 48 +- .../conformance/mergedWithLocalValue.js.diff | 9 + .../missingAndExcessProperties.js.diff | 52 + .../conformance/missingDecoratorType.js.diff | 8 +- ...tractClassesReturnTypeInference.types.diff | 6 +- .../conformance/mixinAccessModifiers.js.diff | 249 +- .../conformance/mixinClassesAnnotated.js.diff | 128 +- .../mixinClassesAnnotated.types.diff | 2 +- .../conformance/mixinClassesAnonymous.js.diff | 144 +- .../mixinClassesAnonymous.symbols.diff | 11 + .../mixinClassesAnonymous.types.diff | 32 +- .../conformance/mixinClassesMembers.js.diff | 126 + ...OnClassDeclarationMemberInFunction.js.diff | 20 +- ...rOnClassExpressionMemberInFunction.js.diff | 9 +- .../moduleExportDuplicateAlias.js.diff | 5 +- .../moduleExportDuplicateAlias2.js.diff | 5 +- .../moduleExportDuplicateAlias3.js.diff | 7 +- .../moduleExportsAliasLoop1.symbols.diff | 5 +- .../conformance/moduleScoping.js.diff | 11 +- .../moduleWithStatementsOfEveryKind.js | 8 +- .../moduleWithStatementsOfEveryKind.js.diff | 156 +- .../moduleWithStatementsOfEveryKind.symbols | 20 +- .../moduleWithStatementsOfEveryKind.types | 8 +- .../submodule/conformance/multiline.js.diff | 2 +- .../conformance/multiline.symbols.diff | 32 - .../multipleDefaultExports01.js.diff | 16 +- .../multipleDefaultExports03.js.diff | 22 + .../multipleDefaultExports05.js.diff | 30 + .../multipleExportDefault3.js.diff | 14 + .../multipleExportDefault4.js.diff | 16 + .../multipleExportDefault5.js.diff | 14 + .../multipleNumericIndexers.js.diff | 22 + .../multipleStringIndexers.js.diff | 22 + .../submodule/conformance/nameCollision.js | 16 +- .../conformance/nameCollision.js.diff | 32 +- .../conformance/nameCollision.symbols | 24 +- .../submodule/conformance/nameCollision.types | 16 +- .../conformance/nameWithRelativePaths.js | 2 +- .../conformance/nameWithRelativePaths.symbols | 2 +- .../conformance/nameWithRelativePaths.types | 2 +- .../conformance/namedTupleMembers.js.diff | 22 +- .../namespaceAssignmentToRequireAlias.js.diff | 10 + .../namespaceImportTypeQuery.js.diff | 34 + .../namespaceImportTypeQuery2.js.diff | 26 + .../namespaceImportTypeQuery3.js.diff | 26 + .../namespaceImportTypeQuery4.js.diff | 23 + .../conformance/namespaceMemberAccess.js.diff | 15 +- .../narrowFromAnyWithInstanceof.symbols.diff | 20 + ...arrowFromAnyWithTypePredicate.symbols.diff | 20 + .../narrowingConstrainedTypeVariable.js.diff | 60 +- ...rrowingGenericTypeFromInstanceof01.js.diff | 24 +- .../negateOperatorWithAnyOtherType.errors.txt | 2 +- .../negateOperatorWithAnyOtherType.js | 2 +- .../negateOperatorWithAnyOtherType.js.diff | 27 +- .../negateOperatorWithAnyOtherType.symbols | 2 +- .../negateOperatorWithAnyOtherType.types | 2 +- .../negateOperatorWithBooleanType.errors.txt | 2 +- .../negateOperatorWithBooleanType.js | 2 +- .../negateOperatorWithBooleanType.js.diff | 19 +- .../negateOperatorWithBooleanType.symbols | 2 +- .../negateOperatorWithBooleanType.types | 2 +- .../negateOperatorWithNumberType.errors.txt | 2 +- .../negateOperatorWithNumberType.js | 2 +- .../negateOperatorWithNumberType.js.diff | 28 +- .../negateOperatorWithNumberType.symbols | 2 +- .../negateOperatorWithNumberType.types | 2 +- .../negateOperatorWithStringType.errors.txt | 2 +- .../negateOperatorWithStringType.js | 2 +- .../negateOperatorWithStringType.js.diff | 28 +- .../negateOperatorWithStringType.symbols | 2 +- .../negateOperatorWithStringType.types | 2 +- .../nestedClassDeclaration.js.diff | 32 +- .../nestedDestructuringOfRequire.js.diff | 9 +- .../submodule/conformance/nestedModules.js | 12 +- .../conformance/nestedModules.js.diff | 19 + .../conformance/nestedModules.symbols | 44 +- .../submodule/conformance/nestedModules.types | 12 +- .../conformance/nestedNamespace.js.diff | 16 + ...(moduleresolution=bundler).errors.txt.diff | 32 - .../neverReturningFunctions1.js.diff | 147 + .../neverReturningFunctions1.types.diff | 22 +- .../submodule/conformance/neverType.js.diff | 70 + .../conformance/neverType.types.diff | 42 +- .../neverTypeErrors1.errors.txt.diff | 10 + .../conformance/neverTypeErrors1.js.diff | 27 + .../neverTypeErrors2.errors.txt.diff | 10 + .../conformance/neverTypeErrors2.js.diff | 27 + .../newOperatorConformance.js.diff | 32 + .../conformance/newOperatorErrorCases.js.diff | 32 + .../conformance/newTarget.es5.js.diff | 87 +- .../conformance/newWithSpread.js.diff | 126 + .../conformance/newWithSpreadES5.js.diff | 125 + .../submodule/conformance/noInfer.js.diff | 70 +- .../noUncheckedIndexedAccess.js.diff | 91 +- .../noUncheckedIndexedAccess.types.diff | 11 +- ...ncheckedIndexedAccessDestructuring.js.diff | 63 +- ...eckedIndexedAccessDestructuring.types.diff | 22 +- .../node10IsNode_node.errors.txt.diff | 30 + .../node10IsNode_node10.types.diff | 12 - ...tWithPackageExports(module=node18).js.diff | 45 +- ...thPackageExports(module=node18).types.diff | 70 + ...tWithPackageExports(module=node20).js.diff | 45 +- ...thPackageExports(module=node20).types.diff | 70 + ...ithPackageExports(module=nodenext).js.diff | 45 +- ...PackageExports(module=nodenext).types.diff | 70 + ...deModulesNoDirectoryModule.errors.txt.diff | 15 + ...esResolveJsonModule(module=node16).js.diff | 21 + ...esolveJsonModule(module=node16).types.diff | 23 + ...esResolveJsonModule(module=node18).js.diff | 21 + ...esolveJsonModule(module=node18).types.diff | 25 +- ...esResolveJsonModule(module=node20).js.diff | 21 + ...esolveJsonModule(module=node20).types.diff | 25 +- ...ResolveJsonModule(module=nodenext).js.diff | 21 + ...olveJsonModule(module=nodenext).types.diff | 25 +- ...ronousCallErrors(module=node16).types.diff | 28 + ...ronousCallErrors(module=node18).types.diff | 28 + ...ronousCallErrors(module=node20).types.diff | 28 + ...nousCallErrors(module=nodenext).types.diff | 28 + ...ericTypeReferenceWithTypeArguments.js.diff | 32 + .../conformance/nonInstantiatedModule.js | 10 +- .../conformance/nonInstantiatedModule.js.diff | 21 +- .../conformance/nonInstantiatedModule.symbols | 32 +- .../conformance/nonInstantiatedModule.types | 10 +- .../nonIterableRestElement1.js.diff | 8 + .../nonIterableRestElement3.js.diff | 8 + .../nonPrimitiveAccessProperty.js.diff | 9 + .../nonPrimitiveAndEmptyObject.js.diff | 6 +- .../nonPrimitiveAndTypeVariables.js.diff | 13 +- .../nonPrimitiveAssignError.symbols.diff | 11 + .../nonPrimitiveInGeneric.symbols.diff | 34 + .../conformance/nonPrimitiveNarrow.js.diff | 15 +- .../conformance/nonPrimitiveNarrow.types.diff | 19 + .../nonPrimitiveRhsSideOfInExpression.js.diff | 15 + .../nonPrimitiveStrictNull.symbols.diff | 34 + .../nonPrimitiveStrictNull.types.diff | 37 + .../nonPrimitiveUnionIntersection.js.diff | 13 + .../nullAssignableToEveryType.js.diff | 15 +- .../nullAssignableToEveryType.symbols.diff | 37 + .../nullIsSubtypeOfEverythingButUndefined.js | 4 +- ...lIsSubtypeOfEverythingButUndefined.js.diff | 48 +- ...lIsSubtypeOfEverythingButUndefined.symbols | 4 +- ...btypeOfEverythingButUndefined.symbols.diff | 16 + ...ullIsSubtypeOfEverythingButUndefined.types | 4 +- .../nullishCoalescingOperator1.js.diff | 40 +- .../nullishCoalescingOperator10.js.diff | 3 +- .../nullishCoalescingOperator11.js.diff | 3 +- .../nullishCoalescingOperator2.js.diff | 21 +- .../nullishCoalescingOperator2.types.diff | 36 + .../nullishCoalescingOperator3.js.diff | 3 +- .../nullishCoalescingOperator3.types.diff | 19 + .../nullishCoalescingOperator4.js.diff | 6 +- .../nullishCoalescingOperator6.js.diff | 5 +- .../nullishCoalescingOperator7.js.diff | 13 +- .../nullishCoalescingOperator8.js.diff | 9 +- .../nullishCoalescingOperator9.js.diff | 6 +- ...eratorInAsyncGenerator(target=es5).js.diff | 22 +- ...arameterBindingPattern(target=es5).js.diff | 11 +- ...InParameterInitializer(target=es5).js.diff | 11 +- ...ullishCoalescingOperator_es2020.types.diff | 36 + ...llishCoalescingOperator_not_strict.js.diff | 24 + ...shCoalescingOperator_not_strict.types.diff | 36 + ...exerConstrainsPropertyDeclarations.js.diff | 68 +- ...xerConstrainsPropertyDeclarations2.js.diff | 54 +- .../numericIndexingResults.js.diff | 15 +- .../numericLiteralTypes1.types.diff | 61 +- .../numericLiteralTypes2.types.diff | 61 +- .../numericNamedPropertyDuplicates.js.diff | 15 +- .../numericStringLiteralTypes.js.diff | 18 +- ...ericStringNamedPropertyEquivalence.js.diff | 15 +- ...BindingPatternKeywordIdentifiers01.js.diff | 8 + ...BindingPatternKeywordIdentifiers02.js.diff | 8 + ...BindingPatternKeywordIdentifiers03.js.diff | 8 + ...BindingPatternKeywordIdentifiers04.js.diff | 8 + ...BindingPatternKeywordIdentifiers05.js.diff | 8 + ...BindingPatternKeywordIdentifiers06.js.diff | 8 + .../conformance/objectLiteralErrors.js.diff | 19 +- .../objectLiteralErrors.types.diff | 13 +- .../objectLiteralGettersAndSetters.js.diff | 34 + ...bjectLiteralGettersAndSetters.symbols.diff | 25 + ...objectLiteralNormalization.errors.txt.diff | 30 + .../objectLiteralNormalization.js.diff | 168 +- .../objectLiteralNormalization.types.diff | 187 +- .../objectLiteralShorthandProperties.js.diff | 25 + ...teralShorthandPropertiesAssignment.js.diff | 19 + ...ShorthandPropertiesAssignmentError.js.diff | 14 + ...signmentErrorFromMissingIdentifier.js.diff | 14 + ...iesErrorFromNoneExistingIdentifier.js.diff | 11 + ...pertiesErrorFromNotUsingIdentifier.js.diff | 29 + ...rthandPropertiesErrorWithModule.errors.txt | 4 +- ...teralShorthandPropertiesErrorWithModule.js | 4 +- ...ShorthandPropertiesErrorWithModule.js.diff | 12 + ...ShorthandPropertiesErrorWithModule.symbols | 4 +- ...alShorthandPropertiesErrorWithModule.types | 4 +- ...horthandPropertiesFunctionArgument.js.diff | 11 + ...orthandPropertiesFunctionArgument2.js.diff | 10 + ...ectLiteralShorthandPropertiesWithModule.js | 4 +- ...teralShorthandPropertiesWithModule.symbols | 4 +- ...LiteralShorthandPropertiesWithModule.types | 4 +- ...LiteralShorthandPropertiesWithModuleES6.js | 4 +- ...alShorthandPropertiesWithModuleES6.symbols | 4 +- ...eralShorthandPropertiesWithModuleES6.types | 4 +- .../conformance/objectRestCatchES5.js.diff | 13 + .../conformance/objectRestForOf.types.diff | 36 + .../conformance/objectRestNegative.js.diff | 26 +- .../objectRestParameterES5.js.diff | 57 + .../objectRestPropertyMustBeLast.js.diff | 14 + .../conformance/objectRestReadonly.js.diff | 15 + .../conformance/objectSpread.js.diff | 167 +- .../conformance/objectSpread.types.diff | 147 +- .../objectSpreadComputedProperty.js.diff | 20 + ...objectSpreadIndexSignature.errors.txt.diff | 21 + .../objectSpreadIndexSignature.js.diff | 15 +- .../objectSpreadIndexSignature.types.diff | 37 + .../objectSpreadNegative.errors.txt.diff | 28 +- .../conformance/objectSpreadNegative.js.diff | 114 +- .../objectSpreadNegative.types.diff | 76 + .../objectSpreadNegativeParse.js.diff | 15 + .../objectSpreadRepeatedComplexity.types.diff | 17 + ...jectSpreadRepeatedNullCheckPerf.types.diff | 11 +- .../objectSpreadSetonlyAccessor.types.diff | 11 + .../objectSpreadStrictNull.js.diff | 30 + .../objectSpreadStrictNull.types.diff | 11 +- ...tTypeHidingMembersOfExtendedObject.js.diff | 62 +- .../objectTypeHidingMembersOfObject.js.diff | 25 + ...ingMembersOfObjectAssignmentCompat.js.diff | 24 + ...ngMembersOfObjectAssignmentCompat2.js.diff | 24 + .../objectTypePropertyAccess.js.diff | 15 +- ...dingMembersOfExtendedFunction.symbols.diff | 11 + ...dingMembersOfExtendedFunction.symbols.diff | 11 + ...ctTypeWithDuplicateNumericProperty.js.diff | 15 +- .../objectTypeWithNumericProperty.js.diff | 15 +- ...ctTypeWithRecursiveWrappedProperty.js.diff | 15 +- ...tTypeWithRecursiveWrappedProperty2.js.diff | 15 +- ...iveWrappedPropertyCheckedNominally.js.diff | 24 +- ...thStringIndexerHidingObjectIndexer.js.diff | 12 +- ...TypeWithStringNamedNumericProperty.js.diff | 15 +- ...ithStringNamedNumericProperty.symbols.diff | 64 +- ...ngNamedPropertyOfIllegalCharacters.js.diff | 15 +- .../conformance/objectTypesIdentity.js.diff | 33 +- .../conformance/objectTypesIdentity2.js.diff | 33 +- .../objectTypesIdentity2.symbols.diff | 18 + ...ectTypesIdentityWithCallSignatures.js.diff | 39 + ...ctTypesIdentityWithCallSignatures2.js.diff | 39 + ...esIdentityWithCallSignatures2.symbols.diff | 18 + ...CallSignaturesDifferingParamCounts.js.diff | 39 + ...ityWithCallSignaturesWithOverloads.js.diff | 40 + ...pesIdentityWithConstructSignatures.js.diff | 33 + ...esIdentityWithConstructSignatures2.js.diff | 30 + ...ntityWithConstructSignatures2.symbols.diff | 18 + ...ructSignaturesDifferingParamCounts.js.diff | 30 + ...sIdentityWithGenericCallSignatures.js.diff | 39 + ...IdentityWithGenericCallSignatures2.js.diff | 39 + ...llSignaturesDifferingByConstraints.js.diff | 39 + ...naturesDifferingByConstraints.symbols.diff | 167 + ...lSignaturesDifferingByConstraints2.js.diff | 48 + ...aturesDifferingByConstraints2.symbols.diff | 217 + ...lSignaturesDifferingByConstraints3.js.diff | 65 +- ...allSignaturesDifferingByReturnType.js.diff | 39 + ...gnaturesDifferingByReturnType.symbols.diff | 20 + ...llSignaturesDifferingByReturnType2.js.diff | 39 + ...naturesDifferingByReturnType2.symbols.diff | 252 + ...aturesDifferingTypeParameterCounts.js.diff | 39 + ...sDifferingTypeParameterCounts.symbols.diff | 61 + ...DifferingTypeParameterCounts2.symbols.diff | 29 + ...naturesDifferingTypeParameterNames.js.diff | 39 + ...enericCallSignaturesOptionalParams.js.diff | 39 + ...nericCallSignaturesOptionalParams2.js.diff | 39 + ...nericCallSignaturesOptionalParams3.js.diff | 39 + ...ctSignaturesDifferingByConstraints.js.diff | 30 + ...naturesDifferingByConstraints.symbols.diff | 131 + ...tSignaturesDifferingByConstraints2.js.diff | 39 + ...aturesDifferingByConstraints2.symbols.diff | 175 + ...tSignaturesDifferingByConstraints3.js.diff | 56 +- ...uctSignaturesDifferingByReturnType.js.diff | 30 + ...gnaturesDifferingByReturnType.symbols.diff | 20 + ...ctSignaturesDifferingByReturnType2.js.diff | 30 + ...naturesDifferingByReturnType2.symbols.diff | 214 + ...aturesDifferingTypeParameterCounts.js.diff | 30 + ...sDifferingTypeParameterCounts.symbols.diff | 52 + ...naturesDifferingTypeParameterNames.js.diff | 30 + ...cConstructSignaturesOptionalParams.js.diff | 30 + ...ConstructSignaturesOptionalParams2.js.diff | 30 + ...ConstructSignaturesOptionalParams3.js.diff | 30 + ...tTypesIdentityWithNumericIndexers1.js.diff | 63 + ...tTypesIdentityWithNumericIndexers2.js.diff | 82 +- ...tTypesIdentityWithNumericIndexers3.js.diff | 63 + ...objectTypesIdentityWithOptionality.js.diff | 33 +- .../objectTypesIdentityWithPrivates.js.diff | 68 +- .../objectTypesIdentityWithPrivates2.js.diff | 41 +- .../objectTypesIdentityWithPrivates3.js.diff | 58 +- .../objectTypesIdentityWithPublics.js.diff | 33 +- ...ectTypesIdentityWithStringIndexers.js.diff | 63 + ...ctTypesIdentityWithStringIndexers2.js.diff | 82 +- .../objectTypesWithOptionalProperties.js.diff | 24 +- ...objectTypesWithOptionalProperties2.js.diff | 33 +- ...jectTypesWithPredefinedTypesAsName.js.diff | 41 + ...ectTypesWithPredefinedTypesAsName2.js.diff | 14 + .../conformance/octalIntegerLiteral.js.diff | 50 + .../octalIntegerLiteralError.js.diff | 18 + .../operatorsAndIntersectionTypes.js.diff | 38 + .../optionalBindingParameters1.js.diff | 12 + .../optionalBindingParameters2.js.diff | 12 + ...ionalBindingParametersInOverloads1.js.diff | 15 + ...ionalBindingParametersInOverloads2.js.diff | 15 + .../optionalChainingInArrow.js.diff | 13 + .../optionalChainingInLoop.js.diff | 22 + ...arameterBindingPattern(target=es5).js.diff | 11 +- ...InParameterInitializer(target=es5).js.diff | 11 +- .../optionalChainingInference.js.diff | 38 + .../conformance/optionalMethods.js.diff | 106 +- .../conformance/optionalProperties01.js.diff | 13 + ...tyAssignableToStringIndexSignature.js.diff | 10 +- .../optionalTupleElements1.js.diff | 15 +- .../optionalTupleElements1.types.diff | 51 + .../overloadResolution.errors.txt.diff | 18 +- .../conformance/overloadResolution.js.diff | 71 +- .../overloadResolution.symbols.diff | 35 + ...esolutionClassConstructors.errors.txt.diff | 23 +- ...verloadResolutionClassConstructors.js.diff | 133 +- ...adResolutionClassConstructors.symbols.diff | 29 + ...loadResolutionConstructors.errors.txt.diff | 17 +- .../overloadResolutionConstructors.js.diff | 71 +- ...verloadResolutionConstructors.symbols.diff | 35 + .../submodule/conformance/override1.js.diff | 112 + .../submodule/conformance/override10.js.diff | 42 + .../submodule/conformance/override11.js.diff | 46 +- .../submodule/conformance/override15.js.diff | 41 + .../submodule/conformance/override2.js.diff | 77 + .../submodule/conformance/override3.js.diff | 63 + .../submodule/conformance/override4.js.diff | 71 +- .../submodule/conformance/override5.js.diff | 86 +- .../submodule/conformance/override6.js.diff | 60 +- .../submodule/conformance/override7.js.diff | 86 +- .../submodule/conformance/override8.js.diff | 110 +- .../overrideParameterProperty.js.diff | 120 +- ...overrideWithoutNoImplicitOverride1.js.diff | 58 + ...(moduleresolution=bundler).errors.txt.diff | 10 - ...pat(moduleresolution=node).errors.txt.diff | 4 + ...eterInitializersForwardReferencing.js.diff | 87 + ...terInitializersForwardReferencing1.js.diff | 70 +- .../parametersWithNoAnnotationAreAny.js.diff | 34 + .../parenthesizedContexualTyping1.js.diff | 39 + ...parenthesizedContexualTyping1.symbols.diff | 38 + .../parenthesizedContexualTyping2.js.diff | 42 +- ...parenthesizedContexualTyping2.symbols.diff | 38 + .../parenthesizedTypes.symbols.diff | 24 + .../conformance/parser0_004152.js.diff | 12 +- .../parser15.4.4.14-9-2.symbols.diff | 11 + .../conformance/parser509546.js.diff | 12 +- .../conformance/parser509546_1.js.diff | 12 +- .../conformance/parser509546_2.js.diff | 12 +- .../conformance/parser509618.errors.txt | 2 +- .../submodule/conformance/parser509618.js | 2 +- .../conformance/parser509618.symbols | 4 +- .../submodule/conformance/parser509618.types | 2 +- .../conformance/parser509630.js.diff | 38 +- .../conformance/parser509667.js.diff | 28 + .../conformance/parser509668.js.diff | 19 +- .../conformance/parser509669.js.diff | 9 + .../conformance/parser512084.js.diff | 13 + .../conformance/parser512097.js.diff | 2 +- .../conformance/parser536727.js.diff | 14 + .../conformance/parser553699.js.diff | 24 + .../conformance/parser585151.js.diff | 14 + .../conformance/parser618973.js.diff | 17 + .../conformance/parser630933.symbols.diff | 11 + .../conformance/parser630933.types.diff | 4 +- .../conformance/parser642331.js.diff | 14 + .../conformance/parser642331_1.js.diff | 14 + .../parserAccessibilityAfterStatic1.js.diff | 12 +- .../parserAccessibilityAfterStatic10.js.diff | 15 + .../parserAccessibilityAfterStatic11.js.diff | 15 + .../parserAccessibilityAfterStatic14.js.diff | 15 + .../parserAccessibilityAfterStatic2.js.diff | 12 +- .../parserAccessibilityAfterStatic3.js.diff | 6 +- .../parserAccessibilityAfterStatic4.js.diff | 12 +- .../parserAccessibilityAfterStatic5.js.diff | 12 +- .../parserAccessibilityAfterStatic6.js.diff | 12 +- .../parserAccessibilityAfterStatic7.js.diff | 15 + .../conformance/parserAccessors1.js.diff | 19 + .../conformance/parserAccessors2.js.diff | 19 + .../parserArgumentList1.symbols.diff | 16 + .../parserArgumentList1.types.diff | 21 + .../parserArrayLiteralExpression11.types.diff | 8 + .../parserArrayLiteralExpression12.types.diff | 9 + .../parserArrayLiteralExpression13.types.diff | 10 + .../parserArrayLiteralExpression14.types.diff | 22 + .../parserArrayLiteralExpression15.types.diff | 22 + .../parserArrayLiteralExpression2.types.diff | 7 + .../parserArrayLiteralExpression3.types.diff | 8 + .../parserArrayLiteralExpression4.types.diff | 9 + .../parserArrayLiteralExpression6.types.diff | 8 + .../parserArrayLiteralExpression8.types.diff | 8 + .../parserArrowFunctionExpression1.js.diff | 8 + .../parserArrowFunctionExpression2.js.diff | 9 + .../parserArrowFunctionExpression3.js.diff | 8 + .../parserArrowFunctionExpression4.js.diff | 8 + .../parserArrowFunctionExpression5.js.diff | 8 + .../conformance/parserAstSpans1.js.diff | 257 +- .../parserCastVersusArrowFunction1.js.diff | 22 + .../conformance/parserClass1.js.diff | 27 + .../conformance/parserClass2.js.diff | 16 +- .../parserClassDeclaration1.js.diff | 30 + .../parserClassDeclaration10.js.diff | 13 + .../parserClassDeclaration11.js.diff | 15 + .../parserClassDeclaration12.js.diff | 14 + .../parserClassDeclaration13.js.diff | 15 + .../parserClassDeclaration14.js.diff | 13 + .../parserClassDeclaration15.js.diff | 14 + .../parserClassDeclaration16.js.diff | 15 + .../parserClassDeclaration19.js.diff | 15 + .../parserClassDeclaration2.js.diff | 13 + .../parserClassDeclaration20.js.diff | 15 + .../parserClassDeclaration21.js.diff | 15 + .../parserClassDeclaration22.js.diff | 15 + .../parserClassDeclaration23.js.diff | 13 + .../parserClassDeclaration24.js.diff | 13 + .../parserClassDeclaration25.js.diff | 13 + .../parserClassDeclaration26.js.diff | 12 +- .../parserClassDeclaration3.js.diff | 30 + .../parserClassDeclaration4.js.diff | 30 + .../parserClassDeclaration5.js.diff | 30 + .../parserClassDeclaration6.js.diff | 30 + .../parserClassDeclaration7.errors.txt | 2 +- .../conformance/parserClassDeclaration7.js | 2 +- .../parserClassDeclaration7.symbols | 4 +- .../conformance/parserClassDeclaration7.types | 2 +- .../parserClassDeclaration8.js.diff | 13 + .../parserClassDeclaration9.js.diff | 13 + ...serClassDeclarationIndexSignature1.js.diff | 13 + .../parserConstructorAmbiguity1.symbols.diff | 8 + .../parserConstructorAmbiguity2.symbols.diff | 8 + .../parserConstructorAmbiguity3.symbols.diff | 9 + .../parserConstructorAmbiguity4.symbols.diff | 8 + .../parserConstructorDeclaration1.js.diff | 14 + .../parserConstructorDeclaration10.js.diff | 13 +- .../parserConstructorDeclaration11.js.diff | 14 + .../parserConstructorDeclaration2.js.diff | 14 + .../parserConstructorDeclaration3.js.diff | 13 +- .../parserConstructorDeclaration4.js.diff | 14 + .../parserConstructorDeclaration5.js.diff | 14 + .../parserConstructorDeclaration6.js.diff | 14 + .../parserConstructorDeclaration7.js.diff | 14 + .../parserConstructorDeclaration8.js.diff | 13 + .../parserConstructorDeclaration9.js.diff | 13 +- .../conformance/parserES3Accessors1.js.diff | 19 + .../conformance/parserES3Accessors2.js.diff | 19 + .../parserES5ComputedPropertyName10.js.diff | 11 +- .../parserES5ComputedPropertyName11.js.diff | 13 + .../parserES5ComputedPropertyName2.js.diff | 9 + .../parserES5ComputedPropertyName3.js.diff | 9 + .../parserES5ComputedPropertyName4.js.diff | 13 + .../parserES5ComputedPropertyName7.js.diff | 12 +- .../parserES5ComputedPropertyName9.js.diff | 12 +- .../parserES5ForOfStatement10.js.diff | 10 + .../parserES5ForOfStatement11.js.diff | 10 + .../parserES5ForOfStatement12.js.diff | 10 + .../parserES5ForOfStatement13.js.diff | 10 + .../parserES5ForOfStatement14.js.diff | 10 + .../parserES5ForOfStatement15.js.diff | 10 + .../parserES5ForOfStatement16.js.diff | 10 + .../parserES5ForOfStatement18.js.diff | 10 + .../parserES5ForOfStatement2.js.diff | 10 + .../parserES5ForOfStatement21.js.diff | 10 + .../parserES5ForOfStatement3.js.diff | 10 + .../parserES5ForOfStatement4.js.diff | 10 + .../parserES5ForOfStatement5.js.diff | 10 + .../parserES5ForOfStatement6.js.diff | 10 + .../parserES5ForOfStatement7.js.diff | 10 + .../parserES5ForOfStatement8.js.diff | 10 + .../parserES5ForOfStatement9.js.diff | 10 + .../parserES5SymbolIndexer2.js.diff | 13 + .../parserES5SymbolProperty1.errors.txt.diff | 13 + .../parserES5SymbolProperty1.symbols.diff | 10 + .../parserES5SymbolProperty1.types.diff | 13 + .../parserES5SymbolProperty2.errors.txt.diff | 13 + .../parserES5SymbolProperty2.symbols.diff | 10 + .../parserES5SymbolProperty2.types.diff | 13 + .../parserES5SymbolProperty3.errors.txt.diff | 13 + .../parserES5SymbolProperty3.symbols.diff | 10 + .../parserES5SymbolProperty3.types.diff | 13 + .../parserES5SymbolProperty4.errors.txt.diff | 15 + .../parserES5SymbolProperty4.symbols.diff | 8 + .../parserES5SymbolProperty4.types.diff | 10 + .../parserES5SymbolProperty5.errors.txt.diff | 15 + .../parserES5SymbolProperty5.js.diff | 14 +- .../parserES5SymbolProperty5.symbols.diff | 8 + .../parserES5SymbolProperty5.types.diff | 10 + .../parserES5SymbolProperty6.errors.txt.diff | 13 + .../parserES5SymbolProperty6.js.diff | 11 +- .../parserES5SymbolProperty6.symbols.diff | 10 + .../parserES5SymbolProperty6.types.diff | 14 + .../parserES5SymbolProperty7.errors.txt.diff | 13 + .../parserES5SymbolProperty7.js.diff | 15 + .../parserES5SymbolProperty7.symbols.diff | 10 + .../parserES5SymbolProperty7.types.diff | 13 + .../parserES5SymbolProperty8.errors.txt.diff | 13 + .../parserES5SymbolProperty8.symbols.diff | 10 + .../parserES5SymbolProperty8.types.diff | 18 + .../parserES5SymbolProperty9.errors.txt.diff | 13 + .../parserES5SymbolProperty9.symbols.diff | 10 + .../parserES5SymbolProperty9.types.diff | 18 + .../parserEnumDeclaration2.errors.txt | 2 +- .../conformance/parserEnumDeclaration2.js | 2 +- .../parserEnumDeclaration2.symbols | 4 +- .../conformance/parserEnumDeclaration2.types | 2 +- ...tAccessibilityModifierInModule1.errors.txt | 2 +- ...serErrantAccessibilityModifierInModule1.js | 2 +- ...rantAccessibilityModifierInModule1.symbols | 2 +- ...ErrantAccessibilityModifierInModule1.types | 2 +- .../parserErrantSemicolonInClass1.js.diff | 66 +- .../parserErrorRecoveryIfStatement1.js.diff | 27 + .../parserErrorRecoveryIfStatement2.js.diff | 27 + .../parserErrorRecoveryIfStatement3.js.diff | 27 + .../parserErrorRecoveryIfStatement4.js.diff | 27 + .../parserErrorRecoveryIfStatement5.js.diff | 24 + .../parserErrorRecoveryIfStatement6.js.diff | 27 + .../parserErrorRecovery_Block3.js.diff | 21 + .../parserErrorRecovery_ClassElement1.js.diff | 22 + ...rserErrorRecovery_ClassElement2.errors.txt | 2 +- .../parserErrorRecovery_ClassElement2.js | 2 +- .../parserErrorRecovery_ClassElement2.js.diff | 18 + .../parserErrorRecovery_ClassElement2.symbols | 4 +- .../parserErrorRecovery_ClassElement2.types | 2 +- ...rserErrorRecovery_ClassElement3.errors.txt | 2 +- .../parserErrorRecovery_ClassElement3.js | 2 +- .../parserErrorRecovery_ClassElement3.js.diff | 18 + .../parserErrorRecovery_ClassElement3.symbols | 2 +- .../parserErrorRecovery_ClassElement3.types | 2 +- ...ecovery_ExtendsOrImplementsClause1.js.diff | 13 + ...ecovery_ExtendsOrImplementsClause2.js.diff | 30 + ...ecovery_ExtendsOrImplementsClause3.js.diff | 13 + ...ecovery_ExtendsOrImplementsClause4.js.diff | 30 + ...ecovery_ExtendsOrImplementsClause5.js.diff | 30 + ...ErrorRecovery_IncompleteMemberVariable1.js | 2 +- ...Recovery_IncompleteMemberVariable1.js.diff | 22 +- ...Recovery_IncompleteMemberVariable1.symbols | 18 +- ...ery_IncompleteMemberVariable1.symbols.diff | 11 + ...orRecovery_IncompleteMemberVariable1.types | 2 +- ...overy_IncompleteMemberVariable2.errors.txt | 2 +- ...ErrorRecovery_IncompleteMemberVariable2.js | 2 +- ...Recovery_IncompleteMemberVariable2.js.diff | 22 +- ...Recovery_IncompleteMemberVariable2.symbols | 18 +- ...ery_IncompleteMemberVariable2.symbols.diff | 11 + ...orRecovery_IncompleteMemberVariable2.types | 2 +- ...parserErrorRecovery_ObjectLiteral2.js.diff | 7 +- ...parserErrorRecovery_ParameterList5.js.diff | 8 + ...parserErrorRecovery_ParameterList6.js.diff | 15 + .../parserErrorRecovery_SourceUnit1.js.diff | 20 + ...rserErrorRecovery_SwitchStatement2.js.diff | 23 + .../parserExportAssignment5.errors.txt | 2 +- .../conformance/parserExportAssignment5.js | 2 +- .../parserExportAssignment5.symbols | 2 +- .../conformance/parserExportAssignment5.types | 2 +- .../parserExportAssignment7.js.diff | 14 + .../parserExportAssignment8.js.diff | 14 + .../parserExportAssignment9.errors.txt | 2 +- .../conformance/parserExportAssignment9.js | 2 +- .../parserExportAssignment9.symbols | 2 +- .../conformance/parserExportAssignment9.types | 2 +- .../parserForInStatement8.errors.txt.diff | 21 + .../conformance/parserForInStatement8.js.diff | 12 + .../conformance/parserForStatement9.js.diff | 12 + .../parserFunctionDeclaration1.errors.txt | 2 +- .../conformance/parserFunctionDeclaration1.js | 2 +- .../parserFunctionDeclaration1.symbols | 4 +- .../parserFunctionDeclaration1.types | 2 +- .../parserFunctionDeclaration7.errors.txt | 2 +- .../conformance/parserFunctionDeclaration7.js | 2 +- .../parserFunctionDeclaration7.symbols | 4 +- .../parserFunctionDeclaration7.types | 2 +- .../conformance/parserFunctionDeclaration8.js | 2 +- .../parserFunctionDeclaration8.symbols | 4 +- .../parserFunctionDeclaration8.types | 2 +- .../parserFunctionPropertyAssignment1.js.diff | 8 + .../parserFunctionPropertyAssignment2.js.diff | 8 + .../parserFunctionPropertyAssignment3.js.diff | 8 + .../parserFunctionPropertyAssignment4.js.diff | 8 + .../conformance/parserGenericClass1.js.diff | 13 + .../conformance/parserGenericClass2.js.diff | 13 + .../parserGenericConstraint1.js.diff | 13 + .../parserGenericConstraint2.js.diff | 13 + .../parserGenericConstraint3.js.diff | 13 + .../parserGenericConstraint4.js.diff | 13 + .../parserGenericConstraint5.js.diff | 13 + .../parserGenericConstraint6.js.diff | 13 + .../parserGenericConstraint7.js.diff | 13 + .../parserGenericsInTypeContexts1.js.diff | 33 + .../parserGenericsInTypeContexts2.js.diff | 33 + ...rserGetAccessorWithTypeParameters1.js.diff | 18 +- .../parserIndexMemberDeclaration1.js.diff | 13 + .../parserIndexMemberDeclaration10.js.diff | 12 +- .../parserIndexMemberDeclaration2.js.diff | 12 +- .../parserIndexMemberDeclaration3.js.diff | 12 +- .../parserIndexMemberDeclaration4.js.diff | 12 +- .../parserIndexMemberDeclaration5.js.diff | 12 +- .../parserIndexMemberDeclaration6.js.diff | 13 + .../parserIndexMemberDeclaration7.js.diff | 13 + .../parserIndexMemberDeclaration8.js.diff | 13 + .../parserIndexMemberDeclaration9.js.diff | 13 + .../parserIndexSignature8.symbols.diff | 8 + ...idIdentifiersInVariableStatements1.js.diff | 15 + .../conformance/parserMemberAccessor1.js.diff | 21 + .../parserMemberAccessorDeclaration1.js.diff | 19 + .../parserMemberAccessorDeclaration10.js.diff | 19 + .../parserMemberAccessorDeclaration11.js.diff | 19 + .../parserMemberAccessorDeclaration12.js.diff | 19 + .../parserMemberAccessorDeclaration13.js.diff | 19 + .../parserMemberAccessorDeclaration14.js.diff | 19 + .../parserMemberAccessorDeclaration15.js.diff | 19 + .../parserMemberAccessorDeclaration16.js.diff | 21 + .../parserMemberAccessorDeclaration17.js.diff | 19 + .../parserMemberAccessorDeclaration18.js.diff | 24 + .../parserMemberAccessorDeclaration2.js.diff | 19 + .../parserMemberAccessorDeclaration3.js.diff | 19 + .../parserMemberAccessorDeclaration4.js.diff | 19 + .../parserMemberAccessorDeclaration5.js.diff | 19 + .../parserMemberAccessorDeclaration6.js.diff | 19 + .../parserMemberAccessorDeclaration7.js.diff | 19 + .../parserMemberAccessorDeclaration8.js.diff | 19 +- .../parserMemberAccessorDeclaration9.js.diff | 19 + .../parserMemberFunctionDeclaration1.js.diff | 15 + .../parserMemberFunctionDeclaration2.js.diff | 15 +- .../parserMemberFunctionDeclaration3.js.diff | 15 + .../parserMemberFunctionDeclaration4.js.diff | 15 + .../parserMemberFunctionDeclaration5.js.diff | 15 + ...berFunctionDeclarationAmbiguities1.js.diff | 29 + .../parserMemberVariableDeclaration1.js.diff | 12 +- .../parserMemberVariableDeclaration2.js.diff | 12 +- .../parserMemberVariableDeclaration3.js.diff | 12 +- .../parserMemberVariableDeclaration4.js.diff | 12 +- .../parserMemberVariableDeclaration5.js.diff | 13 + ...serMissingLambdaOpenBrace1.errors.txt.diff | 32 + .../parserMissingLambdaOpenBrace1.js.diff | 24 + ...parserMissingLambdaOpenBrace1.symbols.diff | 11 + .../parserMissingLambdaOpenBrace1.types.diff | 20 + .../submodule/conformance/parserModule1.js | 2 +- .../conformance/parserModule1.symbols | 2 +- .../submodule/conformance/parserModule1.types | 2 +- .../conformance/parserModuleDeclaration11.js | 2 +- .../parserModuleDeclaration11.symbols | 6 +- .../parserModuleDeclaration11.types | 2 +- .../conformance/parserModuleDeclaration12.js | 2 +- .../parserModuleDeclaration12.symbols | 4 +- .../parserModuleDeclaration12.types | 2 +- .../parserModuleDeclaration2.d.errors.txt | 4 +- .../parserModuleDeclaration2.d.symbols | 2 +- .../parserModuleDeclaration2.d.types | 2 +- .../parserModuleDeclaration3.d.symbols | 2 +- .../parserModuleDeclaration3.d.types | 2 +- .../parserModuleDeclaration3.errors.txt | 4 +- .../conformance/parserModuleDeclaration3.js | 4 +- .../parserModuleDeclaration3.symbols | 6 +- .../parserModuleDeclaration3.types | 4 +- .../parserModuleDeclaration4.d.errors.txt | 6 +- .../parserModuleDeclaration4.d.symbols | 6 +- .../parserModuleDeclaration4.d.types | 4 +- .../conformance/parserModuleDeclaration4.js | 6 +- .../parserModuleDeclaration4.symbols | 10 +- .../parserModuleDeclaration4.types | 6 +- .../parserModuleDeclaration5.errors.txt | 6 +- .../conformance/parserModuleDeclaration5.js | 6 +- .../parserModuleDeclaration5.symbols | 10 +- .../parserModuleDeclaration5.types | 6 +- .../conformance/parserModuleDeclaration6.js | 2 +- .../parserModuleDeclaration6.symbols | 2 +- .../parserModuleDeclaration6.types | 2 +- .../conformance/parserModuleDeclaration7.js | 2 +- .../parserModuleDeclaration7.symbols | 4 +- .../parserModuleDeclaration7.types | 2 +- .../conformance/parserModuleDeclaration8.js | 2 +- .../parserModuleDeclaration8.symbols | 4 +- .../parserModuleDeclaration8.types | 2 +- .../conformance/parserModuleDeclaration9.js | 2 +- .../parserModuleDeclaration9.symbols | 6 +- .../parserModuleDeclaration9.types | 2 +- .../conformance/parserNotRegex2.js.diff | 10 + .../parserObjectCreation1.symbols.diff | 8 + .../conformance/parserParameterList1.js.diff | 15 + .../conformance/parserParameterList10.js.diff | 20 + .../conformance/parserParameterList11.js.diff | 14 + .../conformance/parserParameterList16.js.diff | 15 + .../conformance/parserParameterList17.js.diff | 14 + .../conformance/parserParameterList2.js.diff | 17 + .../conformance/parserParameterList3.js.diff | 15 + .../conformance/parserParameterList6.js.diff | 14 + .../conformance/parserParameterList7.js.diff | 14 +- .../conformance/parserParameterList9.js.diff | 20 + ...esizedVariableAndFunctionInTernary.js.diff | 10 + ...eAndParenthesizedFunctionInTernary.js.diff | 12 + .../parserRealSource1.errors.txt.diff | 4 +- .../conformance/parserRealSource1.js | 4 +- .../conformance/parserRealSource1.js.diff | 104 +- .../conformance/parserRealSource1.symbols | 6 +- .../parserRealSource1.symbols.diff | 20 + .../conformance/parserRealSource1.types | 4 +- .../conformance/parserRealSource10.errors.txt | 2 +- .../parserRealSource10.errors.txt.diff | 2 +- .../conformance/parserRealSource10.js | 2 +- .../conformance/parserRealSource10.js.diff | 320 +- .../conformance/parserRealSource10.symbols | 272 +- .../conformance/parserRealSource10.types | 2 +- .../conformance/parserRealSource11.errors.txt | 2 +- .../parserRealSource11.errors.txt.diff | 2 +- .../conformance/parserRealSource11.js | 2 +- .../conformance/parserRealSource11.js.diff | 2424 ++++- .../conformance/parserRealSource11.symbols | 30 +- .../parserRealSource11.symbols.diff | 125 + .../conformance/parserRealSource11.types | 2 +- .../conformance/parserRealSource11.types.diff | 46 + .../conformance/parserRealSource12.errors.txt | 4 +- .../parserRealSource12.errors.txt.diff | 2 +- .../conformance/parserRealSource12.js | 4 +- .../conformance/parserRealSource12.js.diff | 97 +- .../conformance/parserRealSource12.symbols | 164 +- .../conformance/parserRealSource12.types | 4 +- .../conformance/parserRealSource13.errors.txt | 2 +- .../parserRealSource13.errors.txt.diff | 2 +- .../conformance/parserRealSource13.js | 2 +- .../conformance/parserRealSource13.js.diff | 11 +- .../conformance/parserRealSource13.symbols | 10 +- .../conformance/parserRealSource13.types | 2 +- .../conformance/parserRealSource14.errors.txt | 2 +- .../parserRealSource14.errors.txt.diff | 2 +- .../conformance/parserRealSource14.js | 2 +- .../conformance/parserRealSource14.js.diff | 509 +- .../conformance/parserRealSource14.symbols | 14 +- .../conformance/parserRealSource14.types | 2 +- .../parserRealSource2.errors.txt.diff | 2 +- .../conformance/parserRealSource2.js | 2 +- .../conformance/parserRealSource2.js.diff | 125 + .../conformance/parserRealSource2.symbols | 4 +- .../conformance/parserRealSource2.types | 2 +- .../parserRealSource3.errors.txt.diff | 2 +- .../conformance/parserRealSource3.js | 2 +- .../conformance/parserRealSource3.js.diff | 11 + .../conformance/parserRealSource3.symbols | 4 +- .../conformance/parserRealSource3.types | 2 +- .../conformance/parserRealSource4.errors.txt | 2 +- .../parserRealSource4.errors.txt.diff | 2 +- .../conformance/parserRealSource4.js | 2 +- .../conformance/parserRealSource4.js.diff | 277 +- .../conformance/parserRealSource4.symbols | 8 +- .../conformance/parserRealSource4.types | 2 +- .../conformance/parserRealSource5.errors.txt | 2 +- .../parserRealSource5.errors.txt.diff | 2 +- .../conformance/parserRealSource5.js | 2 +- .../conformance/parserRealSource5.js.diff | 50 +- .../conformance/parserRealSource5.symbols | 44 +- .../conformance/parserRealSource5.types | 2 +- .../conformance/parserRealSource6.errors.txt | 2 +- .../parserRealSource6.errors.txt.diff | 2 +- .../conformance/parserRealSource6.js | 2 +- .../conformance/parserRealSource6.js.diff | 78 +- .../conformance/parserRealSource6.symbols | 8 +- .../parserRealSource6.symbols.diff | 11 + .../conformance/parserRealSource6.types | 2 +- .../conformance/parserRealSource7.errors.txt | 2 +- .../parserRealSource7.errors.txt.diff | 2 +- .../conformance/parserRealSource7.js | 2 +- .../conformance/parserRealSource7.js.diff | 26 +- .../conformance/parserRealSource7.symbols | 4 +- .../parserRealSource7.symbols.diff | 25 + .../conformance/parserRealSource7.types | 2 +- .../conformance/parserRealSource8.errors.txt | 2 +- .../parserRealSource8.errors.txt.diff | 2 +- .../conformance/parserRealSource8.js | 2 +- .../conformance/parserRealSource8.js.diff | 55 +- .../conformance/parserRealSource8.symbols | 24 +- .../parserRealSource8.symbols.diff | 71 + .../conformance/parserRealSource8.types | 2 +- .../conformance/parserRealSource9.errors.txt | 2 +- .../parserRealSource9.errors.txt.diff | 2 +- .../conformance/parserRealSource9.js | 2 +- .../conformance/parserRealSource9.js.diff | 88 +- .../conformance/parserRealSource9.symbols | 90 +- .../parserRealSource9.symbols.diff | 11 + .../conformance/parserRealSource9.types | 2 +- ...larExpressionDivideAmbiguity5.symbols.diff | 13 + ...rRegularExpressionDivideAmbiguity6.js.diff | 13 + ...rserSetAccessorWithTypeAnnotation1.js.diff | 18 +- ...rserSetAccessorWithTypeParameters1.js.diff | 18 +- ...parserShorthandPropertyAssignment1.js.diff | 8 + ...parserShorthandPropertyAssignment5.js.diff | 8 + .../parserSkippedTokens16.errors.txt | 2 +- .../conformance/parserSkippedTokens16.js | 2 +- .../conformance/parserSkippedTokens16.symbols | 4 +- .../conformance/parserSkippedTokens16.types | 2 +- .../parserSuperExpression1.errors.txt | 2 +- .../conformance/parserSuperExpression1.js | 2 +- .../parserSuperExpression1.js.diff | 32 +- .../parserSuperExpression1.symbols | 6 +- .../conformance/parserSuperExpression1.types | 2 +- .../parserSuperExpression2.js.diff | 18 + .../parserSuperExpression3.js.diff | 18 + .../parserSuperExpression4.errors.txt | 2 +- .../conformance/parserSuperExpression4.js | 2 +- .../parserSuperExpression4.js.diff | 32 +- .../parserSuperExpression4.symbols | 6 +- .../conformance/parserSuperExpression4.types | 2 +- .../parserSyntaxWalker.generated.js | 4 +- .../parserSyntaxWalker.generated.symbols | 2 +- .../parserSyntaxWalker.generated.types | 2 +- ...nfinishedTypeNameBeforeKeyword1.errors.txt | 2 +- .../parserUnfinishedTypeNameBeforeKeyword1.js | 2 +- ...erUnfinishedTypeNameBeforeKeyword1.symbols | 2 +- ...rserUnfinishedTypeNameBeforeKeyword1.types | 2 +- .../conformance/parserUnicode3.js.diff | 13 + ...parserUnterminatedGeneric1.errors.txt.diff | 12 + .../parserUnterminatedGeneric2.errors.txt | 2 +- ...parserUnterminatedGeneric2.errors.txt.diff | 12 + .../conformance/parserUnterminatedGeneric2.js | 2 +- .../parserUnterminatedGeneric2.symbols | 2 +- .../parserUnterminatedGeneric2.types | 2 +- .../parserVariableDeclaration4.errors.txt | 2 +- .../conformance/parserVariableDeclaration4.js | 2 +- .../parserVariableDeclaration4.symbols | 2 +- .../parserVariableDeclaration4.types | 2 +- .../parserX_ArrowFunction1.js.diff | 9 + .../parserX_ArrowFunction4.js.diff | 9 + ...r_continueNotInIterationStatement4.js.diff | 11 + .../conformance/parserharness.errors.txt | 30 +- .../submodule/conformance/parserharness.js | 38 +- .../conformance/parserharness.js.diff | 1237 ++- .../conformance/parserharness.symbols | 100 +- .../submodule/conformance/parserharness.types | 36 +- .../conformance/parserharness.types.diff | 111 +- .../conformance/parserindenter.errors.txt | 2 +- .../parserindenter.errors.txt.diff | 2 +- .../submodule/conformance/parserindenter.js | 2 +- .../conformance/parserindenter.js.diff | 301 +- .../conformance/parserindenter.symbols | 200 +- .../conformance/parserindenter.types | 2 +- ...llyAnnotatedFunctionInferenceError.js.diff | 45 +- ...FunctionInferenceWithTypeParameter.js.diff | 80 +- ...notatedFunctionWitoutTypeParameter.js.diff | 10 + .../conformance/partiallyNamedTuples.js.diff | 43 + .../conformance/partiallyNamedTuples2.js.diff | 9 +- .../conformance/partiallyNamedTuples3.js.diff | 9 +- .../conformance/plainJSRedeclare.js.diff | 10 + .../conformance/plainJSRedeclare2.js.diff | 10 + .../conformance/plainJSRedeclare3.js.diff | 10 + .../plusOperatorWithAnyOtherType.errors.txt | 2 +- .../plusOperatorWithAnyOtherType.js | 2 +- .../plusOperatorWithAnyOtherType.js.diff | 27 +- .../plusOperatorWithAnyOtherType.symbols | 2 +- .../plusOperatorWithAnyOtherType.types | 2 +- .../plusOperatorWithBooleanType.errors.txt | 2 +- .../plusOperatorWithBooleanType.js | 2 +- .../plusOperatorWithBooleanType.js.diff | 19 +- .../plusOperatorWithBooleanType.symbols | 2 +- .../plusOperatorWithBooleanType.types | 2 +- .../plusOperatorWithNumberType.errors.txt | 2 +- .../conformance/plusOperatorWithNumberType.js | 2 +- .../plusOperatorWithNumberType.js.diff | 28 +- .../plusOperatorWithNumberType.symbols | 2 +- .../plusOperatorWithNumberType.types | 2 +- .../plusOperatorWithStringType.errors.txt | 2 +- .../conformance/plusOperatorWithStringType.js | 2 +- .../plusOperatorWithStringType.js.diff | 28 +- .../plusOperatorWithStringType.symbols | 2 +- .../plusOperatorWithStringType.types | 2 +- ...alueImports(isolatedmodules=false).js.diff | 13 + ...ValueImports(isolatedmodules=true).js.diff | 13 + ...orts_errors(isolatedmodules=false).js.diff | 16 + ...ports_errors(isolatedmodules=true).js.diff | 16 + ...ClassPropertyAccessibleWithinClass.js.diff | 101 +- ...ropertyAccessibleWithinNestedClass.js.diff | 69 +- .../conformance/privateIndexer.js.diff | 27 + .../conformance/privateIndexer2.js.diff | 13 +- ...privateInstanceMemberAccessibility.js.diff | 53 +- .../privateNameBadDeclaration.js.diff | 23 +- .../conformance/privateNameES5Ban.js.diff | 14 +- ...meInInExpression(target=es2022).types.diff | 34 +- ...meInInExpression(target=esnext).types.diff | 34 +- .../privateNameInObjectLiteral-1.js.diff | 6 +- .../privateNameInObjectLiteral-2.js.diff | 8 +- .../privateNameInObjectLiteral-3.js.diff | 6 +- .../privateNameMethodAsync.types.diff | 33 + .../privateNameStaticMethodAsync.types.diff | 33 + .../privateNamesAndDecorators.js.diff | 11 +- ...teNamesAssertion(target=es2022).types.diff | 19 + ...teNamesAssertion(target=esnext).types.diff | 19 + ...NamesIncompatibleModifiers.errors.txt.diff | 15 + ...ivateNamesIncompatibleModifiers.types.diff | 11 + ...mbersAreNotAccessibleDestructuring.js.diff | 70 +- .../privateStaticMemberAccessibility.js.diff | 40 +- ...ateStaticNotAccessibleInClodule.errors.txt | 2 +- .../privateStaticNotAccessibleInClodule.js | 2 +- ...rivateStaticNotAccessibleInClodule.js.diff | 15 +- ...rivateStaticNotAccessibleInClodule.symbols | 2 +- .../privateStaticNotAccessibleInClodule.types | 2 +- ...teStaticNotAccessibleInClodule2.errors.txt | 2 +- .../privateStaticNotAccessibleInClodule2.js | 2 +- ...ivateStaticNotAccessibleInClodule2.js.diff | 41 +- ...ivateStaticNotAccessibleInClodule2.symbols | 2 +- ...privateStaticNotAccessibleInClodule2.types | 2 +- .../conformance/propertyAccess.js.diff | 50 +- .../conformance/propertyAccessChain.3.js.diff | 25 +- .../propertyAccessNumericLiterals.js.diff | 13 +- ...cessOnTypeParameterWithConstraints.js.diff | 32 + ...nTypeParameterWithConstraints.symbols.diff | 68 + ...essOnTypeParameterWithConstraints2.js.diff | 75 + ...essOnTypeParameterWithConstraints3.js.diff | 77 + ...essOnTypeParameterWithConstraints4.js.diff | 32 + ...TypeParameterWithConstraints4.symbols.diff | 60 + ...essOnTypeParameterWithConstraints5.js.diff | 69 + ...sOnTypeParameterWithoutConstraints.js.diff | 32 + ...propertyAccessStringIndexSignature.js.diff | 16 + ...sStringIndexSignatureNoImplicitAny.js.diff | 16 + .../propertyAccessWidening.js.diff | 21 +- .../propertyAccessWidening.types.diff | 26 +- .../propertyAndAccessorWithSameName.js.diff | 65 +- .../propertyAndFunctionWithSameName.js.diff | 27 +- .../propertyAssignmentUseParentType1.js.diff | 19 + .../propertyNameWithoutTypeAnnotation.js.diff | 15 +- .../propertyNamedConstructor.js.diff | 23 +- .../propertyNamedPrototype.js.diff | 12 +- .../propertyNamesOfReservedWords.js.diff | 15 +- .../propertyOverridesAccessors4.js.diff | 33 +- ...ClassPropertyAccessibleWithinClass.js.diff | 101 +- ...ropertyAccessibleWithinNestedClass.js.diff | 69 +- ...ertyAccessibleWithinNestedSubclass.js.diff | 93 +- ...rtyAccessibleWithinNestedSubclass1.js.diff | 181 +- ...ssPropertyAccessibleWithinSubclass.js.diff | 62 +- ...sPropertyAccessibleWithinSubclass2.js.diff | 118 +- ...sPropertyAccessibleWithinSubclass3.js.diff | 47 +- ...otectedInstanceMemberAccessibility.js.diff | 73 +- ...ssPropertyAccessibleWithinSubclass.js.diff | 100 +- ...sPropertyAccessibleWithinSubclass2.js.diff | 73 +- ...tedStaticNotAccessibleInClodule.errors.txt | 2 +- .../protectedStaticNotAccessibleInClodule.js | 2 +- ...tectedStaticNotAccessibleInClodule.js.diff | 15 +- ...tectedStaticNotAccessibleInClodule.symbols | 2 +- ...rotectedStaticNotAccessibleInClodule.types | 2 +- ...nmentMergeWithInterfaceMethod.symbols.diff | 44 +- .../conformance/publicIndexer.js.diff | 27 + .../conformance/quotedConstructors.js.diff | 65 + .../reExportAliasMakesInstantiated.js | 8 +- .../reExportAliasMakesInstantiated.js.diff | 3 +- .../reExportAliasMakesInstantiated.symbols | 14 +- .../reExportAliasMakesInstantiated.types | 8 +- .../readonlyArraysAndTuples.symbols.diff | 28 + .../readonlyArraysAndTuples2.js.diff | 12 +- .../readonlyArraysAndTuples2.symbols.diff | 19 + .../readonlyConstructorAssignment.js.diff | 95 +- .../readonlyInConstructorParameters.js.diff | 45 +- .../conformance/readonlyReadonly.js.diff | 14 +- .../readonlyRestParameters.js.diff | 54 +- .../conformance/recursiveInitializer.js.diff | 8 + .../recursiveMappedTypes.types.diff | 21 +- .../recursiveTypeInGenericConstraint.js.diff | 30 +- .../recursiveTypeReferences1.js.diff | 89 +- .../recursiveTypeReferences1.symbols.diff | 65 + .../recursiveTypeReferences2.js.diff | 7 +- ...rsiveTypesUsedAsFunctionParameters.js.diff | 24 +- .../recursiveTypesWithTypeof.symbols.diff | 20 + .../reexportClassDefinition.js.diff | 38 +- .../relativePathToDeclarationFile.errors.txt | 4 +- ...ativePathToDeclarationFile.errors.txt.diff | 4 +- .../relativePathToDeclarationFile.js | 4 +- .../relativePathToDeclarationFile.symbols | 2 +- ...relativePathToDeclarationFile.symbols.diff | 2 +- .../relativePathToDeclarationFile.types | 2 +- .../relativePathToDeclarationFile.types.diff | 2 +- .../submodule/conformance/renamed.js.diff | 20 +- .../requireOfESWithPropertyAccess.js.diff | 17 +- .../requireTwoPropertyAccesses.js.diff | 8 +- ...resolutionModeTripleSlash4.errors.txt.diff | 14 +- ...resolutionModeTripleSlash5.errors.txt.diff | 20 + .../conformance/restElementMustBeLast.js.diff | 11 + .../restElementWithAssignmentPattern3.js.diff | 11 + .../restElementWithAssignmentPattern4.js.diff | 11 + .../restElementWithAssignmentPattern5.js.diff | 10 + .../restElementWithBindingPattern.js.diff | 8 + .../restElementWithBindingPattern2.js.diff | 8 + .../restElementWithInitializer1.js.diff | 8 + .../restElementWithInitializer2.js.diff | 11 + .../restElementWithNullInitializer.js.diff | 25 + .../restParameterInDownlevelGenerator.js.diff | 33 + ...rameterWithoutAnnotationIsAnyArray.js.diff | 64 + .../restParametersOfNonArrayTypes.js.diff | 64 + ...restParametersOfNonArrayTypes.symbols.diff | 20 + .../restParametersOfNonArrayTypes2.js.diff | 119 +- ...estParametersOfNonArrayTypes2.symbols.diff | 17 + ...ParametersWithArrayTypeAnnotations.js.diff | 122 + ...etersWithArrayTypeAnnotations.symbols.diff | 92 + .../restPropertyWithBindingPattern.types.diff | 19 + .../conformance/restTupleElements1.js.diff | 52 +- .../restTuplesFromContextualTypes.js.diff | 291 +- ...entNoAsiAfterTransform(target=es5).js.diff | 9 +- .../conformance/returnStatements.js.diff | 51 +- .../conformance/returnStatements.symbols.diff | 13 + .../conformance/scannerClass2.js.diff | 16 +- .../conformance/scannertest1.js.diff | 35 + .../scopeResolutionIdentifiers.errors.txt | 8 +- .../conformance/scopeResolutionIdentifiers.js | 8 +- .../scopeResolutionIdentifiers.js.diff | 26 +- .../scopeResolutionIdentifiers.symbols | 8 +- .../scopeResolutionIdentifiers.symbols.diff | 19 + .../scopeResolutionIdentifiers.types | 8 +- .../submodule/conformance/seeTag1.js.diff | 17 + .../submodule/conformance/seeTag2.js.diff | 29 + .../submodule/conformance/seeTag4.js.diff | 8 +- .../shadowedInternalModule.errors.txt | 24 +- .../conformance/shadowedInternalModule.js | 24 +- .../shadowedInternalModule.js.diff | 14 +- .../shadowedInternalModule.symbols | 58 +- .../conformance/shadowedInternalModule.types | 24 +- .../conformance/sharedMemory.types.diff | 12 +- ...otSubtypeOfNonSpecializedSignature.js.diff | 36 + ...typeOfNonSpecializedSignature.symbols.diff | 29 + ...IsSubtypeOfNonSpecializedSignature.js.diff | 32 +- ...typeOfNonSpecializedSignature.symbols.diff | 29 + .../spellingUncheckedJS.symbols.diff | 9 +- ...preadContextualTypedBindingPattern.js.diff | 8 + .../conformance/spreadDuplicate.js.diff | 25 +- .../conformance/spreadDuplicateExact.js.diff | 25 +- .../conformance/spreadExcessProperty.js.diff | 10 + .../conformance/spreadNonPrimitive.js.diff | 8 + .../conformance/spreadNonPrimitive.types.diff | 11 + .../conformance/spreadObjectOrFalsy.js.diff | 28 +- .../spreadOverwritesPropertyStrict.types.diff | 50 +- .../conformance/spreadUnion.types.diff | 19 + .../conformance/spreadUnion2.errors.txt.diff | 60 + .../conformance/spreadUnion2.types.diff | 73 + .../conformance/spreadUnion3.js.diff | 13 + .../conformance/spreadUnion4.js.diff | 8 + ...aticAndNonStaticPropertiesSameName.js.diff | 18 +- .../conformance/staticFactory1.js.diff | 47 + .../conformance/staticIndexSignature1.js.diff | 21 + .../conformance/staticIndexSignature2.js.diff | 21 + .../conformance/staticIndexSignature3.js.diff | 68 +- .../conformance/staticIndexSignature4.js.diff | 20 +- .../conformance/staticIndexSignature5.js.diff | 9 +- .../conformance/staticIndexSignature6.js.diff | 21 +- .../conformance/staticIndexSignature7.js.diff | 18 +- .../conformance/staticIndexers.js.diff | 27 + ...ssignsToConstructorFunctionMembers.js.diff | 29 + .../staticMemberInitialization.js.diff | 6 +- ...aticMembersUsingClassTypeParameter.js.diff | 39 +- ...embersUsingClassTypeParameter.symbols.diff | 11 + ...ticPropertyAndFunctionWithSameName.js.diff | 24 +- ...(usedefineforclassfields=false).errors.txt | 20 +- ...efineforclassfields=false).errors.txt.diff | 4 +- ...onflicts(usedefineforclassfields=false).js | 20 +- ...cts(usedefineforclassfields=false).js.diff | 681 +- ...cts(usedefineforclassfields=false).symbols | 40 +- ...licts(usedefineforclassfields=false).types | 20 +- ...s(usedefineforclassfields=true).errors.txt | 20 +- ...Conflicts(usedefineforclassfields=true).js | 20 +- ...icts(usedefineforclassfields=true).js.diff | 1001 +- ...icts(usedefineforclassfields=true).symbols | 40 +- ...flicts(usedefineforclassfields=true).types | 20 +- .../staticPropertyNotInClassType.errors.txt | 8 +- .../staticPropertyNotInClassType.js | 8 +- .../staticPropertyNotInClassType.js.diff | 56 +- .../staticPropertyNotInClassType.symbols | 24 +- .../staticPropertyNotInClassType.types | 8 +- .../conformance/strictBindCallApply1.js.diff | 130 +- .../conformance/strictBindCallApply2.js.diff | 3 +- .../strictNullChecksNoWidening.types.diff | 18 + .../stringEnumInElementAccess01.js.diff | 8 + .../stringEnumLiteralTypes1.types.diff | 20 + .../stringEnumLiteralTypes2.types.diff | 20 + ...exerConstrainsPropertyDeclarations.js.diff | 68 +- ...onstrainsPropertyDeclarations.symbols.diff | 11 +- ...xerConstrainsPropertyDeclarations2.js.diff | 54 +- .../conformance/stringIndexingResults.js.diff | 15 +- ...teralTypeIsSubtypeOfString.errors.txt.diff | 113 + ...stringLiteralTypeIsSubtypeOfString.js.diff | 67 +- ...gLiteralTypeIsSubtypeOfString.symbols.diff | 89 + ...sAndLogicalOrExpressions01.errors.txt.diff | 15 + ...eralTypesAndLogicalOrExpressions01.js.diff | 19 + ...lTypesAndLogicalOrExpressions01.types.diff | 15 + ...TypesAndParenthesizedExpressions01.js.diff | 17 + ...esAndParenthesizedExpressions01.types.diff | 24 + .../stringLiteralTypesAndTuples01.js.diff | 13 + .../stringLiteralTypesAsTags01.js.diff | 28 + .../stringLiteralTypesAsTags02.js.diff | 28 + .../stringLiteralTypesAsTags03.js.diff | 28 + ...alTypesAsTypeParameterConstraint01.js.diff | 29 + ...ypesAsTypeParameterConstraint01.types.diff | 39 +- ...alTypesAsTypeParameterConstraint02.js.diff | 13 + ...ypesAsTypeParameterConstraint02.types.diff | 10 +- ...ralTypesInImplementationSignatures.js.diff | 25 + ...alTypesInImplementationSignatures2.js.diff | 18 +- .../stringLiteralTypesInUnionTypes01.js.diff | 23 + ...tringLiteralTypesInUnionTypes01.types.diff | 34 + .../stringLiteralTypesInUnionTypes02.js.diff | 23 + .../stringLiteralTypesInUnionTypes03.js.diff | 23 + ...tringLiteralTypesInUnionTypes03.types.diff | 34 + .../stringLiteralTypesInUnionTypes04.js.diff | 43 + ...teralTypesInVariableDeclarations01.js.diff | 26 + ...iteralTypesOverloadAssignability01.js.diff | 12 + ...iteralTypesOverloadAssignability02.js.diff | 12 + ...iteralTypesOverloadAssignability03.js.diff | 12 + ...iteralTypesOverloadAssignability04.js.diff | 12 + ...iteralTypesOverloadAssignability05.js.diff | 12 + .../stringLiteralTypesOverloads01.js.diff | 60 + .../stringLiteralTypesOverloads01.types.diff | 75 +- .../stringLiteralTypesOverloads02.js.diff | 45 + .../stringLiteralTypesOverloads02.types.diff | 64 +- .../stringLiteralTypesOverloads03.js.diff | 47 + .../stringLiteralTypesOverloads04.js.diff | 12 + .../stringLiteralTypesOverloads04.types.diff | 18 +- ...stringLiteralTypesTypePredicates01.js.diff | 22 + ...gLiteralTypesWithTemplateStrings01.js.diff | 18 + ...gLiteralTypesWithTemplateStrings02.js.diff | 14 + ...LiteralTypesWithVariousOperators01.js.diff | 61 + ...LiteralTypesWithVariousOperators02.js.diff | 41 + ...stringLiteralsWithEqualityChecks01.js.diff | 15 + ...ingLiteralsWithEqualityChecks01.types.diff | 92 + ...stringLiteralsWithEqualityChecks02.js.diff | 15 + ...ingLiteralsWithEqualityChecks02.types.diff | 92 + ...teralsWithEqualityChecks03.errors.txt.diff | 40 + ...stringLiteralsWithEqualityChecks03.js.diff | 15 + ...ingLiteralsWithEqualityChecks03.types.diff | 91 + ...teralsWithEqualityChecks04.errors.txt.diff | 40 + ...stringLiteralsWithEqualityChecks04.js.diff | 15 + ...ingLiteralsWithEqualityChecks04.types.diff | 91 + ...ringLiteralsWithSwitchStatements01.js.diff | 13 + ...gLiteralsWithSwitchStatements01.types.diff | 24 + ...ringLiteralsWithSwitchStatements02.js.diff | 15 + ...gLiteralsWithSwitchStatements02.types.diff | 59 + ...ringLiteralsWithSwitchStatements03.js.diff | 15 + ...gLiteralsWithSwitchStatements03.types.diff | 50 + ...ralsWithSwitchStatements04.errors.txt.diff | 20 + ...ringLiteralsWithSwitchStatements04.js.diff | 13 + ...gLiteralsWithSwitchStatements04.types.diff | 31 + ...stringLiteralsWithTypeAssertions01.js.diff | 20 + ...ingLiteralsWithTypeAssertions01.types.diff | 38 + .../stringNamedPropertyAccess.js.diff | 15 +- .../stringNamedPropertyDuplicates.js.diff | 15 +- .../submodule/conformance/subtypesOfAny.js | 4 +- .../conformance/subtypesOfAny.js.diff | 34 +- .../conformance/subtypesOfAny.symbols | 4 +- .../conformance/subtypesOfAny.symbols.diff | 19 + .../submodule/conformance/subtypesOfAny.types | 4 +- .../subtypesOfTypeParameter.errors.txt | 4 +- .../conformance/subtypesOfTypeParameter.js | 4 +- .../subtypesOfTypeParameter.js.diff | 87 +- .../subtypesOfTypeParameter.symbols | 4 +- .../subtypesOfTypeParameter.symbols.diff | 18 + .../conformance/subtypesOfTypeParameter.types | 4 +- .../subtypesOfTypeParameter.types.diff | 104 +- ...ypesOfTypeParameterWithConstraints.js.diff | 346 +- ...fTypeParameterWithConstraints.symbols.diff | 208 + ...subtypesOfTypeParameterWithConstraints2.js | 4 +- ...pesOfTypeParameterWithConstraints2.js.diff | 54 +- ...pesOfTypeParameterWithConstraints2.symbols | 4 +- ...TypeParameterWithConstraints2.symbols.diff | 76 + ...typesOfTypeParameterWithConstraints2.types | 4 +- ...OfTypeParameterWithConstraints2.types.diff | 23 + ...pesOfTypeParameterWithConstraints4.js.diff | 139 +- ...OfTypeParameterWithConstraints4.types.diff | 23 + ...rameterWithRecursiveConstraints.errors.txt | 4 +- ...OfTypeParameterWithRecursiveConstraints.js | 4 +- ...eParameterWithRecursiveConstraints.js.diff | 287 +- ...eParameterWithRecursiveConstraints.symbols | 44 +- ...ypeParameterWithRecursiveConstraints.types | 4 +- ...rameterWithRecursiveConstraints.types.diff | 64 + .../conformance/subtypesOfUnion.errors.txt | 4 +- .../submodule/conformance/subtypesOfUnion.js | 4 +- .../conformance/subtypesOfUnion.js.diff | 33 +- .../conformance/subtypesOfUnion.symbols | 18 +- .../conformance/subtypesOfUnion.symbols.diff | 30 + .../conformance/subtypesOfUnion.types | 4 +- .../subtypingWithCallSignatures.js | 2 +- .../subtypingWithCallSignatures.js.diff | 15 + .../subtypingWithCallSignatures.symbols | 10 +- .../subtypingWithCallSignatures.types | 2 +- .../subtypingWithCallSignatures2.js.diff | 184 +- .../subtypingWithCallSignatures2.symbols.diff | 106 + .../subtypingWithCallSignatures3.js | 4 +- .../subtypingWithCallSignatures3.js.diff | 145 +- .../subtypingWithCallSignatures3.symbols | 66 +- .../subtypingWithCallSignatures3.symbols.diff | 48 + .../subtypingWithCallSignatures3.types | 4 +- .../subtypingWithCallSignatures4.js.diff | 131 +- .../subtypingWithCallSignaturesA.js.diff | 8 + ...aturesWithSpecializedSignatures.errors.txt | 4 +- ...CallSignaturesWithSpecializedSignatures.js | 4 +- ...ignaturesWithSpecializedSignatures.symbols | 12 +- ...lSignaturesWithSpecializedSignatures.types | 4 +- .../subtypingWithConstructSignatures.js | 2 +- .../subtypingWithConstructSignatures.symbols | 10 +- .../subtypingWithConstructSignatures.types | 2 +- .../subtypingWithConstructSignatures2.js.diff | 63 +- ...ypingWithConstructSignatures2.symbols.diff | 106 + .../subtypingWithConstructSignatures3.js | 4 +- .../subtypingWithConstructSignatures3.js.diff | 65 +- .../subtypingWithConstructSignatures3.symbols | 66 +- ...ypingWithConstructSignatures3.symbols.diff | 48 + .../subtypingWithConstructSignatures3.types | 4 +- .../subtypingWithConstructSignatures4.js.diff | 63 +- .../subtypingWithConstructSignatures5.js.diff | 60 +- ...ypingWithConstructSignatures5.symbols.diff | 61 + .../subtypingWithConstructSignatures6.js.diff | 60 +- ...aturesWithSpecializedSignatures.errors.txt | 4 +- ...ructSignaturesWithSpecializedSignatures.js | 4 +- ...ignaturesWithSpecializedSignatures.symbols | 12 +- ...tSignaturesWithSpecializedSignatures.types | 4 +- ...ignaturesWithOptionalParameters.errors.txt | 6 +- ...ricCallSignaturesWithOptionalParameters.js | 6 +- ...llSignaturesWithOptionalParameters.symbols | 120 +- ...CallSignaturesWithOptionalParameters.types | 6 +- ...ignaturesWithOptionalParameters.errors.txt | 6 +- ...nstructSignaturesWithOptionalParameters.js | 6 +- ...ctSignaturesWithOptionalParameters.symbols | 120 +- ...ructSignaturesWithOptionalParameters.types | 6 +- .../subtypingWithNumericIndexer.errors.txt | 2 +- .../subtypingWithNumericIndexer.js | 2 +- .../subtypingWithNumericIndexer.js.diff | 89 +- .../subtypingWithNumericIndexer.symbols | 12 +- .../subtypingWithNumericIndexer.types | 2 +- .../subtypingWithNumericIndexer2.errors.txt | 2 +- .../subtypingWithNumericIndexer2.js | 2 +- .../subtypingWithNumericIndexer2.symbols | 14 +- .../subtypingWithNumericIndexer2.types | 2 +- .../subtypingWithNumericIndexer3.errors.txt | 2 +- .../subtypingWithNumericIndexer3.js | 2 +- .../subtypingWithNumericIndexer3.js.diff | 98 +- .../subtypingWithNumericIndexer3.symbols | 14 +- .../subtypingWithNumericIndexer3.types | 2 +- .../subtypingWithNumericIndexer4.errors.txt | 2 +- .../subtypingWithNumericIndexer4.js | 2 +- .../subtypingWithNumericIndexer4.js.diff | 62 +- .../subtypingWithNumericIndexer4.symbols | 8 +- .../subtypingWithNumericIndexer4.types | 2 +- .../subtypingWithNumericIndexer5.errors.txt | 2 +- .../subtypingWithNumericIndexer5.js | 2 +- .../subtypingWithNumericIndexer5.js.diff | 55 +- .../subtypingWithNumericIndexer5.symbols | 14 +- .../subtypingWithNumericIndexer5.types | 2 +- .../subtypingWithObjectMembers.errors.txt | 2 +- .../conformance/subtypingWithObjectMembers.js | 2 +- .../subtypingWithObjectMembers.js.diff | 169 +- .../subtypingWithObjectMembers.symbols | 6 +- .../subtypingWithObjectMembers.symbols.diff | 2 +- .../subtypingWithObjectMembers.types | 2 +- .../subtypingWithObjectMembers2.errors.txt | 4 +- .../subtypingWithObjectMembers2.js | 4 +- .../subtypingWithObjectMembers2.symbols | 12 +- .../subtypingWithObjectMembers2.types | 4 +- .../subtypingWithObjectMembers3.errors.txt | 4 +- .../subtypingWithObjectMembers3.js | 4 +- .../subtypingWithObjectMembers3.symbols | 12 +- .../subtypingWithObjectMembers3.types | 4 +- .../subtypingWithObjectMembers4.js.diff | 98 +- .../subtypingWithObjectMembers5.errors.txt | 4 +- .../subtypingWithObjectMembers5.js | 4 +- .../subtypingWithObjectMembers5.js.diff | 57 +- .../subtypingWithObjectMembers5.symbols | 12 +- .../subtypingWithObjectMembers5.types | 4 +- ...pingWithObjectMembersAccessibility.js.diff | 98 +- ...WithObjectMembersAccessibility2.errors.txt | 4 +- ...ubtypingWithObjectMembersAccessibility2.js | 4 +- ...ingWithObjectMembersAccessibility2.js.diff | 158 +- ...ingWithObjectMembersAccessibility2.symbols | 12 +- ...ypingWithObjectMembersAccessibility2.types | 4 +- .../subtypingWithObjectMembersOptionality.js | 2 +- ...typingWithObjectMembersOptionality.symbols | 6 +- ...ubtypingWithObjectMembersOptionality.types | 2 +- .../subtypingWithStringIndexer.errors.txt | 2 +- .../conformance/subtypingWithStringIndexer.js | 2 +- .../subtypingWithStringIndexer.js.diff | 89 +- .../subtypingWithStringIndexer.symbols | 12 +- .../subtypingWithStringIndexer.types | 2 +- .../subtypingWithStringIndexer2.errors.txt | 2 +- .../subtypingWithStringIndexer2.js | 2 +- .../subtypingWithStringIndexer2.symbols | 14 +- .../subtypingWithStringIndexer2.types | 2 +- .../subtypingWithStringIndexer3.errors.txt | 2 +- .../subtypingWithStringIndexer3.js | 2 +- .../subtypingWithStringIndexer3.js.diff | 98 +- .../subtypingWithStringIndexer3.symbols | 14 +- .../subtypingWithStringIndexer3.types | 2 +- .../subtypingWithStringIndexer4.errors.txt | 2 +- .../subtypingWithStringIndexer4.js | 2 +- .../subtypingWithStringIndexer4.js.diff | 62 +- .../subtypingWithStringIndexer4.symbols | 8 +- .../subtypingWithStringIndexer4.types | 2 +- .../superCallBeforeThisAccessing1.js.diff | 51 +- .../superCallBeforeThisAccessing2.js.diff | 47 +- .../superCallBeforeThisAccessing3.js.diff | 51 +- .../superCallBeforeThisAccessing4.js.diff | 58 +- .../superCallBeforeThisAccessing5.js.diff | 30 +- .../superCallBeforeThisAccessing6.js.diff | 47 +- .../superCallBeforeThisAccessing7.js.diff | 51 +- .../superCallBeforeThisAccessing8.js.diff | 52 +- ...BaseTypeButWithSameSymbolInterface.js.diff | 16 + ...ypeButWithSameSymbolInterface.symbols.diff | 11 + ...perCallInConstructorWithNoBaseType.js.diff | 28 +- ...uperCallParameterContextualTyping1.js.diff | 40 +- ...allParameterContextualTyping1.symbols.diff | 11 + ...uperCallParameterContextualTyping2.js.diff | 40 +- ...allParameterContextualTyping2.symbols.diff | 10 + ...uperCallParameterContextualTyping3.js.diff | 73 + .../submodule/conformance/superCalls.js.diff | 71 +- .../superInStaticMembers1(target=es5).js.diff | 1680 +++- .../superPropertyAccessNoError.js.diff | 132 + ...opertyInConstructorBeforeSuperCall.js.diff | 60 + .../superSymbolIndexedAccess5.js.diff | 49 + .../superSymbolIndexedAccess6.js.diff | 49 + .../conformance/switchStatements.errors.txt | 2 +- .../submodule/conformance/switchStatements.js | 2 +- .../conformance/switchStatements.js.diff | 65 +- .../conformance/switchStatements.symbols | 8 +- .../conformance/switchStatements.symbols.diff | 20 + .../conformance/switchStatements.types | 2 +- .../conformance/switchStatements.types.diff | 16 + .../symbolDeclarationEmit12.errors.txt | 2 +- .../symbolDeclarationEmit12.errors.txt.diff | 2 +- .../conformance/symbolDeclarationEmit12.js | 2 +- .../symbolDeclarationEmit12.symbols | 12 +- .../symbolDeclarationEmit12.symbols.diff | 2 +- .../conformance/symbolDeclarationEmit12.types | 2 +- .../submodule/conformance/symbolProperty48.js | 2 +- .../conformance/symbolProperty48.symbols | 2 +- .../conformance/symbolProperty48.types | 2 +- .../submodule/conformance/symbolProperty49.js | 2 +- .../conformance/symbolProperty49.symbols | 2 +- .../conformance/symbolProperty49.types | 2 +- .../submodule/conformance/symbolProperty50.js | 2 +- .../conformance/symbolProperty50.symbols | 4 +- .../conformance/symbolProperty50.types | 2 +- .../submodule/conformance/symbolProperty51.js | 4 +- .../conformance/symbolProperty51.symbols | 8 +- .../conformance/symbolProperty51.types | 4 +- .../submodule/conformance/symbolProperty55.js | 2 +- .../conformance/symbolProperty55.symbols | 2 +- .../conformance/symbolProperty55.symbols.diff | 11 + .../conformance/symbolProperty55.types | 2 +- .../submodule/conformance/symbolProperty56.js | 2 +- .../conformance/symbolProperty56.symbols | 2 +- .../conformance/symbolProperty56.types | 2 +- .../conformance/symbolProperty58.symbols.diff | 11 + .../conformance/symbolProperty61.symbols.diff | 11 + .../conformance/symbolType17.types.diff | 10 + .../conformance/symbolType18.types.diff | 10 + .../conformance/symbolType19.types.diff | 10 + .../conformance/symbolType3.types.diff | 11 + .../conformance/taggedTemplateChain.js.diff | 14 + ...nCharactersThatArePartsOfEscapes01.js.diff | 19 + ...nCharactersThatArePartsOfEscapes02.js.diff | 8 + ...ringsTypeArgumentInference.errors.txt.diff | 19 + ...mplateStringsTypeArgumentInference.js.diff | 101 + ...eStringsTypeArgumentInference.symbols.diff | 19 + ...ateStringsTypeArgumentInference.types.diff | 22 + ...gsTypeArgumentInferenceES6.errors.txt.diff | 19 + ...StringsTypeArgumentInferenceES6.types.diff | 22 + ...teStringsWithIncompatibleTypedTags.js.diff | 33 + ...gsWithManyCallAndMemberExpressions.js.diff | 13 + ...lateStringsWithOverloadResolution1.js.diff | 35 + ...lateStringsWithOverloadResolution2.js.diff | 32 + ...ngsWithOverloadResolution3.errors.txt.diff | 17 +- ...lateStringsWithOverloadResolution3.js.diff | 70 + ...tringsWithOverloadResolution3.symbols.diff | 10 + ...TemplateStringsWithTagNamedDeclare.js.diff | 19 + ...dTemplateStringsWithTagsTypedAsAny.js.diff | 35 + ...xpressionsInSubstitutionExpression.js.diff | 19 + ...taggedTemplateStringsWithTypedTags.js.diff | 31 + .../taggedTemplateUntypedTagCall01.js.diff | 13 + ...aggedTemplateUntypedTagCall01.symbols.diff | 11 + ...ggedTemplateWithConstructableTag01.js.diff | 19 + ...ggedTemplateWithConstructableTag02.js.diff | 13 + .../templateInsideCallback.js.diff | 25 +- .../conformance/templateLiteralTypes1.js.diff | 53 +- .../templateLiteralTypes1.types.diff | 36 +- .../templateLiteralTypes2.errors.txt.diff | 26 + .../conformance/templateLiteralTypes2.js.diff | 148 +- .../templateLiteralTypes2.symbols.diff | 11 + .../templateLiteralTypes2.types.diff | 100 +- .../conformance/templateLiteralTypes3.js.diff | 98 +- .../templateLiteralTypes3.types.diff | 45 +- .../templateLiteralTypes4.types.diff | 11 +- ...mplateLiteralTypesPatterns.errors.txt.diff | 61 + .../templateLiteralTypesPatterns.js.diff | 87 + .../templateLiteralTypesPatterns.types.diff | 31 +- ...sPatternsPrefixSuffixAssignability.js.diff | 14 + .../templateStringBinaryOperations.js.diff | 102 + ...plateStringBinaryOperationsInvalid.js.diff | 198 + ...ateStringControlCharacterEscapes01.js.diff | 8 + ...ateStringControlCharacterEscapes02.js.diff | 8 + ...ateStringControlCharacterEscapes03.js.diff | 8 + ...ateStringControlCharacterEscapes04.js.diff | 8 + .../conformance/templateStringInArray.js.diff | 8 + .../templateStringInArrowFunction.js.diff | 8 + .../templateStringInCallExpression.js.diff | 8 + .../templateStringInConditional.js.diff | 8 + .../templateStringInDeleteExpression.js.diff | 8 + .../templateStringInDivision.js.diff | 8 + .../templateStringInEqualityChecks.js.diff | 14 + ...templateStringInFunctionExpression.js.diff | 11 + .../templateStringInInOperator.js.diff | 8 + .../templateStringInIndexExpression.js.diff | 8 + .../templateStringInInstanceOf.js.diff | 8 + .../templateStringInInstanceOf.symbols.diff | 8 + .../templateStringInModuleName.js.diff | 20 + .../templateStringInModulo.js.diff | 8 + .../templateStringInMultiplication.js.diff | 8 + .../templateStringInNewExpression.js.diff | 8 + .../templateStringInNewOperator.js.diff | 8 + .../templateStringInObjectLiteral.js.diff | 16 + .../templateStringInParentheses.js.diff | 8 + ...templateStringInPropertyAssignment.js.diff | 9 + .../templateStringInPropertyName1.js.diff | 13 + .../templateStringInPropertyName2.js.diff | 13 + .../templateStringInSwitchAndCase.js.diff | 17 + .../templateStringInTaggedTemplate.js.diff | 12 + .../templateStringInTypeAssertion.js.diff | 8 + .../templateStringInTypeOf.js.diff | 8 + .../templateStringInTypeOf.types.diff | 12 + .../templateStringInTypeOfES6.types.diff | 12 + .../templateStringInUnaryPlus.js.diff | 8 + .../conformance/templateStringInWhile.js.diff | 11 + .../templateStringMultiline1.js.diff | 10 + .../templateStringMultiline2.js.diff | 10 + .../templateStringMultiline3.js.diff | 10 +- ...nCharactersThatArePartsOfEscapes01.js.diff | 8 + ...nCharactersThatArePartsOfEscapes02.js.diff | 8 + .../templateStringTermination1.js.diff | 8 + .../templateStringTermination2.js.diff | 8 + .../templateStringTermination3.js.diff | 8 + .../templateStringTermination4.js.diff | 8 + .../templateStringTermination5.js.diff | 8 + .../templateStringUnterminated1.js.diff | 8 + .../templateStringUnterminated2.js.diff | 8 + .../templateStringUnterminated3.js.diff | 8 + .../templateStringUnterminated4.js.diff | 8 + .../templateStringUnterminated5.js.diff | 8 + .../templateStringWhitespaceEscapes1.js.diff | 8 + .../templateStringWhitespaceEscapes2.js.diff | 8 + ...mplateStringWithBackslashEscapes01.js.diff | 14 + ...eStringWithCommentsInArrowFunction.js.diff | 24 + ...templateStringWithEmbeddedAddition.js.diff | 8 + .../templateStringWithEmbeddedArray.js.diff | 8 + ...ateStringWithEmbeddedArrowFunction.js.diff | 8 + ...templateStringWithEmbeddedComments.js.diff | 20 + ...plateStringWithEmbeddedConditional.js.diff | 8 + ...teStringWithEmbeddedConditional.types.diff | 11 + ...tringWithEmbeddedConditionalES6.types.diff | 11 + ...templateStringWithEmbeddedDivision.js.diff | 8 + ...ringWithEmbeddedFunctionExpression.js.diff | 8 + ...mplateStringWithEmbeddedInOperator.js.diff | 8 + ...mplateStringWithEmbeddedInstanceOf.js.diff | 8 + ...eStringWithEmbeddedInstanceOf.symbols.diff | 8 + .../templateStringWithEmbeddedModulo.js.diff | 8 + ...teStringWithEmbeddedMultiplication.js.diff | 8 + ...plateStringWithEmbeddedNewOperator.js.diff | 8 + ...StringWithEmbeddedNewOperator.symbols.diff | 8 + ...ateStringWithEmbeddedObjectLiteral.js.diff | 8 + ...teStringWithEmbeddedTemplateString.js.diff | 8 + ...ithEmbeddedTypeAssertionOnAddition.js.diff | 8 + ...teStringWithEmbeddedTypeOfOperator.js.diff | 8 + ...tringWithEmbeddedTypeOfOperator.types.diff | 9 + ...ngWithEmbeddedTypeOfOperatorES6.types.diff | 9 + ...emplateStringWithEmbeddedUnaryPlus.js.diff | 8 + ...ngWithEmbeddedYieldKeyword.errors.txt.diff | 11 + ...lateStringWithEmbeddedYieldKeyword.js.diff | 49 + ...eStringWithEmbeddedYieldKeyword.types.diff | 11 + ...lateStringWithEmptyLiteralPortions.js.diff | 32 + ...ringWithOpenCommentInStringPortion.js.diff | 8 + .../templateStringWithPropertyAccess.js.diff | 8 + ...xpressionsInSubstitutionExpression.js.diff | 8 + .../thisAndSuperInStaticMembers3.js.diff | 71 +- .../thisAndSuperInStaticMembers4.js.diff | 41 +- .../thisInInstanceMemberInitializer.js.diff | 23 +- .../thisInInvalidContexts.errors.txt | 2 +- .../conformance/thisInInvalidContexts.js | 2 +- .../conformance/thisInInvalidContexts.js.diff | 78 +- .../conformance/thisInInvalidContexts.symbols | 2 +- .../conformance/thisInInvalidContexts.types | 2 +- ...InInvalidContextsExternalModule.errors.txt | 2 +- .../thisInInvalidContextsExternalModule.js | 2 +- ...hisInInvalidContextsExternalModule.js.diff | 78 +- ...hisInInvalidContextsExternalModule.symbols | 2 +- .../thisInInvalidContextsExternalModule.types | 2 +- .../conformance/thisInObjectLiterals.js.diff | 26 +- .../conformance/thisTypeAccessibility.js.diff | 26 +- .../thisTypeAndConstraints.js.diff | 43 + .../conformance/thisTypeErrors.js.diff | 53 +- .../conformance/thisTypeErrors2.js.diff | 37 +- .../conformance/thisTypeInAccessors.js.diff | 65 +- .../thisTypeInAccessorsNegative.js.diff | 17 + .../thisTypeInAccessorsNegative.types.diff | 23 + .../conformance/thisTypeInClasses.js.diff | 71 +- .../thisTypeInClasses.symbols.diff | 16 + .../conformance/thisTypeInFunctions.js.diff | 271 +- .../conformance/thisTypeInFunctions2.js.diff | 42 + .../conformance/thisTypeInFunctions3.js.diff | 35 + .../conformance/thisTypeInFunctions4.js.diff | 16 + .../thisTypeInFunctions4.types.diff | 19 + .../thisTypeInInterfaces.symbols.diff | 16 + .../thisTypeInObjectLiterals.js.diff | 33 + .../thisTypeInObjectLiterals2.js.diff | 212 +- .../conformance/thisTypeInTuples.js.diff | 14 + .../conformance/thisTypeInTuples.symbols.diff | 13 + .../thisTypeInTypePredicate.js.diff | 8 + .../thisTypeInTypePredicate.types.diff | 9 + .../thisTypeSyntacticContext.js.diff | 11 + .../throwInEnclosingStatements.js.diff | 37 +- .../submodule/conformance/throwStatements.js | 2 +- .../conformance/throwStatements.js.diff | 48 +- .../conformance/throwStatements.symbols | 8 +- .../conformance/throwStatements.symbols.diff | 20 + .../conformance/throwStatements.types | 2 +- .../conformance/throwStatements.types.diff | 11 + .../trailingCommasInBindingPatterns.js.diff | 26 +- ...asInFunctionParametersAndArguments.js.diff | 35 + .../trailingCommasInGetter.js.diff | 19 + .../ts-expect-error-nocheck.js.diff | 8 + .../tsNoCheckForTypescript.js.diff | 10 +- .../tsNoCheckForTypescriptComments1.js.diff | 10 +- .../tsNoCheckForTypescriptComments2.js.diff | 10 +- .../tsxAttributeInvalidNames.errors.txt | 2 +- .../conformance/tsxAttributeInvalidNames.js | 2 +- .../tsxAttributeInvalidNames.symbols | 4 +- .../tsxAttributeInvalidNames.types | 2 +- .../tsxAttributeResolution1.errors.txt | 2 +- .../conformance/tsxAttributeResolution1.js | 2 +- .../tsxAttributeResolution1.symbols | 4 +- .../conformance/tsxAttributeResolution1.types | 2 +- .../tsxAttributeResolution12.errors.txt | 4 +- .../conformance/tsxAttributeResolution12.js | 4 +- .../tsxAttributeResolution12.js.diff | 11 + .../tsxAttributeResolution12.symbols | 12 +- .../tsxAttributeResolution12.types | 4 +- .../tsxAttributeResolution15.js.diff | 44 +- .../tsxAttributeResolution16.js.diff | 39 +- .../tsxAttributeResolution2.errors.txt | 2 +- .../conformance/tsxAttributeResolution2.js | 2 +- .../tsxAttributeResolution2.js.diff | 13 + .../tsxAttributeResolution2.symbols | 4 +- .../conformance/tsxAttributeResolution2.types | 2 +- .../tsxAttributeResolution3.errors.txt | 2 +- .../conformance/tsxAttributeResolution3.js | 2 +- .../tsxAttributeResolution3.symbols | 4 +- .../conformance/tsxAttributeResolution3.types | 2 +- .../tsxAttributeResolution4.errors.txt | 2 +- .../conformance/tsxAttributeResolution4.js | 2 +- .../tsxAttributeResolution4.js.diff | 11 + .../tsxAttributeResolution4.symbols | 4 +- .../conformance/tsxAttributeResolution4.types | 2 +- .../tsxAttributeResolution5.errors.txt | 2 +- .../conformance/tsxAttributeResolution5.js | 2 +- .../tsxAttributeResolution5.symbols | 4 +- .../conformance/tsxAttributeResolution5.types | 2 +- .../tsxAttributeResolution6.errors.txt | 2 +- .../conformance/tsxAttributeResolution6.js | 2 +- .../tsxAttributeResolution6.symbols | 4 +- .../conformance/tsxAttributeResolution6.types | 2 +- .../tsxAttributeResolution7.errors.txt | 2 +- .../conformance/tsxAttributeResolution7.js | 2 +- .../tsxAttributeResolution7.symbols | 4 +- .../conformance/tsxAttributeResolution7.types | 2 +- .../conformance/tsxAttributeResolution8.js | 2 +- .../tsxAttributeResolution8.symbols | 4 +- .../conformance/tsxAttributeResolution8.types | 2 +- .../tsxCorrectlyParseLessThanComparison1.js | 2 +- ...xCorrectlyParseLessThanComparison1.js.diff | 40 + ...xCorrectlyParseLessThanComparison1.symbols | 6 +- ...tsxCorrectlyParseLessThanComparison1.types | 2 +- .../tsxDefaultAttributesResolution1.js.diff | 38 +- .../tsxDefaultAttributesResolution2.js.diff | 38 +- .../tsxDefaultAttributesResolution3.js.diff | 38 +- .../conformance/tsxDynamicTagName2.errors.txt | 2 +- .../conformance/tsxDynamicTagName2.js | 2 +- .../conformance/tsxDynamicTagName2.symbols | 4 +- .../conformance/tsxDynamicTagName2.types | 2 +- .../conformance/tsxDynamicTagName3.errors.txt | 2 +- .../conformance/tsxDynamicTagName3.js | 2 +- .../conformance/tsxDynamicTagName3.symbols | 4 +- .../conformance/tsxDynamicTagName3.types | 2 +- .../conformance/tsxDynamicTagName4.js | 2 +- .../conformance/tsxDynamicTagName4.symbols | 4 +- .../conformance/tsxDynamicTagName4.types | 2 +- .../conformance/tsxDynamicTagName5.js.diff | 42 +- .../conformance/tsxDynamicTagName6.js | 2 +- .../conformance/tsxDynamicTagName6.js.diff | 10 + .../conformance/tsxDynamicTagName6.symbols | 4 +- .../conformance/tsxDynamicTagName6.types | 2 +- .../conformance/tsxDynamicTagName7.js.diff | 43 +- .../conformance/tsxDynamicTagName8.js.diff | 42 +- .../conformance/tsxDynamicTagName9.js.diff | 42 +- .../conformance/tsxElementResolution.js | 2 +- .../conformance/tsxElementResolution.js.diff | 32 + .../conformance/tsxElementResolution.symbols | 8 +- .../conformance/tsxElementResolution.types | 2 +- .../tsxElementResolution1.errors.txt | 2 +- .../conformance/tsxElementResolution1.js | 2 +- .../conformance/tsxElementResolution1.symbols | 4 +- .../conformance/tsxElementResolution1.types | 2 +- .../tsxElementResolution10.errors.txt | 2 +- .../conformance/tsxElementResolution10.js | 2 +- .../tsxElementResolution10.symbols | 4 +- .../conformance/tsxElementResolution10.types | 2 +- .../tsxElementResolution11.errors.txt | 2 +- .../conformance/tsxElementResolution11.js | 2 +- .../tsxElementResolution11.symbols | 4 +- .../conformance/tsxElementResolution11.types | 2 +- .../tsxElementResolution12.errors.txt | 2 +- .../conformance/tsxElementResolution12.js | 2 +- .../tsxElementResolution12.symbols | 4 +- .../conformance/tsxElementResolution12.types | 2 +- .../conformance/tsxElementResolution13.js | 2 +- .../tsxElementResolution13.symbols | 4 +- .../conformance/tsxElementResolution13.types | 2 +- .../conformance/tsxElementResolution14.js | 2 +- .../tsxElementResolution14.symbols | 4 +- .../conformance/tsxElementResolution14.types | 2 +- .../tsxElementResolution15.errors.txt | 2 +- .../conformance/tsxElementResolution15.js | 2 +- .../tsxElementResolution15.symbols | 4 +- .../conformance/tsxElementResolution15.types | 2 +- .../tsxElementResolution16.errors.txt | 2 +- .../conformance/tsxElementResolution16.js | 2 +- .../tsxElementResolution16.symbols | 2 +- .../conformance/tsxElementResolution16.types | 2 +- .../tsxElementResolution18.errors.txt | 2 +- .../conformance/tsxElementResolution18.js | 2 +- .../tsxElementResolution18.symbols | 4 +- .../conformance/tsxElementResolution18.types | 2 +- .../conformance/tsxElementResolution2.js | 2 +- .../conformance/tsxElementResolution2.symbols | 4 +- .../conformance/tsxElementResolution2.types | 2 +- .../tsxElementResolution3.errors.txt | 2 +- .../conformance/tsxElementResolution3.js | 2 +- .../conformance/tsxElementResolution3.symbols | 4 +- .../conformance/tsxElementResolution3.types | 2 +- .../tsxElementResolution4.errors.txt | 2 +- .../conformance/tsxElementResolution4.js | 2 +- .../conformance/tsxElementResolution4.symbols | 4 +- .../conformance/tsxElementResolution4.types | 2 +- .../conformance/tsxElementResolution5.js | 2 +- .../conformance/tsxElementResolution5.symbols | 4 +- .../conformance/tsxElementResolution5.types | 2 +- .../tsxElementResolution6.errors.txt | 2 +- .../conformance/tsxElementResolution6.js | 2 +- .../conformance/tsxElementResolution6.symbols | 4 +- .../conformance/tsxElementResolution6.types | 2 +- .../tsxElementResolution7.errors.txt | 6 +- .../conformance/tsxElementResolution7.js | 6 +- .../conformance/tsxElementResolution7.symbols | 14 +- .../conformance/tsxElementResolution7.types | 6 +- .../tsxElementResolution8.errors.txt | 2 +- .../conformance/tsxElementResolution8.js | 2 +- .../conformance/tsxElementResolution8.symbols | 4 +- .../conformance/tsxElementResolution8.types | 2 +- .../tsxElementResolution9.errors.txt | 2 +- .../conformance/tsxElementResolution9.js | 2 +- .../conformance/tsxElementResolution9.symbols | 4 +- .../conformance/tsxElementResolution9.types | 2 +- .../submodule/conformance/tsxEmit1.js | 2 +- .../submodule/conformance/tsxEmit1.js.diff | 48 + .../submodule/conformance/tsxEmit1.symbols | 4 +- .../submodule/conformance/tsxEmit1.types | 2 +- .../submodule/conformance/tsxEmit2.js | 2 +- .../submodule/conformance/tsxEmit2.symbols | 4 +- .../submodule/conformance/tsxEmit2.types | 2 +- .../submodule/conformance/tsxEmit3.errors.txt | 14 +- .../submodule/conformance/tsxEmit3.js | 14 +- .../submodule/conformance/tsxEmit3.js.diff | 31 +- .../submodule/conformance/tsxEmit3.js.map | 4 +- .../conformance/tsxEmit3.js.map.diff | 8 +- .../conformance/tsxEmit3.sourcemap.txt | 132 +- .../conformance/tsxEmit3.sourcemap.txt.diff | 614 +- .../submodule/conformance/tsxEmit3.symbols | 44 +- .../submodule/conformance/tsxEmit3.types | 14 +- .../tsxExternalModuleEmit1.js.diff | 70 +- .../conformance/tsxFragmentErrors.errors.txt | 2 +- .../conformance/tsxFragmentErrors.js | 2 +- .../conformance/tsxFragmentErrors.symbols | 4 +- .../conformance/tsxFragmentErrors.types | 2 +- .../conformance/tsxFragmentPreserveEmit.js | 2 +- .../tsxFragmentPreserveEmit.symbols | 4 +- .../conformance/tsxFragmentPreserveEmit.types | 2 +- .../conformance/tsxFragmentReactEmit.js | 2 +- .../conformance/tsxFragmentReactEmit.symbols | 4 +- .../conformance/tsxFragmentReactEmit.types | 2 +- .../tsxGenericArrowFunctionParsing.errors.txt | 2 +- .../tsxGenericArrowFunctionParsing.js | 2 +- .../tsxGenericArrowFunctionParsing.js.diff | 22 + .../tsxGenericArrowFunctionParsing.symbols | 4 +- .../tsxGenericArrowFunctionParsing.types | 2 +- .../tsxGenericAttributesType1.js.diff | 18 +- .../tsxGenericAttributesType2.js.diff | 6 +- .../tsxGenericAttributesType3.js.diff | 48 +- .../tsxGenericAttributesType4.js.diff | 48 +- .../tsxGenericAttributesType5.js.diff | 48 +- .../tsxGenericAttributesType6.js.diff | 48 +- .../tsxGenericAttributesType7.js.diff | 7 +- .../tsxGenericAttributesType8.js.diff | 7 +- .../tsxGenericAttributesType9.js.diff | 36 +- .../conformance/tsxInArrowFunction.js.diff | 17 + .../tsxLibraryManagedAttributes.js.diff | 153 +- .../tsxNamespacedAttributeName1.js.diff | 10 + .../tsxNamespacedAttributeName2.js.diff | 10 + .../conformance/tsxNamespacedTagName1.js.diff | 14 + .../conformance/tsxNamespacedTagName2.js.diff | 14 + .../conformance/tsxOpeningClosingNames.js | 4 +- .../tsxOpeningClosingNames.symbols | 26 +- .../conformance/tsxOpeningClosingNames.types | 4 +- .../submodule/conformance/tsxParseTests1.js | 2 +- .../conformance/tsxParseTests1.symbols | 4 +- .../conformance/tsxParseTests1.types | 2 +- .../submodule/conformance/tsxParseTests2.js | 2 +- .../conformance/tsxParseTests2.symbols | 4 +- .../conformance/tsxParseTests2.types | 2 +- ...ComponentWithDefaultTypeParameter1.js.diff | 3 +- ...ComponentWithDefaultTypeParameter2.js.diff | 6 +- ...ComponentWithDefaultTypeParameter3.js.diff | 10 +- .../submodule/conformance/tsxReactEmit1.js | 2 +- .../conformance/tsxReactEmit1.js.diff | 41 +- .../conformance/tsxReactEmit1.symbols | 4 +- .../submodule/conformance/tsxReactEmit1.types | 2 +- .../submodule/conformance/tsxReactEmit2.js | 2 +- .../conformance/tsxReactEmit2.symbols | 4 +- .../submodule/conformance/tsxReactEmit2.types | 2 +- .../submodule/conformance/tsxReactEmit3.js | 2 +- .../conformance/tsxReactEmit3.symbols | 4 +- .../submodule/conformance/tsxReactEmit3.types | 2 +- .../conformance/tsxReactEmit4.errors.txt | 2 +- .../submodule/conformance/tsxReactEmit4.js | 2 +- .../conformance/tsxReactEmit4.symbols | 4 +- .../submodule/conformance/tsxReactEmit4.types | 2 +- .../submodule/conformance/tsxReactEmit5.js | 2 +- .../conformance/tsxReactEmit5.symbols | 4 +- .../submodule/conformance/tsxReactEmit5.types | 2 +- .../submodule/conformance/tsxReactEmit6.js | 2 +- .../conformance/tsxReactEmit6.symbols | 4 +- .../submodule/conformance/tsxReactEmit6.types | 2 +- .../conformance/tsxReactEmit7.errors.txt | 2 +- .../submodule/conformance/tsxReactEmit7.js | 2 +- .../conformance/tsxReactEmit7.symbols | 4 +- .../submodule/conformance/tsxReactEmit7.types | 2 +- .../conformance/tsxReactEmitEntities.js | 2 +- .../conformance/tsxReactEmitEntities.symbols | 4 +- .../conformance/tsxReactEmitEntities.types | 2 +- .../conformance/tsxReactEmitNesting.js.diff | 34 +- .../conformance/tsxReactEmitWhitespace.js | 2 +- .../tsxReactEmitWhitespace.symbols | 4 +- .../conformance/tsxReactEmitWhitespace.types | 2 +- .../conformance/tsxReactEmitWhitespace2.js | 2 +- .../tsxReactEmitWhitespace2.symbols | 4 +- .../conformance/tsxReactEmitWhitespace2.types | 2 +- .../tsxSpreadAttributesResolution1.js.diff | 42 +- .../tsxSpreadAttributesResolution10.js.diff | 50 +- .../tsxSpreadAttributesResolution11.js.diff | 61 +- ...readAttributesResolution12.errors.txt.diff | 19 + .../tsxSpreadAttributesResolution12.js.diff | 57 +- .../tsxSpreadAttributesResolution13.js.diff | 16 +- ...readAttributesResolution14.errors.txt.diff | 17 + .../tsxSpreadAttributesResolution14.js.diff | 9 +- .../tsxSpreadAttributesResolution15.js.diff | 5 + .../tsxSpreadAttributesResolution16.js.diff | 9 +- .../tsxSpreadAttributesResolution17.js.diff | 41 + ...preadAttributesResolution2.errors.txt.diff | 18 + .../tsxSpreadAttributesResolution2.js.diff | 50 +- .../tsxSpreadAttributesResolution3.js.diff | 45 +- .../tsxSpreadAttributesResolution4.js.diff | 71 +- .../tsxSpreadAttributesResolution5.js.diff | 67 +- .../tsxSpreadAttributesResolution6.js.diff | 42 +- .../tsxSpreadAttributesResolution7.js.diff | 50 +- .../tsxSpreadAttributesResolution8.js.diff | 51 +- .../tsxSpreadAttributesResolution9.js.diff | 52 +- .../conformance/tsxSpreadChildren.js | 2 +- .../conformance/tsxSpreadChildren.js.diff | 17 + .../conformance/tsxSpreadChildren.symbols | 4 +- .../conformance/tsxSpreadChildren.types | 2 +- ...idType(jsx=react,target=es2015).errors.txt | 2 +- ...renInvalidType(jsx=react,target=es2015).js | 2 +- ...validType(jsx=react,target=es2015).symbols | 4 +- ...InvalidType(jsx=react,target=es2015).types | 2 +- ...validType(jsx=react,target=es5).errors.txt | 2 +- ...ildrenInvalidType(jsx=react,target=es5).js | 2 +- ...nInvalidType(jsx=react,target=es5).js.diff | 34 + ...nInvalidType(jsx=react,target=es5).symbols | 4 +- ...renInvalidType(jsx=react,target=es5).types | 2 +- ...pe(jsx=react-jsx,target=es2015).errors.txt | 2 +- ...nvalidType(jsx=react-jsx,target=es2015).js | 2 +- ...dType(jsx=react-jsx,target=es2015).symbols | 4 +- ...lidType(jsx=react-jsx,target=es2015).types | 2 +- ...dType(jsx=react-jsx,target=es5).errors.txt | 2 +- ...enInvalidType(jsx=react-jsx,target=es5).js | 2 +- ...alidType(jsx=react-jsx,target=es5).js.diff | 30 +- ...alidType(jsx=react-jsx,target=es5).symbols | 4 +- ...nvalidType(jsx=react-jsx,target=es5).types | 2 +- .../conformance/tsxSpreadInvalidType.js.diff | 15 +- .../tsxStatelessFunctionComponents1.js.diff | 75 +- .../tsxStatelessFunctionComponents2.js.diff | 62 +- .../tsxTypeArgumentResolution.js.diff | 6 +- .../conformance/tsxTypeErrors.js.diff | 15 +- .../conformance/tsxUnionElementType3.js.diff | 97 +- .../conformance/tsxUnionElementType4.js.diff | 93 +- .../conformance/tsxUnionElementType5.js.diff | 12 +- .../conformance/tsxUnionElementType6.js.diff | 14 +- .../tsxUnionTypeComponent1.js.diff | 51 +- .../tsxUnionTypeComponent1.types.diff | 28 + .../tsxUnionTypeComponent2.js.diff | 3 +- .../conformance/tupleElementTypes1.js.diff | 8 + .../conformance/tupleElementTypes2.js.diff | 10 + .../conformance/tupleElementTypes3.js.diff | 8 + .../conformance/tupleElementTypes4.js.diff | 10 + .../conformance/tupleLengthCheck.js.diff | 20 + .../twoAccessorsWithSameName.js.diff | 56 + .../twoAccessorsWithSameName2.js.diff | 53 + ...cesDifferingByTypeParameterName.errors.txt | 10 +- ...cInterfacesDifferingByTypeParameterName.js | 10 +- ...rfacesDifferingByTypeParameterName.symbols | 22 +- ...terfacesDifferingByTypeParameterName.types | 10 +- ...esDifferingByTypeParameterName2.errors.txt | 10 +- ...InterfacesDifferingByTypeParameterName2.js | 10 +- ...facesDifferingByTypeParameterName2.symbols | 22 +- ...erfacesDifferingByTypeParameterName2.types | 10 +- ...erfacesWithDifferentConstraints.errors.txt | 10 +- ...nericInterfacesWithDifferentConstraints.js | 10 +- ...InterfacesWithDifferentConstraints.symbols | 22 +- ...facesWithDifferentConstraints.symbols.diff | 38 + ...icInterfacesWithDifferentConstraints.types | 10 +- ...ithTheSameNameButDifferentArity.errors.txt | 10 +- ...erfacesWithTheSameNameButDifferentArity.js | 10 +- ...esWithTheSameNameButDifferentArity.symbols | 22 +- ...acesWithTheSameNameButDifferentArity.types | 10 +- ...woInterfacesDifferentRootModule.errors.txt | 4 +- .../twoInterfacesDifferentRootModule.js | 4 +- .../twoInterfacesDifferentRootModule.symbols | 10 +- .../twoInterfacesDifferentRootModule.types | 4 +- ...oInterfacesDifferentRootModule2.errors.txt | 4 +- .../twoInterfacesDifferentRootModule2.js | 4 +- .../twoInterfacesDifferentRootModule2.js.diff | 11 + .../twoInterfacesDifferentRootModule2.symbols | 12 +- .../twoInterfacesDifferentRootModule2.types | 4 +- ...erfacesWithDifferingOverloads.symbols.diff | 46 + ...MergedInterfacesWithDifferingOverloads2.js | 2 +- ...dInterfacesWithDifferingOverloads2.symbols | 8 +- ...gedInterfacesWithDifferingOverloads2.types | 2 +- .../submodule/conformance/typeAliases.js.diff | 42 +- .../typeAliasesForObjectTypes.js.diff | 12 +- .../typeAndNamespaceExportMerge.js.diff | 3 +- .../typeArgumentInference.errors.txt.diff | 19 + .../conformance/typeArgumentInference.js.diff | 60 + .../typeArgumentInference.symbols.diff | 37 + .../typeArgumentInference.types.diff | 22 + ...ferenceConstructSignatures.errors.txt.diff | 20 + ...gumentInferenceConstructSignatures.js.diff | 61 + ...entInferenceConstructSignatures.types.diff | 22 + .../typeArgumentInferenceErrors.js.diff | 16 + ...nferenceTransitiveConstraints.symbols.diff | 26 + ...umentInferenceWithClassExpression1.js.diff | 17 +- ...umentInferenceWithClassExpression2.js.diff | 17 +- ...umentInferenceWithClassExpression3.js.diff | 22 +- ...ntInferenceWithConstraints.errors.txt.diff | 20 + ...peArgumentInferenceWithConstraints.js.diff | 66 + ...rgumentInferenceWithConstraints.types.diff | 22 + ...ArgumentInferenceWithObjectLiteral.js.diff | 34 + ...eArgumentsWithStringLiteralTypes01.js.diff | 15 + ...gumentsWithStringLiteralTypes01.types.diff | 11 + .../typeAssertions.errors.txt.diff | 20 + .../conformance/typeAssertions.js.diff | 57 +- .../typeFromPropertyAssignment29.js.diff | 61 +- .../typeFromPropertyAssignment29.types.diff | 48 +- .../typeFromPropertyAssignment30.js.diff | 10 + .../typeFromPropertyAssignment36.js.diff | 11 +- .../typeFromPrototypeAssignment4.js.diff | 6 +- .../conformance/typeGuardEnums.js.diff | 11 + .../conformance/typeGuardEnums.types.diff | 19 + .../conformance/typeGuardFunction.js.diff | 80 +- .../typeGuardFunctionErrors.errors.txt.diff | 20 + .../typeGuardFunctionErrors.js.diff | 135 +- .../typeGuardFunctionGenerics.js.diff | 61 +- .../typeGuardFunctionOfFormThis.js.diff | 185 +- .../typeGuardFunctionOfFormThisErrors.js.diff | 97 + .../conformance/typeGuardInClass.js.diff | 32 + .../conformance/typeGuardInClass.types.diff | 10 + .../typeGuardIntersectionTypes.js.diff | 36 + .../typeGuardIntersectionTypes.types.diff | 11 + ...eGuardNarrowsPrimitiveIntersection.js.diff | 11 + .../typeGuardNarrowsToLiteralType.js.diff | 11 + ...typeGuardNarrowsToLiteralTypeUnion.js.diff | 11 + ...eGuardNarrowsToLiteralTypeUnion.types.diff | 10 +- .../conformance/typeGuardNesting.js.diff | 28 + .../conformance/typeGuardNesting.types.diff | 106 + .../typeGuardOfFormExpr1AndExpr2.js.diff | 15 +- .../typeGuardOfFormExpr1AndExpr2.types.diff | 63 + .../typeGuardOfFormExpr1OrExpr2.js.diff | 15 +- .../typeGuardOfFormExpr1OrExpr2.types.diff | 63 + .../typeGuardOfFormInstanceOf.js.diff | 59 +- .../conformance/typeGuardOfFormIsType.js.diff | 50 +- .../typeGuardOfFormNotExpr.types.diff | 80 + .../typeGuardOfFormThisMember.js.diff | 125 +- .../typeGuardOfFormThisMemberErrors.js.diff | 103 +- .../typeGuardOfFormTypeOfBoolean.js.diff | 39 +- .../typeGuardOfFormTypeOfBoolean.types.diff | 91 + ...ypeOfEqualEqualHasNoEffect.errors.txt.diff | 20 + ...dOfFormTypeOfEqualEqualHasNoEffect.js.diff | 15 +- ...FormTypeOfEqualEqualHasNoEffect.types.diff | 37 + .../typeGuardOfFormTypeOfFunction.js.diff | 22 + .../typeGuardOfFormTypeOfFunction.types.diff | 112 +- ...dOfFormTypeOfIsOrderIndependent.types.diff | 38 + ...mTypeOfNotEqualHasNoEffect.errors.txt.diff | 20 + ...ardOfFormTypeOfNotEqualHasNoEffect.js.diff | 15 +- ...OfFormTypeOfNotEqualHasNoEffect.types.diff | 37 + .../typeGuardOfFormTypeOfNumber.js.diff | 39 +- .../typeGuardOfFormTypeOfNumber.types.diff | 91 + ...typeGuardOfFormTypeOfOther.errors.txt.diff | 98 + .../typeGuardOfFormTypeOfOther.js.diff | 39 +- .../typeGuardOfFormTypeOfOther.types.diff | 82 + ...eGuardOfFormTypeOfPrimitiveSubtype.js.diff | 34 + ...ardOfFormTypeOfPrimitiveSubtype.types.diff | 55 + .../typeGuardOfFormTypeOfString.js.diff | 39 +- .../typeGuardOfFormTypeOfString.types.diff | 91 + ...typeGuardOfFromPropNameInUnionType.js.diff | 182 +- ...uardOfFromPropNameInUnionType.symbols.diff | 20 +- .../typeGuardRedundancy.types.diff | 58 + .../typeGuardTautologicalConsistiency.js.diff | 11 + ...peGuardTautologicalConsistiency.types.diff | 31 + .../typeGuardTypeOfUndefined.types.diff | 245 +- .../typeGuardsAsAssertions.js.diff | 88 +- .../typeGuardsAsAssertions.types.diff | 52 +- .../conformance/typeGuardsDefeat.js.diff | 11 + .../conformance/typeGuardsDefeat.types.diff | 24 +- .../typeGuardsInClassAccessors.js.diff | 181 + .../typeGuardsInClassAccessors.types.diff | 182 + .../typeGuardsInClassMethods.js.diff | 109 + .../typeGuardsInClassMethods.types.diff | 137 + ...peGuardsInConditionalExpression.types.diff | 151 +- .../typeGuardsInDoStatement.js.diff | 11 + .../typeGuardsInDoStatement.types.diff | 28 + .../typeGuardsInExternalModule.types.diff | 19 + .../typeGuardsInForStatement.js.diff | 11 + .../typeGuardsInForStatement.types.diff | 29 + .../conformance/typeGuardsInFunction.js.diff | 11 + .../typeGuardsInFunction.types.diff | 173 + .../typeGuardsInFunctionAndModuleBlock.js | 8 +- ...typeGuardsInFunctionAndModuleBlock.js.diff | 41 + ...typeGuardsInFunctionAndModuleBlock.symbols | 10 +- .../typeGuardsInFunctionAndModuleBlock.types | 8 +- ...eGuardsInFunctionAndModuleBlock.types.diff | 115 +- .../conformance/typeGuardsInGlobal.types.diff | 10 + .../typeGuardsInIfStatement.types.diff | 136 +- .../conformance/typeGuardsInModule.js | 8 +- .../conformance/typeGuardsInModule.js.diff | 11 +- .../conformance/typeGuardsInModule.symbols | 10 +- .../conformance/typeGuardsInModule.types | 8 +- .../conformance/typeGuardsInModule.types.diff | 100 + .../typeGuardsInProperties.js.diff | 35 +- .../typeGuardsInProperties.types.diff | 56 + ...sInRightOperandOfAndAndOperator.types.diff | 96 +- ...rdsInRightOperandOfOrOrOperator.types.diff | 96 +- .../typeGuardsInWhileStatement.js.diff | 11 + .../typeGuardsInWhileStatement.types.diff | 28 + .../typeGuardsNestedAssignments.js.diff | 52 +- .../typeGuardsNestedAssignments.types.diff | 11 + .../typeGuardsObjectMethods.js.diff | 11 + .../typeGuardsObjectMethods.types.diff | 92 + .../typeGuardsOnClassProperty.js.diff | 26 +- .../typeGuardsOnClassProperty.types.diff | 36 +- .../typeGuardsTypeParameters.js.diff | 41 +- .../typeGuardsTypeParameters.types.diff | 19 + .../conformance/typeGuardsWithAny.types.diff | 37 + .../typeGuardsWithInstanceOf.js.diff | 24 + .../typeGuardsWithInstanceOf.symbols.diff | 11 + ...tanceOfByConstructorSignature.symbols.diff | 11 + .../typeInferenceWithTupleType.js.diff | 10 + .../conformance/typeOfThisInAccessor.js.diff | 74 +- .../typeOfThisInConstructorParamList.js.diff | 16 + .../typeOfThisInFunctionExpression.js | 2 +- .../typeOfThisInFunctionExpression.js.diff | 15 +- .../typeOfThisInFunctionExpression.symbols | 4 +- .../typeOfThisInFunctionExpression.types | 2 +- .../typeOfThisInInstanceMember.js.diff | 49 +- .../typeOfThisInInstanceMember2.js.diff | 50 +- .../typeOfThisInMemberFunctions.js.diff | 73 +- .../typeOfThisInMemberFunctions.symbols.diff | 11 + .../typeOfThisInStaticMembers.js.diff | 45 +- ...fThisInStaticMembers10(target=es5).js.diff | 101 +- ...fThisInStaticMembers11(target=es5).js.diff | 103 +- ...fThisInStaticMembers12(target=es5).js.diff | 15 +- ...fThisInStaticMembers13(target=es5).js.diff | 15 +- .../typeOfThisInStaticMembers2.js.diff | 20 +- ...OfThisInStaticMembers3(target=es5).js.diff | 39 +- ...OfThisInStaticMembers4(target=es5).js.diff | 39 +- ...OfThisInStaticMembers5(target=es5).js.diff | 15 +- .../typeOfThisInStaticMembers6.js.diff | 31 +- ...OfThisInStaticMembers7(target=es5).js.diff | 39 +- ...OfThisInStaticMembers8(target=es5).js.diff | 35 +- ...OfThisInStaticMembers9(target=es5).js.diff | 67 +- ...ceMemberNarrowedWithLoopAntecedent.js.diff | 42 +- .../conformance/typeOnlyMerge1.js.diff | 8 +- .../typeParameterAsBaseType.js.diff | 39 + .../typeParameterAsTypeArgument.js.diff | 15 +- ...ypeParameterConstraintTransitively.js.diff | 11 +- ...peParameterConstraintTransitively2.js.diff | 11 +- .../typeParameterAssignability2.symbols.diff | 84 + .../typeParameterAssignability3.js.diff | 32 +- .../typeParameterConstModifiers.js.diff | 132 +- ...rameterDirectlyConstrainedToItself.js.diff | 27 + ...meterIndirectlyConstrainedToItself.js.diff | 35 + .../typeParameterUsedAsConstraint.js.diff | 69 + ...typeParameterUsedAsConstraint.symbols.diff | 92 + ...meterUsedAsTypeParameterConstraint.js.diff | 16 + ...eterUsedAsTypeParameterConstraint2.js.diff | 24 + ...eterUsedAsTypeParameterConstraint4.js.diff | 43 +- ...ParametersAreIdenticalToThemselves.js.diff | 33 +- ...etersAreIdenticalToThemselves.symbols.diff | 62 + ...peParametersAvailableInNestedScope.js.diff | 26 +- ...eParametersAvailableInNestedScope3.js.diff | 12 +- .../submodule/conformance/typeQuery.js.diff | 19 + .../conformance/typeQueryOnClass.js.diff | 89 +- .../typeQueryWithReservedWords.js.diff | 25 + .../conformance/typeRelationships.js.diff | 85 +- .../conformance/typeSatisfaction.js.diff | 22 + ...typeSatisfaction_contextualTyping1.js.diff | 13 + ...typeSatisfaction_contextualTyping2.js.diff | 13 +- ...atisfaction_contextualTyping3.symbols.diff | 10 + ...peSatisfaction_ensureInterfaceImpl.js.diff | 17 + ...ypeSatisfaction_errorLocations1.types.diff | 20 + ...sfaction_optionalMemberConformance.js.diff | 13 + ...eSatisfaction_propNameConstraining.js.diff | 20 + ...tisfaction_propertyNameFulfillment.js.diff | 20 + ...rtyaccessfromindexsignature=false).js.diff | 23 + ...ertyaccessfromindexsignature=true).js.diff | 23 + ...e2(nouncheckedindexedaccess=false).js.diff | 23 + ...ce2(nouncheckedindexedaccess=true).js.diff | 23 + ...cuousIntersectionOfContextualTypes.js.diff | 10 + ...usIntersectionOfContextualTypes.types.diff | 8 + .../conformance/typeTagNoErasure.js.diff | 6 +- ...typeTagOnFunctionReferencesGeneric.js.diff | 9 +- .../typedefOnSemicolonClassElement.js.diff | 12 +- .../conformance/typedefOnStatements.js.diff | 18 +- .../typeofANonExportedType.errors.txt | 4 +- .../conformance/typeofANonExportedType.js | 4 +- .../typeofANonExportedType.js.diff | 36 +- .../typeofANonExportedType.symbols | 4 +- .../conformance/typeofANonExportedType.types | 4 +- .../typeofAnExportedType.errors.txt | 4 +- .../conformance/typeofAnExportedType.js | 4 +- .../conformance/typeofAnExportedType.js.diff | 33 +- .../conformance/typeofAnExportedType.symbols | 4 +- .../conformance/typeofAnExportedType.types | 4 +- .../conformance/typeofClass2.js.diff | 49 + .../typeofClassWithPrivates.js.diff | 15 +- .../typeofImportTypeOnlyExport.js.diff | 23 +- .../conformance/typeofModuleWithoutExports.js | 2 +- .../typeofModuleWithoutExports.js.diff | 12 +- .../typeofModuleWithoutExports.symbols | 2 +- .../typeofModuleWithoutExports.types | 2 +- ...typeofOperatorInvalidOperations.types.diff | 17 + .../typeofOperatorWithAnyOtherType.errors.txt | 2 +- .../typeofOperatorWithAnyOtherType.js | 2 +- .../typeofOperatorWithAnyOtherType.js.diff | 27 +- .../typeofOperatorWithAnyOtherType.symbols | 2 +- .../typeofOperatorWithAnyOtherType.types | 2 +- .../typeofOperatorWithAnyOtherType.types.diff | 285 + .../typeofOperatorWithBooleanType.errors.txt | 2 +- .../typeofOperatorWithBooleanType.js | 2 +- .../typeofOperatorWithBooleanType.js.diff | 19 +- .../typeofOperatorWithBooleanType.symbols | 2 +- .../typeofOperatorWithBooleanType.types | 2 +- .../typeofOperatorWithBooleanType.types.diff | 162 + .../typeofOperatorWithEnumType.types.diff | 97 +- .../typeofOperatorWithNumberType.errors.txt | 2 +- .../typeofOperatorWithNumberType.js | 2 +- .../typeofOperatorWithNumberType.js.diff | 28 +- .../typeofOperatorWithNumberType.symbols | 2 +- .../typeofOperatorWithNumberType.types | 2 +- .../typeofOperatorWithNumberType.types.diff | 225 + .../typeofOperatorWithStringType.errors.txt | 2 +- .../typeofOperatorWithStringType.js | 2 +- .../typeofOperatorWithStringType.js.diff | 28 +- .../typeofOperatorWithStringType.symbols | 2 +- .../typeofOperatorWithStringType.types | 2 +- .../typeofOperatorWithStringType.types.diff | 221 + .../conformance/typeofThis.errors.txt | 2 +- .../submodule/conformance/typeofThis.js | 2 +- .../submodule/conformance/typeofThis.js.diff | 209 +- .../submodule/conformance/typeofThis.symbols | 2 +- .../submodule/conformance/typeofThis.types | 2 +- .../typeofThisWithImplicitThis.js.diff | 9 + ...yExternalModuleStillHasInstance.errors.txt | 2 +- ...typesOnlyExternalModuleStillHasInstance.js | 2 +- ...OnlyExternalModuleStillHasInstance.symbols | 4 +- ...esOnlyExternalModuleStillHasInstance.types | 2 +- .../typesWithDuplicateTypeParameters.js.diff | 22 + .../typesWithOptionalProperty.js.diff | 7 +- .../typesWithPrivateConstructor.js.diff | 26 + .../typesWithProtectedConstructor.js.diff | 26 + .../typesWithPublicConstructor.js.diff | 26 + ...typesWithSpecializedCallSignatures.js.diff | 66 +- ...WithSpecializedConstructSignatures.js.diff | 63 +- .../conformance/typingsSuggestionBun1.js.diff | 8 + .../conformance/typingsSuggestionBun2.js.diff | 8 + .../conformance/umd-augmentation-1.js.diff | 11 +- .../conformance/umd-augmentation-2.js.diff | 14 + .../conformance/umd-augmentation-3.js.diff | 11 +- .../conformance/umd-augmentation-4.js.diff | 14 + .../submodule/conformance/umd1.js.diff | 10 + .../submodule/conformance/umd2.js.diff | 10 + .../submodule/conformance/umd3.js.diff | 6 +- .../submodule/conformance/umd4.js.diff | 6 +- .../submodule/conformance/umd5.js.diff | 9 +- .../submodule/conformance/umd6.js.diff | 8 + .../submodule/conformance/umd7.js.diff | 8 + .../submodule/conformance/umd8.js.diff | 13 + .../undefinedAssignableToEveryType.js.diff | 15 +- ...ndefinedAssignableToEveryType.symbols.diff | 38 + .../undefinedIsSubtypeOfEverything.js | 4 +- .../undefinedIsSubtypeOfEverything.js.diff | 278 +- .../undefinedIsSubtypeOfEverything.symbols | 4 +- ...ndefinedIsSubtypeOfEverything.symbols.diff | 28 + .../undefinedIsSubtypeOfEverything.types | 4 +- ...ndedEscapesInStrings01(target=es5).js.diff | 8 + ...ndedEscapesInStrings02(target=es5).js.diff | 8 + ...ndedEscapesInStrings03(target=es5).js.diff | 8 + ...ndedEscapesInStrings04(target=es5).js.diff | 8 + ...ndedEscapesInStrings05(target=es5).js.diff | 8 + ...ndedEscapesInStrings06(target=es5).js.diff | 8 + ...ndedEscapesInStrings08(target=es5).js.diff | 8 + ...ndedEscapesInStrings09(target=es5).js.diff | 8 + ...ndedEscapesInStrings10(target=es5).js.diff | 8 + ...ndedEscapesInStrings11(target=es5).js.diff | 8 + ...ndedEscapesInStrings13(target=es5).js.diff | 8 + ...ndedEscapesInStrings15(target=es5).js.diff | 8 + ...ndedEscapesInStrings16(target=es5).js.diff | 8 + ...ndedEscapesInStrings18(target=es5).js.diff | 8 + ...ndedEscapesInStrings23(target=es5).js.diff | 8 + ...ndedEscapesInStrings25(target=es5).js.diff | 8 + ...edEscapesInTemplates01(target=es5).js.diff | 8 + ...edEscapesInTemplates02(target=es5).js.diff | 8 + ...edEscapesInTemplates03(target=es5).js.diff | 8 + ...edEscapesInTemplates04(target=es5).js.diff | 8 + ...edEscapesInTemplates05(target=es5).js.diff | 8 + ...edEscapesInTemplates06(target=es5).js.diff | 8 + ...edEscapesInTemplates07(target=es5).js.diff | 8 + ...edEscapesInTemplates08(target=es5).js.diff | 8 + ...edEscapesInTemplates09(target=es5).js.diff | 8 + ...edEscapesInTemplates10(target=es5).js.diff | 8 + ...edEscapesInTemplates11(target=es5).js.diff | 8 + ...edEscapesInTemplates12(target=es5).js.diff | 8 + ...edEscapesInTemplates13(target=es5).js.diff | 8 + ...edEscapesInTemplates14(target=es5).js.diff | 8 + ...edEscapesInTemplates15(target=es5).js.diff | 8 + ...edEscapesInTemplates16(target=es5).js.diff | 8 + ...edEscapesInTemplates17(target=es5).js.diff | 8 + ...edEscapesInTemplates18(target=es5).js.diff | 8 + ...edEscapesInTemplates19(target=es5).js.diff | 8 + ...edEscapesInTemplates20(target=es5).js.diff | 8 + .../unionAndIntersectionInference1.types.diff | 35 +- .../unionAndIntersectionInference3.types.diff | 15 +- ...IfEveryConstituentTypeIsSubtype.errors.txt | 4 +- ...nSubtypeIfEveryConstituentTypeIsSubtype.js | 4 +- ...ypeIfEveryConstituentTypeIsSubtype.js.diff | 37 +- ...ypeIfEveryConstituentTypeIsSubtype.symbols | 4 +- ...EveryConstituentTypeIsSubtype.symbols.diff | 20 + ...btypeIfEveryConstituentTypeIsSubtype.types | 4 +- .../unionThisTypeInFunctions.errors.txt.diff | 42 + .../unionThisTypeInFunctions.symbols.diff | 12 + .../unionThisTypeInFunctions.types.diff | 12 +- .../unionTypeCallSignatures.symbols.diff | 47 + .../unionTypeCallSignatures2.symbols.diff | 20 + .../unionTypeCallSignatures3.js.diff | 31 + .../unionTypeCallSignatures6.types.diff | 16 + .../unionTypeConstructSignatures.symbols.diff | 47 + .../conformance/unionTypeEquivalence.js.diff | 43 + .../unionTypeFromArrayLiteral.js.diff | 70 + .../unionTypeIndexSignature.symbols.diff | 29 + .../conformance/unionTypeInference.types.diff | 6 +- .../unionTypeLiterals.symbols.diff | 11 + ...nTypePropertyAccessibility.errors.txt.diff | 60 + .../unionTypePropertyAccessibility.js.diff | 42 +- .../unionTypePropertyAccessibility.types.diff | 88 + .../conformance/unionTypeReadonly.js.diff | 21 + .../conformance/unionTypeReduction2.js.diff | 51 +- .../unionTypeReduction2.types.diff | 8 +- .../unionTypesAssignability.js.diff | 54 + .../conformance/unionsOfTupleTypes1.js.diff | 59 +- .../conformance/uniqueSymbols.types.diff | 29 +- .../uniqueSymbolsDeclarations.types.diff | 29 +- .../conformance/unknownControlFlow.js.diff | 74 +- .../unknownControlFlow.symbols.diff | 35 + .../conformance/unknownControlFlow.types.diff | 123 +- .../conformance/unknownType1.js.diff | 81 +- .../conformance/unknownType1.symbols.diff | 11 + .../conformance/unknownType1.types.diff | 15 + .../conformance/unknownType2.errors.txt.diff | 17 + .../conformance/unknownType2.js.diff | 194 +- .../conformance/unknownType2.types.diff | 50 +- .../untypedModuleImport_allowJs.symbols.diff | 9 +- .../useObjectValuesAndEntries1.js.diff | 14 + .../useObjectValuesAndEntries2.js.diff | 13 + .../conformance/usePromiseFinally.js.diff | 9 + .../usingDeclarations.1(target=es5).js.diff | 668 +- .../conformance/usingDeclarations.11.js.diff | 176 +- .../usingDeclarations.2(target=es5).js.diff | 16 + .../usingDeclarations.3(target=es5).js.diff | 16 + ...usingDeclarationsInFor(target=es5).js.diff | 16 + ...clarationsInForAwaitOf(target=es5).js.diff | 112 +- ...gDeclarationsInForOf.1(target=es5).js.diff | 18 + ...tors.1(module=commonjs,target=es5).js.diff | 41 +- ...rators.1(module=esnext,target=es5).js.diff | 46 +- ...ors.10(module=commonjs,target=es5).js.diff | 44 +- ...ators.10(module=esnext,target=es5).js.diff | 44 +- ...ors.11(module=commonjs,target=es5).js.diff | 44 +- ...ators.11(module=esnext,target=es5).js.diff | 44 +- ...ors.12(module=commonjs,target=es5).js.diff | 44 +- ...ators.12(module=esnext,target=es5).js.diff | 44 +- ...tors.2(module=commonjs,target=es5).js.diff | 41 +- ...rators.2(module=esnext,target=es5).js.diff | 41 +- ...tors.3(module=commonjs,target=es5).js.diff | 41 +- ...rators.3(module=esnext,target=es5).js.diff | 41 +- ...tors.4(module=commonjs,target=es5).js.diff | 41 +- ...rators.4(module=esnext,target=es5).js.diff | 41 +- ...tors.5(module=commonjs,target=es5).js.diff | 41 +- ...rators.5(module=esnext,target=es5).js.diff | 41 +- ...tors.6(module=commonjs,target=es5).js.diff | 41 +- ...rators.6(module=esnext,target=es5).js.diff | 41 +- ...tors.7(module=commonjs,target=es5).js.diff | 44 +- ...rators.7(module=esnext,target=es5).js.diff | 44 +- ...tors.8(module=commonjs,target=es5).js.diff | 44 +- ...rators.8(module=esnext,target=es5).js.diff | 44 +- ...tors.9(module=commonjs,target=es5).js.diff | 44 +- ...rators.9(module=esnext,target=es5).js.diff | 44 +- ...tors.1(module=commonjs,target=es5).js.diff | 11 +- ...rators.1(module=esnext,target=es5).js.diff | 16 +- ...ors.10(module=commonjs,target=es5).js.diff | 14 +- ...ators.10(module=esnext,target=es5).js.diff | 14 +- ...ors.11(module=commonjs,target=es5).js.diff | 14 +- ...ators.11(module=esnext,target=es5).js.diff | 14 +- ...ors.12(module=commonjs,target=es5).js.diff | 14 +- ...ators.12(module=esnext,target=es5).js.diff | 14 +- ...tors.2(module=commonjs,target=es5).js.diff | 11 +- ...rators.2(module=esnext,target=es5).js.diff | 11 +- ...tors.3(module=commonjs,target=es5).js.diff | 11 +- ...rators.3(module=esnext,target=es5).js.diff | 11 +- ...tors.4(module=commonjs,target=es5).js.diff | 11 +- ...rators.4(module=esnext,target=es5).js.diff | 11 +- ...tors.5(module=commonjs,target=es5).js.diff | 11 +- ...rators.5(module=esnext,target=es5).js.diff | 11 +- ...tors.6(module=commonjs,target=es5).js.diff | 11 +- ...rators.6(module=esnext,target=es5).js.diff | 11 +- ...tors.7(module=commonjs,target=es5).js.diff | 14 +- ...rators.7(module=esnext,target=es5).js.diff | 14 +- ...tors.8(module=commonjs,target=es5).js.diff | 14 +- ...rators.8(module=esnext,target=es5).js.diff | 14 +- ...tors.9(module=commonjs,target=es5).js.diff | 14 +- ...rators.9(module=esnext,target=es5).js.diff | 14 +- .../validMultipleVariableDeclarations.js.diff | 11 + ...dMultipleVariableDeclarations.symbols.diff | 11 + .../validNullAssignments.errors.txt | 2 +- .../conformance/validNullAssignments.js | 2 +- .../conformance/validNullAssignments.js.diff | 15 +- .../conformance/validNullAssignments.symbols | 4 +- .../conformance/validNullAssignments.types | 2 +- .../validStringAssignments.symbols.diff | 9 + .../validUndefinedAssignments.js.diff | 15 +- .../conformance/variadicTuples1.js.diff | 272 +- .../conformance/variadicTuples1.types.diff | 13 +- .../conformance/variadicTuples2.js.diff | 92 +- .../conformance/variadicTuples2.symbols.diff | 22 + .../submodule/conformance/variance.js.diff | 30 +- .../conformance/varianceAnnotations.js.diff | 55 +- .../verbatimModuleSyntaxNoElisionESM.js.diff | 34 + ...ESM(esmoduleinterop=false).errors.txt.diff | 25 - ...tionsESM(esmoduleinterop=false).types.diff | 11 - .../voidOperatorWithAnyOtherType.errors.txt | 2 +- .../voidOperatorWithAnyOtherType.js | 2 +- .../voidOperatorWithAnyOtherType.js.diff | 21 +- .../voidOperatorWithAnyOtherType.symbols | 2 +- .../voidOperatorWithAnyOtherType.types | 2 +- .../voidOperatorWithBooleanType.js | 2 +- .../voidOperatorWithBooleanType.js.diff | 19 +- .../voidOperatorWithBooleanType.symbols | 2 +- .../voidOperatorWithBooleanType.types | 2 +- .../conformance/voidOperatorWithNumberType.js | 2 +- .../voidOperatorWithNumberType.js.diff | 28 +- .../voidOperatorWithNumberType.symbols | 2 +- .../voidOperatorWithNumberType.types | 2 +- .../conformance/voidOperatorWithStringType.js | 2 +- .../voidOperatorWithStringType.js.diff | 28 +- .../voidOperatorWithStringType.symbols | 2 +- .../voidOperatorWithStringType.types | 2 +- .../voidParamAssignmentCompatibility.js.diff | 3 +- .../weakTypesAndLiterals01.js.diff | 28 + .../weakTypesAndLiterals01.types.diff | 22 +- .../conformance/wideningTuples2.js.diff | 11 + .../conformance/wideningTuples5.js.diff | 8 + .../conformance/wideningTuples6.js.diff | 10 + .../conformance/wideningTuples7.js.diff | 10 + .../submodule/conformance/witness.errors.txt | 2 +- .../submodule/conformance/witness.js | 2 +- .../submodule/conformance/witness.js.diff | 72 +- .../submodule/conformance/witness.symbols | 2 +- .../submodule/conformance/witness.types | 2 +- .../wrappedAndRecursiveConstraints.js.diff | 22 +- ...rappedAndRecursiveConstraints.symbols.diff | 20 + .../wrappedAndRecursiveConstraints2.js.diff | 16 + .../wrappedAndRecursiveConstraints3.js.diff | 26 +- .../wrappedAndRecursiveConstraints4.js.diff | 27 +- ...entNoAsiAfterTransform(target=es5).js.diff | 231 +- .../renameAlias.baseline.jsonc.diff | 18 + .../renameAlias3.baseline.jsonc.diff | 18 + ...meAliasExternalModule3.baseline.jsonc.diff | 19 + .../tsxRename1.baseline.jsonc.diff | 19 + .../tsxRename2.baseline.jsonc.diff | 10 +- .../alwaysStrictModule2.errors.txt.diff | 2 +- ...arationEmitMonorepoBaseUrl.errors.txt.diff | 70 +- ...ionEmitPathMappingMonorepo.errors.txt.diff | 45 +- ...onEmitPathMappingMonorepo2.errors.txt.diff | 70 +- ...ersPathKindBasedOnBundling.errors.txt.diff | 28 +- .../compiler/elidedJSImport1.types.diff | 10 + ...rmatEmit1(module=commonjs).errors.txt.diff | 41 - ...rmatEmit2(module=commonjs).errors.txt.diff | 44 - ...rmatEmit3(module=commonjs).errors.txt.diff | 46 - ...rmatEmit4(module=commonjs).errors.txt.diff | 46 - ...riptImportDefaultBadExport.errors.txt.diff | 17 - ...avascriptImportDefaultBadExport.types.diff | 5 - ...gedWithModuleAugmentation2.errors.txt.diff | 14 +- .../jsFileFunctionOverloads.types.diff | 11 +- .../jsFileFunctionOverloads2.types.diff | 11 +- .../compiler/jsFileMethodOverloads.types.diff | 11 + .../jsFileMethodOverloads2.types.diff | 11 +- .../jsdocBracelessTypeTag1.errors.txt.diff | 17 + ...ithRelativeAndAbsolutePath.errors.txt.diff | 66 +- ...onWithExtensions_withPaths.errors.txt.diff | 69 +- ...e_externalModule_withPaths.errors.txt.diff | 66 +- ...nWithSuffixes_one_jsModule.errors.txt.diff | 36 + ...izedJSDocCastDoesNotNarrow.errors.txt.diff | 17 + ...nthesizedJSDocCastDoesNotNarrow.types.diff | 11 + ...asedModuleResolution2_node.errors.txt.diff | 8 +- ...asedModuleResolution3_node.errors.txt.diff | 26 +- ...asedModuleResolution4_node.errors.txt.diff | 44 +- ...asedModuleResolution5_node.errors.txt.diff | 62 +- ...asedModuleResolution7_node.errors.txt.diff | 78 +- ...asedModuleResolution8_node.errors.txt.diff | 36 +- ...n_rootImport_aliasWithRoot.errors.txt.diff | 40 +- ...ithRoot_differentRootTypes.errors.txt.diff | 64 +- ...asWithRoot_multipleAliases.errors.txt.diff | 41 +- ...aliasWithRoot_realRootFile.errors.txt.diff | 40 +- ...rootImport_noAliasWithRoot.errors.txt.diff | 40 +- ...AliasWithRoot_realRootFile.errors.txt.diff | 40 +- ...leResolution_withExtension.errors.txt.diff | 41 +- ...lution_withExtensionInName.errors.txt.diff | 37 +- ...tension_MapedToNodeModules.errors.txt.diff | 35 +- ...withExtension_failedLookup.errors.txt.diff | 8 +- ...athMappingInheritedBaseUrl.errors.txt.diff | 50 +- .../compiler/pathsValidation1.errors.txt.diff | 10 +- .../compiler/pathsValidation2.errors.txt.diff | 17 +- .../compiler/pathsValidation3.errors.txt.diff | 10 +- .../compiler/pathsValidation4.errors.txt.diff | 19 +- ...veJsonModuleAndPathMapping.errors.txt.diff | 8 +- ...uireOfJsonFile_PathMapping.errors.txt.diff | 35 +- ...ithFileEndingWithInterface.errors.txt.diff | 4 +- ...uthinessCallExpressionCoercion4.types.diff | 6 +- ...ertionsAndNonReturningFunctions.types.diff | 38 +- ...estrictions(module=esnext).errors.txt.diff | 28 + ...trictions(module=preserve).errors.txt.diff | 41 + ...ectAssignPrototypeProperty.errors.txt.diff | 7 +- .../checkJsdocReturnTag2.types.diff | 11 + .../conformance/checkJsdocTypeTag5.types.diff | 15 +- ...ameterDeclaration9(strict=true).types.diff | 2 +- .../emit(jsx=preserve).errors.txt.diff | 28 + .../emit(jsx=react).errors.txt.diff | 28 + .../errorOnFunctionReturnType.errors.txt.diff | 11 +- ...(moduleresolution=bundler).errors.txt.diff | 24 - ...ntainerMergeTsDeclaration3.errors.txt.diff | 4 +- ...eclarationsFunctionLikeClasses2.types.diff | 16 +- ...portAliasExposedWithinNamespace.types.diff | 3 +- ...tAliasExposedWithinNamespaceCjs.types.diff | 3 +- .../conformance/jsDeclarationsJson.types.diff | 29 +- ...tionsNonIdentifierInferredNames.types.diff | 13 + .../conformance/jsdocLiteral.types.diff | 16 +- .../conformance/jsdocOverrideTag1.types.diff | 11 + .../conformance/jsdocReturnTag1.types.diff | 11 +- .../conformance/jsdocTemplateTag3.types.diff | 20 + .../jsdocTypeTagCast.errors.txt.diff | 21 +- .../conformance/moduleExportAlias5.types.diff | 14 +- .../moduleExportDuplicateAlias3.types.diff | 20 +- ...ExportsElementAccessAssignment2.types.diff | 10 + ...ternateResult_noResolution.errors.txt.diff | 14 +- ...e10Alternateresult_noTypes.errors.txt.diff | 6 +- ...tAssignment(module=node16).errors.txt.diff | 11 +- ...tAssignment(module=node18).errors.txt.diff | 11 +- ...tAssignment(module=node20).errors.txt.diff | 11 +- ...ssignment(module=nodenext).errors.txt.diff | 11 +- ...ronousCallErrors(module=node16).types.diff | 28 + ...ronousCallErrors(module=node18).types.diff | 28 + ...ronousCallErrors(module=node20).types.diff | 28 + ...nousCallErrors(module=nodenext).types.diff | 28 + ...lesCJSEmit1(module=node18).errors.txt.diff | 7 +- ...lesCJSEmit1(module=node20).errors.txt.diff | 7 +- ...sCJSEmit1(module=nodenext).errors.txt.diff | 7 +- .../conformance/overloadTag1.types.diff | 29 + .../conformance/overloadTag2.types.diff | 11 + ...ntMergeWithInterfaceMethod.errors.txt.diff | 4 +- .../conformance/returnTagTypeGuard.types.diff | 20 +- .../typedefCrossModule2.types.diff | 26 +- .../typesVersions.emptyTypes.errors.txt.diff | 30 +- .../typesVersions.justIndex.errors.txt.diff | 29 +- ...ntypedModuleImport_allowJs.errors.txt.diff | 16 + .../untypedModuleImport_allowJs.types.diff | 21 + 11290 files changed, 376362 insertions(+), 49447 deletions(-) create mode 100644 testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anonterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argsInScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFind.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFind.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assigningFunctionToTupleIssuesError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatBug2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatBug5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatInterfaceWithStringIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatOnNew.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatWithOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatability44.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentCompatability45.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentIndexedToPrimitives.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentNestedInLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentRestElementWithErrorSourceType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToAnyArrayRestParameters.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToConditionalBrandedStringTemplateOrMapping.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToExpandingArrayType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypeBracketNamedPropertyAccess.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass2a.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesClass4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/autoLift2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/autolift3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/autolift4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/avoid.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/awaitUnionPromise.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/badThisBinding.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/baseTypeAfterDerivedType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bases.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bestChoiceType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bestChoiceType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bestChoiceType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bigintAmbientMinimal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bigintWithoutLib.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bigintWithoutLib.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bind1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bindingPatternCannotBeOnlyInferenceSource.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bindingPatternContextualTypeDoesNotCauseWidening.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bindingPatternInParameter01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingCaptureThisInFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingUsedBeforeDef.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsInDownlevelGenerator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOnClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloadViaElementAccessExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callOverloads5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/callbacksDontShareTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cannotInvokeNewOnErrorExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/captureSuperPropertyAccessInSuperCall01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/captureThisInSuperCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop11.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop13.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedShorthandPropertyAssignmentNoCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/capturedVarInLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/castExpressionParentheses.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/castOfAwait.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/castOfYield.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/castOfYield.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/castOfYield.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/chainedAssignment2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/chainedSpecializationToObjectTypeLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralHasCheckedKeyof.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkMergedGlobalUMDSymbol.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccess.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularObjectLiteralAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularOptionalityRemoval.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularResolvedSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularTypeArgumentsLocalAndOuterNoCrash1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularTypeofWithFunctionModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/circularlySimplifyingConditionalTypesNoCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classCannotExtendVar.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classDeclaredBeforeClassFactory.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExpressionAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExpressionTest1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExpressionTest2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsInterface_not.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsMultipleBaseClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtendsNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classExtensionNameOutput.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classFunctionMerging.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classFunctionMerging2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementingInterfaceIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementsClass1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementsClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementsClass3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementsClass6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classImplementsPrimitive.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classIndexer4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classInheritence.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classMethodWithKeywordName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classOrder1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classOrder2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classOverloadForFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classOverloadForFunction2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classSideInheritance1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classUpdateTests.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classWithEmptyTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classWithMultipleBaseClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleTest2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collectionPatternNoError.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionArgumentsArrowFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionArgumentsClassMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionArgumentsFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionArgumentsFunctionExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionRestParameterArrowFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionRestParameterClassMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionRestParameterFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionRestParameterFunctionExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionRestParameterUnderscoreIUsage.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndNameResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientClassInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientVarInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndClassInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndEnumInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndFunctionInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndNameResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndVarInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commaOperatorInConditionalExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentBeforeStaticMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement16.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnArrayElement9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnClassAccessor1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnClassAccessor2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnClassMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnSimpleArrowFunctionBody1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentOnStaticMember1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsAfterFunctionExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsCommentParsing.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOnReturnStatement1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsTypeParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/commentsVarDecl.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/complicatedGenericRecursiveBaseClassReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/compositeContextualSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/computedTypesKeyofNoIndexSignatureType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/computerPropertiesInES5ShouldBeTransformed.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/concatClassAndString.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/concatTuples.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/concatTuples.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalAnyCheckTypePicksBothBranches.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalDoesntLeakUninstantiatedTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalEqualityOnLiteralObjects.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalEqualityTestingNullability.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalExpression1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalExpressions2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/configFileExtendsAsList.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constDeclarations-es5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constEnumErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constEnumToStringNoComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constEnumToStringWithComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constIndexedAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constantEnumAssert.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constantEnumAssert.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constantOverloadFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constantOverloadFunctionNoSubtypeError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constraintsUsedInPrototypeProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorArgsErrors1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorArgsErrors5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorOverloads1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorOverloads2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorOverloads3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorOverloads8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorReturningAPrimitive.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorReturnsInvalidType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorStaticParamName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorStaticParamNameErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorWithCapturedSuper.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/constructorsWithSpecializedSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualSignature_objectLiteralMethodMayReturnNever.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeAppliedToVarArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeArrayReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeCaching.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeIterableUnions.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeLogicalOr.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeObjectSpreadExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingArrayDestructuringWithDefaults.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfArrayLiterals1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaReturnExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfObjectLiterals2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfOptionalMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingOfTooShortOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingTwoInstancesOfSameTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingWithFixedTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericAndNonGenericSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypedByDiscriminableUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypedGenericAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypedJsxAttribute.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/contextuallyTypingRestParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/continueInLoopsWithCapturedBlockScopedBindings1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/continueNotInIterationStatement4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowArrayErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowArrays.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowCaching.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowCaching.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowCaching.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionFunctionCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowDestructuringParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowLoopAnalysis.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowManyConsecutiveConditionsNoTimeout.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowNoImplicitAny.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowOuterVariable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowUnionContainingTypeParameter1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/correlatedUnions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashInEmitTokenWithComment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashInResolveInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashInresolveReturnStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/crashOnMethodSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/createArray.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/dataViewConstructor.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/dataViewConstructor.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileClassExtendsNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileClassWithIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileClassWithStaticMethodReturningConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileEnums.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileForClassWithMultipleBaseClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileForClassWithPrivateOverloadedFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileForFunctionTypeAsTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileImportedTypeUseInTypeArgPosition.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileMethods.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileRegressionTests.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileRestParametersOfFunctionAndFunctionType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declInput.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declInput3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitAliasExportStar.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitAliasFromIndirectFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitArrayTypesFromGenericArrayUsage.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitClassInherritsAny.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameWithQuestionToken.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringWithOptionalBindingParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitForDefaultExportClassExtendingExpression01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitIndexTypeArray.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitKeywordDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitNonExportedBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitPropertyNumericStringKey.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitRecursiveConditionalAliasPreserved.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitTupleRestSignatureLeadingVariadic.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameInOuterScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameShadowedInternally.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitWithInvalidPackageJsonTypings.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationFunctionTypeNonlocalShouldNotBeAnError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declarationsForIndirectTypeAliasReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/declareIdentifierAsBeginningOfStatementExpression01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deepComparisons.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deepKeysIndexing.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deeplyNestedConditionalTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultArgsInOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultOfAnyInStrictNullChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultParameterTrailingComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultValueInConstructorOverload1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/defaultValueInFunctionOverload1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/derivedClassOverridesPrivateFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/derivedClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/derivedTypeCallingBaseImplWithOptionalParams.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructionAssignmentError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=false).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=true).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructureOptionalParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructureTupleWithVariableElement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuredMaappedTypeIsNotImplicitlyAny.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringFromUnionSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringPropertyAssignmentNameIsNotAssignmentTarget.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringTypeGuardFlow.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/destructuringWithNumberLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminableUnionWithIntersectedMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminantElementAccessCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminateWithMissingProperty.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminatedUnionErrorMessage.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfLambdaFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doWhileUnreachableCode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/dottedSymbolResolution1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doubleUnderscoreLabels.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doubleUnderscoreMappedTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/doubleUnderscoreReactNamespace.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst17.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst18.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst19.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/downlevelLetConst9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateTypeParameters2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/elementAccessExpressionInternalComments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emitSkipsThisWithRestParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emitThisInObjectLiteralGetter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emitThisInSuperMethodCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyArrayDestructuringExpressionVisitedByTransformer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyDeclarationEmitIsModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyGenericParamList.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyThenWarning.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyThenWithoutWarning.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/emptyTypeArgumentListWithNew.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumNumbering1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/enumUsedBeforeDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorConstructorSubtypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType02.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType03.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorHandlingInInstanceOf.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorInfoForRelatedIndexTypesNoConstraintElaboration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes02.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes03.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes04.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorRecoveryInClassDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorSupression1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorWithSameNameType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5-commonjs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5-commonjs4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5-yieldFunctionObjectLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5ModuleWithModuleGenCommonjs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5ModuleWithoutModuleGenTarget.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5SetterparameterDestructuringNotElided.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es5andes6module.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ClassSuperCodegenBug.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ClassTest7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6DeclOrdering.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleEs2015Error.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseInEs5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseWithExport.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/eventEmitterPatternWithRecordOfFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/evolvingArrayTypeInAssert.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.js create mode 100644 testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.symbols create mode 100644 testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.types create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithEmptyObject.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyCheckingIntersectionWithConditional.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/excessPropertyErrorForFunctionTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exhaustiveSwitchImplicitReturn.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJSDocInTs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigmentsDeclared.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/explicitAnyAfterSpreadNoImplicitAnyError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportAssignmentWithExports.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultClassAndValue.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultInterfaceClassAndValue.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultParenthesize.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultTypeAndClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultTypeClassAndValue.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=es2015,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=esnext,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=es2015,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=esnext,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportEqualsCommonJs.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportObjectRest(module=es2015,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportObjectRest(module=esnext,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportToString.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/exportVisibility.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extBaseClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendConstructSignatureInInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendGenericArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendGenericArray2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendGlobalThis.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendGlobalThis.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendGlobalThis.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendNonClassSymbol1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendNonClassSymbol2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendPrivateConstructorClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/extendsJavaScript.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/externModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsInFunctionParameterDefaults.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/flatArrayNoExcessiveStackDepth.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/flowControlTypeGuardThenSwitch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/flowInFinally1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/forInStrictNullChecksNoError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/forLoopEndingMultilineComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/forLoopWithDestructuringDoesNotElideFollowingStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/forOfStringConstituents.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/forOfTransformsExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/freshLiteralInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/funClodule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/funcdecl.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionAndPropertyNameConflict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=false).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionAssignment.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall13.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall16.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionCall17.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionExpressionInWithBlock.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloadAmbiguity1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads43.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads44.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads45.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloads7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloadsOnGenericArity2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionOverloadsOutOfOrder.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionParameterArityMismatch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionTypeArgumentAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithAnyReturnTypeAndNoReturnExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements11.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements13.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements16.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionsMissingReturnStatementsAndExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericArray1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericArrayAssignmentCompatErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericArrayWithoutTypeAnnotation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericAssignmentCompatWithInterfaces1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCallWithFixedArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericChainedCalls.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericClassInheritsConstructorFromNonGenericClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericClassStaticMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericClassesInModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCombinators2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericCombinators2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraint1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraint2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericConstraintDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericConstructorFunction1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericContextualTypingSpecialization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericDefaults.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericDefaults.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionCallSignatureReturnTypeMismatch.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionHasFreshTypeArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionSpecializations1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionTypedArgumentsAreFixed.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctions2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionsAndConditionalInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericInference1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericInterfaceImplementation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericInterfaceTypeCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericInterfacesWithoutTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericLambaArgWithoutTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericObjectCreationWithoutTypeArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericObjectLitReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericObjectSpreadResultInSwitch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericOverloadSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericParameterAssignability1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericReduce.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericRestArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericSignatureIdentity.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericSpecializations1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericSpecializations2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericSpecializations3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericStaticAnyTypeFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeParameterEquivalence2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeReferencesRequireTypeArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeUsedWithoutTypeArguments1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericTypeWithNonGenericBaseMisMatch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericWithOpenTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericsAndHigherOrderFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericsManyTypeParameters.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/genericsWithDuplicateTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getSetEnumerable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getterMissingReturnError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getterSetterSubtypeAssignment.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/getterThatThrowsShouldNotNeedReturn.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/gettersAndSetters.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/gettersAndSettersAccessibility.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/gettersAndSettersTypesAgree.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/globalFunctionAugmentationOverload.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/globalIsContextualKeyword.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/globalThis.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/globalThisCapture.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/grammarAmbiguities1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/heterogeneousArrayAndOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/higherOrderMappedIndexLookupInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/homomorphicMappedTypeNesting.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/identicalTypesNoDifferByCheckOrder.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/identifierStartAfterNumericLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implementArrayInterface.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implementInterfaceAnyMemberWithVoid.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implementsClauseAlreadySeen.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implementsInClassExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyAnyReturningFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionWithoutFormalType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyDeclareTypePropertyWithoutType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyFunctionInvocationWithAnyArguements.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyFunctionReturnNullOrUndefined.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitAnyInCatch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitConstParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/implicitIndexSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importNonExportedMember4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importNonExportedMember5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importNonExportedMember6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importNonExportedMember7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inOperatorWithGeneric.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incompatibleExports2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incompatibleTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incrementalConfig.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incrementalInvalid.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/incrementalTsBuildInfoFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexClassByNumber.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexIntoArraySubclass.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexIntoEnum.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexSignatureTypeCheck2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexSignatureWithAccessibilityModifier.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexSignatureWithTrailingComma.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexSignatureWithoutTypeAnnotation1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNullStrictNullChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexedAccessCanBeHighOrder.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexedAccessConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexedAccessRelation.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexer2A.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexer3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexerAsOptional.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexerConstraints2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexerReturningTypeParameter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indexerSignatureWithRestParam.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indirectSelfReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/indirectSelfReferenceGeneric.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes3.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferObjectTypeFromStringLiteralToKeyof.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferParameterWithMethodCallInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferSecondaryParameter.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferSetterParamType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferStringLiteralUnionForBindingElement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferTupleFromBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferTypeArgumentsInSignatureWithRestParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferTypePredicates.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferenceFromParameterlessLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeNested.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferredFunctionReturnTypeIsEmptyType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferredNonidentifierTypesGetQuotes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferredRestTypeFixedOnce.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferredReturnTypeIncorrectReuse1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inferringReturnTypeFromConstructSignatureGeneric.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritFromGenericTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollision.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedGenericCallSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/initializePropertiesWithRenamedLet.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/inlineConditionalHasSimilarAssignability.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerAliases.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerAliases2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instanceOfAssignability.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instanceofNarrowReadonlyArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instanceofOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instantiateContextuallyTypedGenericThis.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instantiateCrossFileMerge.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instantiatedBaseTypeConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instantiatedReturnTypeContravariance.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/instantiationExpressionErrorNoCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/intTypeCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceImplementation5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceImplementation7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceMergeWithNonGenericTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfaceWithMultipleDeclarations.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfacedecl.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/interfacedeclWithIndexerErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasEnum.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/intersectionOfTypeVariableHasApparentSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/intrinsics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invalidOptionalChainFromNewExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invalidReferenceSyntax1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invalidSymbolInTypeParameter1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invalidTypeNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invocationExpressionInFunctionParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/invokingNonGenericMethodWithTypeArguments1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsExpressions.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/isolatedModulesExportImportUninstantiatedNamespace.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInvalidName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsdocTypecastNoTypeNoCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/json.stringify.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/json.stringify.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxAttributeMissingInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxCallbackWithDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxChildrenWrongType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxInExtendsClause.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxLocalNamespaceIndexSignatureNoCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeStringValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixIntrinsics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/jsxNestedWithinTernaryParsesCorrectly.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/keyofGenericExtendingClassDoubleLayer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/keyofIsLiteralContexualType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/keywordExpressionInternalComments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/keywordExpressionInternalComments.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/lambdaASIEmit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/lambdaExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/lambdaParamTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/largeTupleTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/lastPropertyInLiteralWins.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/lateBoundDestructuringImplicitAnyError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letAsIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letAsIdentifierInStrictMode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letConstInCaseClauses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letConstMatchingParameterNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letDeclarations-es5-1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letDeclarations-es5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letInConstDeclarations_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letInLetConstDeclOfForOfAndForIn_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letInLetDeclarations_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letInNonStrictMode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letInVarDeclOfForOf_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letKeepNamesOfTopLevelItems.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/letShadowedByNameInNestedScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libMembers.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libMembers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimple.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libTypeScriptOverrideSimpleConfig.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libTypeScriptSubfileResolving.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/libTypeScriptSubfileResolvingConfig.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/library_ArraySlice.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/library_DatePrototypeProperties.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/library_StringSlice.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/literalFreshnessPropagationOnNarrowing.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/literalFreshnessPropagationOnNarrowing.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/literalFreshnessPropagationOnNarrowing.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/literalIntersectionYieldsLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/literalWideningWithCompoundLikeAssignments.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/localClassesInLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/localImportNameVsGlobalName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/localRequireFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/localTypeParameterInferencePriority.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mapGroupBy.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mapOnTupleTypes01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mapOnTupleTypes02.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedToToIndexSignatureInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeAsStringTemplate.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeGenericWithKnownKeys.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeGenericWithKnownKeys.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeIndexedAccess.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeIndexedAccess.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeMultiInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeNotMistakenlyHomomorphic.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeNotMistakenlyHomomorphic.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypePartialNonHomomorphicBaseConstraint.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeRecursiveInference.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeRecursiveInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeRecursiveInference.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeWithAsClauseAndLateBoundProperty.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/maxConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/memberScope.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergeMultipleInterfacesReexported.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergeSymbolReexportInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergeSymbolReexportedTypeAliasInstantiation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedClassNamespaceRecordCast.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedDeclarationExports.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedDeclarations3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedDeclarations4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedDeclarations5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mergedInterfaceFromMultipleFiles1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/metadataOfStringLiteral.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/metadataOfUnion.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/methodSignatureDeclarationEmit1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mismatchedClassConstructorVariable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mismatchedExplicitTypeParameterAndArgumentType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mismatchedGenericArguments1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingCommaInTemplateStringsArray.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingDiscriminants2.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/missingDiscriminants2.symbols create mode 100644 testdata/baselines/reference/submodule/compiler/missingDiscriminants2.types create mode 100644 testdata/baselines/reference/submodule/compiler/missingFunctionImplementation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingPropertiesOfClassExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingReturnStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingReturnStatement1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingSelf.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/missingTypeArguments2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mixedStaticAndInstanceClassMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mixinIntersectionIsValidbaseType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/mixingStaticAndInstanceOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modifierOnParameter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modifierParenCast.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modifiersInObjectLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_Dom.asynciterable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_Dom.asynciterable.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_Worker.asynciterable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_Worker.asynciterable.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modularizeLibrary_Worker.iterable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAndInterfaceWithSameName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAsBaseType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAssignmentCompat1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAssignmentCompat2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAssignmentCompat4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationGlobal1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationGlobal2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationGlobal2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationGlobal3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationGlobal3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleAugmentationInAmbientModule5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleClassArrayCodeGenTest.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleCrashBug1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/moduleElementsInWrongContext.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleExportsUnaryExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleMemberWithoutTypeAnnotation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleMerge.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleNewExportBug.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/modulePrologueCommonjs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleRedifinitionErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleReopenedTypeOtherBlock.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleReopenedTypeSameBlock.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithExtensions_unexpected2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithRequire.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithRequireAndImport.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_empty.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_notSpecified.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneBlank.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_oneNotFound.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_dirModuleWithIndex.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalModulePath.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_externalTSModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_one_jsonModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleResolutionWithSuffixes_threeLastIsBlank4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleScopingBug.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/moduleVisibilityTest4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/module_augmentUninstantiatedModule2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multiLineContextDiagnosticWithPretty.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multiLinePropertyAccessAndArrowFunctionIndent1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multiModuleClodule1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multiSignatureTypeInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multipleBaseInterfaesWithIncompatibleProperties2(exactoptionalpropertytypes=false).symbols create mode 100644 testdata/baselines/reference/submodule/compiler/multipleBaseInterfaesWithIncompatibleProperties2(exactoptionalpropertytypes=false).types create mode 100644 testdata/baselines/reference/submodule/compiler/multipleBaseInterfaesWithIncompatibleProperties2(exactoptionalpropertytypes=true).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/multipleBaseInterfaesWithIncompatibleProperties2(exactoptionalpropertytypes=true).symbols create mode 100644 testdata/baselines/reference/submodule/compiler/multipleBaseInterfaesWithIncompatibleProperties2(exactoptionalpropertytypes=true).types create mode 100644 testdata/baselines/reference/submodule/compiler/mutuallyRecursiveGenericBaseTypes2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nameCollisionsInPropertyAssignments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/namespaceDisambiguationInUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/namespaceMergedWithFunctionWithOverloadsUsage.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/namespaceNotMergedWithFunctionDefaultExport.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/namespaces2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/namespacesDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByBooleanComparison.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByBooleanComparison.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByClauseExpressionInSwitchTrue1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByClauseExpressionInSwitchTrue1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByClauseExpressionInSwitchTrue3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByInstanceof.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowByParenthesizedSwitchExpression.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowBySwitchDiscriminantUndefinedCase1(exactoptionalpropertytypes=false,nouncheckedindexedaccess=false).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowBySwitchDiscriminantUndefinedCase1(exactoptionalpropertytypes=false,nouncheckedindexedaccess=true).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowBySwitchDiscriminantUndefinedCase1(exactoptionalpropertytypes=true,nouncheckedindexedaccess=false).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowBySwitchDiscriminantUndefinedCase1(exactoptionalpropertytypes=true,nouncheckedindexedaccess=true).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowCommaOperatorNestedWithinLHS.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowTypeByInstanceof.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowUnknownByTypeofObject.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowedConstInMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingAssignmentReadonlyRespectsAssertion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingByDiscriminantInLoop.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingByDiscriminantInLoop.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingByTypeofInSwitch.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingConstrainedTypeParameter.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingMutualSubtypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingOfQualifiedNames.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingOrderIndependent.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingRestGenericCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingTruthyObject.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingTypeofObject.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingTypeofParenthesized1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingTypeofUndefined1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingTypeofUndefined2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingUnionWithBang.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingUnionWithBang.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/narrowingWithNonNullExpression.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nativeToBoxedTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nearbyIdenticalGenericLambdasAssignable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings11.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings13.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings14.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings15.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings16.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedBlockScopedBindings9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedFreshLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedLoopTypeGuards.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedLoopWithOnlyInnerLetCaptured.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedLoops.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedLoops.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedModulePrivateAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedRecursiveArraysOrObjectsError01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedRecursiveArraysOrObjectsError01.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedRecursiveLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedSuperCallEmit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedThisContainer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedTypeVariableInfersLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nestedTypeVariableInfersLiteral.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/neverAsDiscriminantType(strict=false).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newAbstractInstance.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newArrays.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newLexicalEnvironmentForConvertedLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newNamesInGlobalAugmentations1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newOnInstanceSymbol.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/newOperator.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCircularDefinitionOnExportOfPrivateInMergedNamespace.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndClassInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndLocalVarInAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndLocalVarInConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndLocalVarInFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndLocalVarInLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndLocalVarInMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionAndVarInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCollisionThisExpressionInFunctionAndVarInGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noConstraintInReturnType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnMixin.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnNoLib.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnParameterNamedRequire.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noCrashOnThisTypeUsage.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noEmitHelpers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringInPrivateMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringParameterDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringVarDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyDestructuringVarDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyForIn.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyForMethodParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyInContextuallyTypesFunctionParamter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyInContextuallyTypesFunctionParamter.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyInContextuallyTypesFunctionParamter.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyLoopCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyMissingSetAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyNamelessParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyParametersInBareFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyParametersInModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyStringIndexerOnObject.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyUnionNormalizedObjectLiteral1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitAnyWithOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitReturnInConstructors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitSymbolToString.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitThisBigThis.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noImplicitThisFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noInferUnionExcessPropertyCheck1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noRepeatedPropertyNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noSubstitutionTemplateStringLiteralTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noTypeArgumentOnReturnType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noUncheckedIndexAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noUnusedLocals_destructuringAssignment.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noUnusedLocals_potentialPredicateUnusedParam.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noUnusedLocals_selfReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/noUnusedLocals_writeOnly.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonArrayRestArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonExportedElementsOfMergedModules.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonIdenticalTypeConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonInferrableTypePropagation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonInferrableTypePropagation2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonNullFullInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonNullReferenceMatching.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonNullableTypes1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonObjectUnionNestedExcessPropertyCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonexistentPropertyOnUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonexistentPropertyUnavailableOnPromisedType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nongenericConditionalNotPartiallyComputed.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nonstrictTemplateWithNotOctalPrintsAsIs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/null.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/nullableFunctionError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numberAssignableToEnumInsideUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numberVsBigIntOperations.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerConstraint.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerConstraint1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerConstraint2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerConstraint5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerTyping1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerTyping2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/numericIndexerTyping2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectAssignLikeNonUnionResult.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectAssignLikeNonUnionResult.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectBindingPatternContextuallyTypesArgument.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectBindingPattern_restElementWithPropertyName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectFreeze.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectFreezeLiteralsDontWiden.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectFromEntries.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectGroupBy.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectInstantiationFromUnionSpread.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLitIndexerContextualType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLitPropertyScoping.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralArraySpecialization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralComputedNameNoDeclarationError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralDeclarationGeneration1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralEnumPropertyNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralFreshnessWithSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralFreshnessWithSpread.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralFunctionArgContextualTyping.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralFunctionArgContextualTyping2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralMemberWithModifiers1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralMemberWithQuestionMark1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralThisWidenedOnUse.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralWithSemicolons1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralWithSemicolons2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralWithSemicolons4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralsAgainstUnionsOfArrays01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectLiteralsAgainstUnionsOfArrays01.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectMembersOnTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/objectSpreadWithinMethodWithinObjectWithSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/omittedExpressionForOfLoop.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/operationsAvailableOnPromisedType.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/operationsAvailableOnPromisedType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalArgsWithDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalChainWithInstantiationExpression1(target=es2019).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalChainWithInstantiationExpression1(target=es2020).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalConstructorArgInSuper.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalFunctionArgAssignability.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamInOverride.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamReferencingOtherParams1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamReferencingOtherParams2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamReferencingOtherParams3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParameterRetainsNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamterAndVariableDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalParamterAndVariableDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalPropertiesTest.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionalSetterParam.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionsCompositeWithIncrementalFalse.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/optionsTsBuildInfoFileWithoutIncrementalAndComposite.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/out-flag.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overload1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overload2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadAssignmentCompat.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadCallTest.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadConsecutiveness.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadEquivalenceWithStatics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadErrorMatchesImplementationElaboaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadModifiersMustAgree.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstAsTypeAnnotation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstConstraintChecks1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstConstraintChecks2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstInBaseWithBadImplementationInDerived.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstInCallback1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstInheritance4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstNoAnyImplementation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstNoAnyImplementation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstNoNonSpecializedSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstNoStringImplementation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstNoStringImplementation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnConstantsInvalidOverload1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadOnGenericArity.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionOnDefaultConstructor1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionOverCTLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionOverNonCTLambdas.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionOverNonCTLambdas.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionOverNonCTLambdas.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadResolutionWithAny.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadReturnTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadReturnTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadWithCallbacksWithDifferingOptionalityOnArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadedStaticMethodSpecialization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadingOnConstants1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadresolutionWithConstraintCheckingDeferred.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadsWithComputedNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadsWithConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadsWithProvisionalErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/overloadsWithinClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parameterDestructuringObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parameterListAsTupleType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parameterNamesInTypeParameterList.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parameterPropertyOutsideConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parameterReferenceInInitializer2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/paramsOnlyHaveLiteralTypesWhenAppropriatelyContextualized.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parenthesizedArrowExpressionASI.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseArrowFunctionWithFunctionReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseEntityNameWithReservedWord.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseErrorInHeritageClause1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseGenericArrowRatherThanLeftShift.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseObjectLiteralsWithoutTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseReplacementCharacter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parseUnaryExpressionNoTypeAssertionInJsx4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parserConstructorDeclaration12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/parserPrivateIdentifierInArrayAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/partialDiscriminatedUnionMemberHasGoodError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/partiallyAmbientClodule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/partiallyDiscriminantedUnions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/partiallyDiscriminantedUnions.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/pathsValidation1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/pathsValidation2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/pathsValidation3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/performanceComparisonOfStructurallyIdenticalInterfacesWithGenericSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/pickOfLargeObjectUnionWorks.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/potentiallyUnassignedVariableInCatch.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/predicateSemantics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/prefixedNumberLiteralAssignToNumberLiteralType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/prespecializedGenericMembers1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/prettyFileWithErrorsAndTabs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/primitiveConstraints2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/primitiveMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/primitiveMembers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/primitiveTypeAsClassName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyAccessorDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyCheckAnonymousFunctionParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyCheckTypeOfInvisibleModuleError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyCheckTypeOfInvisibleModuleNoError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyClassExtendsClauseDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyClassImplementsClauseDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyFunc.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyFunctionReturnTypeDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyGloClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyGloGetter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyGloInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParameterOfFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParameterOfFunctionDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParametersOfClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParametersOfClassDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParametersOfInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privacyTypeParametersOfInterfaceDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/privateFieldsInClassExpressionDeclaration.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseChaining1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseChaining2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseDefinitionTest.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseDefinitionTest.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promisePermutations.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promisePermutations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promisePermutations2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promisePermutations3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseTest.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseTypeInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseTypeStrictNull.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promiseWithResolvers.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promises.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/promisesWithConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/propagationOfPromiseInitialization.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/properties.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/propertyAccessExpressionInnerComments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/propertyAccessOnObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/propertyWrappedInTry.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/protoInIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/publicGetterProtectedSetterFromThisParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/qualifiedName_entity-name-resolution-does-not-affect-class-heritage.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/qualify.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/quickIntersectionCheckCorrectlyCachesErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/quotedAccessorName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/quotedAccessorName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/quotedFunctionName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/quotedFunctionName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ramdaToolsNoInfinite2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reachabilityChecks1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reachabilityChecks3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reactReduxLikeDeferredInferenceAllowsAssignment.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reactSFCAndFunctionResolvable.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyAssignmentInSubclassOfClassExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyFloat32ArrayAssignableWithFloat32Array.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyInNonPropertyParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyPropertySubtypeRelationDirected.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyTupleAndArrayElaboration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/readonlyTupleAndArrayElaboration.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveArrayNotCircular.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveBaseCheck3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveBaseCheck4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveBaseCheck5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveBaseCheck6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveBaseConstructorCreation1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveCloduleReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveComplicatedClasses.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveComplicatedClasses.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveComplicatedClasses.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveConditionalCrash3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveConditionalEvaluationNonInfinite.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveFunctionTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveFunctionTypes1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveGenericMethodCall.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveGenericMethodCall.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveGetterAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveInferenceBug.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveResolveTypeMembers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTupleTypeInference.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTupleTypes1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTupleTypes2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTypeAliasWithSpreadConditionalReturnNotCircular.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTypeAliasWithSpreadConditionalReturnNotCircular.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTypeParameterConstraintReferenceLacksTypeArgs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/recursiveTypeRelations.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/redefineArray.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/redefineArray.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/reexportMissingDefault4.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reexportMissingDefault7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/referenceSatisfiesExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regExpWithOpenBracketInCharClass(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regExpWithOpenBracketInCharClass(target=es5).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regExpWithSlashInCharClass.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regExpWithSlashInCharClass.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regularExpressionGroupNameSuggestions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regularExpressionScanning(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regularExpressionScanning(target=es5).symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/regularExpressionUnicodePropertyValueExpressionSuggestions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/relationalOperatorComparable.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.symbols.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/requireOfJsonFileWithoutResolveJsonModule.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/requiredInitializedParameter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/requiredInitializedParameter2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/requiredInitializedParameter3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/requiredInitializedParameter4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reservedWords2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reservedWords2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reservedWords3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.js create mode 100644 testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.symbols create mode 100644 testdata/baselines/reference/submodule/compiler/resolutionCandidateFromPackageJsonField2.types create mode 100644 testdata/baselines/reference/submodule/compiler/resolveInterfaceNameWithSameLetDeclarationName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolveInterfaceNameWithSameLetDeclarationName2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolveInterfaceNameWithSameLetDeclarationName2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolveModuleNameWithSameLetDeclarationName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolveTypeAliasWithSameLetDeclarationName1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restArgAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restArgMissingName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restElementWithNumberPropertyName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restElementWithNumberPropertyName.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restInvalidArgumentType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParamAsOptional.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParamModifier.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterAssignmentCompatibility.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterNoTypeAnnotation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterNotLast.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameterWithBindingPattern3.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restParamsWithNonRestParams.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restTypeRetainsMappyness.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/restUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/returnInfiniteIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/returnTypeParameterWithModules.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/returnValueInSetter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reverseMappedTypeContextualTypeNotCircular.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reverseMappedTypeIntersectionConstraint.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reverseMappedTypeIntersectionConstraint.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/reverseMappedTypeLimitedConstraint.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReferencesInFunctionParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReferencingFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReferencingFile2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReferencingFile3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/selfReferencingSpreadInLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/setterWithReturn.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shadowPrivateMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shadowingViaLocalValue.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shadowingViaLocalValueOrBindingElement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shorthand-property-es5-es6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shorthandOfExportedEntity02_targetES5_CommonJS.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shorthandPropertyAssignmentsInDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shorthandPropertyUndefined.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/shouldNotPrintNullEscapesIntoOctalLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sideEffectImports1(module=commonjs,nouncheckedsideeffectimports=true).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sideEffectImports1(module=nodenext,nouncheckedsideeffectimports=true).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sideEffectImports1(module=preserve,nouncheckedsideeffectimports=true).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sigantureIsSubTypeIfTheyAreIdentical.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/signatureLengthMismatchCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/signatureLengthMismatchInOverload.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/slightlyIndirectedDeepObjectLiteralElaborations.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMap-FileWithComments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDecorators.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPattern2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForArrayBindingPatternDefaultValues2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForObjectBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForObjectBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForObjectBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPattern2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfArrayBindingPatternDefaultValues2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfObjectBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringForOfObjectBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPattern2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringParametertArrayBindingPatternDefaultValues2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement1.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatement1.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern3.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern4.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern5.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern6.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPattern7.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementArrayBindingPatternDefaultValues3.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementDefaultValues.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPattern.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementNestedObjectBindingPatternWithDefaultValues.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern1.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern2.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern3.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationDestructuringVariableStatementObjectBindingPattern4.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationForIn.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationFunctionExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationFunctionPropertyAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationLambdaSpanningMultipleLines.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationLambdaSpanningMultipleLines.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationLambdaSpanningMultipleLines.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationModule.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationVarInDownLevelGenerator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationWithComments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithCaseSensitiveFileNamesAndOutDir.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithMultipleFilesWithFileEndingWithInterface.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapWithNonCaseSensitiveFileNamesAndOutDir.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/sourcemapValidationDuplicateNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specedNoStackBlown.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specializationError.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specializationOfExportedClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specializationsShouldNotAffectEachOther.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specializedOverloadWithRestParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/specializedSignatureAsCallbackParameter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spellingSuggestionGlobal2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spellingSuggestionGlobal3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spliceTuples.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadBooleanRespectsFreshness.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadBooleanRespectsFreshness.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadBooleanRespectsFreshness.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadExpressionContextualTypeWithNamespace.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadIntersection.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadInvalidArgumentType.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadOfObjectLiteralAssignableToIndexSignature.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadParameterTupleType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadTupleAccessedByTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadTupleAccessedByTypeParameter.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadTypeRemovesReadonly.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spreadsAndContextualTupleTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spyComparisonChecking.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/spyComparisonChecking.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticAndMemberFunctions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticAnonymousTypeNotReferencingTypeParameter.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticGetter1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticGetter2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticGetterAndSetter.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticIndexSignatureAndNormalIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticInstanceResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticInstanceResolution2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticInstanceResolution4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticInterfaceAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticMemberExportAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticMemberOfClassAndPublicMemberOfAnotherClassAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticMethodWithTypeParameterExtendsClauseDeclFile.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticMethodsReferencingClassTypeParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticOffOfInstance1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticOffOfInstance2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/staticPrototypePropertyOnClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictFunctionTypes1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictFunctionTypesErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictModeEnumMemberNameReserved.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictModeReservedWordInDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictModeUseContextualKeyword.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictNullEmptyDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictNullEmptyDestructuring.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictNullLogicalAndOr.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictNullLogicalAndOr.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictOptionalProperties1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/strictSubtypeAndNarrowing.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/stringIndexerAndConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subclassThisTypeAssignable01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subclassUint8Array.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subclassWithPolymorphicThisIsAssignable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/substitutionTypeNoMergeOfAssignableType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subtypeReductionUnionConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subtypeReductionUnionConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/subtypeRelationForNever.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/super.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/super1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/super2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superAccessInFatArrow1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallAssignResult.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatDerivesFromGenericType1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatDerivesFromGenericType2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatDerivesFromGenericTypeButWithIncorrectNumberOfTypeArguments1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatDerivesFromGenericTypeButWithNoTypeArguments1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatDerivesNonGenericTypeButWithTypeArguments1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromClassThatHasNoBaseType1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallFromFunction1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallInStaticMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallInsideClassDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallInsideClassExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallInsideObjectLiteralExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superCallWithMissingBaseClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superHasMethodsFromMergedInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superInCatchBlock1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superInConstructorParam1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superInObjectLiterals_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superNewCall1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superNoModifiersCrash.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superPropertyAccess1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superPropertyAccess2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superPropertyAccessInComputedPropertiesOfNestedType_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superPropertyAccessInSuperCall01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superPropertyElementNoUnusedLexicalThisCapture.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superWithGenerics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/superWithTypeArgument.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/super_inside-object-literal-getters-and-setters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/switchAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/switchCaseNarrowsMatchingClausesEvenWhenNonMatchingClausesExist.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/switchCasesExpressionTypeMismatch.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/switchComparableCompatForBrands.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/symbolObserverMismatchingPolyfillsWorkTogether.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedPrimitiveNarrowing.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateStringsHexadecimalEscapes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateStringsWithCurriedFunction.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateStringsWithMultilineTemplate.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateStringsWithUnicodeEscapes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateStringsWithWhitespaceEscapes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplateWithoutDeclaredHelper.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplatesInDifferentScopes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/taggedTemplatesInModuleAndGlobal.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tailRecursiveConditionalTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/targetTypeBaseCalls.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateExpressionNoInlininingOfConstantBindingWithInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateLiteralIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateLiteralsSourceMap.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateLiteralsSourceMap.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateLiteralsSourceMap.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateStringsArrayTypeDefinedInES5Mode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/templateStringsArrayTypeNotDefinedES5Mode.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ternaryExpressionSourceMap.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ternaryExpressionSourceMap.js.map.diff create mode 100644 testdata/baselines/reference/submodule/compiler/ternaryExpressionSourceMap.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisExpressionInCallExpressionWithTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisExpressionInIndexExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInGenericStaticMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInObjectJs.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInPropertyBoundDeclarations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInStatics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisInTupleTypeParameterConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisReferencedInFunctionInsideArrowFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisTypeAsConstraint.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/thisWhenTypeCheckFails.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tooFewArgumentsInGenericFunctionTypedArgument.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tooManyTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tooManyTypeParameters1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/topLevelLambda.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/topLevelLambda2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/topLevelLambda3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/trackedSymbolsNoCrash.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/trailingCommaInHeterogenousArrayLiteral1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/trailingCommasES5.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/transformArrowInBlockScopedLoopVarInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/transformParenthesizesConditionalSubexpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/transitiveTypeArgumentInference1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tripleSlashReferenceAbsoluteWindowsPath.js.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=commonjs).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tripleSlashTypesReferenceWithMissingExports(module=commonjs).js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/trivialSubtypeReductionNoStructuralCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/trivialSubtypeReductionNoStructuralCheck2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/truthinessCallExpressionCoercion1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tsxAttributeQuickinfoTypesSameAsObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tsxAttributesHasInferrableIndex.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tsxDiscriminantPropertyInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tsxInferenceShouldNotYieldAnyOnUnions.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tsxResolveExternalModuleExportsTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/tupleTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/twiceNestedKeyofIndexInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeAliasDeclarationEmit3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeAliasDeclareKeywordNewlines.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeAliasDoesntMakeModuleInstantiated.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeAliasFunctionTypeSharedSymbol.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgInference2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgInferenceWithNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgumentConstraintResolution1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgumentDefaultUsesConstraintOnCircularDefault.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeAssertionToGenericFunctionType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeCheckExportsVariable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeCheckObjectLiteralMethodBody.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeCheckReturnExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeCheckTypeArgument.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardConstructorClassAndNumber.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardConstructorNarrowPrimitivesInUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardConstructorNarrowPrimitivesInUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardConstructorNarrowPrimitivesInUnion.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardConstructorPrimitiveTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardNarrowByMutableUntypedField.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardNarrowByUntypedField.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardNarrowsIndexedAccessOfKnownProperty1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeGuardOnContainerTypeNoHang.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceConflictingCandidates.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceFBoundedTypeParams.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceFixEarly.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceLiteralUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceReturnTypeCallback.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceTypePredicate.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceTypePredicate2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeInferenceWithTypeAnnotation.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeLiteralCallback.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeOfOperator1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeOfSuperCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeOfThisInStatics.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterAsBaseClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterAssignmentCompat1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterConstraints1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterDiamond3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterDiamond4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterExplicitlyExtendsAny.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterExtendsPrimitive.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithContextSensitiveArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithContextSensitiveArguments2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithContextSensitiveArguments3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithContextSensitiveArguments4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterFixingWithContextSensitiveArguments5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterInConstraint1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterLeak.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterListWithTrailingComma1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParameterWithInvalidConstraintType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersAndParametersInComputedNames.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersInStaticAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersInStaticMethods.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeParametersShouldNotBeEqual2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typePredicateFreshLiteralWidening.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typePredicateFreshLiteralWidening.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typePredicateInherit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typePredicateWithThisParameter.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeReferenceDirectives4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeReferenceDirectives6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeUsedAsValueError.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeValueConflict1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeValueConflict2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeVariableTypeGuards.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typedArrays-es5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typedArrays-es5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typedArrays-es6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typedArraysSubarray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typedGenericPrototypeMember.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeofObjectInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeofStrictNull.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeofStripsFreshness.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/typeofUnknownSymbol.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/umdGlobalConflict.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/uncalledFunctionChecksInConditional2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/undeclaredBase.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/undeclaredMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/undefinedTypeArgument1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/undefinedTypeAssignment1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/underscoreMapFirst.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/underscoreTest1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/underscoreTest1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/underscoreThisInDerivedClass01.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/underscoreThisInDerivedClass02.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unexpectedStatementBlockTerminator.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unexportedInstanceClassVariables.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames02(target=es5).types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionExcessPropertyCheckNoApparentPropTypeMismatchErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionOfArraysFilterCall.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionOfArraysFilterCall.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionOfClassCalls.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionPropertyExistence.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionPropertyExistence.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionPropertyOfProtectedAndIntersectionProperty.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionPropertyOfProtectedAndIntersectionProperty.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionTypeWithIndexedLiteralType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionTypeWithRecursiveSubtypeReduction1.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionTypeWithRecursiveSubtypeReduction2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionTypeWithRecursiveSubtypeReduction2.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionWithIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unionWithIndexSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/uniqueSymbolAllowsIndexInObjectWithIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unknownPropertiesAreAssignableToObjectUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unknownSymbolInGenericReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unknownSymbolInGenericReturnType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unknownTypeArgOnCall.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unreachableFlowAfterFinally.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unreachableSwitchTypeofAny.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unreachableSwitchTypeofAny.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unreachableSwitchTypeofUnknown.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unreachableSwitchTypeofUnknown.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/untypedArgumentInLambdaExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/untypedFunctionCallsWithTypeParameters1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/untypedFunctionCallsWithTypeParameters1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedClassesinModule1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedClassesinNamespace1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedClassesinNamespace2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedClassesinNamespace3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedClassesinNamespace4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedDestructuringParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports10.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports12.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports7.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedImports9.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedInterfaceinNamespace4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedInterfaceinNamespace5.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndObjectSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndObjectSpread2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndParametersOverloadSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndParametersTypeAliases.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsAndParametersTypeAliases.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsInMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsInMethod2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsInMethod3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsInMethod4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsStartingWithUnderscore.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsinConstructor1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedLocalsinConstructor2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedMultipleParameter1InContructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedMultipleParameter2InContructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedMultipleParameters1InMethodDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedMultipleParameters2InMethodDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersInLambda1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersInLambda2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersWithUnderscore.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersWithUnderscore.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersinConstructor1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersinConstructor2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedParametersinConstructor3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedPrivateMethodInClass1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedPrivateMethodInClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedPrivateMethodInClass3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedPrivateMethodInClass4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedSemicolonInClass.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedSetterInClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedSingleParameterInContructor.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedSingleParameterInMethodDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedSwitchStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInLambda1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInLambda2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInMethod2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInMethod3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameterInMethod4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameters6.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParameters8.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParametersCheckedByNoUnusedParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParametersNotCheckedByNoUnusedLocals.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedTypeParametersWithUnderscore.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesWithUnderscoreInBindingElement.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesWithUnderscoreInForOfLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinBlocks1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinBlocks2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinForLoop2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinForLoop3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinForLoop4.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinNamespaces1.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinNamespaces2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/unusedVariablesinNamespaces3.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/useBeforeDeclaration_destructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/useUnknownInCatchVariables01.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/varArgParamTypeCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/varArgWithNoParamName.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/vararg.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/varianceRepeatedlyPropegatesWithUnreliableFlag.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/visSyntax.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/visibilityOfTypeParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/voidArrayLit.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/voidIsInitialized.types.diff create mode 100644 testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference2.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/weakType.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/webworkerIterable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/compiler/widenedTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/withStatementErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/compiler/yieldInForInInDownlevelGenerator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ArrowFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ArrowFunction4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES3For-ofTypeCheck1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES3For-ofTypeCheck2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES3For-ofTypeCheck4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES3For-ofTypeCheck6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of1.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of1.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of13.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of13.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of17.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of18.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of19.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of20.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of21.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of22.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of23.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of24.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of25.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of25.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of25.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of26.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of26.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of26.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of27.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of28.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of29.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of3.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of3.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of30.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of31.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of33.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of33.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of33.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of34.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of35.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of35.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of35.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of36.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of36.js.map.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of36.sourcemap.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of37.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-of9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck10.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck10.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck10.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5For-ofTypeCheck9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty6.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty7.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty7.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5SymbolProperty7.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ES5for-of32.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ExportVariableOfGenericTypeWithInaccessibleTypeAsTypeArgument.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/FunctionAndModuleWithSameNameAndCommonRoot.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/FunctionAndModuleWithSameNameAndDifferentCommonRoot.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/FunctionDeclaration8_es6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ModuleAndFunctionWithSameNameAndCommonRoot.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ModuleWithExportedAndNonExportedEnums.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/NonInitializedExportInInternalModule.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/Protected7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/TemplateExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/TypeGuardWithArrayUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/accessorWithES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/accessorWithMismatchedAccessibilityModifiers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/accessorsAreNotContextuallyTyped.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/additionOperatorWithConstrainedTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/additionOperatorWithNullValueAndInvalidOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/additionOperatorWithTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/additionOperatorWithUndefinedValueAndInvalidOperands.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/allowImportingTsExtensions(moduleresolution=bundler).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/allowUnescapedParagraphAndLineSeparatorsInStringLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/anyAssignabilityInInheritance.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/anyAssignableToEveryType2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/apparentTypeSubtyping.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/apparentTypeSupertype.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/argumentExpressionContextualTyping.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arityAndOrderCompatibility01.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arityAndOrderCompatibility01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arityAndOrderCompatibility01.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayAssignmentPatternWithAny.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteral.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralExpressionContextualTyping.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralInference.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralSpreadES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralWidened.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralWithMultipleBestCommonTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals2ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals2ES5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals2ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals2ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiterals3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayLiteralsWithRecursiveGenerics.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayTypeOfFunctionTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayTypeOfFunctionTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrayTypeOfTypeOf.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrowFunctionExpressions.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrowFunctionWithParameterNameAsync_es2017.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrowFunctionWithParameterNameAsync_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/arrowFunctionWithParameterNameAsync_es6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asOperator1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asOperator3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asOperatorASI.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asOperatorContextualType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace04.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/asiPreventsParsingAsNamespace04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignFromStringInterface.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignFromStringInterface2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignFromStringInterface2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithDiscriminatedUnion.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithDiscriminatedUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithDiscriminatedUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithEnumIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentGenericLookupTypeNarrowing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentLHSIsValue.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentToParenthesizedIdentifiers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentTypeNarrowing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/assignmentTypeNarrowing.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncArrowFunction2_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncArrowFunction3_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncArrowFunction4_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncArrowFunction9_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncFunctionDeclaration3_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncFunctionDeclaration8_es5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/asyncWithVarShadowing_es6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/augmentedTypeAssignmentCompatIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/augmentedTypeAssignmentCompatIndexSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/augmentedTypeBracketAccessIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/augmentedTypeBracketAccessIndexSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/awaitUnion_es5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/awaitUnion_es6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/binaryIntegerLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/binaryIntegerLiteralError.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bivariantInferences.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerCommonJS.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerCommonJS.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerCommonJS.trace.json create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerImportESM(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerImportESM(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerOptionsCompat.errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerRelative1(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/bundlerRelative1(module=preserve).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callGenericFunctionWithIncorrectNumberOfTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callGenericFunctionWithZeroTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callNonGenericFunctionWithTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callOverload.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callOverload.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignatureAssignabilityInInheritance2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignatureAssignabilityInInheritance3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignatureAssignabilityInInheritance5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignatureWithOptionalParameterAndInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignatureWithoutReturnTypeAnnotationInference.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignaturesWithAccessibilityModifiersOnParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignaturesWithDuplicateParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignaturesWithOptionalParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callSignaturesWithParameterInitializers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callWithSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callWithSpread.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callWithSpread2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callWithSpread3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/callWithSpread5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/canFollowGetSetKeyword.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/catchClauseWithTypeAnnotation.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsdocTypeTag2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsdocTypeTagOnObjectProperty2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty14.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty15.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty7.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty7.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxChildrenProperty8.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/checkJsxUnionSFXContextualTypeInferredCorrectly.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractAsIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractAssignabilityConstructorFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractConstructorAssignability.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractCrashedOnce.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractExtends.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractFactoryFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInAModule.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInheritance1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInheritance2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractInstantiations1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractManyKeywords.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractMergedDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractMethodInNonAbstractClass.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractMethodWithImplementation.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractMixedWithModifiers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractOverrideWithAbstract.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractSingleLineDecl.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractSuperCalls.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethod1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractUsingAbstractMethods2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorAccessibility5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classConstructorOverloadsAccessibility.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classDoesNotDependOnBaseTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classDoesNotDependOnBaseTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExpression2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExpression4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExpression5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingBuiltinType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingBuiltinType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingClassLikeType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingNonConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingOptionalChain.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingPrimitive.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendingPrimitive2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendsItself.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classExtendsValidConstructorFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classInsideBlock.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classStaticBlock7.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classStaticBlock7.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classStaticBlockUseBeforeDef3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithConstructors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithEmptyBody.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithPredefinedTypesAsNames.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithPredefinedTypesAsNames2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithSemicolonClassElement1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithSemicolonClassElement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithTwoConstructorDefinitions.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/classWithoutExplicitConstructor.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/commaOperatorWithSecondOperandObjectType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/commaOperatorWithSecondOperandStringType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/commonTypeIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/comparisonOperatorWithNumberOperand.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/compoundAssignmentLHSIsValue.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/compoundExponentiationAssignmentLHSIsValue.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames10_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames11_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames13_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames14_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames15_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames16_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames17_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames18_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames19_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames1_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames20_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames21_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames22_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames23_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames24_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames25_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames26_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames27_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames28_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames29_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames2_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames30_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames31_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames32_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames33_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames34_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames3_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames3_ES5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames46_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames47_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames48_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames49_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames4_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames50_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames51_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames5_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames6_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames7_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames8_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNames9_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType10_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType1_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType2_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType3_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType4_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType5_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType6_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType6_ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType6_ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType7_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType7_ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType7_ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType8_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesContextualType9_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesDeclarationEmit1_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesDeclarationEmit2_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesDeclarationEmit5_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesDeclarationEmit6_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesOnOverloads_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesSourceMap1_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/computedPropertyNamesSourceMap2_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=bundler).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=bundler).trace.json create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=node16).errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=node16).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=node16).trace.json create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=nodenext).errors.txt create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=nodenext).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalExportsResolutionFallbackNull(moduleresolution=nodenext).trace.json create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalOperatorConditionIsBooleanType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalOperatorConditionIsObjectType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalOperatorConditoinIsStringType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalOperatorWithIdenticalBCT.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalTypes1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/conditionalTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constAssertions.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constEnum2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constEnum2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constLocalsInFunctionExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constLocalsInFunctionExpressions.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constraintSatisfactionWithAny.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignatureAssignabilityInInheritance2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignatureAssignabilityInInheritance3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignatureAssignabilityInInheritance5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignaturesWithIdenticalOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignaturesWithOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignaturesWithOverloads2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructorImplementationWithDefaultValues.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructorImplementationWithDefaultValues.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/constructorImplementationWithDefaultValues2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualIntersectionType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualSignatureInstantiation.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualThisType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithTuple.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithUnionTypeCallSignatures.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithUnionTypeIndexSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithUnionTypeMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithUnionTypeMembers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextualTypeWithUnionTypeObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeCommaOperator01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeCommaOperator02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeCommaOperator03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeLogicalAnd01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeLogicalAnd02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypeLogicalAnd03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializer.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedBindingInitializerNegative.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedFunctionExpressionsAndReturnAnnotations.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedIife.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedIifeStrict.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedObjectLiteralMethodDeclaration01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/contextuallyTypedStringLiteralsInJsxAttributes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAliasingCatchVariables(useunknownincatchvariables=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAliasingCatchVariables(useunknownincatchvariables=false).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAliasingCatchVariables(useunknownincatchvariables=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAliasingCatchVariables(useunknownincatchvariables=true).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAssignmentExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowAssignmentPatternOrder.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBinaryAndExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBinaryOrExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBinaryOrExpression.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBinaryOrExpression.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBindingElement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBindingElement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBindingPatternOrder.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowBindingPatternOrder.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowCommaOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowCommaOperator.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowConditionalExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowDeleteOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowDestructuringDeclaration.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowDoWhileStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowDoWhileStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowDoWhileStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowElementAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowElementAccess2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForInStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForInStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForInStatement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForOfStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForOfStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowForStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowGenericTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowIfStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowIfStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowIfStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInstanceOfGuardPrimitives.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInstanceOfGuardPrimitives.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInstanceofExtendsFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInstanceofExtendsFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowInstanceofExtendsFunction.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowIteration.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowIterationErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowOptionalChain.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowSuperPropertyAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowTruthiness.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowTypeofObject.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowWhileStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowWhileStatement.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowWhileStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/controlFlowWithTemplateLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitIdentifierPredicates01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitIdentifierPredicatesWithPrivateName01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitThisPredicates01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitThisPredicates02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitThisPredicatesWithPrivateName01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationEmitThisPredicatesWithPrivateName02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationFiles.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationWithNoInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/declarationsAndAssignments.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClass8.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructor1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassConstructorParameter4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassMethod10.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassMethodOverload1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/decoratorOnClassProperty7.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/defaultExportWithOverloads01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/definiteAssignmentAssertions.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/dependentDestructuredVariablesFromNestedPatterns.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassFunctionOverridesBaseClassAccessor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassIncludesInheritedMembers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassOverridesIndexersWithAssignmentCompatibility.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassSuperStatementPosition.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassTransitivity.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassTransitivity2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassTransitivity3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassTransitivity4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassWithoutExplicitConstructor.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassWithoutExplicitConstructor2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedClassWithoutExplicitConstructor3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/derivedUninitializedPropertyDeclaration.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment1ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment1ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment1ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment1ES5iterable.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment1ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringArrayBindingPatternAndAssignment5SiblingInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringCatch.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringEvaluationOrder(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringInFunctionType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectAssignmentPatternWithNestedSpread(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment1ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment6(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment7(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment8(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringObjectBindingPatternAndAssignment9SiblingInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration1ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration3ES5iterable.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration7ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration7ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterDeclaration8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringParameterProperties5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringReassignsRightHandSide.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringSameNames.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringSpread.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringSpread.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringTypeAssertionsES5_7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration1ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration1ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration1ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration1ES5iterable.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration1ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVariableDeclaration2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVoid.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringVoidStrictNullChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/destructuringWithLiteralInitializers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/discriminatedUnionTypes1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/discriminatedUnionTypes1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/discriminatedUnionTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/duplicateNumericIndexers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/duplicatePropertyNames.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/duplicateStringIndexers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/dynamicImportDefer(module=nodenext).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/dynamicImportDeferInvalidStandalone.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionAsIs.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionThisCapturing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments05.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments06.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments07.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments08.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments09.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments14.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments15.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments16.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments17.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments17.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments18.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments18.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionWhenUsingArguments19.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitArrowFunctionsAsIs.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitClassDeclarationWithPropertyAccessInHeritageClause1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitDefaultParametersFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitDefaultParametersFunctionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitDefaultParametersFunctionProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitDefaultParametersMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTempalteString4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTempalteString4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTempalteString4ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString1ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString2ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitExponentiationOperatorInTemplateString3ES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitRestParametersFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitRestParametersFunctionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitRestParametersFunctionProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emitRestParametersMethod.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyArrayBindingPatternParameter01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyArrayBindingPatternParameter02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyArrayBindingPatternParameter03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyArrayBindingPatternParameter04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns01_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns01_ES5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns01_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns02_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns02_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns03_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns03_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns04_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyAssignmentPatterns04_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyObjectBindingPatternParameter01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyObjectBindingPatternParameter02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyObjectBindingPatternParameter03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyObjectBindingPatternParameter04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyTuplesTypeAssertion01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyTuplesTypeAssertion02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns01_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns02_ES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/emptyVariableDeclarationBindingPatterns02_ES5iterable.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumAssignability.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumAssignabilityInInheritance.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumClassification.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumIsNotASubtypeOfAnythingButNumber.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumLiteralTypes1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enumLiteralTypes2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/enums.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/equalityWithtNullishCoalescingAssignment(strict=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/es2022IntlAPIs.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/es6modulekindExportClassNameWithObject.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/es6modulekindWithES5Target8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-accessors-nonStaticAbstract(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-fields-nonStaticAmbient(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-methods-nonStaticAbstract(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esDecorators-classDeclaration-parameterDecorators(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/esnextmodulekindWithES5Target8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/everyTypeAssignableToAny.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInitializer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/everyTypeWithAnnotationAndInvalidInitializer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/everyTypeWithInitializer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exhaustiveSwitchStatements1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exhaustiveSwitchStatements1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exnextmodulekindExportClassNameWithObject.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorInTemplateStringWithSyntaxError3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorSyntaxError2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exponentiationOperatorWithTemplateStringInvalid.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace1(module=es2015).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace1(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace2(module=es2015).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace2(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace3(module=es2015).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace3(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace4(module=es2015).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAsNamespace4(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAssignNonIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAssignNonIdentifier.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAssignNonIdentifier.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportAssignTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportBinding.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportClassNameWithObjectCommonJS.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportDeclaration(isolatedmodules=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportDeclaration(isolatedmodules=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportDeclaration_moduleSpecifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportDeclaration_value.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportDefaultClassNameWithObject.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNamespace1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNamespace10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNamespace2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNamespace4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNamespace6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesCommonJS.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportNonInitializedVariablesInIfThenStatementNoCrash1(module=esnext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportSpecifiers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/exportsAndImportsWithContextualKeywordNames01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/extendStringInterface.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/extendsClause.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/fluentClasses.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsArray.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsArray.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsArrayErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsArrayErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsDestructuring.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsDestructuring.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsDestructuring2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsDestructuring4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsInvalid.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-inStatementsInvalid.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-of39.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/for-of44.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/forStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/forStatementsMultipleInvalidDecl.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/forStatementsMultipleValidDecl.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/forStatementsMultipleValidDecl.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/forgottenNew.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionCalls.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionConstraintSatisfaction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionConstraintSatisfaction2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionExpressionContextualTyping1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionExpressionContextualTyping2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionExpressionContextualTyping3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionImplementationErrors.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionImplementations.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionLiteralForOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionLiteralForOverloads2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionOverloadErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionOverloadErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionWithMultipleReturnStatements.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionWithMultipleReturnStatements2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/functionWithMultipleReturnStatements2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatedContextualTyping.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatorTypeCheck23.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatorTypeCheck24.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatorTypeCheck52.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatorTypeCheck53.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/generatorTypeCheck54.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithConstraintsTypeArgumentInference2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithFunctionTypedArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithFunctionTypedArguments5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithGenericSignatureArguments3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithObjectTypeArgsAndIndexers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithObjectTypeArgsAndIndexersErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithObjectTypeArgsAndInitializers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithObjectTypeArgsAndNumericIndexer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithObjectTypeArgsAndStringIndexer.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithOverloadedFunctionTypedArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericCallWithOverloadedFunctionTypedArguments2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericClassWithFunctionTypedMemberArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericFunctionParameters.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericRestParameters1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericRestParameters2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericRestParameters3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/genericTypeAliases.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/getSetAccessorContextualTyping.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/globalThisAmbientModules.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/globalThisBlockscopedProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/globalThisBlockscopedProperties.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/globalThisBlockscopedProperties.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/globalThisReadonlyProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/heterogeneousArrayLiterals.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithPrivates.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/implementsClause.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/importCallExpressionInExportEqualsCJS.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importCallExpressionSpecifierNotStringTypeError.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importCallExpressionSpecifierNotStringTypeError.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importClause_namedImports.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importDefaultNamedType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importDefaultNamedType2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importDefaultNamedType3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=es5).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=commonjs,target=esnext).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=es5).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=es2020,target=esnext).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=es5).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importMeta(module=esnext,target=esnext).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/importTypeAmbientMissing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/inOperatorWithInvalidOperands.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/indexSignatureTypeInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/inferTypes1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/inferTypesWithExtends1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/inferringClassMembersFromAssignments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/innerTypeParameterShadowingOuterOne.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/innerTypeParameterShadowingOuterOne2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/innerTypeParameterShadowingOuterOne2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instanceMemberAssignsToClassPrototype.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instanceofOperatorWithInvalidOperands.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instanceofOperatorWithLHSIsObject.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instanceofOperatorWithLHSIsObject.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instanceofOperatorWithRHSIsSubtypeOfFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/instantiationExpressions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/interfaceDoesNotDependOnBaseTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/interfaceDoesNotDependOnBaseTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/interfaceExtendingOptionalChain.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/interfaceWithPropertyThatIsPrivateInBaseType2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intersectionAsWeakTypeSource.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intersectionReduction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intersectionThisTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intersectionTypeReadonly.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intersectionWithUnionConstraint.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intlDateTimeFormatRangeES2021.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intlNumberFormatES2020.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intlNumberFormatES2023.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/intraExpressionInferences.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidBinaryIntegerLiteralAndOctalIntegerLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidDoWhileBreakStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidDoWhileContinueStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidForBreakStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidForContinueStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidForInBreakStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidForInContinueStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidModuleWithVarStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidMultipleVariableDeclarations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidReturnStatements.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidReturnStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidTypeOfTarget.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidWhileBreakStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/invalidWhileContinueStatements.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/isomorphicMappedTypeInference.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsDeclarationsClassImplementsGenericsSerialization.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsdocLinkTag6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsdocParseDotDotDotInJSDocFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsdocParseErrorsInTypescript.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsxAndTypeAssertion.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsxParsingError2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsxParsingError3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsxParsingError4(strict=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/jsxParsingErrorImmediateSpreadInAttributeValue.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/keyofAndForIn.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/keyofAndIndexedAccess.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/keyofInferenceIntersectsResults.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/keyofInferenceLowerPriorityThanReturn.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/keyofIntersection.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/labeledStatementDeclarationListInLoopNoCrash4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/labeledStatementExportDeclarationNoCrash1(module=esnext).js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/legacyNodeModulesExportsSpecifierGenerationConditions.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literalTypeWidening.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literalTypes1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literalTypesAndDestructuring.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literalTypesAndTypeAssertions.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literalTypesAndTypeAssertions.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/literals.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/localTypes4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/localTypes5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/localTypes5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/logicalAndOperatorStrictMode.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/logicalOrExpressionIsNotContextuallyTyped.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/logicalOrOperatorWithEveryType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/malformedTags.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeAsClauseRelationships.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeAsClauseRelationships.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeAsClauses.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeErrors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeOverlappingStringEnumKeys.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeRelationships.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypeWithAny.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypes4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mappedTypesArraysTuples.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/memberFunctionOverloadMixingStaticAndInstance.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/memberFunctionsWithPrivateOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/memberFunctionsWithPublicOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/memberFunctionsWithPublicPrivateOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mergeThreeInterfaces2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mergeTwoInterfaces2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mergedClassInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mergedInterfacesWithMultipleBases3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mergedWithLocalValue.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/missingAndExcessProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mixinClassesAnonymous.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/mixinClassesMembers.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/multiline.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleDefaultExports03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleDefaultExports05.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleExportDefault3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleExportDefault4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleExportDefault5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleNumericIndexers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/multipleStringIndexers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/namespaceAssignmentToRequireAlias.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/namespaceImportTypeQuery.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/namespaceImportTypeQuery2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/namespaceImportTypeQuery3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/namespaceImportTypeQuery4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/narrowFromAnyWithInstanceof.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/narrowFromAnyWithTypePredicate.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nestedModules.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nestedNamespace.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/nestedPackageJsonRedirect(moduleresolution=bundler).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverReturningFunctions1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverTypeErrors1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverTypeErrors1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverTypeErrors2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/neverTypeErrors2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/newOperatorConformance.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/newOperatorErrorCases.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/newWithSpread.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/newWithSpreadES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/node10IsNode_node.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/node10IsNode_node10.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node18).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=node20).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesDeclarationEmitDynamicImportWithPackageExports(module=nodenext).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesNoDirectoryModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesResolveJsonModule(module=node16).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesResolveJsonModule(module=node16).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesResolveJsonModule(module=node18).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesResolveJsonModule(module=node20).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesResolveJsonModule(module=nodenext).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesSynchronousCallErrors(module=node16).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesSynchronousCallErrors(module=node18).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesSynchronousCallErrors(module=node20).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nodeModulesSynchronousCallErrors(module=nodenext).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonGenericTypeReferenceWithTypeArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonIterableRestElement1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonIterableRestElement3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveAccessProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveAssignError.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveInGeneric.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveNarrow.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveRhsSideOfInExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveStrictNull.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveStrictNull.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nonPrimitiveUnionIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullAssignableToEveryType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullIsSubtypeOfEverythingButUndefined.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullishCoalescingOperator2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullishCoalescingOperator3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullishCoalescingOperator_es2020.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullishCoalescingOperator_not_strict.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/nullishCoalescingOperator_not_strict.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers05.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectBindingPatternKeywordIdentifiers06.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralGettersAndSetters.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralGettersAndSetters.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralNormalization.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandProperties.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesAssignmentError.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesErrorFromNoneExistingIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesErrorWithModule.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesFunctionArgument.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectLiteralShorthandPropertiesFunctionArgument2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectRestCatchES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectRestForOf.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectRestParameterES5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectRestPropertyMustBeLast.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectRestReadonly.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadComputedProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadIndexSignature.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadIndexSignature.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadNegativeParse.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadRepeatedComplexity.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadSetonlyAccessor.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectSpreadStrictNull.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypeHidingMembersOfObject.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypeHidingMembersOfObjectAssignmentCompat.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypeHidingMembersOfObjectAssignmentCompat2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentity2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithCallSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithCallSignatures2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithCallSignatures2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithCallSignaturesDifferingParamCounts.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithCallSignaturesWithOverloads.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithConstructSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithConstructSignatures2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithConstructSignatures2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignatures2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesOptionalParams.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithNumericIndexers1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithNumericIndexers3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesIdentityWithStringIndexers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesWithPredefinedTypesAsName.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/objectTypesWithPredefinedTypesAsName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/octalIntegerLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/octalIntegerLiteralError.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/operatorsAndIntersectionTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalBindingParameters1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalBindingParameters2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalBindingParametersInOverloads1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalBindingParametersInOverloads2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalChainingInArrow.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalChainingInLoop.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalChainingInference.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalProperties01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/optionalTupleElements1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/overloadResolution.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/overloadResolutionClassConstructors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/overloadResolutionConstructors.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/override1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/override10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/override15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/override2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/override3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/overrideWithoutNoImplicitOverride1.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/packageJsonImportsExportsOptionCompat(moduleresolution=bundler).errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parameterInitializersForwardReferencing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parametersWithNoAnnotationAreAny.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parenthesizedContexualTyping1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parenthesizedContexualTyping1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parenthesizedContexualTyping2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parenthesizedTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser15.4.4.14-9-2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser509667.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser509669.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser512084.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser536727.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser553699.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser585151.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser618973.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser630933.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser642331.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser642331_1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessibilityAfterStatic10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessibilityAfterStatic11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessibilityAfterStatic14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessibilityAfterStatic7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessors1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserAccessors2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArgumentList1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArgumentList1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression11.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression12.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression13.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression14.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression15.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrayLiteralExpression8.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrowFunctionExpression1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrowFunctionExpression2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrowFunctionExpression3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrowFunctionExpression4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserArrowFunctionExpression5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserCastVersusArrowFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClass1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration19.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration20.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration21.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration22.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration23.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration24.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration25.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclaration9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserClassDeclarationIndexSignature1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorAmbiguity1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorAmbiguity2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorAmbiguity3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorAmbiguity4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserConstructorDeclaration8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES3Accessors1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES3Accessors2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ComputedPropertyName4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement18.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement21.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5ForOfStatement9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolIndexer2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty5.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty7.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty7.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty7.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty8.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserES5SymbolProperty9.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecoveryIfStatement6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_Block3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ClassElement1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ClassElement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ClassElement3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ExtendsOrImplementsClause1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ExtendsOrImplementsClause2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ExtendsOrImplementsClause3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ExtendsOrImplementsClause4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ExtendsOrImplementsClause5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_IncompleteMemberVariable1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_IncompleteMemberVariable2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ParameterList5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_ParameterList6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_SourceUnit1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserErrorRecovery_SwitchStatement2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserExportAssignment7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserExportAssignment8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserForInStatement8.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserForInStatement8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserForStatement9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserFunctionPropertyAssignment1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserFunctionPropertyAssignment2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserFunctionPropertyAssignment3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserFunctionPropertyAssignment4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericClass1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericConstraint7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericsInTypeContexts1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserGenericsInTypeContexts2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexMemberDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexMemberDeclaration6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexMemberDeclaration7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexMemberDeclaration8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexMemberDeclaration9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserIndexSignature8.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserInvalidIdentifiersInVariableStatements1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessor1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration13.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration14.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration15.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration17.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration18.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberAccessorDeclaration9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberFunctionDeclaration1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberFunctionDeclaration3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberFunctionDeclaration4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberFunctionDeclaration5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberFunctionDeclarationAmbiguities1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMemberVariableDeclaration5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMissingLambdaOpenBrace1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMissingLambdaOpenBrace1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMissingLambdaOpenBrace1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserMissingLambdaOpenBrace1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserNotRegex2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserObjectCreation1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList10.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList11.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList16.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList17.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParameterList9.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParenthesizedVariableAndFunctionInTernary.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserParenthesizedVariableAndParenthesizedFunctionInTernary.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource11.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource11.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource6.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource7.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource8.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRealSource9.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRegularExpressionDivideAmbiguity5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserRegularExpressionDivideAmbiguity6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserShorthandPropertyAssignment1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserShorthandPropertyAssignment5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserSuperExpression2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserSuperExpression3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserUnicode3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric1.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserUnterminatedGeneric2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserX_ArrowFunction1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parserX_ArrowFunction4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/parser_continueNotInIterationStatement4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/partiallyAnnotatedFunctionWitoutTypeParameter.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/partiallyNamedTuples.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/plainJSRedeclare.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/plainJSRedeclare2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/plainJSRedeclare3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/preserveValueImports(isolatedmodules=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/preserveValueImports(isolatedmodules=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/preserveValueImports_errors(isolatedmodules=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/preserveValueImports_errors(isolatedmodules=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNameMethodAsync.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNameStaticMethodAsync.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNamesAssertion(target=es2022).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNamesAssertion(target=esnext).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNamesIncompatibleModifiers.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/privateNamesIncompatibleModifiers.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints4.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithConstraints5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessOnTypeParameterWithoutConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessStringIndexSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAccessStringIndexSignatureNoImplicitAny.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/propertyAssignmentUseParentType1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/publicIndexer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/quotedConstructors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/readonlyArraysAndTuples.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/readonlyArraysAndTuples2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/recursiveInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/recursiveTypeReferences1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/recursiveTypesWithTypeof.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/resolutionModeTripleSlash5.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementMustBeLast.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithAssignmentPattern3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithAssignmentPattern4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithAssignmentPattern5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithBindingPattern2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithInitializer1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithInitializer2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restElementWithNullInitializer.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParameterInDownlevelGenerator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParameterWithoutAnnotationIsAnyArray.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParametersOfNonArrayTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParametersOfNonArrayTypes.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParametersOfNonArrayTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParametersWithArrayTypeAnnotations.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restParametersWithArrayTypeAnnotations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/restPropertyWithBindingPattern.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/returnStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/scannertest1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/scopeResolutionIdentifiers.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/seeTag1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/seeTag2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/specializedSignatureIsSubtypeOfNonSpecializedSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadContextualTypedBindingPattern.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadExcessProperty.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadNonPrimitive.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadNonPrimitive.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadUnion.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadUnion2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadUnion2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadUnion3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/spreadUnion4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticFactory1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticIndexSignature1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticIndexSignature2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticIndexers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticMemberAssignsToConstructorFunctionMembers.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/staticMembersUsingClassTypeParameter.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/strictNullChecksNoWidening.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringEnumInElementAccess01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringEnumLiteralTypes1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringEnumLiteralTypes2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypeIsSubtypeOfString.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndLogicalOrExpressions01.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndLogicalOrExpressions01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndLogicalOrExpressions01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndParenthesizedExpressions01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndParenthesizedExpressions01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAndTuples01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAsTags01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAsTags02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAsTags03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAsTypeParameterConstraint01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesAsTypeParameterConstraint02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInImplementationSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes03.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInUnionTypes04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesInVariableDeclarations01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloadAssignability01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloadAssignability02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloadAssignability03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloadAssignability04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloadAssignability05.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloads01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloads02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloads03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesOverloads04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesTypePredicates01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesWithTemplateStrings01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesWithTemplateStrings02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesWithVariousOperators01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralTypesWithVariousOperators02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks02.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks03.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks03.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks04.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithEqualityChecks04.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements02.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements03.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements04.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithSwitchStatements04.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithTypeAssertions01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/stringLiteralsWithTypeAssertions01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfAny.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameter.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithConstraints4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfTypeParameterWithRecursiveConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypesOfUnion.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithCallSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithCallSignatures2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithCallSignatures3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithCallSignaturesA.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithConstructSignatures2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithConstructSignatures3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/subtypingWithConstructSignatures5.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superCallFromClassThatHasNoBaseTypeButWithSameSymbolInterface.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superCallFromClassThatHasNoBaseTypeButWithSameSymbolInterface.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superCallParameterContextualTyping1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superCallParameterContextualTyping2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superCallParameterContextualTyping3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superPropertyAccessNoError.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superPropertyInConstructorBeforeSuperCall.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superSymbolIndexedAccess5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/superSymbolIndexedAccess6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/switchStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/switchStatements.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolProperty55.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolProperty58.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolProperty61.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolType17.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolType18.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolType19.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/symbolType3.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateChain.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInference.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInference.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInference.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInferenceES6.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsTypeArgumentInferenceES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithIncompatibleTypedTags.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithManyCallAndMemberExpressions.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithOverloadResolution1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithOverloadResolution2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithOverloadResolution3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithOverloadResolution3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithTagNamedDeclare.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithTagsTypedAsAny.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateStringsWithTypedTags.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateUntypedTagCall01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateUntypedTagCall01.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateWithConstructableTag01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/taggedTemplateWithConstructableTag02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateLiteralTypes2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateLiteralTypes2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateLiteralTypesPatterns.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateLiteralTypesPatterns.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateLiteralTypesPatternsPrefixSuffixAssignability.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringBinaryOperations.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringBinaryOperationsInvalid.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringControlCharacterEscapes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringControlCharacterEscapes02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringControlCharacterEscapes03.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringControlCharacterEscapes04.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInArray.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInArrowFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInCallExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInConditional.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInDeleteExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInDivision.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInEqualityChecks.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInFunctionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInInOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInIndexExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInInstanceOf.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInInstanceOf.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInModuleName.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInModulo.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInMultiplication.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInNewExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInNewOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInParentheses.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInPropertyAssignment.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInPropertyName1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInPropertyName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInSwitchAndCase.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInTaggedTemplate.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInTypeAssertion.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInTypeOf.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInTypeOf.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInTypeOfES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInUnaryPlus.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringInWhile.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringMultiline1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringMultiline2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringPlainCharactersThatArePartsOfEscapes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringPlainCharactersThatArePartsOfEscapes02.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringTermination1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringTermination2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringTermination3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringTermination4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringTermination5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringUnterminated1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringUnterminated2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringUnterminated3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringUnterminated4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringUnterminated5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWhitespaceEscapes1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWhitespaceEscapes2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithBackslashEscapes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithCommentsInArrowFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedAddition.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedArray.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedArrowFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedComments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedConditional.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedConditional.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedConditionalES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedDivision.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedFunctionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedInOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedInstanceOf.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedInstanceOf.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedModulo.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedMultiplication.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedNewOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedNewOperator.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedTemplateString.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedTypeAssertionOnAddition.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedTypeOfOperator.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedTypeOfOperator.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedTypeOfOperatorES6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedUnaryPlus.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedYieldKeyword.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedYieldKeyword.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmbeddedYieldKeyword.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithEmptyLiteralPortions.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithOpenCommentInStringPortion.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringWithPropertyAccess.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/templateStringsWithTypeErrorInFunctionExpressionsInSubstitutionExpression.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeAndConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInAccessorsNegative.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInAccessorsNegative.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInClasses.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInFunctions2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInFunctions3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInFunctions4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInFunctions4.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInInterfaces.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInObjectLiterals.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInTuples.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInTuples.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInTypePredicate.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeInTypePredicate.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/thisTypeSyntacticContext.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/throwStatements.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/throwStatements.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/trailingCommasInFunctionParametersAndArguments.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/trailingCommasInGetter.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/ts-expect-error-nocheck.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxAttributeResolution12.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxAttributeResolution2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxAttributeResolution4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxCorrectlyParseLessThanComparison1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxDynamicTagName6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxElementResolution.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxEmit1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxGenericArrowFunctionParsing.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxInArrowFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxNamespacedAttributeName1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxNamespacedAttributeName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxNamespacedTagName1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxNamespacedTagName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadAttributesResolution12.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadAttributesResolution14.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadAttributesResolution17.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadAttributesResolution2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadChildren.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxSpreadChildrenInvalidType(jsx=react,target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tsxUnionTypeComponent1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tupleElementTypes1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tupleElementTypes2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tupleElementTypes3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tupleElementTypes4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/tupleLengthCheck.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/twoAccessorsWithSameName.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/twoAccessorsWithSameName2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/twoGenericInterfacesWithDifferentConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/twoInterfacesDifferentRootModule2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/twoMergedInterfacesWithDifferingOverloads.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInference.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInference.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInference.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInference.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceConstructSignatures.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceConstructSignatures.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceConstructSignatures.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceTransitiveConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithConstraints.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithConstraints.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithConstraints.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentInferenceWithObjectLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentsWithStringLiteralTypes01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeArgumentsWithStringLiteralTypes01.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeAssertions.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeFromPropertyAssignment30.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardEnums.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardEnums.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardFunctionErrors.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardFunctionOfFormThisErrors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardInClass.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardInClass.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardIntersectionTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardIntersectionTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardNarrowsPrimitiveIntersection.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardNarrowsToLiteralType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardNarrowsToLiteralTypeUnion.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardNesting.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardNesting.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormExpr1AndExpr2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormExpr1OrExpr2.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormNotExpr.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfBoolean.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfEqualEqualHasNoEffect.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfEqualEqualHasNoEffect.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfIsOrderIndependent.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfNotEqualHasNoEffect.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfNotEqualHasNoEffect.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfNumber.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfOther.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfOther.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfPrimitiveSubtype.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfPrimitiveSubtype.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardOfFormTypeOfString.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardRedundancy.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardTautologicalConsistiency.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardTautologicalConsistiency.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsDefeat.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInClassAccessors.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInClassAccessors.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInClassMethods.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInClassMethods.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInDoStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInDoStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInExternalModule.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInForStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInForStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInFunction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInFunction.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInFunctionAndModuleBlock.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInGlobal.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInModule.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInProperties.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInWhileStatement.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsInWhileStatement.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsNestedAssignments.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsObjectMethods.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsObjectMethods.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsTypeParameters.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsWithAny.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsWithInstanceOf.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsWithInstanceOf.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeGuardsWithInstanceOfByConstructorSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeInferenceWithTupleType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeOfThisInConstructorParamList.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeOfThisInMemberFunctions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterAsBaseType.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterAssignability2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterDirectlyConstrainedToItself.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterIndirectlyConstrainedToItself.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterUsedAsConstraint.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterUsedAsConstraint.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterUsedAsTypeParameterConstraint.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParameterUsedAsTypeParameterConstraint2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeParametersAreIdenticalToThemselves.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeQuery.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeQueryWithReservedWords.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_contextualTyping1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_contextualTyping3.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_ensureInterfaceImpl.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_errorLocations1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_optionalMemberConformance.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propNameConstraining.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propertyNameFulfillment.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propertyValueConformance1(nopropertyaccessfromindexsignature=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=false).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_propertyValueConformance2(nouncheckedindexedaccess=true).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_vacuousIntersectionOfContextualTypes.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeSatisfaction_vacuousIntersectionOfContextualTypes.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofClass2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofOperatorInvalidOperations.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofOperatorWithAnyOtherType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofOperatorWithBooleanType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofOperatorWithNumberType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofOperatorWithStringType.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typeofThisWithImplicitThis.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typesWithDuplicateTypeParameters.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typesWithPrivateConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typesWithProtectedConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typesWithPublicConstructor.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typingsSuggestionBun1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/typingsSuggestionBun2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd-augmentation-2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd-augmentation-4.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/umd8.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/undefinedAssignableToEveryType.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/undefinedIsSubtypeOfEverything.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings01(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings02(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings03(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings04(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings05(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings06(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings08(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings09(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings10(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings11(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings13(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings15(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings16(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings18(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings23(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInStrings25(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates01(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates02(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates03(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates04(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates05(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates06(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates07(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates08(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates09(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates10(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates11(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates12(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates13(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates14(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates15(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates16(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates17(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates18(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates19(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unicodeExtendedEscapesInTemplates20(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionSubtypeIfEveryConstituentTypeIsSubtype.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionThisTypeInFunctions.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionThisTypeInFunctions.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeCallSignatures.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeCallSignatures2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeCallSignatures3.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeCallSignatures6.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeConstructSignatures.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeEquivalence.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeFromArrayLiteral.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeIndexSignature.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeLiterals.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypePropertyAccessibility.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypePropertyAccessibility.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypeReadonly.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unionTypesAssignability.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unknownControlFlow.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unknownType1.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unknownType1.types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/unknownType2.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/conformance/useObjectValuesAndEntries1.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/useObjectValuesAndEntries2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/usePromiseFinally.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/usingDeclarations.2(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/usingDeclarations.3(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/usingDeclarationsInFor(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/usingDeclarationsInForOf.1(target=es5).js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/validMultipleVariableDeclarations.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/validMultipleVariableDeclarations.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/validStringAssignments.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/variadicTuples2.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxNoElisionESM.js.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/verbatimModuleSyntaxRestrictionsESM(esmoduleinterop=false).types.diff create mode 100644 testdata/baselines/reference/submodule/conformance/weakTypesAndLiterals01.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wideningTuples2.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wideningTuples5.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wideningTuples6.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wideningTuples7.js.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wrappedAndRecursiveConstraints.symbols.diff create mode 100644 testdata/baselines/reference/submodule/conformance/wrappedAndRecursiveConstraints2.js.diff create mode 100644 testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias.baseline.jsonc.diff create mode 100644 testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAlias3.baseline.jsonc.diff create mode 100644 testdata/baselines/reference/submodule/fourslash/findRenameLocations/renameAliasExternalModule3.baseline.jsonc.diff create mode 100644 testdata/baselines/reference/submodule/fourslash/findRenameLocations/tsxRename1.baseline.jsonc.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/elidedJSImport1.types.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit1(module=commonjs).errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit2(module=commonjs).errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit3(module=commonjs).errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/impliedNodeFormatEmit4(module=commonjs).errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/javascriptImportDefaultBadExport.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/jsdocBracelessTypeTag1.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/moduleResolutionWithSuffixes_one_jsModule.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/parenthesizedJSDocCastDoesNotNarrow.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/compiler/parenthesizedJSDocCastDoesNotNarrow.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/bundlerSyntaxRestrictions(module=esnext).errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/bundlerSyntaxRestrictions(module=preserve).errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/checkJsdocReturnTag2.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/emit(jsx=preserve).errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/emit(jsx=react).errors.txt.diff delete mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/extensionLoadingPriority(moduleresolution=bundler).errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsNonIdentifierInferredNames.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocOverrideTag1.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/jsdocTemplateTag3.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/moduleExportsElementAccessAssignment2.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/nodeModulesAllowJsSynchronousCallErrors(module=node16).types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/nodeModulesAllowJsSynchronousCallErrors(module=node18).types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/nodeModulesAllowJsSynchronousCallErrors(module=node20).types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/nodeModulesAllowJsSynchronousCallErrors(module=nodenext).types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/overloadTag1.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/overloadTag2.types.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.errors.txt.diff create mode 100644 testdata/baselines/reference/submoduleAccepted/conformance/untypedModuleImport_allowJs.types.diff diff --git a/_submodules/TypeScript b/_submodules/TypeScript index 1ee9e0d9a2..1112daead7 160000 --- a/_submodules/TypeScript +++ b/_submodules/TypeScript @@ -1 +1 @@ -Subproject commit 1ee9e0d9a24b629da3a8cae2748616af1dc8fc0c +Subproject commit 1112daead7b7610e21fa5b5da4696e2d92e89385 diff --git a/internal/tsoptions/tsconfigparsing_test.go b/internal/tsoptions/tsconfigparsing_test.go index 4f57b5068f..46ab705f5f 100644 --- a/internal/tsoptions/tsconfigparsing_test.go +++ b/internal/tsoptions/tsconfigparsing_test.go @@ -1149,6 +1149,7 @@ func TestParseSrcCompiler(t *testing.T) { "transformers/classThis.ts", "transformers/declarations.ts", "transformers/destructuring.ts", + "transformers/es2015.ts", "transformers/es2016.ts", "transformers/es2017.ts", "transformers/es2018.ts", @@ -1157,6 +1158,7 @@ func TestParseSrcCompiler(t *testing.T) { "transformers/es2021.ts", "transformers/esDecorators.ts", "transformers/esnext.ts", + "transformers/generators.ts", "transformers/jsx.ts", "transformers/legacyDecorators.ts", "transformers/namedEvaluation.ts", diff --git a/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff b/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff index 8a6e307a17..dcc6d6204f 100644 --- a/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff +++ b/testdata/baselines/reference/submodule/compiler/2dArrays.js.diff @@ -1,14 +1,35 @@ --- old.2dArrays.js +++ new.2dArrays.js -@@= skipped -20, +20 lines =@@ - class Cell { +@@= skipped -17, +17 lines =@@ } - class Ship { + + //// [2dArrays.js] +-var Cell = /** @class */ (function () { +- function Cell() { +- } +- return Cell; +-}()); +-var Ship = /** @class */ (function () { +- function Ship() { +- } +- return Ship; +-}()); +-var Board = /** @class */ (function () { +- function Board() { +- } +- Board.prototype.allShipsSunk = function () { ++class Cell { ++} ++class Ship { + isSunk; - } - class Board { ++} ++class Board { + ships; + cells; - allShipsSunk() { ++ allShipsSunk() { return this.ships.every(function (val) { return val.isSunk; }); - } \ No newline at end of file +- }; +- return Board; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff index 499c77d7d5..3ae3cf29a1 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_Watch.js.diff @@ -11,7 +11,40 @@ - */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +-var formatHost = { +- getCanonicalFileName: function (path) { return path; }, +const ts = require("typescript"); - const formatHost = { - getCanonicalFileName: path => path, - getCurrentDirectory: ts.sys.getCurrentDirectory, \ No newline at end of file ++const formatHost = { ++ getCanonicalFileName: path => path, + getCurrentDirectory: ts.sys.getCurrentDirectory, +- getNewLine: function () { return ts.sys.newLine; }, ++ getNewLine: () => ts.sys.newLine, + }; + function watchMain() { +- var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json"); ++ const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json"); + if (!configPath) { + throw new Error("Could not find a valid 'tsconfig.json'."); + } +@@= skipped -27, +22 lines =@@ + // Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit. + // For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable. + // Note that there is another overload for `createWatchCompilerHost` that takes a set of root files. +- var host = ts.createWatchCompilerHost(configPath, {}, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged); ++ const host = ts.createWatchCompilerHost(configPath, {}, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, reportDiagnostic, reportWatchStatusChanged); + // You can technically override any given hook on the host, though you probably don't need to. + // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all. +- var origCreateProgram = host.createProgram; +- host.createProgram = function (rootNames, options, host, oldProgram) { ++ const origCreateProgram = host.createProgram; ++ host.createProgram = (rootNames, options, host, oldProgram) => { + console.log("** We're about to create the program! **"); + return origCreateProgram(rootNames, options, host, oldProgram); + }; +- var origPostProgramCreate = host.afterProgramCreate; +- host.afterProgramCreate = function (program) { ++ const origPostProgramCreate = host.afterProgramCreate; ++ host.afterProgramCreate = program => { + console.log("** We finished making the program! **"); + origPostProgramCreate(program); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff index 495001bf42..a660d377a9 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithDefaults.js.diff @@ -12,5 +12,30 @@ -var ts = require("typescript"); +const ts = require("typescript"); function watchMain() { - const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json"); - if (!configPath) { \ No newline at end of file +- var configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json"); ++ const configPath = ts.findConfigFile(/*searchPath*/ "./", ts.sys.fileExists, "tsconfig.json"); + if (!configPath) { + throw new Error("Could not find a valid 'tsconfig.json'."); + } +@@= skipped -21, +17 lines =@@ + // Between `createEmitAndSemanticDiagnosticsBuilderProgram` and `createSemanticDiagnosticsBuilderProgram`, the only difference is emit. + // For pure type-checking scenarios, or when another tool/process handles emit, using `createSemanticDiagnosticsBuilderProgram` may be more desirable. + // Note that there is another overload for `createWatchCompilerHost` that takes a set of root files. +- var host = ts.createWatchCompilerHost(configPath, {}, ts.sys); ++ const host = ts.createWatchCompilerHost(configPath, {}, ts.sys); + // You can technically override any given hook on the host, though you probably don't need to. + // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all. +- var origCreateProgram = host.createProgram; +- host.createProgram = function (rootNames, options, host, oldProgram) { ++ const origCreateProgram = host.createProgram; ++ host.createProgram = (rootNames, options, host, oldProgram) => { + console.log("** We're about to create the program! **"); + return origCreateProgram(rootNames, options, host, oldProgram); + }; +- var origPostProgramCreate = host.afterProgramCreate; +- host.afterProgramCreate = function (program) { ++ const origPostProgramCreate = host.afterProgramCreate; ++ host.afterProgramCreate = program => { + console.log("** We finished making the program! **"); + origPostProgramCreate(program); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff index 25d0f11df7..4c4e70a980 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_WatchWithOwnWatchHost.js.diff @@ -13,4 +13,40 @@ +const ts = require("typescript"); function watchMain() { // get list of files and compiler options somehow - const files = []; \ No newline at end of file +- var files = []; +- var options = {}; +- var host = { ++ const files = []; ++ const options = {}; ++ const host = { + rootFiles: files, +- options: options, +- useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; }, +- getNewLine: function () { return ts.sys.newLine; }, ++ options, ++ useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames, ++ getNewLine: () => ts.sys.newLine, + getCurrentDirectory: ts.sys.getCurrentDirectory, +- getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); }, ++ getDefaultLibFileName: options => ts.getDefaultLibFilePath(options), + fileExists: ts.sys.fileExists, + readFile: ts.sys.readFile, + directoryExists: ts.sys.directoryExists, +@@= skipped -29, +25 lines =@@ + }; + // You can technically override any given hook on the host, though you probably don't need to. + // Note that we're assuming `origCreateProgram` and `origPostProgramCreate` doesn't use `this` at all. +- var origCreateProgram = host.createProgram; +- host.createProgram = function (rootNames, options, host, oldProgram) { ++ const origCreateProgram = host.createProgram; ++ host.createProgram = (rootNames, options, host, oldProgram) => { + console.log("** We're about to create the program! **"); + return origCreateProgram(rootNames, options, host, oldProgram); + }; +- var origPostProgramCreate = host.afterProgramCreate; +- host.afterProgramCreate = function (program) { ++ const origPostProgramCreate = host.afterProgramCreate; ++ host.afterProgramCreate = program => { + console.log("** We finished making the program! **"); + origPostProgramCreate(program); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff index b2e0459c6f..bccc6d1948 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_compile.js.diff @@ -15,4 +15,23 @@ +const ts = require("typescript"); function compile(fileNames, options) { var program = ts.createProgram(fileNames, options); - var emitResult = program.emit(); \ No newline at end of file + var emitResult = program.emit(); + var allDiagnostics = ts.getPreEmitDiagnostics(program); +- allDiagnostics.forEach(function (diagnostic) { ++ allDiagnostics.forEach(diagnostic => { + var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + if (!diagnostic.file) { + console.log(message); + return; + } +- var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character; +- console.log("".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message)); ++ var { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); ++ console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); + }); + var exitCode = emitResult.emitSkipped ? 1 : 0; +- console.log("Process exiting with code '".concat(exitCode, "'.")); ++ console.log(`Process exiting with code '${exitCode}'.`); + process.exit(exitCode); + } + compile(process.argv.slice(2), { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff index 939a10fa62..f05d85b5d2 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_jsdoc.js.diff @@ -15,4 +15,93 @@ +const ts = require("typescript"); // excerpted from https://github.com/YousefED/typescript-json-schema // (converted from a method and modified; for example, `this: any` to compensate, among other changes) - function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) { \ No newline at end of file + function parseCommentsIntoDefinition(symbol, definition, otherAnnotations) { +- var _this = this; + if (!symbol) { + return; + } + // the comments for a symbol +- var comments = symbol.getDocumentationComment(undefined); ++ let comments = symbol.getDocumentationComment(undefined); + if (comments.length) { +- definition.description = comments.map(function (comment) { return comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n"); }).join(""); ++ definition.description = comments.map(comment => comment.kind === "lineBreak" ? comment.text : comment.text.trim().replace(/\r\n/g, "\n")).join(""); + } + // jsdocs are separate from comments +- var jsdocs = symbol.getJsDocTags(this.checker); +- jsdocs.forEach(function (doc) { ++ const jsdocs = symbol.getJsDocTags(this.checker); ++ jsdocs.forEach(doc => { + // if we have @TJS-... annotations, we have to parse them +- var name = doc.name, text = doc.text; +- if (_this.userValidationKeywords[name]) { +- definition[name] = _this.parseValue(text); ++ const { name, text } = doc; ++ if (this.userValidationKeywords[name]) { ++ definition[name] = this.parseValue(text); + } + else { + // special annotations +@@= skipped -35, +28 lines =@@ + }); + } + function getAnnotations(node) { +- var _this = this; +- var symbol = node.symbol; ++ const symbol = node.symbol; + if (!symbol) { + return undefined; + } +- var jsDocTags = symbol.getJsDocTags(this.checker); ++ const jsDocTags = symbol.getJsDocTags(this.checker); + if (!jsDocTags || !jsDocTags.length) { + return undefined; + } +- var annotations = jsDocTags.reduce(function (result, jsDocTag) { +- var value = _this.parseJsDocTag(jsDocTag); ++ const annotations = jsDocTags.reduce((result, jsDocTag) => { ++ const value = this.parseJsDocTag(jsDocTag); + if (value !== undefined) { + result[jsDocTag.name] = value; + } +@@= skipped -24, +23 lines =@@ + return ts.getJSDocParameterTags(node); + } + if (node.kind === ts.SyntaxKind.FunctionDeclaration) { +- var func = node; ++ const func = node; + if (ts.hasJSDocParameterTags(func)) { +- var flat = []; +- for (var _i = 0, _a = func.parameters.map(ts.getJSDocParameterTags); _i < _a.length; _i++) { +- var tags = _a[_i]; ++ const flat = []; ++ for (const tags of func.parameters.map(ts.getJSDocParameterTags)) { + if (tags) +- flat.push.apply(flat, tags); ++ flat.push(...tags); + } + return flat; + } +@@= skipped -16, +15 lines =@@ + if (node.kind === ts.SyntaxKind.FunctionDeclaration) { + return ts.getJSDocReturnType(node); + } +- var type = ts.getJSDocType(node); ++ let type = ts.getJSDocType(node); + if (type && type.kind === ts.SyntaxKind.FunctionType) { + return type.type; + } +@@= skipped -9, +9 lines =@@ + ts.getJSDocTags(node); + } + function getSomeOtherTags(node) { +- var tags = []; ++ const tags = []; + tags.push(ts.getJSDocAugmentsTag(node)); + tags.push(ts.getJSDocClassTag(node)); + tags.push(ts.getJSDocReturnTag(node)); +- var type = ts.getJSDocTypeTag(node); ++ const type = ts.getJSDocTypeTag(node); + if (type) { + tags.push(type); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff index 2f9b2b9e1f..15181385dc 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_linter.js.diff @@ -15,4 +15,42 @@ +const ts = require("typescript"); function delint(sourceFile) { delintNode(sourceFile); - function delintNode(node) { \ No newline at end of file + function delintNode(node) { +@@= skipped -21, +16 lines =@@ + } + break; + case ts.SyntaxKind.IfStatement: +- var ifStatement = node; ++ let ifStatement = node; + if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) { + report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); + } +@@= skipped -11, +11 lines =@@ + } + break; + case ts.SyntaxKind.BinaryExpression: +- var op = node.operatorToken.kind; ++ let op = node.operatorToken.kind; + if (op === ts.SyntaxKind.EqualsEqualsToken || op == ts.SyntaxKind.ExclamationEqualsToken) { + report(node, "Use '===' and '!=='."); + } +@@= skipped -9, +9 lines =@@ + ts.forEachChild(node, delintNode); + } + function report(node, message) { +- var _a = sourceFile.getLineAndCharacterOfPosition(node.getStart()), line = _a.line, character = _a.character; +- console.log("".concat(sourceFile.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message)); ++ let { line, character } = sourceFile.getLineAndCharacterOfPosition(node.getStart()); ++ console.log(`${sourceFile.fileName} (${line + 1},${character + 1}): ${message}`); + } + } +-var fileNames = process.argv.slice(2); +-fileNames.forEach(function (fileName) { ++const fileNames = process.argv.slice(2); ++fileNames.forEach(fileName => { + // Parse a file +- var sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true); ++ let sourceFile = ts.createSourceFile(fileName, readFileSync(fileName).toString(), ts.ScriptTarget.ES2015, /*setParentNodes */ true); + // delint it + delint(sourceFile); + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff index aa2225246a..738bf87273 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_parseConfig.js.diff @@ -15,4 +15,26 @@ +const ts = require("typescript"); function printError(error) { if (!error) { - return; \ No newline at end of file + return; + } +- console.log("".concat(error.file && error.file.fileName, ": ").concat(error.messageText)); ++ console.log(`${error.file && error.file.fileName}: ${error.messageText}`); + } + function createProgram(rootFiles, compilerOptionsJson) { +- var _a = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson), config = _a.config, error = _a.error; ++ const { config, error } = ts.parseConfigFileTextToJson("tsconfig.json", compilerOptionsJson); + if (error) { + printError(error); + return undefined; + } +- var basePath = process.cwd(); +- var settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath); ++ const basePath = process.cwd(); ++ const settings = ts.convertCompilerOptionsFromJson(config.config["compilerOptions"], basePath); + if (!settings.options) { +- for (var _i = 0, _b = settings.errors; _i < _b.length; _i++) { +- var err = _b[_i]; ++ for (const err of settings.errors) { + printError(err); + } + return undefined; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff index 62ddcd3067..b04d42edd3 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_transform.js.diff @@ -11,7 +11,9 @@ - */ Object.defineProperty(exports, "__esModule", { value: true }); -var ts = require("typescript"); +-var source = "let x: string = 'string'"; +-var result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); +const ts = require("typescript"); - const source = "let x: string = 'string'"; - let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); ++const source = "let x: string = 'string'"; ++let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS }); console.log(JSON.stringify(result)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff index 7872ebf267..6f4eaad397 100644 --- a/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff +++ b/testdata/baselines/reference/submodule/compiler/APISample_watcher.js.diff @@ -13,5 +13,98 @@ -var ts = require("typescript"); +const ts = require("typescript"); function watch(rootFileNames, options) { - const files = {}; - // initialize the list of files \ No newline at end of file +- var files = {}; ++ const files = {}; + // initialize the list of files +- rootFileNames.forEach(function (fileName) { ++ rootFileNames.forEach(fileName => { + files[fileName] = { version: 0 }; + }); + // Create the language service host to allow the LS to communicate with the host +- var servicesHost = { +- getScriptFileNames: function () { return rootFileNames; }, +- getScriptVersion: function (fileName) { return files[fileName] && files[fileName].version.toString(); }, +- getScriptSnapshot: function (fileName) { ++ const servicesHost = { ++ getScriptFileNames: () => rootFileNames, ++ getScriptVersion: (fileName) => files[fileName] && files[fileName].version.toString(), ++ getScriptSnapshot: (fileName) => { + if (!fs.existsSync(fileName)) { + return undefined; + } + return ts.ScriptSnapshot.fromString(fs.readFileSync(fileName).toString()); + }, +- getCurrentDirectory: function () { return process.cwd(); }, +- getCompilationSettings: function () { return options; }, +- getDefaultLibFileName: function (options) { return ts.getDefaultLibFilePath(options); }, +- fileExists: function (fileName) { return fs.existsSync(fileName); }, +- readFile: function (fileName) { return fs.readFileSync(fileName); }, ++ getCurrentDirectory: () => process.cwd(), ++ getCompilationSettings: () => options, ++ getDefaultLibFileName: (options) => ts.getDefaultLibFilePath(options), ++ fileExists: fileName => fs.existsSync(fileName), ++ readFile: fileName => fs.readFileSync(fileName), + }; + // Create the language service files +- var services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()); ++ const services = ts.createLanguageService(servicesHost, ts.createDocumentRegistry()); + // Now let's watch the files +- rootFileNames.forEach(function (fileName) { ++ rootFileNames.forEach(fileName => { + // First time around, emit all files + emitFile(fileName); + // Add a watch on the file to handle next change +- fs.watchFile(fileName, { persistent: true, interval: 250 }, function (curr, prev) { ++ fs.watchFile(fileName, { persistent: true, interval: 250 }, (curr, prev) => { + // Check timestamp + if (+curr.mtime <= +prev.mtime) { + return; +@@= skipped -48, +43 lines =@@ + }); + }); + function emitFile(fileName) { +- var output = services.getEmitOutput(fileName); ++ let output = services.getEmitOutput(fileName); + if (!output.emitSkipped) { +- console.log("Emitting ".concat(fileName)); ++ console.log(`Emitting ${fileName}`); + } + else { +- console.log("Emitting ".concat(fileName, " failed")); ++ console.log(`Emitting ${fileName} failed`); + logErrors(fileName); + } +- output.outputFiles.forEach(function (o) { ++ output.outputFiles.forEach(o => { + fs.writeFileSync(o.name, o.text, "utf8"); + }); + } + function logErrors(fileName) { +- var allDiagnostics = services.getCompilerOptionsDiagnostics() ++ let allDiagnostics = services.getCompilerOptionsDiagnostics() + .concat(services.getSyntacticDiagnostics(fileName)) + .concat(services.getSemanticDiagnostics(fileName)); +- allDiagnostics.forEach(function (diagnostic) { +- var message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); ++ allDiagnostics.forEach(diagnostic => { ++ let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); + if (diagnostic.file) { +- var _a = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start), line = _a.line, character = _a.character; +- console.log(" Error ".concat(diagnostic.file.fileName, " (").concat(line + 1, ",").concat(character + 1, "): ").concat(message)); ++ let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); ++ console.log(` Error ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); + } + else { +- console.log(" Error: ".concat(message)); ++ console.log(` Error: ${message}`); + } + }); + } + } + // Initialize files constituting the program as all .ts files in the current directory +-var currentDirectoryFiles = fs.readdirSync(process.cwd()). +- filter(function (fileName) { return fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"; }); ++const currentDirectoryFiles = fs.readdirSync(process.cwd()). ++ filter(fileName => fileName.length >= 3 && fileName.substr(fileName.length - 3, 3) === ".ts"); + // Start the watcher + watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff new file mode 100644 index 0000000000..f71ea7995e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ArrowFunctionExpression1.js.diff @@ -0,0 +1,8 @@ +--- old.ArrowFunctionExpression1.js ++++ new.ArrowFunctionExpression1.js +@@= skipped -3, +3 lines =@@ + var v = (public x: string) => { }; + + //// [ArrowFunctionExpression1.js] +-var v = function (x) { }; ++var v = (x) => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff new file mode 100644 index 0000000000..9bea73cca6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration10.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration10.js ++++ new.ClassDeclaration10.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration10.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff new file mode 100644 index 0000000000..4cac66fea3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration11.js.diff @@ -0,0 +1,15 @@ +--- old.ClassDeclaration11.js ++++ new.ClassDeclaration11.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration11.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +-}()); ++class C { ++ foo() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff new file mode 100644 index 0000000000..a1ad1bc5d0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration13.js.diff @@ -0,0 +1,15 @@ +--- old.ClassDeclaration13.js ++++ new.ClassDeclaration13.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration13.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function () { }; +- return C; +-}()); ++class C { ++ bar() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff new file mode 100644 index 0000000000..a1c3be512b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration14.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration14.js ++++ new.ClassDeclaration14.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration14.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff new file mode 100644 index 0000000000..d73f6e6276 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration15.js.diff @@ -0,0 +1,14 @@ +--- old.ClassDeclaration15.js ++++ new.ClassDeclaration15.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration15.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++ constructor() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff new file mode 100644 index 0000000000..976f5eb8c2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration21.js.diff @@ -0,0 +1,15 @@ +--- old.ClassDeclaration21.js ++++ new.ClassDeclaration21.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration21.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype[1] = function () { }; +- return C; +-}()); ++class C { ++ 1() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff new file mode 100644 index 0000000000..87198caf25 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration22.js.diff @@ -0,0 +1,15 @@ +--- old.ClassDeclaration22.js ++++ new.ClassDeclaration22.js +@@= skipped -6, +6 lines =@@ + } + + //// [ClassDeclaration22.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype["bar"] = function () { }; +- return C; +-}()); ++class C { ++ "bar"() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff new file mode 100644 index 0000000000..311e44d60c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration24.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration24.js ++++ new.ClassDeclaration24.js +@@= skipped -4, +4 lines =@@ + } + + //// [ClassDeclaration24.js] +-var any = /** @class */ (function () { +- function any() { +- } +- return any; +-}()); ++class any { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff new file mode 100644 index 0000000000..fd412b8ffb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration25.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration25.js ++++ new.ClassDeclaration25.js +@@= skipped -11, +11 lines =@@ + + + //// [ClassDeclaration25.js] +-var List = /** @class */ (function () { +- function List() { +- } +- return List; +-}()); ++class List { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff index b1edb6a682..eae54067d4 100644 --- a/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration26.js.diff @@ -1,14 +1,19 @@ --- old.ClassDeclaration26.js +++ new.ClassDeclaration26.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + } //// [ClassDeclaration26.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.foo = 10; - } +- return C; +-}()); ++class C { + var; + export foo = 10; - } ++} var constructor; - () => { }; \ No newline at end of file +-(function () { }); ++() => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff new file mode 100644 index 0000000000..0b5b245e62 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration8.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration8.js ++++ new.ClassDeclaration8.js +@@= skipped -5, +5 lines =@@ + } + + //// [ClassDeclaration8.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff new file mode 100644 index 0000000000..1d9437767c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclaration9.js.diff @@ -0,0 +1,13 @@ +--- old.ClassDeclaration9.js ++++ new.ClassDeclaration9.js +@@= skipped -5, +5 lines =@@ + } + + //// [ClassDeclaration9.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff index 8998fe2750..ae8712b765 100644 --- a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration.js.diff @@ -4,12 +4,12 @@ } //// [ClassDeclarationWithInvalidConstOnPropertyDeclaration.js] --let AtomicNumbers = (() => { -- class AtomicNumbers { +-var AtomicNumbers = /** @class */ (function () { +- function AtomicNumbers() { - } - AtomicNumbers.H = 1; - return AtomicNumbers; --})(); +-}()); +class AtomicNumbers { + static H = 1; +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff index 6f45402f14..efb60fa4f2 100644 --- a/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js.diff @@ -1,12 +1,16 @@ --- old.ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js +++ new.ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + } //// [ClassDeclarationWithInvalidConstOnPropertyDeclaration2.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.x = 10; - } +- return C; +-}()); ++class C { + const; + x = 10; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff b/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff new file mode 100644 index 0000000000..e386d2cbf7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ExportAssignment7.js.diff @@ -0,0 +1,14 @@ +--- old.ExportAssignment7.js ++++ new.ExportAssignment7.js +@@= skipped -8, +8 lines =@@ + //// [ExportAssignment7.js] + "use strict"; + exports.C = void 0; +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + module.exports = B; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff b/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff new file mode 100644 index 0000000000..9baa222f15 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ExportAssignment8.js.diff @@ -0,0 +1,14 @@ +--- old.ExportAssignment8.js ++++ new.ExportAssignment8.js +@@= skipped -8, +8 lines =@@ + //// [ExportAssignment8.js] + "use strict"; + exports.C = void 0; +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + module.exports = B; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt index 9f4446f361..e22c882cac 100644 --- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.errors.txt @@ -2,7 +2,7 @@ FunctionDeclaration7.ts(2,13): error TS2391: Function implementation is missing ==== FunctionDeclaration7.ts (1 errors) ==== - module M { + namespace M { function foo(); ~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js index 5d4aabcb4c..4990bf8f4b 100644 --- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js +++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/FunctionDeclaration7.ts] //// //// [FunctionDeclaration7.ts] -module M { +namespace M { function foo(); } diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols index a651b0cf91..995bbce277 100644 --- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols +++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.symbols @@ -1,9 +1,9 @@ //// [tests/cases/compiler/FunctionDeclaration7.ts] //// === FunctionDeclaration7.ts === -module M { +namespace M { >M : Symbol(M, Decl(FunctionDeclaration7.ts, 0, 0)) function foo(); ->foo : Symbol(foo, Decl(FunctionDeclaration7.ts, 0, 10)) +>foo : Symbol(foo, Decl(FunctionDeclaration7.ts, 0, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types index 2c1487af19..e5e3310697 100644 --- a/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types +++ b/testdata/baselines/reference/submodule/compiler/FunctionDeclaration7.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/FunctionDeclaration7.ts] //// === FunctionDeclaration7.ts === -module M { +namespace M { >M : typeof M function foo(); diff --git a/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff b/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff new file mode 100644 index 0000000000..1c8fd70654 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/MemberAccessorDeclaration15.js.diff @@ -0,0 +1,19 @@ +--- old.MemberAccessorDeclaration15.js ++++ new.MemberAccessorDeclaration15.js +@@= skipped -5, +5 lines =@@ + } + + //// [MemberAccessorDeclaration15.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "Foo", { +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ set Foo(a) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff b/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff new file mode 100644 index 0000000000..1dc4362b87 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ParameterList6.js.diff @@ -0,0 +1,14 @@ +--- old.ParameterList6.js ++++ new.ParameterList6.js +@@= skipped -6, +6 lines =@@ + } + + //// [ParameterList6.js] +-var C = /** @class */ (function () { +- function C(C) { ++class C { ++ constructor(C) { + } +- return C; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff b/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff index 03676ba7b7..b6419982ea 100644 --- a/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ParameterList7.js.diff @@ -1,10 +1,16 @@ --- old.ParameterList7.js +++ new.ParameterList7.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + } //// [ParameterList7.js] - class C1 { +-var C1 = /** @class */ (function () { +- function C1(p3) { ++class C1 { + p3; - constructor(p3) { ++ constructor(p3) { this.p3 = p3; - } // OK \ No newline at end of file + } // OK +- return C1; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff new file mode 100644 index 0000000000..6dd3a54bd1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScope.js.diff @@ -0,0 +1,42 @@ +--- old.abstractClassInLocalScope.js ++++ new.abstractClassInLocalScope.js +@@= skipped -9, +9 lines =@@ + + + //// [abstractClassInLocalScope.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-(function () { +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++(() => { ++ class A { ++ } ++ class B extends A { ++ } + new B(); + return A; + })(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff new file mode 100644 index 0000000000..e25160ef00 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/abstractClassInLocalScopeIsAbstract.js.diff @@ -0,0 +1,42 @@ +--- old.abstractClassInLocalScopeIsAbstract.js ++++ new.abstractClassInLocalScopeIsAbstract.js +@@= skipped -9, +9 lines =@@ + + + //// [abstractClassInLocalScopeIsAbstract.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-(function () { +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++(() => { ++ class A { ++ } ++ class B extends A { ++ } + new A(); + new B(); + })(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff b/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff index 079c343a8f..5a7d190b56 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractClassUnionInstantiation.js.diff @@ -1,13 +1,47 @@ --- old.abstractClassUnionInstantiation.js +++ new.abstractClassUnionInstantiation.js -@@= skipped -28, +28 lines =@@ - class ConcreteB { - } - class AbstractA { +@@= skipped -23, +23 lines =@@ + [AbstractA, AbstractB].map(cls => new cls()); // should error + + //// [abstractClassUnionInstantiation.js] +-var ConcreteA = /** @class */ (function () { +- function ConcreteA() { +- } +- return ConcreteA; +-}()); +-var ConcreteB = /** @class */ (function () { +- function ConcreteB() { +- } +- return ConcreteB; +-}()); +-var AbstractA = /** @class */ (function () { +- function AbstractA() { +- } +- return AbstractA; +-}()); +-var AbstractB = /** @class */ (function () { +- function AbstractB() { +- } +- return AbstractB; +-}()); ++class ConcreteA { ++} ++class ConcreteB { ++} ++class AbstractA { + a; - } - class AbstractB { ++} ++class AbstractB { + b; - } ++} new cls1(); // should error - new cls2(); // should error \ No newline at end of file + new cls2(); // should error + new cls3(); // should work +-[ConcreteA, AbstractA, AbstractB].map(function (cls) { return new cls(); }); // should error +-[AbstractA, AbstractB, ConcreteA].map(function (cls) { return new cls(); }); // should error +-[ConcreteA, ConcreteB].map(function (cls) { return new cls(); }); // should work +-[AbstractA, AbstractB].map(function (cls) { return new cls(); }); // should error ++[ConcreteA, AbstractA, AbstractB].map(cls => new cls()); // should error ++[AbstractA, AbstractB, ConcreteA].map(cls => new cls()); // should error ++[ConcreteA, ConcreteB].map(cls => new cls()); // should work ++[AbstractA, AbstractB].map(cls => new cls()); // should error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff index d87f347912..7430945b40 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyBasics.js.diff @@ -1,23 +1,56 @@ --- old.abstractPropertyBasics.js +++ new.abstractPropertyBasics.js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + } //// [abstractPropertyBasics.js] - class B { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.raw = "edge"; +- _this.ro = "readonly please"; +- return _this; +- } +- Object.defineProperty(C.prototype, "prop", { +- get: function () { return "foo"; }, +- set: function (v) { }, +- enumerable: false, +- configurable: true +- }); +- C.prototype.m = function () { }; +- return C; +-}(B)); ++class B { + prop; + raw; + ro; - } - class C extends B { -- constructor() { -- super(...arguments); -- this.raw = "edge"; -- this.ro = "readonly please"; -- } - get prop() { return "foo"; } - set prop(v) { } ++} ++class C extends B { ++ get prop() { return "foo"; } ++ set prop(v) { } + raw = "edge"; + ro = "readonly please"; + readonlyProp; // don't have to give a value, in fact - m() { } - } \ No newline at end of file ++ m() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff index 16fbbd728c..8c5a253797 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyInConstructor.js.diff @@ -1,62 +1,151 @@ --- old.abstractPropertyInConstructor.js +++ new.abstractPropertyInConstructor.js -@@= skipped -97, +97 lines =@@ +@@= skipped -95, +95 lines =@@ + + //// [abstractPropertyInConstructor.js] - class AbstractClass { - constructor(str, other) { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var AbstractClass = /** @class */ (function () { +- function AbstractClass(str, other) { +- var _this = this; - this.other = this.prop; -- this.fn = () => this.prop; +- this.fn = function () { return _this.prop; }; ++class AbstractClass { ++ constructor(str, other) { this.method(parseInt(str)); - let val = this.prop.toLowerCase(); +- var val = this.prop.toLowerCase(); ++ let val = this.prop.toLowerCase(); if (!str) { -@@= skipped -15, +13 lines =@@ + this.prop = "Hello World"; + } + this.cb(str); + // OK, reference is inside function +- var innerFunction = function () { +- return _this.prop; ++ const innerFunction = () => { ++ return this.prop; + }; // OK, references are to another instance other.cb(other.prop); } +- AbstractClass.prototype.method2 = function () { + prop; + cb; + other = this.prop; + fn = () => this.prop; - method2() { ++ method2() { this.prop = this.prop + "!"; - } - } - class DerivedAbstractClass extends AbstractClass { +- }; +- return AbstractClass; +-}()); +-var DerivedAbstractClass = /** @class */ (function (_super) { +- __extends(DerivedAbstractClass, _super); +- function DerivedAbstractClass(str, other, yetAnother) { +- var _this = _super.call(this, str, other) || this; +- _this.cb = function (s) { }; ++ } ++} ++class DerivedAbstractClass extends AbstractClass { + cb = (s) => { }; - constructor(str, other, yetAnother) { - super(str, other); -- this.cb = (s) => { }; ++ constructor(str, other, yetAnother) { ++ super(str, other); // there is no implementation of 'prop' in any base class - this.cb(this.prop.toLowerCase()); - this.method(1); -@@= skipped -17, +21 lines =@@ - } - } - class Implementation extends DerivedAbstractClass { +- _this.cb(_this.prop.toLowerCase()); +- _this.method(1); ++ this.cb(this.prop.toLowerCase()); ++ this.method(1); + // OK, references are to another instance + other.cb(other.prop); + yetAnother.cb(yetAnother.prop); +- return _this; +- } +- return DerivedAbstractClass; +-}(AbstractClass)); +-var Implementation = /** @class */ (function (_super) { +- __extends(Implementation, _super); +- function Implementation(str, other, yetAnother) { +- var _this = _super.call(this, str, other, yetAnother) || this; +- _this.prop = ""; +- _this.cb = function (s) { }; +- _this.cb(_this.prop); +- return _this; +- } +- Implementation.prototype.method = function (n) { ++ } ++} ++class Implementation extends DerivedAbstractClass { + prop = ""; + cb = (s) => { }; - constructor(str, other, yetAnother) { - super(str, other, yetAnother); -- this.prop = ""; -- this.cb = (s) => { }; - this.cb(this.prop); - } - method(n) { -@@= skipped -19, +19 lines =@@ ++ constructor(str, other, yetAnother) { ++ super(str, other, yetAnother); ++ this.cb(this.prop); ++ } ++ method(n) { + this.cb(this.prop + n); +- }; +- return Implementation; +-}(DerivedAbstractClass)); +-var User = /** @class */ (function () { +- function User(a) { ++ } ++} ++class User { ++ constructor(a) { + a.prop; + a.cb("hi"); + a.method(12); + a.method2(); } - } - class C1 { +- return User; +-}()); +-var C1 = /** @class */ (function () { +- function C1() { +- var _a; +- var self = this; // ok +- var _b = this, x = _b.x, y1 = _b.y; // error +- (_a = this, x = _a.x, y1 = _a.y, y1 = _a["y"]); // error +- } +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- var _a; +- var self = this; // ok +- var _b = this, x = _b.x, y1 = _b.y; // ok +- (_a = this, x = _a.x, y1 = _a.y, y1 = _a["y"]); // ok +- } +- return C2; +-}()); ++} ++class C1 { + x; + y; - constructor() { - let self = this; // ok - let { x, y: y1 } = this; // error -@@= skipped -7, +9 lines =@@ - } - } - class C2 { ++ constructor() { ++ let self = this; // ok ++ let { x, y: y1 } = this; // error ++ ({ x, y: y1, "y": y1 } = this); // error ++ } ++} ++class C2 { + x; + y; - constructor() { - let self = this; // ok - let { x, y: y1 } = this; // ok \ No newline at end of file ++ constructor() { ++ let self = this; // ok ++ let { x, y: y1 } = this; // ok ++ ({ x, y: y1, "y": y1 } = this); // ok ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff b/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff index d8883c1c17..4c72ce40d9 100644 --- a/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff +++ b/testdata/baselines/reference/submodule/compiler/abstractPropertyNegative.js.diff @@ -1,44 +1,125 @@ --- old.abstractPropertyNegative.js +++ new.abstractPropertyNegative.js -@@= skipped -46, +46 lines =@@ +@@= skipped -45, +45 lines =@@ + //// [abstractPropertyNegative.js] - class B { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.ro = "readonly please"; +- return _this; +- } +- Object.defineProperty(C.prototype, "concreteWithNoBody", { +- get: function () { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}(B)); +-var c = new C(); ++class B { + prop; + ro; - } - class C extends B { -- constructor() { -- super(...arguments); -- this.ro = "readonly please"; -- } -- get concreteWithNoBody() { } ++} ++class C extends B { + ro = "readonly please"; + notAllowed; - } - let c = new C(); ++} ++let c = new C(); c.ro = "error: lhs of assignment can't be readonly"; - class WrongTypeProperty { -+ num; - } - class WrongTypePropertyImpl extends WrongTypeProperty { -- constructor() { -- super(...arguments); -- this.num = "nope, wrong"; +-var WrongTypeProperty = /** @class */ (function () { +- function WrongTypeProperty() { - } -+ num = "nope, wrong"; - } - class WrongTypeAccessor { - } -@@= skipped -24, +21 lines =@@ - get num() { return "nope, wrong"; } - } - class WrongTypeAccessorImpl2 extends WrongTypeAccessor { -- constructor() { -- super(...arguments); -- this.num = "nope, wrong"; +- return WrongTypeProperty; +-}()); +-var WrongTypePropertyImpl = /** @class */ (function (_super) { +- __extends(WrongTypePropertyImpl, _super); +- function WrongTypePropertyImpl() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.num = "nope, wrong"; +- return _this; - } +- return WrongTypePropertyImpl; +-}(WrongTypeProperty)); +-var WrongTypeAccessor = /** @class */ (function () { +- function WrongTypeAccessor() { +- } +- return WrongTypeAccessor; +-}()); +-var WrongTypeAccessorImpl = /** @class */ (function (_super) { +- __extends(WrongTypeAccessorImpl, _super); +- function WrongTypeAccessorImpl() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(WrongTypeAccessorImpl.prototype, "num", { +- get: function () { return "nope, wrong"; }, +- enumerable: false, +- configurable: true +- }); +- return WrongTypeAccessorImpl; +-}(WrongTypeAccessor)); +-var WrongTypeAccessorImpl2 = /** @class */ (function (_super) { +- __extends(WrongTypeAccessorImpl2, _super); +- function WrongTypeAccessorImpl2() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.num = "nope, wrong"; +- return _this; +- } +- return WrongTypeAccessorImpl2; +-}(WrongTypeAccessor)); +-var AbstractAccessorMismatch = /** @class */ (function () { +- function AbstractAccessorMismatch() { +- } +- Object.defineProperty(AbstractAccessorMismatch.prototype, "p1", { +- set: function (val) { }, +- enumerable: false, +- configurable: true +- }); ++class WrongTypeProperty { ++ num; ++} ++class WrongTypePropertyImpl extends WrongTypeProperty { ++ num = "nope, wrong"; ++} ++class WrongTypeAccessor { ++} ++class WrongTypeAccessorImpl extends WrongTypeAccessor { ++ get num() { return "nope, wrong"; } ++} ++class WrongTypeAccessorImpl2 extends WrongTypeAccessor { + num = "nope, wrong"; - } - class AbstractAccessorMismatch { - set p1(val) { } \ No newline at end of file ++} ++class AbstractAccessorMismatch { ++ set p1(val) { } + ; +- Object.defineProperty(AbstractAccessorMismatch.prototype, "p2", { +- get: function () { return "should work"; }, +- enumerable: false, +- configurable: true +- }); +- return AbstractAccessorMismatch; +-}()); ++ get p2() { return "should work"; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js index a1d5c09b84..8b9c20d5cf 100644 --- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js +++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/acceptableAlias1.ts] //// //// [acceptableAlias1.ts] -module M { - export module N { +namespace M { + export namespace N { } export import X = N; } diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols index 607068de65..ff03a13bc4 100644 --- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols +++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/acceptableAlias1.ts] //// === acceptableAlias1.ts === -module M { +namespace M { >M : Symbol(M, Decl(acceptableAlias1.ts, 0, 0)) - export module N { ->N : Symbol(N, Decl(acceptableAlias1.ts, 0, 10)) + export namespace N { +>N : Symbol(N, Decl(acceptableAlias1.ts, 0, 13)) } export import X = N; >X : Symbol(X, Decl(acceptableAlias1.ts, 2, 5)) ->N : Symbol(N, Decl(acceptableAlias1.ts, 0, 10)) +>N : Symbol(N, Decl(acceptableAlias1.ts, 0, 13)) } import r = M.X; diff --git a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types index 33140ceb99..a458c495bd 100644 --- a/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types +++ b/testdata/baselines/reference/submodule/compiler/acceptableAlias1.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/acceptableAlias1.ts] //// === acceptableAlias1.ts === -module M { +namespace M { >M : typeof M - export module N { + export namespace N { } export import X = N; >X : any diff --git a/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff b/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff index 5586842aa1..ef09ac41a3 100644 --- a/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/accessInstanceMemberFromStaticMethod01.js.diff @@ -1,10 +1,19 @@ --- old.accessInstanceMemberFromStaticMethod01.js +++ new.accessInstanceMemberFromStaticMethod01.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [accessInstanceMemberFromStaticMethod01.js] - class C { +-var C = /** @class */ (function () { +- function C() { ++class C { + static foo; - bar() { - let k = foo; - } \ No newline at end of file ++ bar() { ++ let k = foo; + } +- C.prototype.bar = function () { +- var k = foo; +- }; +- return C; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff b/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff index da5be33c25..f6ff800075 100644 --- a/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/accessOverriddenBaseClassMember1.js.diff @@ -1,19 +1,60 @@ --- old.accessOverriddenBaseClassMember1.js +++ new.accessOverriddenBaseClassMember1.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + //// [accessOverriddenBaseClassMember1.js] - class Point { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Point = /** @class */ (function () { +- function Point(x, y) { ++class Point { + x; + y; - constructor(x, y) { ++ constructor(x, y) { this.x = x; this.y = y; -@@= skipped -9, +11 lines =@@ } - } - class ColoredPoint extends Point { +- Point.prototype.toString = function () { ++ toString() { + return "x=" + this.x + " y=" + this.y; +- }; +- return Point; +-}()); +-var ColoredPoint = /** @class */ (function (_super) { +- __extends(ColoredPoint, _super); +- function ColoredPoint(x, y, color) { +- var _this = _super.call(this, x, y) || this; +- _this.color = color; +- return _this; +- } +- ColoredPoint.prototype.toString = function () { +- return _super.prototype.toString.call(this) + " color=" + this.color; +- }; +- return ColoredPoint; +-}(Point)); ++ } ++} ++class ColoredPoint extends Point { + color; - constructor(x, y, color) { - super(x, y); - this.color = color; \ No newline at end of file ++ constructor(x, y, color) { ++ super(x, y); ++ this.color = color; ++ } ++ toString() { ++ return super.toString() + " color=" + this.color; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff b/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff index 1e2c331529..2393dd2c33 100644 --- a/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/accessStaticMemberFromInstanceMethod01.js.diff @@ -1,10 +1,19 @@ --- old.accessStaticMemberFromInstanceMethod01.js +++ new.accessStaticMemberFromInstanceMethod01.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [accessStaticMemberFromInstanceMethod01.js] - class C { +-var C = /** @class */ (function () { +- function C() { ++class C { + foo; - static bar() { - let k = foo; - } \ No newline at end of file ++ static bar() { ++ let k = foo; + } +- C.bar = function () { +- var k = foo; +- }; +- return C; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff b/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff new file mode 100644 index 0000000000..f6280d1a19 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorAccidentalCallDiagnostic.js.diff @@ -0,0 +1,22 @@ +--- old.accessorAccidentalCallDiagnostic.js ++++ new.accessorAccidentalCallDiagnostic.js +@@= skipped -11, +11 lines =@@ + + //// [accessorAccidentalCallDiagnostic.js] + // https://github.com/microsoft/TypeScript/issues/24554 +-var Test24554 = /** @class */ (function () { +- function Test24554() { +- } +- Object.defineProperty(Test24554.prototype, "property", { +- get: function () { return 1; }, +- enumerable: false, +- configurable: true +- }); +- return Test24554; +-}()); ++class Test24554 { ++ get property() { return 1; } ++} + function test24554(x) { + return x.property(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff b/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff index 5a989ff971..f1c8214a3c 100644 --- a/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/accessorInAmbientContextES5.js.diff @@ -18,15 +18,23 @@ -}; -var _RegularClass_shouldError_accessor_storage; // Regular class should still error when targeting ES5 - class RegularClass { -- constructor() { +-var RegularClass = /** @class */ (function () { +- function RegularClass() { - _RegularClass_shouldError_accessor_storage.set(this, void 0); - } -- get shouldError() { return __classPrivateFieldGet(this, _RegularClass_shouldError_accessor_storage, "f"); } // Should still error -- set shouldError(value) { __classPrivateFieldSet(this, _RegularClass_shouldError_accessor_storage, value, "f"); } -+ accessor shouldError; // Should still error - } +- Object.defineProperty(RegularClass.prototype, "shouldError", { +- get: function () { return __classPrivateFieldGet(this, _RegularClass_shouldError_accessor_storage, "f"); } // Should still error +- , +- set: function (value) { __classPrivateFieldSet(this, _RegularClass_shouldError_accessor_storage, value, "f"); }, +- enumerable: false, +- configurable: true +- }); +- return RegularClass; +-}()); -_RegularClass_shouldError_accessor_storage = new WeakMap(); ++class RegularClass { ++ accessor shouldError; // Should still error ++} //// [accessorInAmbientContextES5.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff b/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff new file mode 100644 index 0000000000..d3c13dfd9d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorParameterAccessibilityModifier.js.diff @@ -0,0 +1,25 @@ +--- old.accessorParameterAccessibilityModifier.js ++++ new.accessorParameterAccessibilityModifier.js +@@= skipped -6, +6 lines =@@ + } + + //// [accessorParameterAccessibilityModifier.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "X", { +- set: function (v) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C, "X", { +- set: function (v2) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ set X(v) { } ++ static set X(v2) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff new file mode 100644 index 0000000000..5ee6f121a2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorWithInitializer.js.diff @@ -0,0 +1,29 @@ +--- old.accessorWithInitializer.js ++++ new.accessorWithInitializer.js +@@= skipped -6, +6 lines =@@ + } + + //// [accessorWithInitializer.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "X", { +- set: function (v) { +- if (v === void 0) { v = 0; } +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C, "X", { +- set: function (v2) { +- if (v2 === void 0) { v2 = 0; } +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ set X(v = 0) { } ++ static set X(v2 = 0) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff new file mode 100644 index 0000000000..bef8f93898 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorWithLineTerminator.js.diff @@ -0,0 +1,21 @@ +--- old.accessorWithLineTerminator.js ++++ new.accessorWithLineTerminator.js +@@= skipped -9, +9 lines =@@ + } + + //// [accessorWithLineTerminator.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- get: function () { return 1; }, +- set: function (v) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ get x() { return 1; } ++ set x(v) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff b/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff new file mode 100644 index 0000000000..ba6a3110eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorWithRestParam.js.diff @@ -0,0 +1,35 @@ +--- old.accessorWithRestParam.js ++++ new.accessorWithRestParam.js +@@= skipped -6, +6 lines =@@ + } + + //// [accessorWithRestParam.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "X", { +- set: function () { +- var v = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- v[_i] = arguments[_i]; +- } +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C, "X", { +- set: function () { +- var v2 = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- v2[_i] = arguments[_i]; +- } +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ set X(...v) { } ++ static set X(...v2) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff b/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff new file mode 100644 index 0000000000..3b96eefe26 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessorsEmit.js.diff @@ -0,0 +1,51 @@ +--- old.accessorsEmit.js ++++ new.accessorsEmit.js +@@= skipped -17, +17 lines =@@ + } + + //// [accessorsEmit.js] +-var Result = /** @class */ (function () { +- function Result() { +- } +- return Result; +-}()); +-var Test = /** @class */ (function () { +- function Test() { +- } +- Object.defineProperty(Test.prototype, "Property", { +- get: function () { +- var x = 1; +- return null; +- }, +- enumerable: false, +- configurable: true +- }); +- return Test; +-}()); +-var Test2 = /** @class */ (function () { +- function Test2() { +- } +- Object.defineProperty(Test2.prototype, "Property", { +- get: function () { +- var x = 1; +- return null; +- }, +- enumerable: false, +- configurable: true +- }); +- return Test2; +-}()); ++class Result { ++} ++class Test { ++ get Property() { ++ var x = 1; ++ return null; ++ } ++} ++class Test2 { ++ get Property() { ++ var x = 1; ++ return null; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt index 89cd98a0a0..9a3e5a8c36 100644 --- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.errors.txt @@ -9,7 +9,7 @@ accessorsInAmbientContext.ts(16,21): error TS1183: An implementation cannot be d ==== accessorsInAmbientContext.ts (8 errors) ==== - declare module M { + declare namespace M { class C { get X() { return 1; } ~ diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js index 05daedd495..73122973c5 100644 --- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js +++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/accessorsInAmbientContext.ts] //// //// [accessorsInAmbientContext.ts] -declare module M { +declare namespace M { class C { get X() { return 1; } set X(v) { } diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols index ae20eb27ee..57281be161 100644 --- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols +++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/accessorsInAmbientContext.ts] //// === accessorsInAmbientContext.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(accessorsInAmbientContext.ts, 0, 0)) class C { ->C : Symbol(C, Decl(accessorsInAmbientContext.ts, 0, 18)) +>C : Symbol(C, Decl(accessorsInAmbientContext.ts, 0, 21)) get X() { return 1; } >X : Symbol(C.X, Decl(accessorsInAmbientContext.ts, 1, 13), Decl(accessorsInAmbientContext.ts, 2, 29)) diff --git a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types index 8f202b5af9..fd535eee97 100644 --- a/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types +++ b/testdata/baselines/reference/submodule/compiler/accessorsInAmbientContext.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/accessorsInAmbientContext.ts] //// === accessorsInAmbientContext.ts === -declare module M { +declare namespace M { >M : typeof M class C { diff --git a/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff new file mode 100644 index 0000000000..8a42536c9e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_error-cases.js.diff @@ -0,0 +1,45 @@ +--- old.accessors_spec_section-4.5_error-cases.js ++++ new.accessors_spec_section-4.5_error-cases.js +@@= skipped -15, +15 lines =@@ + } + + //// [accessors_spec_section-4.5_error-cases.js] +-var LanguageSpec_section_4_5_error_cases = /** @class */ (function () { +- function LanguageSpec_section_4_5_error_cases() { +- } +- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterFirst", { +- get: function () { return ""; }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedSetter_SetterLast", { +- get: function () { return ""; }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterFirst", { +- get: function () { return ""; }, +- set: function (aStr) { aStr = 0; }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_error_cases.prototype, "AnnotatedGetter_GetterLast", { +- get: function () { return ""; }, +- set: function (aStr) { aStr = 0; }, +- enumerable: false, +- configurable: true +- }); +- return LanguageSpec_section_4_5_error_cases; +-}()); ++class LanguageSpec_section_4_5_error_cases { ++ set AnnotatedSetter_SetterFirst(a) { } ++ get AnnotatedSetter_SetterFirst() { return ""; } ++ get AnnotatedSetter_SetterLast() { return ""; } ++ set AnnotatedSetter_SetterLast(a) { } ++ get AnnotatedGetter_GetterFirst() { return ""; } ++ set AnnotatedGetter_GetterFirst(aStr) { aStr = 0; } ++ set AnnotatedGetter_GetterLast(aStr) { aStr = 0; } ++ get AnnotatedGetter_GetterLast() { return ""; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff new file mode 100644 index 0000000000..9f7d724a66 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/accessors_spec_section-4.5_inference.js.diff @@ -0,0 +1,92 @@ +--- old.accessors_spec_section-4.5_inference.js ++++ new.accessors_spec_section-4.5_inference.js +@@= skipped -26, +26 lines =@@ + } + + //// [accessors_spec_section-4.5_inference.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var LanguageSpec_section_4_5_inference = /** @class */ (function () { +- function LanguageSpec_section_4_5_inference() { +- } +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredGetterFromSetterAnnotation_GetterFirst", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredFromGetter_SetterFirst", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(LanguageSpec_section_4_5_inference.prototype, "InferredSetterFromGetterAnnotation_GetterFirst", { +- get: function () { return new B(); }, +- set: function (a) { }, +- enumerable: false, +- configurable: true +- }); +- return LanguageSpec_section_4_5_inference; +-}()); ++class A { ++} ++class B extends A { ++} ++class LanguageSpec_section_4_5_inference { ++ set InferredGetterFromSetterAnnotation(a) { } ++ get InferredGetterFromSetterAnnotation() { return new B(); } ++ get InferredGetterFromSetterAnnotation_GetterFirst() { return new B(); } ++ set InferredGetterFromSetterAnnotation_GetterFirst(a) { } ++ get InferredFromGetter() { return new B(); } ++ set InferredFromGetter(a) { } ++ set InferredFromGetter_SetterFirst(a) { } ++ get InferredFromGetter_SetterFirst() { return new B(); } ++ set InferredSetterFromGetterAnnotation(a) { } ++ get InferredSetterFromGetterAnnotation() { return new B(); } ++ get InferredSetterFromGetterAnnotation_GetterFirst() { return new B(); } ++ set InferredSetterFromGetterAnnotation_GetterFirst(a) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff b/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff index bd54a55b29..4030e61cb2 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasAssignments.js.diff @@ -1,11 +1,17 @@ --- old.aliasAssignments.js +++ new.aliasAssignments.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.someClass = void 0; - class someClass { +-var someClass = /** @class */ (function () { +- function someClass() { +- } +- return someClass; +-}()); ++class someClass { + someData; - } ++} exports.someClass = someClass; //// [aliasAssignments_1.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt index d8842b18de..dbd6ea51ef 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/aliasBug.errors.txt @@ -2,11 +2,11 @@ aliasBug.ts(16,15): error TS2694: Namespace 'foo.bar.baz' has no exported member ==== aliasBug.ts (1 errors) ==== - module foo { + namespace foo { export class Provide { } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} } import provide = foo; diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js b/testdata/baselines/reference/submodule/compiler/aliasBug.js index 7c8e941cb5..2c496fe1a0 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasBug.js +++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/aliasBug.ts] //// //// [aliasBug.ts] -module foo { +namespace foo { export class Provide { } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} } import provide = foo; diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff index 1906307412..d143ec3acb 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff @@ -1,6 +1,31 @@ --- old.aliasBug.js +++ new.aliasBug.js -@@= skipped -36, +36 lines =@@ +@@= skipped -23, +23 lines =@@ + //// [aliasBug.js] + var foo; + (function (foo) { +- var Provide = /** @class */ (function () { +- function Provide() { +- } +- return Provide; +- }()); ++ class Provide { ++ } + foo.Provide = Provide; +- var bar; ++ let bar; + (function (bar) { +- var baz; ++ let baz; + (function (baz) { +- var boo = /** @class */ (function () { +- function boo() { +- } +- return boo; +- }()); ++ class boo { ++ } + baz.boo = boo; })(baz = bar.baz || (bar.baz = {})); })(bar = foo.bar || (foo.bar = {})); })(foo || (foo = {})); diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.symbols b/testdata/baselines/reference/submodule/compiler/aliasBug.symbols index af29dc0302..0676ffa8e2 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasBug.symbols +++ b/testdata/baselines/reference/submodule/compiler/aliasBug.symbols @@ -1,17 +1,17 @@ //// [tests/cases/compiler/aliasBug.ts] //// === aliasBug.ts === -module foo { +namespace foo { >foo : Symbol(foo, Decl(aliasBug.ts, 0, 0)) export class Provide { ->Provide : Symbol(Provide, Decl(aliasBug.ts, 0, 12)) +>Provide : Symbol(Provide, Decl(aliasBug.ts, 0, 15)) } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} >bar : Symbol(bar, Decl(aliasBug.ts, 2, 5)) ->baz : Symbol(baz, Decl(aliasBug.ts, 4, 23)) ->boo : Symbol(boo, Decl(aliasBug.ts, 4, 43)) +>baz : Symbol(baz, Decl(aliasBug.ts, 4, 26)) +>boo : Symbol(boo, Decl(aliasBug.ts, 4, 49)) } import provide = foo; @@ -22,13 +22,13 @@ import booz = foo.bar.baz; >booz : Symbol(booz, Decl(aliasBug.ts, 7, 21)) >foo : Symbol(foo, Decl(aliasBug.ts, 0, 0)) >bar : Symbol(provide.bar, Decl(aliasBug.ts, 2, 5)) ->baz : Symbol(booz, Decl(aliasBug.ts, 4, 23)) +>baz : Symbol(booz, Decl(aliasBug.ts, 4, 26)) var p = new provide.Provide(); >p : Symbol(p, Decl(aliasBug.ts, 10, 3)) ->provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) >provide : Symbol(provide, Decl(aliasBug.ts, 5, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) function use() { >use : Symbol(use, Decl(aliasBug.ts, 10, 30)) @@ -36,12 +36,12 @@ function use() { var p1: provide.Provide; // error here, but should be okay >p1 : Symbol(p1, Decl(aliasBug.ts, 13, 5)) >provide : Symbol(provide, Decl(aliasBug.ts, 5, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) var p2: foo.Provide; >p2 : Symbol(p2, Decl(aliasBug.ts, 14, 5)) >foo : Symbol(foo, Decl(aliasBug.ts, 0, 0)) ->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) var p3:booz.bar; >p3 : Symbol(p3, Decl(aliasBug.ts, 15, 5)) @@ -50,8 +50,8 @@ function use() { var p22 = new provide.Provide(); >p22 : Symbol(p22, Decl(aliasBug.ts, 16, 5)) ->provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>provide.Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) >provide : Symbol(provide, Decl(aliasBug.ts, 5, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasBug.ts, 0, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.types b/testdata/baselines/reference/submodule/compiler/aliasBug.types index ed860ce259..cd5f1cd137 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasBug.types +++ b/testdata/baselines/reference/submodule/compiler/aliasBug.types @@ -1,14 +1,14 @@ //// [tests/cases/compiler/aliasBug.ts] //// === aliasBug.ts === -module foo { +namespace foo { >foo : typeof foo export class Provide { >Provide : Provide } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} >bar : typeof bar >baz : typeof baz >boo : boo diff --git a/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff index 78ff4b84b6..061be475dd 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasDoesNotDuplicateSignatures.js.diff @@ -7,5 +7,7 @@ -var demoModule_1 = require("demoModule"); +const demoModule_1 = require("demoModule"); // Assign an incorrect type here to see the type of 'f'. - let x1 = demoNS.f; - let x2 = demoModule_1.f; \ No newline at end of file +-var x1 = demoNS.f; +-var x2 = demoModule_1.f; ++let x1 = demoNS.f; ++let x2 = demoModule_1.f; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt index 5e94cd3c9a..fb11944a2e 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.errors.txt @@ -8,10 +8,10 @@ aliasErrors.ts(26,15): error TS2694: Namespace 'foo.bar.baz' has no exported mem ==== aliasErrors.ts (7 errors) ==== - module foo { + namespace foo { export class Provide { } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} } import provide = foo; diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js b/testdata/baselines/reference/submodule/compiler/aliasErrors.js index dc63511f5a..5dc2cbc2b6 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js @@ -1,10 +1,10 @@ //// [tests/cases/compiler/aliasErrors.ts] //// //// [aliasErrors.ts] -module foo { +namespace foo { export class Provide { } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} } import provide = foo; diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff index 24b597fbc2..80f19fc2ce 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff @@ -1,6 +1,31 @@ --- old.aliasErrors.js +++ new.aliasErrors.js -@@= skipped -47, +47 lines =@@ +@@= skipped -34, +34 lines =@@ + //// [aliasErrors.js] + var foo; + (function (foo) { +- var Provide = /** @class */ (function () { +- function Provide() { +- } +- return Provide; +- }()); ++ class Provide { ++ } + foo.Provide = Provide; +- var bar; ++ let bar; + (function (bar) { +- var baz; ++ let baz; + (function (baz) { +- var boo = /** @class */ (function () { +- function boo() { +- } +- return boo; +- }()); ++ class boo { ++ } + baz.boo = boo; })(baz = bar.baz || (bar.baz = {})); })(bar = foo.bar || (foo.bar = {})); })(foo || (foo = {})); diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols index e0f0f38130..f009b2d233 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols @@ -1,16 +1,16 @@ //// [tests/cases/compiler/aliasErrors.ts] //// === aliasErrors.ts === -module foo { +namespace foo { >foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0)) export class Provide { ->Provide : Symbol(Provide, Decl(aliasErrors.ts, 0, 12)) +>Provide : Symbol(Provide, Decl(aliasErrors.ts, 0, 15)) } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} >bar : Symbol(bar, Decl(aliasErrors.ts, 2, 5)) ->baz : Symbol(baz, Decl(aliasErrors.ts, 3, 23)) ->boo : Symbol(boo, Decl(aliasErrors.ts, 3, 43)) +>baz : Symbol(baz, Decl(aliasErrors.ts, 3, 26)) +>boo : Symbol(boo, Decl(aliasErrors.ts, 3, 49)) } import provide = foo; @@ -21,7 +21,7 @@ import booz = foo.bar.baz; >booz : Symbol(booz, Decl(aliasErrors.ts, 6, 21)) >foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0)) >bar : Symbol(beez, Decl(aliasErrors.ts, 2, 5)) ->baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23)) +>baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26)) import beez = foo.bar; >beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26)) @@ -49,29 +49,29 @@ import r = undefined; var p = new provide.Provide(); >p : Symbol(p, Decl(aliasErrors.ts, 18, 3)) ->provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) >provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) function use() { >use : Symbol(use, Decl(aliasErrors.ts, 18, 30)) beez.baz.boo; ->beez.baz.boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 43)) ->beez.baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23)) +>beez.baz.boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 49)) +>beez.baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26)) >beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26)) ->baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23)) ->boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 43)) +>baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26)) +>boo : Symbol(booz.boo, Decl(aliasErrors.ts, 3, 49)) var p1: provide.Provide; >p1 : Symbol(p1, Decl(aliasErrors.ts, 23, 5)) >provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) var p2: foo.Provide; >p2 : Symbol(p2, Decl(aliasErrors.ts, 24, 5)) >foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0)) ->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) var p3:booz.bar; >p3 : Symbol(p3, Decl(aliasErrors.ts, 25, 5)) @@ -80,9 +80,9 @@ function use() { var p22 = new provide.Provide(); >p22 : Symbol(p22, Decl(aliasErrors.ts, 26, 5)) ->provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>provide.Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) >provide : Symbol(provide, Decl(aliasErrors.ts, 4, 1)) ->Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 12)) +>Provide : Symbol(provide.Provide, Decl(aliasErrors.ts, 0, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff index 41d7daef72..57d5febccb 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.symbols.diff @@ -6,7 +6,7 @@ >foo : Symbol(foo, Decl(aliasErrors.ts, 0, 0)) ->bar : Symbol(provide.bar, Decl(aliasErrors.ts, 2, 5)) +>bar : Symbol(beez, Decl(aliasErrors.ts, 2, 5)) - >baz : Symbol(booz, Decl(aliasErrors.ts, 3, 23)) + >baz : Symbol(booz, Decl(aliasErrors.ts, 3, 26)) import beez = foo.bar; >beez : Symbol(beez, Decl(aliasErrors.ts, 7, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.types b/testdata/baselines/reference/submodule/compiler/aliasErrors.types index c3824ddd6e..8905c060da 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasErrors.types +++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.types @@ -1,13 +1,13 @@ //// [tests/cases/compiler/aliasErrors.ts] //// === aliasErrors.ts === -module foo { +namespace foo { >foo : typeof foo export class Provide { >Provide : Provide } - export module bar { export module baz {export class boo {}}} + export namespace bar { export namespace baz {export class boo {}}} >bar : typeof bar >baz : typeof baz >boo : boo diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js index 436451a9d7..cb4f818bbe 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/aliasInaccessibleModule.ts] //// //// [aliasInaccessibleModule.ts] -module M { - module N { +namespace M { + namespace N { } export import X = N; } diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols index 642fbd88fb..8b47a71ec0 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/aliasInaccessibleModule.ts] //// === aliasInaccessibleModule.ts === -module M { +namespace M { >M : Symbol(M, Decl(aliasInaccessibleModule.ts, 0, 0)) - module N { ->N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 10)) + namespace N { +>N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 13)) } export import X = N; >X : Symbol(X, Decl(aliasInaccessibleModule.ts, 2, 5)) ->N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 10)) +>N : Symbol(N, Decl(aliasInaccessibleModule.ts, 0, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types index e6e74a6e05..95bedef94b 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/aliasInaccessibleModule.ts] //// === aliasInaccessibleModule.ts === -module M { +namespace M { >M : typeof M - module N { + namespace N { } export import X = N; >X : any diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js index 12b498bae9..979b7157bb 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// //// [aliasInaccessibleModule2.ts] -module M { - module N { +namespace M { + namespace N { class C { } diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff new file mode 100644 index 0000000000..caaf9172c9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.js.diff @@ -0,0 +1,19 @@ +--- old.aliasInaccessibleModule2.js ++++ new.aliasInaccessibleModule2.js +@@= skipped -13, +13 lines =@@ + //// [aliasInaccessibleModule2.js] + var M; + (function (M) { +- var N; ++ let N; + (function (N) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + })(N || (N = {})); + var R = N; + M.X = R; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols index a45790dfb7..d034fe3b9d 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.symbols @@ -1,20 +1,20 @@ //// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// === aliasInaccessibleModule2.ts === -module M { +namespace M { >M : Symbol(M, Decl(aliasInaccessibleModule2.ts, 0, 0)) - module N { ->N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 10)) + namespace N { +>N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 13)) class C { ->C : Symbol(C, Decl(aliasInaccessibleModule2.ts, 1, 14)) +>C : Symbol(C, Decl(aliasInaccessibleModule2.ts, 1, 17)) } } import R = N; >R : Symbol(R, Decl(aliasInaccessibleModule2.ts, 5, 5)) ->N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 10)) +>N : Symbol(N, Decl(aliasInaccessibleModule2.ts, 0, 13)) export import X = R; >X : Symbol(X, Decl(aliasInaccessibleModule2.ts, 6, 17)) diff --git a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types index 178cd768d6..bc2337a744 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types +++ b/testdata/baselines/reference/submodule/compiler/aliasInaccessibleModule2.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/aliasInaccessibleModule2.ts] //// === aliasInaccessibleModule2.ts === -module M { +namespace M { >M : typeof M - module N { + namespace N { >N : typeof N class C { diff --git a/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff b/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff index 99893034bd..5147b27857 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasInstantiationExpressionGenericIntersectionNoCrash1.js.diff @@ -5,7 +5,12 @@ //// [aliasInstantiationExpressionGenericIntersectionNoCrash1.js] -"use strict"; - class ErrImpl { +-var ErrImpl = /** @class */ (function () { +- function ErrImpl() { +- } +- return ErrImpl; +-}()); ++class ErrImpl { + e; - } ++} e; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff b/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff index 5f3c71a237..c36c849ac2 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js.diff @@ -6,6 +6,11 @@ //// [aliasOfGenericFunctionWithRestBehavedSameAsUnaliased.js] -"use strict"; -// the type printback for every `test` below should be "y" - let check = "y"; - let check1 = "y"; - let check2 = "y"; \ No newline at end of file +-var check = "y"; +-var check1 = "y"; +-var check2 = "y"; +-var check3 = "y"; ++let check = "y"; ++let check1 = "y"; ++let check2 = "y"; ++let check3 = "y"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt index 69493aecad..327faccff8 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.errors.txt @@ -13,7 +13,7 @@ aliasOnMergedModuleInterface_1.ts(5,16): error TS2708: Cannot use namespace 'foo ==== aliasOnMergedModuleInterface_0.ts (0 errors) ==== declare module "foo" { - module B { + namespace B { export interface A { } } diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js index f1b78e4ef5..e7cac961b6 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js +++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.js @@ -3,7 +3,7 @@ //// [aliasOnMergedModuleInterface_0.ts] declare module "foo" { - module B { + namespace B { export interface A { } } diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols index 3cda351469..6544197e32 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols +++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.symbols @@ -17,17 +17,17 @@ z.bar("hello"); // This should be ok var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be error >x : Symbol(x, Decl(aliasOnMergedModuleInterface_1.ts, 4, 3)) >foo : Symbol(foo, Decl(aliasOnMergedModuleInterface_1.ts, 0, 0)) ->A : Symbol(foo.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14)) +>A : Symbol(foo.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17)) === aliasOnMergedModuleInterface_0.ts === declare module "foo" >"foo" : Symbol("foo", Decl(aliasOnMergedModuleInterface_0.ts, 0, 0)) { - module B { + namespace B { >B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5)) export interface A { ->A : Symbol(A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14)) +>A : Symbol(A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17)) } } interface B { @@ -37,7 +37,7 @@ declare module "foo" >bar : Symbol(B.bar, Decl(aliasOnMergedModuleInterface_0.ts, 6, 17)) >name : Symbol(name, Decl(aliasOnMergedModuleInterface_0.ts, 7, 12)) >B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5)) ->A : Symbol(B.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 14)) +>A : Symbol(B.A, Decl(aliasOnMergedModuleInterface_0.ts, 2, 17)) } export = B; >B : Symbol(B, Decl(aliasOnMergedModuleInterface_0.ts, 1, 1), Decl(aliasOnMergedModuleInterface_0.ts, 5, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types index a8653dcc88..9827b8c929 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types +++ b/testdata/baselines/reference/submodule/compiler/aliasOnMergedModuleInterface.types @@ -28,7 +28,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err declare module "foo" >"foo" : typeof import("foo") { - module B { + namespace B { export interface A { } } diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff index e816863525..c6295649f3 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInAccessorsOfClass.js.diff @@ -1,28 +1,75 @@ --- old.aliasUsageInAccessorsOfClass.js +++ new.aliasUsageInAccessorsOfClass.js -@@= skipped -31, +31 lines =@@ +@@= skipped -30, +30 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsage1_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsage1_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsage1_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsage1_main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var moduleA = require("./aliasUsage1_moduleA"); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- Object.defineProperty(C2.prototype, "A", { +- get: function () { +- return this.x; +- }, +- set: function (x) { +- x = moduleA; +- }, +- enumerable: false, +- configurable: true +- }); +- return C2; +-}()); +const moduleA = require("./aliasUsage1_moduleA"); - class C2 { ++class C2 { + x; - get A() { - return this.x; - } \ No newline at end of file ++ get A() { ++ return this.x; ++ } ++ set A(x) { ++ x = moduleA; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff index 7db6c429c0..7f06685666 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInArray.js.diff @@ -1,20 +1,48 @@ --- old.aliasUsageInArray.js +++ new.aliasUsageInArray.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInArray_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInArray_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInArray_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInArray_main.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff index cc771acb3a..bad752b6ea 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInFunctionExpression.js.diff @@ -1,25 +1,55 @@ --- old.aliasUsageInFunctionExpression.js +++ new.aliasUsageInFunctionExpression.js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInFunctionExpression_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInFunctionExpression_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInFunctionExpression_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInFunctionExpression_main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var moduleA = require("./aliasUsageInFunctionExpression_moduleA"); +-var f = function (x) { return x; }; +-f = function (x) { return moduleA; }; +const moduleA = require("./aliasUsageInFunctionExpression_moduleA"); - var f = (x) => x; - f = (x) => moduleA; \ No newline at end of file ++var f = (x) => x; ++f = (x) => moduleA; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff index 5de3c24e3f..aaf1263831 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInGenericFunction.js.diff @@ -1,20 +1,48 @@ --- old.aliasUsageInGenericFunction.js +++ new.aliasUsageInGenericFunction.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInGenericFunction_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInGenericFunction_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInGenericFunction_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInGenericFunction_main.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff index 32d8707f5d..b302008a97 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInIndexerOfClass.js.diff @@ -1,32 +1,68 @@ --- old.aliasUsageInIndexerOfClass.js +++ new.aliasUsageInIndexerOfClass.js -@@= skipped -30, +30 lines =@@ +@@= skipped -29, +29 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInIndexerOfClass_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInIndexerOfClass_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInIndexerOfClass_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInIndexerOfClass_main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var moduleA = require("./aliasUsageInIndexerOfClass_moduleA"); -+const moduleA = require("./aliasUsageInIndexerOfClass_moduleA"); - class N { -- constructor() { +-var N = /** @class */ (function () { +- function N() { - this.x = moduleA; - } +- return N; +-}()); +-var N2 = /** @class */ (function () { +- function N2() { +- } +- return N2; +-}()); ++const moduleA = require("./aliasUsageInIndexerOfClass_moduleA"); ++class N { + x = moduleA; - } - class N2 { ++} ++class N2 { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff index 906bac9bc4..f2f4d3b02c 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInObjectLiteral.js.diff @@ -1,20 +1,48 @@ --- old.aliasUsageInObjectLiteral.js +++ new.aliasUsageInObjectLiteral.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInObjectLiteral_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInObjectLiteral_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInObjectLiteral_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInObjectLiteral_main.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff index 2770714897..0259cbfab3 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInOrExpression.js.diff @@ -1,20 +1,48 @@ --- old.aliasUsageInOrExpression.js +++ new.aliasUsageInOrExpression.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInOrExpression_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInOrExpression_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInOrExpression_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInOrExpression_main.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff index 47986a8d15..a460d7e62a 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInTypeArgumentOfExtendsClause.js.diff @@ -1,33 +1,86 @@ --- old.aliasUsageInTypeArgumentOfExtendsClause.js +++ new.aliasUsageInTypeArgumentOfExtendsClause.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInTypeArgumentOfExtendsClause_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInTypeArgumentOfExtendsClause_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [aliasUsageInTypeArgumentOfExtendsClause_main.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA"); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.x = moduleA; +- return _this; +- } +- return D; +-}(C)); +const moduleA = require("./aliasUsageInTypeArgumentOfExtendsClause_moduleA"); - class C { ++class C { + x; - } - class D extends C { -- constructor() { -- super(...arguments); -- this.x = moduleA; -- } ++} ++class D extends C { + x = moduleA; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff index f2b32cfcab..189417c831 100644 --- a/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff +++ b/testdata/baselines/reference/submodule/compiler/aliasUsageInVarAssignment.js.diff @@ -1,18 +1,48 @@ --- old.aliasUsageInVarAssignment.js +++ new.aliasUsageInVarAssignment.js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [aliasUsageInVarAssignment_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./aliasUsageInVarAssignment_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./aliasUsageInVarAssignment_backbone"); - class VisualizationModel extends Backbone.Model { - } - exports.VisualizationModel = VisualizationModel; \ No newline at end of file ++class VisualizationModel extends Backbone.Model { ++} + exports.VisualizationModel = VisualizationModel; + //// [aliasUsageInVarAssignment_main.js] + "use strict"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff b/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff index 467ca1a9f4..f9be5a59b2 100644 --- a/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/allowImportClausesToMergeWithTypes.js.diff @@ -7,16 +7,19 @@ -var b_1 = require("./b"); +const b_1 = require("./b"); exports.default = b_1.default; - const x = { x: "" }; +-var x = { x: "" }; ++const x = { x: "" }; b_1.default; //// [index.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var a_1 = require("./a"); +-var x = { x: "" }; +const a_1 = require("./a"); - const x = { x: "" }; ++const x = { x: "" }; a_1.default; -var b_1 = require("./b"); +const b_1 = require("./b"); b_1.default; - const y = x; \ No newline at end of file +-var y = x; ++const y = x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff index 44a7593278..419efd674f 100644 --- a/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff +++ b/testdata/baselines/reference/submodule/compiler/allowJscheckJsTypeParameterNoCrash.js.diff @@ -8,4 +8,12 @@ +const func_1 = require("./func"); // hover on vextend exports.a = (0, func_1.vextend)({ - watch: { \ No newline at end of file + watch: { +- data1: function (val) { ++ data1(val) { + this.data2 = 1; + }, +- data2: function (val) { }, ++ data2(val) { }, + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt index d3fa738698..d073999d24 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.errors.txt @@ -2,7 +2,7 @@ alwaysStrictModule.ts(3,13): error TS1100: Invalid use of 'arguments' in strict ==== alwaysStrictModule.ts (1 errors) ==== - module M { + namespace M { export function f() { var arguments = []; ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js index 1dd397d5f4..ffdb4d0e98 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/alwaysStrictModule.ts] //// //// [alwaysStrictModule.ts] -module M { +namespace M { export function f() { var arguments = []; } diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols index 8e3f76ef47..5dd9a1aa25 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/alwaysStrictModule.ts] //// === alwaysStrictModule.ts === -module M { +namespace M { >M : Symbol(M, Decl(alwaysStrictModule.ts, 0, 0)) export function f() { ->f : Symbol(f, Decl(alwaysStrictModule.ts, 0, 10)) +>f : Symbol(f, Decl(alwaysStrictModule.ts, 0, 13)) var arguments = []; >arguments : Symbol(arguments, Decl(alwaysStrictModule.ts, 2, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types index 639c482bc3..827ceaa216 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/alwaysStrictModule.ts] //// === alwaysStrictModule.ts === -module M { +namespace M { >M : typeof M export function f() { diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt index eae1ba1ed9..5cc7c385fc 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.errors.txt @@ -5,7 +5,7 @@ b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. !!! error TS5102: Option 'outFile' has been removed. Please remove it from your configuration. ==== a.ts (1 errors) ==== - module M { + namespace M { export function f() { var arguments = []; ~~~~~~~~~ @@ -14,7 +14,7 @@ b.ts(3,13): error TS1100: Invalid use of 'arguments' in strict mode. } ==== b.ts (1 errors) ==== - module M { + namespace M { export function f2() { var arguments = []; ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols index 43ad606a40..b56aa3f3af 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/alwaysStrictModule2.ts] //// === a.ts === -module M { +namespace M { >M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) export function f() { ->f : Symbol(f, Decl(a.ts, 0, 10)) +>f : Symbol(f, Decl(a.ts, 0, 13)) var arguments = []; >arguments : Symbol(arguments, Decl(a.ts, 2, 11)) @@ -13,11 +13,11 @@ module M { } === b.ts === -module M { +namespace M { >M : Symbol(M, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0)) export function f2() { ->f2 : Symbol(f2, Decl(b.ts, 0, 10)) +>f2 : Symbol(f2, Decl(b.ts, 0, 13)) var arguments = []; >arguments : Symbol(arguments, Decl(b.ts, 2, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types index ddf13f957e..e96a6a9be3 100644 --- a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/alwaysStrictModule2.ts] //// === a.ts === -module M { +namespace M { >M : typeof M export function f() { @@ -14,7 +14,7 @@ module M { } === b.ts === -module M { +namespace M { >M : typeof M export function f2() { diff --git a/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff new file mode 100644 index 0000000000..543dd479ff --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/alwaysStrictModule3.js.diff @@ -0,0 +1,8 @@ +--- old.alwaysStrictModule3.js ++++ new.alwaysStrictModule3.js +@@= skipped -5, +5 lines =@@ + + //// [alwaysStrictModule3.js] + // module ES2015 +-export var a = 1; ++export const a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff new file mode 100644 index 0000000000..7ffad08432 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.js.diff @@ -0,0 +1,39 @@ +--- old.ambientConstLiterals.js ++++ new.ambientConstLiterals.js +@@= skipped -33, +33 lines =@@ + E[E["C"] = 2] = "C"; + E[E["non identifier"] = 3] = "non identifier"; + })(E || (E = {})); +-var c1 = "abc"; +-var c2 = 123; +-var c3 = c1; +-var c4 = c2; +-var c5 = f(123); +-var c6 = f(-123); +-var c7 = true; +-var c8 = E.A; +-var c8b = E["non identifier"]; +-var c9 = { x: "abc" }; +-var c10 = [123]; +-var c11 = "abc" + "def"; +-var c12 = 123 + 456; +-var c13 = Math.random() > 0.5 ? "abc" : "def"; +-var c14 = Math.random() > 0.5 ? 123 : 456; ++const c1 = "abc"; ++const c2 = 123; ++const c3 = c1; ++const c4 = c2; ++const c5 = f(123); ++const c6 = f(-123); ++const c7 = true; ++const c8 = E.A; ++const c8b = E["non identifier"]; ++const c9 = { x: "abc" }; ++const c10 = [123]; ++const c11 = "abc" + "def"; ++const c12 = 123 + 456; ++const c13 = Math.random() > 0.5 ? "abc" : "def"; ++const c14 = Math.random() > 0.5 ? 123 : 456; + + + //// [ambientConstLiterals.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff new file mode 100644 index 0000000000..e0cba3da91 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambientConstLiterals.symbols.diff @@ -0,0 +1,16 @@ +--- old.ambientConstLiterals.symbols ++++ new.ambientConstLiterals.symbols +@@= skipped -70, +70 lines =@@ + const c13 = Math.random() > 0.5 ? "abc" : "def"; + >c13 : Symbol(c13, Decl(ambientConstLiterals.ts, 19, 5)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const c14 = Math.random() > 0.5 ? 123 : 456; + >c14 : Symbol(c14, Decl(ambientConstLiterals.ts, 20, 5)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js index 91b0518200..59e6b64781 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// //// [ambientEnumElementInitializer6.ts] -declare module M { +declare namespace M { enum E { e = 3 } diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols index 47eb704911..26dce152cd 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// === ambientEnumElementInitializer6.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(ambientEnumElementInitializer6.ts, 0, 0)) enum E { ->E : Symbol(E, Decl(ambientEnumElementInitializer6.ts, 0, 18)) +>E : Symbol(E, Decl(ambientEnumElementInitializer6.ts, 0, 21)) e = 3 >e : Symbol(E.e, Decl(ambientEnumElementInitializer6.ts, 1, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types index f852e992be..f9372be1e6 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types +++ b/testdata/baselines/reference/submodule/compiler/ambientEnumElementInitializer6.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientEnumElementInitializer6.ts] //// === ambientEnumElementInitializer6.ts === -declare module M { +declare namespace M { >M : typeof M enum E { diff --git a/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff b/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff new file mode 100644 index 0000000000..6c27892c52 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambientExportDefaultErrors.types.diff @@ -0,0 +1,19 @@ +--- old.ambientExportDefaultErrors.types ++++ new.ambientExportDefaultErrors.types +@@= skipped -31, +31 lines =@@ + >"indirect" : typeof import("indirect") + + export default typeof Foo.default; +->typeof Foo.default : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof Foo.default : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >Foo.default : number + >Foo : typeof Foo + >default : number +@@= skipped -12, +12 lines =@@ + >"indirect2" : typeof import("indirect2") + + export = typeof Foo2; +->typeof Foo2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof Foo2 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >Foo2 : number + } diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.js b/testdata/baselines/reference/submodule/compiler/ambientFundule.js index deffb57f79..6ede114d99 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientFundule.js +++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.js @@ -2,7 +2,7 @@ //// [ambientFundule.ts] declare function f(); -declare module f { var x } +declare namespace f { var x } declare function f(x); //// [ambientFundule.js] diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols b/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols index b8daf73847..eacd01f572 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.symbols @@ -2,13 +2,13 @@ === ambientFundule.ts === declare function f(); ->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21)) +>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21)) -declare module f { var x } ->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21)) ->x : Symbol(x, Decl(ambientFundule.ts, 1, 22)) +declare namespace f { var x } +>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21)) +>x : Symbol(x, Decl(ambientFundule.ts, 1, 25)) declare function f(x); ->f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 26), Decl(ambientFundule.ts, 0, 21)) +>f : Symbol(f, Decl(ambientFundule.ts, 0, 0), Decl(ambientFundule.ts, 1, 29), Decl(ambientFundule.ts, 0, 21)) >x : Symbol(x, Decl(ambientFundule.ts, 2, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/ambientFundule.types b/testdata/baselines/reference/submodule/compiler/ambientFundule.types index 64681d6907..becd968c2b 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientFundule.types +++ b/testdata/baselines/reference/submodule/compiler/ambientFundule.types @@ -4,7 +4,7 @@ declare function f(); >f : typeof f -declare module f { var x } +declare namespace f { var x } >f : typeof f >x : any diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js index 5067df2a06..e4ea4d04c9 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleExports.ts] //// //// [ambientModuleExports.ts] -declare module Foo { +declare namespace Foo { function a():void; var b:number; class C {} @@ -11,7 +11,7 @@ Foo.a(); Foo.b; var c = new Foo.C(); -declare module Foo2 { +declare namespace Foo2 { export function a(): void; export var b: number; export class C { } diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols index 1fdab327d7..1f338c067f 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/ambientModuleExports.ts] //// === ambientModuleExports.ts === -declare module Foo { +declare namespace Foo { >Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0)) function a():void; ->a : Symbol(a, Decl(ambientModuleExports.ts, 0, 20)) +>a : Symbol(a, Decl(ambientModuleExports.ts, 0, 23)) var b:number; >b : Symbol(b, Decl(ambientModuleExports.ts, 2, 4)) @@ -15,9 +15,9 @@ declare module Foo { } Foo.a(); ->Foo.a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 20)) +>Foo.a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 23)) >Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0)) ->a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 20)) +>a : Symbol(Foo.a, Decl(ambientModuleExports.ts, 0, 23)) Foo.b; >Foo.b : Symbol(Foo.b, Decl(ambientModuleExports.ts, 2, 4)) @@ -30,11 +30,11 @@ var c = new Foo.C(); >Foo : Symbol(Foo, Decl(ambientModuleExports.ts, 0, 0)) >C : Symbol(Foo.C, Decl(ambientModuleExports.ts, 2, 14)) -declare module Foo2 { +declare namespace Foo2 { >Foo2 : Symbol(Foo2, Decl(ambientModuleExports.ts, 8, 20)) export function a(): void; ->a : Symbol(a, Decl(ambientModuleExports.ts, 10, 21)) +>a : Symbol(a, Decl(ambientModuleExports.ts, 10, 24)) export var b: number; >b : Symbol(b, Decl(ambientModuleExports.ts, 12, 14)) @@ -44,9 +44,9 @@ declare module Foo2 { } Foo2.a(); ->Foo2.a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 21)) +>Foo2.a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 24)) >Foo2 : Symbol(Foo2, Decl(ambientModuleExports.ts, 8, 20)) ->a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 21)) +>a : Symbol(Foo2.a, Decl(ambientModuleExports.ts, 10, 24)) Foo2.b; >Foo2.b : Symbol(Foo2.b, Decl(ambientModuleExports.ts, 12, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types index 57f727d333..a22bbc3599 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleExports.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleExports.ts] //// === ambientModuleExports.ts === -declare module Foo { +declare namespace Foo { >Foo : typeof Foo function a():void; @@ -32,7 +32,7 @@ var c = new Foo.C(); >Foo : typeof Foo >C : typeof Foo.C -declare module Foo2 { +declare namespace Foo2 { >Foo2 : typeof Foo2 export function a(): void; diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js index 45a7d6e06e..89af25fa66 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// //// [ambientModuleWithClassDeclarationWithExtends.ts] -declare module foo { +declare namespace foo { class A { } class B extends A { } } diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols index f5161339f6..2f9fdbbd54 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// === ambientModuleWithClassDeclarationWithExtends.ts === -declare module foo { +declare namespace foo { >foo : Symbol(foo, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 0)) class A { } ->A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 20)) +>A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 23)) class B extends A { } >B : Symbol(B, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 1, 15)) ->A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 20)) +>A : Symbol(A, Decl(ambientModuleWithClassDeclarationWithExtends.ts, 0, 23)) } diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types index bb42378d64..532cc461bc 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithClassDeclarationWithExtends.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleWithClassDeclarationWithExtends.ts] //// === ambientModuleWithClassDeclarationWithExtends.ts === -declare module foo { +declare namespace foo { >foo : typeof foo class A { } diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js index c57ef31e0c..e2fce1a4cd 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// //// [ambientModuleWithTemplateLiterals.ts] -declare module Foo { +declare namespace Foo { enum Bar { a = `1`, b = '2', diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols index df96ad10c3..b832ba305c 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// === ambientModuleWithTemplateLiterals.ts === -declare module Foo { +declare namespace Foo { >Foo : Symbol(Foo, Decl(ambientModuleWithTemplateLiterals.ts, 0, 0)) enum Bar { ->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20)) +>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23)) a = `1`, >a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14)) @@ -26,17 +26,17 @@ declare module Foo { export const c = Bar.a; >c : Symbol(c, Decl(ambientModuleWithTemplateLiterals.ts, 10, 16)) >Bar.a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14)) ->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20)) +>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23)) >a : Symbol(Bar.a, Decl(ambientModuleWithTemplateLiterals.ts, 1, 14)) export const d = Bar['b']; >d : Symbol(d, Decl(ambientModuleWithTemplateLiterals.ts, 11, 16)) ->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20)) +>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23)) >'b' : Symbol(Bar.b, Decl(ambientModuleWithTemplateLiterals.ts, 2, 16)) export const e = Bar[`c`]; >e : Symbol(e, Decl(ambientModuleWithTemplateLiterals.ts, 12, 16)) ->Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 20)) +>Bar : Symbol(Bar, Decl(ambientModuleWithTemplateLiterals.ts, 0, 23)) >`c` : Symbol(Bar.c, Decl(ambientModuleWithTemplateLiterals.ts, 3, 16)) } diff --git a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types index a57801abb2..c2c79f0900 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types +++ b/testdata/baselines/reference/submodule/compiler/ambientModuleWithTemplateLiterals.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModuleWithTemplateLiterals.ts] //// === ambientModuleWithTemplateLiterals.ts === -declare module Foo { +declare namespace Foo { >Foo : typeof Foo enum Bar { diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.js b/testdata/baselines/reference/submodule/compiler/ambientModules.js index cea5c21436..2bf38460e6 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModules.js +++ b/testdata/baselines/reference/submodule/compiler/ambientModules.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModules.ts] //// //// [ambientModules.ts] -declare module Foo.Bar { export var foo; }; +declare namespace Foo.Bar { export var foo; }; Foo.Bar.foo = 5; //// [ambientModules.js] diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.symbols b/testdata/baselines/reference/submodule/compiler/ambientModules.symbols index 1ef6c20a4f..9190683049 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModules.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientModules.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/ambientModules.ts] //// === ambientModules.ts === -declare module Foo.Bar { export var foo; }; +declare namespace Foo.Bar { export var foo; }; >Foo : Symbol(Foo, Decl(ambientModules.ts, 0, 0)) ->Bar : Symbol(Bar, Decl(ambientModules.ts, 0, 19)) ->foo : Symbol(foo, Decl(ambientModules.ts, 0, 35)) +>Bar : Symbol(Bar, Decl(ambientModules.ts, 0, 22)) +>foo : Symbol(foo, Decl(ambientModules.ts, 0, 38)) Foo.Bar.foo = 5; ->Foo.Bar.foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 35)) ->Foo.Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 19)) +>Foo.Bar.foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 38)) +>Foo.Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 22)) >Foo : Symbol(Foo, Decl(ambientModules.ts, 0, 0)) ->Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 19)) ->foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 35)) +>Bar : Symbol(Foo.Bar, Decl(ambientModules.ts, 0, 22)) +>foo : Symbol(Foo.Bar.foo, Decl(ambientModules.ts, 0, 38)) diff --git a/testdata/baselines/reference/submodule/compiler/ambientModules.types b/testdata/baselines/reference/submodule/compiler/ambientModules.types index 601805b48d..9aa1e4b84d 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientModules.types +++ b/testdata/baselines/reference/submodule/compiler/ambientModules.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientModules.ts] //// === ambientModules.ts === -declare module Foo.Bar { export var foo; }; +declare namespace Foo.Bar { export var foo; }; >Foo : typeof Foo >Bar : typeof Bar >foo : any diff --git a/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff new file mode 100644 index 0000000000..6b2e625333 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=commonjs).js.diff @@ -0,0 +1,10 @@ +--- old.ambientRequireFunction(module=commonjs).js ++++ new.ambientRequireFunction(module=commonjs).js +@@= skipped -14, +14 lines =@@ + + //// [app.js] + /// +-var fs = require("fs"); +-var text = fs.readFileSync("/a/b/c"); ++const fs = require("fs"); ++const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff new file mode 100644 index 0000000000..dfa305a9d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambientRequireFunction(module=preserve).js.diff @@ -0,0 +1,10 @@ +--- old.ambientRequireFunction(module=preserve).js ++++ new.ambientRequireFunction(module=preserve).js +@@= skipped -14, +14 lines =@@ + + //// [app.js] + /// +-var fs = require("fs"); +-var text = fs.readFileSync("/a/b/c"); ++const fs = require("fs"); ++const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt b/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt index 8ab93c1b1f..d7af3687d5 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.errors.txt @@ -3,7 +3,7 @@ ambientStatement1.ts(4,22): error TS1039: Initializers are not allowed in ambien ==== ambientStatement1.ts (2 errors) ==== - declare module M1 { + declare namespace M1 { while(true); ~~~~~ !!! error TS1036: Statements are not allowed in ambient contexts. diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.js b/testdata/baselines/reference/submodule/compiler/ambientStatement1.js index 60e5400465..4143238a2b 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.js +++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientStatement1.ts] //// //// [ambientStatement1.ts] - declare module M1 { + declare namespace M1 { while(true); export var v1 = () => false; diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols b/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols index 408900b536..68bc6e86f6 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientStatement1.ts] //// === ambientStatement1.ts === - declare module M1 { + declare namespace M1 { >M1 : Symbol(M1, Decl(ambientStatement1.ts, 0, 0)) while(true); diff --git a/testdata/baselines/reference/submodule/compiler/ambientStatement1.types b/testdata/baselines/reference/submodule/compiler/ambientStatement1.types index 7d52415ced..f19dfa44ed 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientStatement1.types +++ b/testdata/baselines/reference/submodule/compiler/ambientStatement1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientStatement1.ts] //// === ambientStatement1.ts === - declare module M1 { + declare namespace M1 { >M1 : typeof M1 while(true); diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt index 5201538571..bef1bb8c98 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.errors.txt @@ -5,7 +5,7 @@ ambientWithStatements.ts(25,5): error TS2410: The 'with' statement is not suppor ==== ambientWithStatements.ts (4 errors) ==== - declare module M { + declare namespace M { break; ~~~~~ !!! error TS1036: Statements are not allowed in ambient contexts. diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js index c2d3d23364..d56d11b021 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js +++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientWithStatements.ts] //// //// [ambientWithStatements.ts] -declare module M { +declare namespace M { break; continue; debugger; diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols index bf545c56ea..9442562aa5 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols +++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientWithStatements.ts] //// === ambientWithStatements.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(ambientWithStatements.ts, 0, 0)) break; diff --git a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types index 6040eb295a..5a3b13ca97 100644 --- a/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types +++ b/testdata/baselines/reference/submodule/compiler/ambientWithStatements.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ambientWithStatements.ts] //// === ambientWithStatements.ts === -declare module M { +declare namespace M { >M : typeof M break; diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff new file mode 100644 index 0000000000..2d824b73c2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambiguousCallsWhereReturnTypesAgree.js.diff @@ -0,0 +1,37 @@ +--- old.ambiguousCallsWhereReturnTypesAgree.js ++++ new.ambiguousCallsWhereReturnTypesAgree.js +@@= skipped -30, +30 lines =@@ + + + //// [ambiguousCallsWhereReturnTypesAgree.js] +-var TestClass = /** @class */ (function () { +- function TestClass() { ++class TestClass { ++ bar(x) { + } +- TestClass.prototype.bar = function (x) { +- }; +- TestClass.prototype.foo = function (x) { ++ foo(x) { + this.bar(x); // should not error +- }; +- return TestClass; +-}()); +-var TestClass2 = /** @class */ (function () { +- function TestClass2() { + } +- TestClass2.prototype.bar = function (x) { ++} ++class TestClass2 { ++ bar(x) { + return 0; +- }; +- TestClass2.prototype.foo = function (x) { ++ } ++ foo(x) { + return this.bar(x); // should not error +- }; +- return TestClass2; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff new file mode 100644 index 0000000000..94c8feebc1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/ambiguousGenericAssertion1.js.diff @@ -0,0 +1,11 @@ +--- old.ambiguousGenericAssertion1.js ++++ new.ambiguousGenericAssertion1.js +@@= skipped -8, +8 lines =@@ + + //// [ambiguousGenericAssertion1.js] + function f(x) { return null; } +-var r = function (x) { return x; }; ++var r = (x) => x; + var r2 = f; // valid + var r3 = << T > (x), T; + T > f; // ambiguous, appears to the parser as a << operation \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff b/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff index b9b8f70338..93505b5478 100644 --- a/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ambiguousOverloadResolution.js.diff @@ -1,10 +1,40 @@ --- old.ambiguousOverloadResolution.js +++ new.ambiguousOverloadResolution.js -@@= skipped -13, +13 lines =@@ - class A { - } - class B extends A { +@@= skipped -10, +10 lines =@@ + var t: number = f(x, x); // Not an error + + //// [ambiguousOverloadResolution.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { ++} ++class B extends A { + x; - } ++} var x; var t = f(x, x); // Not an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff index 211600ef2e..d1e8ee35ff 100644 --- a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff +++ b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.js.diff @@ -1,29 +1,99 @@ --- old.anonClassDeclarationEmitIsAnon.js +++ new.anonClassDeclarationEmitIsAnon.js -@@= skipped -47, +47 lines =@@ +@@= skipped -35, +35 lines =@@ + + //// [wrapClass.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.wrapClass = wrapClass; + exports.Timestamped = Timestamped; + function wrapClass(param) { +- return /** @class */ (function () { +- function Wrapped() { +- } +- Wrapped.prototype.foo = function () { ++ return class Wrapped { ++ foo() { + return param; +- }; +- return Wrapped; +- }()); ++ } ++ }; } function Timestamped(Base) { - return class extends Base { -- constructor() { -- super(...arguments); -- this.timestamp = Date.now(); +- return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.timestamp = Date.now(); +- return _this; - } +- return class_1; +- }(Base)); ++ return class extends Base { + timestamp = Date.now(); - }; ++ }; } //// [index.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.TimestampedUser = exports.User = void 0; -var wrapClass_1 = require("./wrapClass"); +const wrapClass_1 = require("./wrapClass"); exports.default = (0, wrapClass_1.wrapClass)(0); // Simple class - class User { -- constructor() { +-var User = /** @class */ (function () { +- function User() { - this.name = ''; - } +- return User; +-}()); ++class User { + name = ''; - } ++} exports.User = User; - // User that is Timestamped \ No newline at end of file + // User that is Timestamped +-var TimestampedUser = /** @class */ (function (_super) { +- __extends(TimestampedUser, _super); +- function TimestampedUser() { +- return _super.call(this) || this; ++class TimestampedUser extends (0, wrapClass_1.Timestamped)(User) { ++ constructor() { ++ super(); + } +- return TimestampedUser; +-}((0, wrapClass_1.Timestamped)(User))); ++} + exports.TimestampedUser = TimestampedUser; + diff --git a/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff new file mode 100644 index 0000000000..d5da498208 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anonClassDeclarationEmitIsAnon.symbols.diff @@ -0,0 +1,11 @@ +--- old.anonClassDeclarationEmitIsAnon.symbols ++++ new.anonClassDeclarationEmitIsAnon.symbols +@@= skipped -35, +35 lines =@@ + timestamp = Date.now(); + >timestamp : Symbol((Anonymous class).timestamp, Decl(wrapClass.ts, 11, 31)) + >Date.now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) + + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.js b/testdata/baselines/reference/submodule/compiler/anonterface.js index 014edc26b6..c7e0fa4431 100644 --- a/testdata/baselines/reference/submodule/compiler/anonterface.js +++ b/testdata/baselines/reference/submodule/compiler/anonterface.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/anonterface.ts] //// //// [anonterface.ts] -module M { +namespace M { export class C { m(fn:{ (n:number):string; },n2:number):string { return fn(n2); diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.js.diff b/testdata/baselines/reference/submodule/compiler/anonterface.js.diff new file mode 100644 index 0000000000..6e6d353418 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anonterface.js.diff @@ -0,0 +1,21 @@ +--- old.anonterface.js ++++ new.anonterface.js +@@= skipped -18, +18 lines =@@ + //// [anonterface.js] + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.m = function (fn, n2) { ++ class C { ++ m(fn, n2) { + return fn(n2); +- }; +- return C; +- }()); ++ } ++ } + M.C = C; + })(M || (M = {})); + var c = new M.C(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.symbols b/testdata/baselines/reference/submodule/compiler/anonterface.symbols index 5491336c74..e7149ac3b4 100644 --- a/testdata/baselines/reference/submodule/compiler/anonterface.symbols +++ b/testdata/baselines/reference/submodule/compiler/anonterface.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/anonterface.ts] //// === anonterface.ts === -module M { +namespace M { >M : Symbol(M, Decl(anonterface.ts, 0, 0)) export class C { ->C : Symbol(C, Decl(anonterface.ts, 0, 10)) +>C : Symbol(C, Decl(anonterface.ts, 0, 13)) m(fn:{ (n:number):string; },n2:number):string { >m : Symbol(C.m, Decl(anonterface.ts, 1, 20)) @@ -22,9 +22,9 @@ module M { var c=new M.C(); >c : Symbol(c, Decl(anonterface.ts, 8, 3)) ->M.C : Symbol(M.C, Decl(anonterface.ts, 0, 10)) +>M.C : Symbol(M.C, Decl(anonterface.ts, 0, 13)) >M : Symbol(M, Decl(anonterface.ts, 0, 0)) ->C : Symbol(M.C, Decl(anonterface.ts, 0, 10)) +>C : Symbol(M.C, Decl(anonterface.ts, 0, 13)) c.m(function(n) { return "hello: "+n; },18); >c.m : Symbol(M.C.m, Decl(anonterface.ts, 1, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/anonterface.types b/testdata/baselines/reference/submodule/compiler/anonterface.types index 7427468484..9d50569455 100644 --- a/testdata/baselines/reference/submodule/compiler/anonterface.types +++ b/testdata/baselines/reference/submodule/compiler/anonterface.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/anonterface.ts] //// === anonterface.ts === -module M { +namespace M { >M : typeof M export class C { diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff index fea082a3df..12d65fe02e 100644 --- a/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff +++ b/testdata/baselines/reference/submodule/compiler/anonymousClassDeclarationDoesntPrintWithReadonly.js.diff @@ -1,10 +1,47 @@ --- old.anonymousClassDeclarationDoesntPrintWithReadonly.js +++ new.anonymousClassDeclarationDoesntPrintWithReadonly.js -@@= skipped -14, +14 lines =@@ +@@= skipped -10, +10 lines =@@ + + //// [anonymousClassDeclarationDoesntPrintWithReadonly.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); exports.X = void 0; exports.y = y; - class X { +-var X = /** @class */ (function () { +- function X(a) { ++class X { + a; - constructor(a) { ++ constructor(a) { this.a = a; - } \ No newline at end of file + } +- return X; +-}()); ++} + exports.X = X; + function y() { +- return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return class_1; +- }(X)); ++ return class extends X { ++ }; + } + diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff new file mode 100644 index 0000000000..c0cb008daf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.js.diff @@ -0,0 +1,14 @@ +--- old.anonymousClassExpression1.js ++++ new.anonymousClassExpression1.js +@@= skipped -6, +6 lines =@@ + + //// [anonymousClassExpression1.js] + function f() { +- return typeof /** @class */ (function () { +- function class_1() { +- } +- return class_1; +- }()) === "function"; ++ return typeof class { ++ } === "function"; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff new file mode 100644 index 0000000000..769c6a2a42 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression1.types.diff @@ -0,0 +1,11 @@ +--- old.anonymousClassExpression1.types ++++ new.anonymousClassExpression1.types +@@= skipped -5, +5 lines =@@ + + return typeof class {} === "function"; + >typeof class {} === "function" : boolean +->typeof class {} : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof class {} : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >class {} : typeof (Anonymous class) + >"function" : "function" + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff new file mode 100644 index 0000000000..03eef30d4b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anonymousClassExpression2.js.diff @@ -0,0 +1,31 @@ +--- old.anonymousClassExpression2.js ++++ new.anonymousClassExpression2.js +@@= skipped -24, +24 lines =@@ + // note: repros with `while (0);` too + // but it's less inscrutable and more obvious to put it *inside* the loop + while (0) { +- var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.methodA = function () { ++ class A { ++ methodA() { + this; //note: a this reference of some kind is required to trigger the bug +- }; +- return A; +- }()); +- var B = /** @class */ (function () { +- function B() { + } +- B.prototype.methodB = function () { ++ } ++ class B { ++ methodB() { + this.methodA; // error + this.methodB; // ok +- }; +- return B; +- }()); ++ } ++ } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff b/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff new file mode 100644 index 0000000000..5ac4c9eb73 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anyAndUnknownHaveFalsyComponents.js.diff @@ -0,0 +1,18 @@ +--- old.anyAndUnknownHaveFalsyComponents.js ++++ new.anyAndUnknownHaveFalsyComponents.js +@@= skipped -41, +41 lines =@@ + }; + return __assign.apply(this, arguments); + }; +-var y1 = x1 && 3; ++const y1 = x1 && 3; + function foo1() { + return __assign({ display: "block" }, (isTreeHeader1 && { + display: "flex", + })); + } +-var y2 = x2 && 3; ++const y2 = x2 && 3; + function foo2() { + return __assign({ display: "block" }, (isTreeHeader1 && { + display: "flex", \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt b/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt index cfbb06ee70..2423c2c43c 100644 --- a/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.errors.txt @@ -4,7 +4,7 @@ anyDeclare.ts(4,14): error TS2300: Duplicate identifier 'myFn'. ==== anyDeclare.ts (2 errors) ==== declare var x: any; - module myMod { + namespace myMod { var myFn; ~~~~ !!! error TS2300: Duplicate identifier 'myFn'. diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.js b/testdata/baselines/reference/submodule/compiler/anyDeclare.js index 295e93e72e..6e16859b59 100644 --- a/testdata/baselines/reference/submodule/compiler/anyDeclare.js +++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.js @@ -2,7 +2,7 @@ //// [anyDeclare.ts] declare var x: any; -module myMod { +namespace myMod { var myFn; function myFn() { } } diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols b/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols index 56d3e51027..fecba41fa2 100644 --- a/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols +++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.symbols @@ -4,7 +4,7 @@ declare var x: any; >x : Symbol(x, Decl(anyDeclare.ts, 0, 11)) -module myMod { +namespace myMod { >myMod : Symbol(myMod, Decl(anyDeclare.ts, 0, 19)) var myFn; diff --git a/testdata/baselines/reference/submodule/compiler/anyDeclare.types b/testdata/baselines/reference/submodule/compiler/anyDeclare.types index e4a7c89ba1..5b802ab688 100644 --- a/testdata/baselines/reference/submodule/compiler/anyDeclare.types +++ b/testdata/baselines/reference/submodule/compiler/anyDeclare.types @@ -4,7 +4,7 @@ declare var x: any; >x : any -module myMod { +namespace myMod { >myMod : typeof myMod var myFn; diff --git a/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff b/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff new file mode 100644 index 0000000000..64e5e74c65 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anyIdenticalToItself.js.diff @@ -0,0 +1,29 @@ +--- old.anyIdenticalToItself.js ++++ new.anyIdenticalToItself.js +@@= skipped -15, +15 lines =@@ + + //// [anyIdenticalToItself.js] + function foo(x, y) { } +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "X", { +- get: function () { +- var y; +- return y; +- }, +- set: function (v) { +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ get X() { ++ var y; ++ return y; ++ } ++ set X(v) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff new file mode 100644 index 0000000000..cadde7f29c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/anyInferenceAnonymousFunctions.js.diff @@ -0,0 +1,15 @@ +--- old.anyInferenceAnonymousFunctions.js ++++ new.anyInferenceAnonymousFunctions.js +@@= skipped -23, +23 lines =@@ + paired.reduce(function (a1, a2) { + return a1.concat({}); + }, []); +-paired.reduce(function (b1, b2) { ++paired.reduce((b1, b2) => { + return b1.concat({}); + }, []); +-paired.reduce(function (b3, b4) { return b3.concat({}); }, []); +-paired.map(function (c1) { return c1.count; }); ++paired.reduce((b3, b4) => b3.concat({}), []); ++paired.map((c1) => c1.count); + paired.map(function (c2) { return c2.count; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff b/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff new file mode 100644 index 0000000000..2c47da9455 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argsInScope.js.diff @@ -0,0 +1,22 @@ +--- old.argsInScope.js ++++ new.argsInScope.js +@@= skipped -13, +13 lines =@@ + + + //// [argsInScope.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.P = function (ii, j, k) { ++class C { ++ P(ii, j, k) { + for (var i = 0; i < arguments.length; i++) { + // WScript.Echo("param: " + arguments[i]); + } +- }; +- return C; +-}()); ++ } ++} + var c = new C(); + c.P(1, 2, 3); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff new file mode 100644 index 0000000000..ec396e8ac2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.js.diff @@ -0,0 +1,18 @@ +--- old.argumentsAsPropertyName.js ++++ new.argumentsAsPropertyName.js +@@= skipped -18, +18 lines =@@ + + //// [argumentsAsPropertyName.js] + function myFunction(myType) { +- var _loop_1 = function (i) { ++ for (let i = 0; i < 10; i++) { + use(myType.arguments[i]); + // create closure so that tsc will turn loop body into function +- var x = 5; ++ const x = 5; + [1, 2, 3].forEach(function (j) { use(x); }); +- }; +- for (var i = 0; i < 10; i++) { +- _loop_1(i); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff new file mode 100644 index 0000000000..211c0d01fd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName.symbols.diff @@ -0,0 +1,11 @@ +--- old.argumentsAsPropertyName.symbols ++++ new.argumentsAsPropertyName.symbols +@@= skipped -6, +6 lines =@@ + + arguments: Array + >arguments : Symbol(arguments, Decl(argumentsAsPropertyName.ts, 1, 15)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + declare function use(s: any); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff new file mode 100644 index 0000000000..12381631f4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsAsPropertyName2.js.diff @@ -0,0 +1,22 @@ +--- old.argumentsAsPropertyName2.js ++++ new.argumentsAsPropertyName2.js +@@= skipped -16, +16 lines =@@ + //// [argumentsAsPropertyName2.js] + // target: es5 + function foo() { +- var _loop_1 = function (x) { +- var i; ++ for (let x = 0; x < 1; ++x) { ++ let i; + [].forEach(function () { i; }); + ({ arguments: 0 }); +- ({ arguments: arguments_1 }); +- ({ arguments: arguments_1 }); +- }; +- var arguments_1 = arguments; +- for (var x = 0; x < 1; ++x) { +- _loop_1(x); ++ ({ arguments }); ++ ({ arguments: arguments }); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff new file mode 100644 index 0000000000..4e6624a5d6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.argumentsObjectIterator01_ES5.errors.txt ++++ new.argumentsObjectIterator01_ES5.errors.txt +@@= skipped -0, +0 lines =@@ +-argumentsObjectIterator01_ES5.ts(3,21): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++argumentsObjectIterator01_ES5.ts(3,21): error TS2495: Type 'IArguments' is not an array type or a string type. + + + ==== argumentsObjectIterator01_ES5.ts (1 errors) ==== +@@= skipped -5, +5 lines =@@ + let result = []; + for (let arg of arguments) { + ~~~~~~~~~ +-!!! error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2495: Type 'IArguments' is not an array type or a string type. + result.push(arg + arg); + } + return <[any, any, any]>result; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff new file mode 100644 index 0000000000..a471eefaf8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator01_ES5.js.diff @@ -0,0 +1,14 @@ +--- old.argumentsObjectIterator01_ES5.js ++++ new.argumentsObjectIterator01_ES5.js +@@= skipped -10, +10 lines =@@ + + //// [argumentsObjectIterator01_ES5.js] + function doubleAndReturnAsArray(x, y, z) { +- var result = []; +- for (var _i = 0, arguments_1 = arguments; _i < arguments_1.length; _i++) { +- var arg = arguments_1[_i]; ++ let result = []; ++ for (let arg of arguments) { + result.push(arg + arg); + } + return result; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff new file mode 100644 index 0000000000..06e834e642 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.argumentsObjectIterator02_ES5.errors.txt ++++ new.argumentsObjectIterator02_ES5.errors.txt +@@= skipped -0, +0 lines =@@ +-argumentsObjectIterator02_ES5.ts(5,21): error TS2802: Type 'ArrayIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + + ==== argumentsObjectIterator02_ES5.ts (1 errors) ==== + function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] { + let blah = arguments[Symbol.iterator]; ++ ~~~~~~ ++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + let result = []; + for (let arg of blah()) { +- ~~~~~~ +-!!! error TS2802: Type 'ArrayIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + result.push(arg + arg); + } + return <[any, any, any]>result; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff new file mode 100644 index 0000000000..739d4bd153 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.js.diff @@ -0,0 +1,16 @@ +--- old.argumentsObjectIterator02_ES5.js ++++ new.argumentsObjectIterator02_ES5.js +@@= skipped -14, +14 lines =@@ + + //// [argumentsObjectIterator02_ES5.js] + function doubleAndReturnAsArray(x, y, z) { +- var blah = arguments[Symbol.iterator]; +- var result = []; +- for (var _i = 0, _a = blah(); _i < _a.length; _i++) { +- var arg = _a[_i]; ++ let blah = arguments[Symbol.iterator]; ++ let result = []; ++ for (let arg of blah()) { + result.push(arg + arg); + } + return result; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff new file mode 100644 index 0000000000..6f8eac7933 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.symbols.diff @@ -0,0 +1,12 @@ +--- old.argumentsObjectIterator02_ES5.symbols ++++ new.argumentsObjectIterator02_ES5.symbols +@@= skipped -9, +9 lines =@@ + let blah = arguments[Symbol.iterator]; + >blah : Symbol(blah, Decl(argumentsObjectIterator02_ES5.ts, 1, 7)) + >arguments : Symbol(arguments) +->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) +->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) + + let result = []; + >result : Symbol(result, Decl(argumentsObjectIterator02_ES5.ts, 3, 7)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff new file mode 100644 index 0000000000..7db4eb52d4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator02_ES5.types.diff @@ -0,0 +1,31 @@ +--- old.argumentsObjectIterator02_ES5.types ++++ new.argumentsObjectIterator02_ES5.types +@@= skipped -7, +7 lines =@@ + >z : number + + let blah = arguments[Symbol.iterator]; +->blah : () => ArrayIterator +->arguments[Symbol.iterator] : () => ArrayIterator ++>blah : any ++>arguments[Symbol.iterator] : any + >arguments : IArguments +->Symbol.iterator : unique symbol +->Symbol : SymbolConstructor +->iterator : unique symbol ++>Symbol.iterator : any ++>Symbol : any ++>iterator : any + + let result = []; + >result : any[] +@@= skipped -13, +13 lines =@@ + + for (let arg of blah()) { + >arg : any +->blah() : ArrayIterator +->blah : () => ArrayIterator ++>blah() : any ++>blah : any + + result.push(arg + arg); + >result.push(arg + arg) : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff new file mode 100644 index 0000000000..54e90f7cb1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.argumentsObjectIterator03_ES5.errors.txt ++++ new.argumentsObjectIterator03_ES5.errors.txt +@@= skipped -0, +0 lines =@@ +-argumentsObjectIterator03_ES5.ts(2,9): error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++argumentsObjectIterator03_ES5.ts(2,9): error TS2461: Type 'IArguments' is not an array type. + + + ==== argumentsObjectIterator03_ES5.ts (1 errors) ==== + function asReversedTuple(a: number, b: string, c: boolean): [boolean, string, number] { + let [x, y, z] = arguments; + ~~~~~~~~~ +-!!! error TS2802: Type 'IArguments' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2461: Type 'IArguments' is not an array type. + + return [z, y, x]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff new file mode 100644 index 0000000000..5ae567ce07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsObjectIterator03_ES5.js.diff @@ -0,0 +1,10 @@ +--- old.argumentsObjectIterator03_ES5.js ++++ new.argumentsObjectIterator03_ES5.js +@@= skipped -10, +10 lines =@@ + + //// [argumentsObjectIterator03_ES5.js] + function asReversedTuple(a, b, c) { +- var x = arguments[0], y = arguments[1], z = arguments[2]; ++ let [x, y, z] = arguments; + return [z, y, x]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff index 814809d520..f15918274e 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsPropertyNameInJsMode1.js.diff @@ -1,6 +1,19 @@ --- old.argumentsPropertyNameInJsMode1.js +++ new.argumentsPropertyNameInJsMode1.js -@@= skipped -22, +22 lines =@@ +@@= skipped -12, +12 lines =@@ + + + //// [a.js] +-var foo = { +- f1: function (params) { } ++const foo = { ++ f1: (params) => { } + }; + function f2(x) { +- foo.f1({ x: x, arguments: [] }); ++ foo.f1({ x, arguments: [] }); + } + f2(1, 2, 3); //// [a.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff new file mode 100644 index 0000000000..371964c303 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).errors.txt.diff @@ -0,0 +1,72 @@ +--- old.argumentsSpreadRestIterables(target=es5).errors.txt ++++ new.argumentsSpreadRestIterables(target=es5).errors.txt +@@= skipped -0, +0 lines =@@ +-argumentsSpreadRestIterables.tsx(3,28): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(4,35): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(5,41): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(8,21): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(9,21): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(10,27): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(11,27): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(15,19): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(16,19): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(17,25): error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +-argumentsSpreadRestIterables.tsx(18,25): error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. +- +- +-==== argumentsSpreadRestIterables.tsx (11 errors) ==== ++argumentsSpreadRestIterables.tsx(1,22): error TS2304: Cannot find name 'Iterable'. ++argumentsSpreadRestIterables.tsx(8,21): error TS2461: Type '"hello"' is not an array type. ++argumentsSpreadRestIterables.tsx(10,27): error TS2461: Type '"hello"' is not an array type. ++argumentsSpreadRestIterables.tsx(15,19): error TS2461: Type '"hello"' is not an array type. ++argumentsSpreadRestIterables.tsx(17,25): error TS2461: Type '"hello"' is not an array type. ++ ++ ++==== argumentsSpreadRestIterables.tsx (5 errors) ==== + declare const itNum: Iterable ++ ~~~~~~~~ ++!!! error TS2304: Cannot find name 'Iterable'. + + ;(function(...rest) {})(...itNum) +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + ;(function(a, ...rest) {})('', ...itNum) +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + ;(function(a, ...rest) {})('', true, ...itNum) +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + + declare function fn1(...args: T): T; + const res1 = fn1(..."hello"); + ~~~~~~~ +-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2461: Type '"hello"' is not an array type. + const res2 = fn1(...itNum); +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + const res3 = fn1(true, ..."hello"); + ~~~~~~~ +-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2461: Type '"hello"' is not an array type. + const res4 = fn1(true, ...itNum); +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + + // repro from #52781 + declare function foo(...args: T): T; + const p1 = foo(..."hello"); + ~~~~~~~ +-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2461: Type '"hello"' is not an array type. + const p2 = foo(...itNum); +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + const p3 = foo(true, ..."hello"); + ~~~~~~~ +-!!! error TS2802: Type '"hello"' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. ++!!! error TS2461: Type '"hello"' is not an array type. + const p4 = foo(true, ...itNum); +- ~~~~~ +-!!! error TS2802: Type 'Iterable' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff new file mode 100644 index 0000000000..6a68b3a9c9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).symbols.diff @@ -0,0 +1,11 @@ +--- old.argumentsSpreadRestIterables(target=es5).symbols ++++ new.argumentsSpreadRestIterables(target=es5).symbols +@@= skipped -2, +2 lines =@@ + === argumentsSpreadRestIterables.tsx === + declare const itNum: Iterable + >itNum : Symbol(itNum, Decl(argumentsSpreadRestIterables.tsx, 0, 13)) +->Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) ++>Iterable : Symbol(Iterable) + + ;(function(...rest) {})(...itNum) + >rest : Symbol(rest, Decl(argumentsSpreadRestIterables.tsx, 2, 11)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff new file mode 100644 index 0000000000..09e1f8f299 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsSpreadRestIterables(target=es5).types.diff @@ -0,0 +1,102 @@ +--- old.argumentsSpreadRestIterables(target=es5).types ++++ new.argumentsSpreadRestIterables(target=es5).types +@@= skipped -5, +5 lines =@@ + + ;(function(...rest) {})(...itNum) + >(function(...rest) {})(...itNum) : void +->(function(...rest) {}) : (...rest: any[]) => void +->function(...rest) {} : (...rest: any[]) => void +->rest : any[] +->...itNum : any ++>(function(...rest) {}) : (...rest: Iterable) => void ++>function(...rest) {} : (...rest: Iterable) => void ++>rest : Iterable ++>...itNum : Iterable + >itNum : Iterable + + ;(function(a, ...rest) {})('', ...itNum) + >(function(a, ...rest) {})('', ...itNum) : void +->(function(a, ...rest) {}) : (a: string, ...rest: any[]) => void +->function(a, ...rest) {} : (a: string, ...rest: any[]) => void ++>(function(a, ...rest) {}) : (a: string, ...rest: Iterable) => void ++>function(a, ...rest) {} : (a: string, ...rest: Iterable) => void + >a : string +->rest : any[] ++>rest : Iterable + >'' : "" +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable + + ;(function(a, ...rest) {})('', true, ...itNum) + >(function(a, ...rest) {})('', true, ...itNum) : void +->(function(a, ...rest) {}) : (a: string, rest_0: boolean, ...rest: any[]) => void +->function(a, ...rest) {} : (a: string, rest_0: boolean, ...rest: any[]) => void ++>(function(a, ...rest) {}) : (a: string, rest_0: boolean, ...rest: Iterable[]) => void ++>function(a, ...rest) {} : (a: string, rest_0: boolean, ...rest: Iterable[]) => void + >a : string +->rest : [boolean, ...any[]] ++>rest : [boolean, ...Iterable[]] + >'' : "" + >true : true +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable + + declare function fn1(...args: T): T; +@@= skipped -39, +39 lines =@@ + >"hello" : "hello" + + const res2 = fn1(...itNum); +->res2 : readonly any[] +->fn1(...itNum) : readonly any[] ++>res2 : Iterable ++>fn1(...itNum) : Iterable + >fn1 : (...args: T) => T +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable + + const res3 = fn1(true, ..."hello"); +@@= skipped -15, +15 lines =@@ + >"hello" : "hello" + + const res4 = fn1(true, ...itNum); +->res4 : readonly [true, ...any[]] +->fn1(true, ...itNum) : readonly [true, ...any[]] ++>res4 : readonly [true, ...Iterable[]] ++>fn1(true, ...itNum) : readonly [true, ...Iterable[]] + >fn1 : (...args: T) => T + >true : true +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable + + // repro from #52781 +@@= skipped -20, +20 lines =@@ + >"hello" : "hello" + + const p2 = foo(...itNum); +->p2 : any[] +->foo(...itNum) : any[] ++>p2 : Iterable ++>foo(...itNum) : Iterable + >foo : (...args: T) => T +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable + + const p3 = foo(true, ..."hello"); +@@= skipped -15, +15 lines =@@ + >"hello" : "hello" + + const p4 = foo(true, ...itNum); +->p4 : [boolean, ...any[]] +->foo(true, ...itNum) : [boolean, ...any[]] ++>p4 : [boolean, ...Iterable[]] ++>foo(true, ...itNum) : [boolean, ...Iterable[]] + >foo : (...args: T) => T + >true : true +->...itNum : any ++>...itNum : Iterable + >itNum : Iterable diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff new file mode 100644 index 0000000000..6a6757650d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt.diff @@ -0,0 +1,27 @@ +--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt ++++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.errors.txt +@@= skipped -4, +4 lines =@@ + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(33,16): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(40,7): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(42,16): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. ++argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(66,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(75,7): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(77,9): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(96,26): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts(102,15): error TS2815: 'arguments' cannot be referenced in property initializers or class static initialization blocks. + + +-==== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (11 errors) ==== ++==== argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts (12 errors) ==== + function A() { + return class T { + a = arguments +@@= skipped -87, +88 lines =@@ + arguments; // ok + } + [Symbol.iterator]() { ++ ~~~~~~ ++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + arguments; // ok + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff index da291e63c7..87276ed32b 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js.diff @@ -1,87 +1,150 @@ --- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js +++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js -@@= skipped -117, +117 lines =@@ +@@= skipped -116, +116 lines =@@ + //// [argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.js] function A() { - return class T { -- constructor() { +- return /** @class */ (function () { +- function T() { - this.a = arguments; - } +- return T; +- }()); ++ return class T { + a = arguments; - }; ++ }; } function A1() { - return new class T { -- constructor() { +- return new /** @class */ (function () { +- function T() { - this.a = arguments; - } +- return T; +- }()); ++ return new class T { + a = arguments; - }; ++ }; } function B() { - return class T { -- constructor() { +- return /** @class */ (function () { +- function T() { - this.a = { b: arguments }; - } +- return T; +- }()); ++ return class T { + a = { b: arguments }; - }; ++ }; } function B1() { - return new class T { -- constructor() { +- return new /** @class */ (function () { +- function T() { - this.a = { b: arguments }; - } +- return T; +- }()); ++ return new class T { + a = { b: arguments }; - }; ++ }; } function C() { - return class T { -- constructor() { +- return /** @class */ (function () { +- function T() { - this.a = function () { arguments; }; - } +- return T; +- }()); ++ return class T { + a = function () { arguments; }; - }; ++ }; } function D() { - return class T { -- constructor() { -- this.a = () => arguments; // should error +- return /** @class */ (function () { +- function T() { +- this.a = function () { return arguments; }; // should error - } +- return T; +- }()); ++ return class T { + a = () => arguments; // should error - }; ++ }; } function D1() { - return class T { -- constructor() { -- this.a = () => { +- return /** @class */ (function () { +- function T() { +- this.a = function () { - arguments; // should error -- const b = () => { +- var b = function () { - return arguments; // should error - }; - function f() { - return arguments; // ok - } ++ return class T { + a = () => { + arguments; // should error + const b = () => { + return arguments; // should error }; - } +- return T; +- }()); +-} +-function D2() { +- return /** @class */ (function () { +- function class_1() { +- arguments; // ok +- } +- Object.defineProperty(class_1.prototype, "foo", { +- get: function () { + function f() { -+ return arguments; // ok + return arguments; // ok +- }, +- set: function (foo) { +- arguments; // ok +- }, +- enumerable: false, +- configurable: true +- }); +- class_1.prototype.bar = function () { +- arguments; // ok +- }; +- class_1.prototype[Symbol.iterator] = function () { +- arguments; // ok +- }; +- return class_1; +- }()); + } + }; - }; - } - function D2() { -@@= skipped -75, +61 lines =@@ - }; ++ }; ++} ++function D2() { ++ return class { ++ constructor() { ++ arguments; // ok ++ } ++ get foo() { ++ return arguments; // ok ++ } ++ set foo(foo) { ++ arguments; // ok ++ } ++ bar() { ++ arguments; // ok ++ } ++ [Symbol.iterator]() { ++ arguments; // ok ++ } ++ }; } function D3() { - var _a; -- return _a = class T { -- }, -- (() => { +- return _a = /** @class */ (function () { +- function T() { +- } +- return T; +- }()), +- (function () { + return class T { + static { arguments; // should error @@ -95,9 +158,12 @@ } function D4() { - var _a; -- return _a = class T { -- }, -- (() => { +- return _a = /** @class */ (function () { +- function T() { +- } +- return T; +- }()), +- (function () { + return class T { + static { function f() { @@ -109,19 +175,39 @@ + }; } function D5() { - return class T { -- constructor() { -- this.a = (() => { return arguments; })(); // should error +- return /** @class */ (function () { +- function T() { +- this.a = (function () { return arguments; })(); // should error - } +- return T; +- }()); ++ return class T { + a = (() => { return arguments; })(); // should error - }; ++ }; } function D6() { - return class T { -- constructor() { -- this.a = (x = arguments) => { }; // should error +- return /** @class */ (function () { +- function T() { +- this.a = function (x) { +- if (x === void 0) { x = arguments; } +- }; // should error - } +- return T; +- }()); ++ return class T { + a = (x = arguments) => { }; // should error - }; ++ }; } - function D7() { \ No newline at end of file + function D7() { +- return /** @class */ (function () { +- function T() { ++ return class T { ++ a(x = arguments) { + } +- T.prototype.a = function (x) { +- if (x === void 0) { x = arguments; } +- }; +- return T; +- }()); ++ }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff new file mode 100644 index 0000000000..05947c8337 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols.diff @@ -0,0 +1,12 @@ +--- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols ++++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.symbols +@@= skipped -132, +132 lines =@@ + } + [Symbol.iterator]() { + >[Symbol.iterator] : Symbol((Anonymous class)[Symbol.iterator], Decl(argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.ts, 64, 5)) +->Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) +->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) + + arguments; // ok + >arguments : Symbol(arguments) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff index e820f62202..1cdedaa21c 100644 --- a/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff +++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types.diff @@ -1,65 +1,15 @@ --- old.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types +++ new.argumentsUsedInClassFieldInitializerOrStaticInitializationBlock.types -@@= skipped -80, +80 lines =@@ - >T : typeof T - - a = () => arguments // should error -->a : () => IArguments -->() => arguments : () => IArguments -->arguments : IArguments -+>a : () => any -+>() => arguments : () => any -+>arguments : any - } - } - -@@= skipped -18, +18 lines =@@ - >() => { arguments; // should error const b = () => { return arguments; // should error } function f() { return arguments; // ok } } : () => void - - arguments; // should error -->arguments : IArguments -+>arguments : any - - const b = () => { -->b : () => IArguments -->() => { return arguments; // should error } : () => IArguments -+>b : () => any -+>() => { return arguments; // should error } : () => any - - return arguments; // should error -->arguments : IArguments -+>arguments : any - } - - function f() { -@@= skipped -109, +109 lines =@@ - >T : typeof T - - a = (() => { return arguments; })() // should error -->a : IArguments -->(() => { return arguments; })() : IArguments -->(() => { return arguments; }) : () => IArguments -->() => { return arguments; } : () => IArguments -->arguments : IArguments -+>a : any -+>(() => { return arguments; })() : any -+>(() => { return arguments; }) : () => any -+>() => { return arguments; } : () => any -+>arguments : any - } - } - -@@= skipped -16, +16 lines =@@ - >T : typeof T - - a = (x = arguments) => {} // should error -->a : (x?: IArguments) => void -->(x = arguments) => {} : (x?: IArguments) => void -->x : IArguments -->arguments : IArguments -+>a : (x?: any) => void -+>(x = arguments) => {} : (x?: any) => void -+>x : any -+>arguments : any - } - } +@@= skipped -149, +149 lines =@@ + } + [Symbol.iterator]() { + >[Symbol.iterator] : () => void +->Symbol.iterator : unique symbol +->Symbol : SymbolConstructor +->iterator : unique symbol ++>Symbol.iterator : any ++>Symbol : any ++>iterator : any + + arguments; // ok + >arguments : IArguments \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff b/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff new file mode 100644 index 0000000000..dd13a0c4b0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/argumentsUsedInObjectLiteralProperty.js.diff @@ -0,0 +1,20 @@ +--- old.argumentsUsedInObjectLiteralProperty.js ++++ new.argumentsUsedInObjectLiteralProperty.js +@@= skipped -9, +9 lines =@@ + } + + //// [argumentsUsedInObjectLiteralProperty.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.createSelectableViewModel = function (initialState, selectedValue) { ++class A { ++ static createSelectableViewModel(initialState, selectedValue) { + return { + selectedValue: arguments.length + }; +- }; +- return A; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff b/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff new file mode 100644 index 0000000000..ca83d07896 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arithAssignTyping.js.diff @@ -0,0 +1,16 @@ +--- old.arithAssignTyping.js ++++ new.arithAssignTyping.js +@@= skipped -16, +16 lines =@@ + f ^= 1; // error + + //// [arithAssignTyping.js] +-var f = /** @class */ (function () { +- function f() { +- } +- return f; +-}()); ++class f { ++} + f += ''; // error + f += 1; // error + f -= 1; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff b/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff new file mode 100644 index 0000000000..f6e5f0a5a2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arityErrorRelatedSpanBindingPattern.js.diff @@ -0,0 +1,16 @@ +--- old.arityErrorRelatedSpanBindingPattern.js ++++ new.arityErrorRelatedSpanBindingPattern.js +@@= skipped -10, +10 lines =@@ + + + //// [arityErrorRelatedSpanBindingPattern.js] +-function foo(a, b, _a) { +- var c = _a.c; +-} +-function bar(a, b, _a) { +- var c = _a[0]; +-} ++function foo(a, b, { c }) { } ++function bar(a, b, [c]) { } + foo("", 0); + bar("", 0); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff new file mode 100644 index 0000000000..2ba1222fca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff @@ -0,0 +1,85 @@ +--- old.arrayAssignmentTest1.errors.txt ++++ new.arrayAssignmentTest1.errors.txt +@@= skipped -0, +0 lines =@@ + arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. + arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 +-arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 ++arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1 + arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. + arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. + Property 'IM1' is missing in type 'C3' but required in type 'I1'. +@@= skipped -10, +10 lines =@@ + arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. + Property 'C2M1' is missing in type 'C1' but required in type 'C2'. + arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. +- Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 ++ Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1 + arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. +- Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 ++ Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1 + arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. + Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. + arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. +@@= skipped -10, +10 lines =@@ + arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is not assignable to type 'C3[]'. + Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. + arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. +-arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++arrayAssignmentTest1.ts(80,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest1.ts(82,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest1.ts(83,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest1.ts(84,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest1.ts(85,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + + + ==== arrayAssignmentTest1.ts (19 errors) ==== +@@= skipped -62, +62 lines =@@ + !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 + var c2_error: C2 = []; // should be an error - is + ~~~~~~~~ +-!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 ++!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1 + var c3_error: C3 = []; // should be an error - is + ~~~~~~~~ + !!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. +@@= skipped -42, +42 lines =@@ + arr_c2 = arr_i1; // should be an error - subtype relationship - is + ~~~~~~ + !!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. +-!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 ++!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1 + arr_c2 = arr_c3; // should be an error - is + ~~~~~~ + !!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. +-!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 ++!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1 + + // "clean up bug" occurs at this point + // if you move these three expressions to another file, they raise an error +@@= skipped -30, +30 lines =@@ + !!! error TS2322: Type '() => C1' is not assignable to type 'any[]'. + arr_any = o1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = a1; // should be ok - is + arr_any = c1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = c2; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = c3; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = i1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff new file mode 100644 index 0000000000..1b8626d7a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.js.diff @@ -0,0 +1,55 @@ +--- old.arrayAssignmentTest1.js ++++ new.arrayAssignmentTest1.js +@@= skipped -87, +87 lines =@@ + arr_any = i1; // should be an error - is + + //// [arrayAssignmentTest1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.IM1 = function () { return null; }; +- C1.prototype.C1M1 = function () { return null; }; +- return C1; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C2.prototype.C2M1 = function () { return null; }; +- return C2; +-}(C1)); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- C3.prototype.CM3M1 = function () { return 3; }; +- return C3; +-}()); ++class C1 { ++ IM1() { return null; } ++ C1M1() { return null; } ++} ++class C2 extends C1 { ++ C2M1() { return null; } ++} ++class C3 { ++ CM3M1() { return 3; } ++} + /* + + This behaves unexpectedly with the following types: \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff new file mode 100644 index 0000000000..d74aa3f315 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.errors.txt.diff @@ -0,0 +1,43 @@ +--- old.arrayAssignmentTest2.errors.txt ++++ new.arrayAssignmentTest2.errors.txt +@@= skipped -5, +5 lines =@@ + Property 'CM3M1' is missing in type 'I1' but required in type 'C3'. + arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'. + arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. +-arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. +-arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++arrayAssignmentTest2.ts(53,1): error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest2.ts(55,1): error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest2.ts(56,1): error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest2.ts(57,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. ++arrayAssignmentTest2.ts(58,1): error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + + + ==== arrayAssignmentTest2.ts (10 errors) ==== +@@= skipped -78, +78 lines =@@ + !!! error TS2322: Type '() => any' is not assignable to type 'any[]'. + arr_any = o1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type '{ one: number; }' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = a1; // should be ok - is + arr_any = c1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = c2; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C2' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = c3; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + arr_any = i1; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'I1' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff new file mode 100644 index 0000000000..20c0f401e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest2.js.diff @@ -0,0 +1,55 @@ +--- old.arrayAssignmentTest2.js ++++ new.arrayAssignmentTest2.js +@@= skipped -61, +61 lines =@@ + + + //// [arrayAssignmentTest2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.IM1 = function () { return null; }; +- C1.prototype.C1M1 = function () { return null; }; +- return C1; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C2.prototype.C2M1 = function () { return null; }; +- return C2; +-}(C1)); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- C3.prototype.CM3M1 = function () { return 3; }; +- return C3; +-}()); ++class C1 { ++ IM1() { return null; } ++ C1M1() { return null; } ++} ++class C2 extends C1 { ++ C2M1() { return null; } ++} ++class C3 { ++ CM3M1() { return 3; } ++} + /* + + This behaves unexpectedly with the following types: \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff index 1503b565a1..b4d741b5e3 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.errors.txt.diff @@ -2,7 +2,7 @@ +++ new.arrayAssignmentTest3.errors.txt @@= skipped -0, +0 lines =@@ -arrayAssignmentTest3.ts(12,25): error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. -- Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. +- Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 25 more. +arrayAssignmentTest3.ts(12,25): error TS2740: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. @@ -12,7 +12,7 @@ var xx = new a(null, 7, new B()); ~~~~~~~ -!!! error TS2345: Argument of type 'B' is not assignable to parameter of type 'B[]'. --!!! error TS2345: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. +-!!! error TS2345: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 25 more. +!!! error TS2740: Type 'B' is missing the following properties from type 'B[]': length, pop, push, concat, and 16 more. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff index aa56f2d95c..32c230238f 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest3.js.diff @@ -1,11 +1,26 @@ --- old.arrayAssignmentTest3.js +++ new.arrayAssignmentTest3.js -@@= skipped -22, +22 lines =@@ - class B { - } - class a { +@@= skipped -19, +19 lines =@@ + // The following gives no error + // Michal saw no error if he used number instead of B, + // but I do... +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var a = /** @class */ (function () { +- function a(x, y, z) { ++class B { ++} ++class a { + x; + y; - constructor(x, y, z) { ++ constructor(x, y, z) { this.x = x; - this.y = y; \ No newline at end of file + this.y = y; + } +- return a; +-}()); ++} + var xx = new a(null, 7, new B()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff new file mode 100644 index 0000000000..554dbee4f7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.arrayAssignmentTest4.errors.txt ++++ new.arrayAssignmentTest4.errors.txt +@@= skipped -0, +0 lines =@@ + arrayAssignmentTest4.ts(22,1): error TS2322: Type '() => any' is not assignable to type 'any[]'. +-arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++arrayAssignmentTest4.ts(23,1): error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + + + ==== arrayAssignmentTest4.ts (2 errors) ==== +@@= skipped -28, +28 lines =@@ + !!! error TS2322: Type '() => any' is not assignable to type 'any[]'. + arr_any = c3; // should be an error - is + ~~~~~~~ +-!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 25 more. ++!!! error TS2740: Type 'C3' is missing the following properties from type 'any[]': length, pop, push, concat, and 16 more. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff new file mode 100644 index 0000000000..ca2ea88559 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest4.js.diff @@ -0,0 +1,18 @@ +--- old.arrayAssignmentTest4.js ++++ new.arrayAssignmentTest4.js +@@= skipped -26, +26 lines =@@ + + + //// [arrayAssignmentTest4.js] +-var C3 = /** @class */ (function () { +- function C3() { +- } +- C3.prototype.CM3M1 = function () { return 3; }; +- return C3; +-}()); ++class C3 { ++ CM3M1() { return 3; } ++} + /* + + This behaves unexpectedly with teh following types: \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt index a8263630de..ffbb476fe8 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.errors.txt @@ -3,7 +3,7 @@ arrayAssignmentTest5.ts(23,17): error TS2322: Type 'IToken[]' is not assignable ==== arrayAssignmentTest5.ts (1 errors) ==== - module Test { + namespace Test { interface IState { } interface IToken { diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js index 805f670c21..e1006e91b8 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayAssignmentTest5.ts] //// //// [arrayAssignmentTest5.ts] -module Test { +namespace Test { interface IState { } interface IToken { diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff new file mode 100644 index 0000000000..39f0c732ba --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.js.diff @@ -0,0 +1,29 @@ +--- old.arrayAssignmentTest5.js ++++ new.arrayAssignmentTest5.js +@@= skipped -37, +37 lines =@@ + //// [arrayAssignmentTest5.js] + var Test; + (function (Test) { +- var Bug = /** @class */ (function () { +- function Bug() { +- } +- Bug.prototype.onEnter = function (line, state, offset) { ++ class Bug { ++ onEnter(line, state, offset) { + var lineTokens = this.tokenize(line, state, true); + var tokens = lineTokens.tokens; + if (tokens.length === 0) { + return this.onEnter(line, tokens, offset); // <== this should produce an error since onEnter can not be called with (string, IStateToken[], offset) + } +- }; +- Bug.prototype.tokenize = function (line, state, includeStates) { ++ } ++ tokenize(line, state, includeStates) { + return null; +- }; +- return Bug; +- }()); ++ } ++ } + Test.Bug = Bug; + })(Test || (Test = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols index 6ec2d24f20..98578cb028 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/arrayAssignmentTest5.ts] //// === arrayAssignmentTest5.ts === -module Test { +namespace Test { >Test : Symbol(Test, Decl(arrayAssignmentTest5.ts, 0, 0)) interface IState { ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) } interface IToken { >IToken : Symbol(IToken, Decl(arrayAssignmentTest5.ts, 2, 5)) @@ -19,7 +19,7 @@ module Test { state: IState; >state : Symbol(IStateToken.state, Decl(arrayAssignmentTest5.ts, 6, 42)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) } interface ILineTokens { >ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5)) @@ -30,7 +30,7 @@ module Test { endState: IState; >endState : Symbol(ILineTokens.endState, Decl(arrayAssignmentTest5.ts, 10, 25)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) } interface IAction { >IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5)) @@ -42,7 +42,7 @@ module Test { >onEnter : Symbol(IMode.onEnter, Decl(arrayAssignmentTest5.ts, 15, 21)) >line : Symbol(line, Decl(arrayAssignmentTest5.ts, 16, 16)) >state : Symbol(state, Decl(arrayAssignmentTest5.ts, 16, 28)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) >offset : Symbol(offset, Decl(arrayAssignmentTest5.ts, 16, 42)) >IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5)) @@ -50,7 +50,7 @@ module Test { >tokenize : Symbol(IMode.tokenize, Decl(arrayAssignmentTest5.ts, 16, 66)) >line : Symbol(line, Decl(arrayAssignmentTest5.ts, 17, 17)) >state : Symbol(state, Decl(arrayAssignmentTest5.ts, 17, 29)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) >includeStates : Symbol(includeStates, Decl(arrayAssignmentTest5.ts, 17, 43)) >ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5)) } @@ -62,7 +62,7 @@ module Test { >onEnter : Symbol(Bug.onEnter, Decl(arrayAssignmentTest5.ts, 19, 39)) >line : Symbol(line, Decl(arrayAssignmentTest5.ts, 20, 23)) >state : Symbol(state, Decl(arrayAssignmentTest5.ts, 20, 35)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) >offset : Symbol(offset, Decl(arrayAssignmentTest5.ts, 20, 49)) >IAction : Symbol(IAction, Decl(arrayAssignmentTest5.ts, 12, 5)) @@ -100,7 +100,7 @@ module Test { >tokenize : Symbol(Bug.tokenize, Decl(arrayAssignmentTest5.ts, 26, 9)) >line : Symbol(line, Decl(arrayAssignmentTest5.ts, 27, 24)) >state : Symbol(state, Decl(arrayAssignmentTest5.ts, 27, 36)) ->IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest5.ts, 0, 16)) >includeStates : Symbol(includeStates, Decl(arrayAssignmentTest5.ts, 27, 50)) >ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest5.ts, 8, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types index 877f42a8bf..f34228a738 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest5.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayAssignmentTest5.ts] //// === arrayAssignmentTest5.ts === -module Test { +namespace Test { >Test : typeof Test interface IState { diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js index 98120b6354..7a521047fc 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayAssignmentTest6.ts] //// //// [arrayAssignmentTest6.ts] -module Test { +namespace Test { interface IState { } interface IToken { diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff new file mode 100644 index 0000000000..43e49a6fda --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.js.diff @@ -0,0 +1,20 @@ +--- old.arrayAssignmentTest6.js ++++ new.arrayAssignmentTest6.js +@@= skipped -24, +24 lines =@@ + //// [arrayAssignmentTest6.js] + var Test; + (function (Test) { +- var Bug = /** @class */ (function () { +- function Bug() { +- } +- Bug.prototype.tokenize = function (line, tokens, includeStates) { ++ class Bug { ++ tokenize(line, tokens, includeStates) { + return null; +- }; +- return Bug; +- }()); ++ } ++ } + Test.Bug = Bug; + })(Test || (Test = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols index d41afbb82d..0bbcc562b9 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/arrayAssignmentTest6.ts] //// === arrayAssignmentTest6.ts === -module Test { +namespace Test { >Test : Symbol(Test, Decl(arrayAssignmentTest6.ts, 0, 0)) interface IState { ->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16)) } interface IToken { >IToken : Symbol(IToken, Decl(arrayAssignmentTest6.ts, 2, 5)) @@ -22,7 +22,7 @@ module Test { endState: IState; >endState : Symbol(ILineTokens.endState, Decl(arrayAssignmentTest6.ts, 7, 25)) ->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16)) } interface IMode { >IMode : Symbol(IMode, Decl(arrayAssignmentTest6.ts, 9, 5)) @@ -31,7 +31,7 @@ module Test { >tokenize : Symbol(IMode.tokenize, Decl(arrayAssignmentTest6.ts, 10, 21)) >line : Symbol(line, Decl(arrayAssignmentTest6.ts, 11, 17)) >state : Symbol(state, Decl(arrayAssignmentTest6.ts, 11, 29)) ->IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 13)) +>IState : Symbol(IState, Decl(arrayAssignmentTest6.ts, 0, 16)) >includeStates : Symbol(includeStates, Decl(arrayAssignmentTest6.ts, 11, 43)) >ILineTokens : Symbol(ILineTokens, Decl(arrayAssignmentTest6.ts, 5, 5)) } diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types index e829e25389..8075fcc0de 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types +++ b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest6.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayAssignmentTest6.ts] //// === arrayAssignmentTest6.ts === -module Test { +namespace Test { >Test : typeof Test interface IState { diff --git a/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff new file mode 100644 index 0000000000..d6ab4ed272 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayAugment.symbols.diff @@ -0,0 +1,19 @@ +--- old.arrayAugment.symbols ++++ new.arrayAugment.symbols +@@= skipped -1, +1 lines =@@ + + === arrayAugment.ts === + interface Array { +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 0)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) + + split: (parts: number) => T[][]; + >split : Symbol(Array.split, Decl(arrayAugment.ts, 0, 20)) + >parts : Symbol(parts, Decl(arrayAugment.ts, 1, 12)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(arrayAugment.ts, 0, 16)) + } + + var x = ['']; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js index b3c5e8766a..f7ca47930a 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js +++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayBestCommonTypes.ts] //// //// [arrayBestCommonTypes.ts] -module EmptyTypes { +namespace EmptyTypes { interface iface { } class base implements iface { } class base2 implements iface { } @@ -54,7 +54,7 @@ module EmptyTypes { } } -module NonEmptyTypes { +namespace NonEmptyTypes { interface iface { x: string; } class base implements iface { x: string; y: string; } class base2 implements iface { x: string; z: string; } diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff index 0b4eb802fb..42105013ad 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.js.diff @@ -1,18 +1,124 @@ --- old.arrayBestCommonTypes.js +++ new.arrayBestCommonTypes.js -@@= skipped -154, +154 lines =@@ +@@= skipped -109, +109 lines =@@ + + + //// [arrayBestCommonTypes.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var EmptyTypes; + (function (EmptyTypes) { +- var base = /** @class */ (function () { +- function base() { +- } +- return base; +- }()); +- var base2 = /** @class */ (function () { +- function base2() { +- } +- return base2; +- }()); +- var derived = /** @class */ (function (_super) { +- __extends(derived, _super); +- function derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return derived; +- }(base)); +- var f = /** @class */ (function () { +- function f() { +- } +- f.prototype.voidIfAny = function (x, y) { +- if (y === void 0) { y = false; } +- return null; +- }; +- f.prototype.x = function () { ++ class base { ++ } ++ class base2 { ++ } ++ class derived extends base { ++ } ++ class f { ++ voidIfAny(x, y = false) { return null; } ++ x() { + (this.voidIfAny([4, 2][0])); + (this.voidIfAny([4, 2, undefined][0])); + (this.voidIfAny([undefined, 2, 4][0])); +@@= skipped -70, +39 lines =@@ + var b2 = [base2Obj, baseObj, ifaceObj]; + var b3 = [baseObj, ifaceObj, base2Obj]; + var b4 = [ifaceObj, baseObj, base2Obj]; +- }; +- return f; +- }()); ++ } ++ } + })(EmptyTypes || (EmptyTypes = {})); var NonEmptyTypes; (function (NonEmptyTypes) { - class base { +- var base = /** @class */ (function () { +- function base() { +- } +- return base; +- }()); +- var base2 = /** @class */ (function () { +- function base2() { +- } +- return base2; +- }()); +- var derived = /** @class */ (function (_super) { +- __extends(derived, _super); +- function derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return derived; +- }(base)); +- var f = /** @class */ (function () { +- function f() { +- } +- f.prototype.voidIfAny = function (x, y) { +- if (y === void 0) { y = false; } +- return null; +- }; +- f.prototype.x = function () { ++ class base { + x; + y; - } - class base2 { ++ } ++ class base2 { + x; + z; - } - class derived extends base { ++ } ++ class derived extends base { + a; - } - class f { - voidIfAny(x, y = false) { return null; } \ No newline at end of file ++ } ++ class f { ++ voidIfAny(x, y = false) { return null; } ++ x() { + (this.voidIfAny([4, 2][0])); + (this.voidIfAny([4, 2, undefined][0])); + (this.voidIfAny([undefined, 2, 4][0])); +@@= skipped -59, +47 lines =@@ + var b2 = [base2Obj, baseObj, ifaceObj]; + var b3 = [baseObj, ifaceObj, base2Obj]; + var b4 = [ifaceObj, baseObj, base2Obj]; +- }; +- return f; +- }()); ++ } ++ } + })(NonEmptyTypes || (NonEmptyTypes = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols index 2e4d5fbdb3..2ad95c4749 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.symbols @@ -1,19 +1,19 @@ //// [tests/cases/compiler/arrayBestCommonTypes.ts] //// === arrayBestCommonTypes.ts === -module EmptyTypes { +namespace EmptyTypes { >EmptyTypes : Symbol(EmptyTypes, Decl(arrayBestCommonTypes.ts, 0, 0)) interface iface { } ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22)) class base implements iface { } >base : Symbol(base, Decl(arrayBestCommonTypes.ts, 1, 23)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22)) class base2 implements iface { } >base2 : Symbol(base2, Decl(arrayBestCommonTypes.ts, 2, 35)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22)) class derived extends base { } >derived : Symbol(derived, Decl(arrayBestCommonTypes.ts, 3, 36)) @@ -191,7 +191,7 @@ module EmptyTypes { var ifaceObj: iface = null; >ifaceObj : Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 41, 15)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 19)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 0, 22)) var baseObj = new base(); >baseObj : Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 42, 15)) @@ -228,22 +228,22 @@ module EmptyTypes { } } -module NonEmptyTypes { +namespace NonEmptyTypes { >NonEmptyTypes : Symbol(NonEmptyTypes, Decl(arrayBestCommonTypes.ts, 51, 1)) interface iface { x: string; } ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25)) >x : Symbol(iface.x, Decl(arrayBestCommonTypes.ts, 54, 21)) class base implements iface { x: string; y: string; } >base : Symbol(base, Decl(arrayBestCommonTypes.ts, 54, 34)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25)) >x : Symbol(base.x, Decl(arrayBestCommonTypes.ts, 55, 33)) >y : Symbol(base.y, Decl(arrayBestCommonTypes.ts, 55, 44)) class base2 implements iface { x: string; z: string; } >base2 : Symbol(base2, Decl(arrayBestCommonTypes.ts, 55, 57)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25)) >x : Symbol(base2.x, Decl(arrayBestCommonTypes.ts, 56, 34)) >z : Symbol(base2.z, Decl(arrayBestCommonTypes.ts, 56, 45)) @@ -424,7 +424,7 @@ module NonEmptyTypes { var ifaceObj: iface = null; >ifaceObj : Symbol(ifaceObj, Decl(arrayBestCommonTypes.ts, 94, 15)) ->iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 22)) +>iface : Symbol(iface, Decl(arrayBestCommonTypes.ts, 53, 25)) var baseObj = new base(); >baseObj : Symbol(baseObj, Decl(arrayBestCommonTypes.ts, 95, 15)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types index 1ee5f447bd..4cdb6400d1 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types +++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayBestCommonTypes.ts] //// === arrayBestCommonTypes.ts === -module EmptyTypes { +namespace EmptyTypes { >EmptyTypes : typeof EmptyTypes interface iface { } @@ -380,7 +380,7 @@ module EmptyTypes { } } -module NonEmptyTypes { +namespace NonEmptyTypes { >NonEmptyTypes : typeof NonEmptyTypes interface iface { x: string; } diff --git a/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff new file mode 100644 index 0000000000..fcc316edf6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayBestCommonTypes.types.diff @@ -0,0 +1,40 @@ +--- old.arrayBestCommonTypes.types ++++ new.arrayBestCommonTypes.types +@@= skipped -349, +349 lines =@@ + >base2 : typeof base2 + + var b1 = [baseObj, base2Obj, ifaceObj]; +->b1 : iface[] +->[baseObj, base2Obj, ifaceObj] : iface[] ++>b1 : (base | base2)[] ++>[baseObj, base2Obj, ifaceObj] : (base | base2)[] + >baseObj : base + >base2Obj : base2 + >ifaceObj : iface + + var b2 = [base2Obj, baseObj, ifaceObj]; +->b2 : iface[] +->[base2Obj, baseObj, ifaceObj] : iface[] ++>b2 : (base | base2)[] ++>[base2Obj, baseObj, ifaceObj] : (base | base2)[] + >base2Obj : base2 + >baseObj : base + >ifaceObj : iface + + var b3 = [baseObj, ifaceObj, base2Obj]; +->b3 : iface[] +->[baseObj, ifaceObj, base2Obj] : iface[] ++>b3 : (base | base2)[] ++>[baseObj, ifaceObj, base2Obj] : (base | base2)[] + >baseObj : base + >ifaceObj : iface + >base2Obj : base2 + + var b4 = [ifaceObj, baseObj, base2Obj]; +->b4 : iface[] +->[ifaceObj, baseObj, base2Obj] : iface[] ++>b4 : (base | base2)[] ++>[ifaceObj, baseObj, base2Obj] : (base | base2)[] + >ifaceObj : iface + >baseObj : base + >base2Obj : base2 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff b/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff new file mode 100644 index 0000000000..6a0a594a8f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayBindingPatternOmittedExpressions.types.diff @@ -0,0 +1,29 @@ +--- old.arrayBindingPatternOmittedExpressions.types ++++ new.arrayBindingPatternOmittedExpressions.types +@@= skipped -5, +5 lines =@@ + + { + let [, b, , a] = results; +-> : undefined + >b : string +-> : undefined + >a : string + >results : string[] + +@@= skipped -21, +19 lines =@@ + + function f([, a, , b, , , , s, , , ] = results) { + >f : ([, a, , b, , , , s, , ,]?: string[]) => void +-> : undefined + >a : string +-> : undefined + >b : string +-> : undefined +-> : undefined +-> : undefined + >s : string +-> : undefined +-> : undefined + >results : string[] + + a = s[1]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff new file mode 100644 index 0000000000..ac4c64b582 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayBufferIsViewNarrowsType.symbols.diff @@ -0,0 +1,10 @@ +--- old.arrayBufferIsViewNarrowsType.symbols ++++ new.arrayBufferIsViewNarrowsType.symbols +@@= skipped -6, +6 lines =@@ + + if (ArrayBuffer.isView(obj)) { + >ArrayBuffer.isView : Symbol(ArrayBufferConstructor.isView, Decl(lib.es5.d.ts, --, --)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >isView : Symbol(ArrayBufferConstructor.isView, Decl(lib.es5.d.ts, --, --)) + >obj : Symbol(obj, Decl(arrayBufferIsViewNarrowsType.ts, 0, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff new file mode 100644 index 0000000000..2ef6516c07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayConcat2.symbols.diff @@ -0,0 +1,11 @@ +--- old.arrayConcat2.symbols ++++ new.arrayConcat2.symbols +@@= skipped -15, +15 lines =@@ + + var b = new Array(); + >b : Symbol(b, Decl(arrayConcat2.ts, 5, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + b.concat('hello'); + >b.concat : Symbol(Array.concat, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff new file mode 100644 index 0000000000..f7c7810715 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayConcat3.symbols.diff @@ -0,0 +1,15 @@ +--- old.arrayConcat3.symbols ++++ new.arrayConcat3.symbols +@@= skipped -16, +16 lines =@@ + >T1 : Symbol(T1, Decl(arrayConcat3.ts, 2, 34)) + >T : Symbol(T, Decl(arrayConcat3.ts, 2, 17)) + >a : Symbol(a, Decl(arrayConcat3.ts, 2, 49)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Fn : Symbol(Fn, Decl(arrayConcat3.ts, 0, 0)) + >T : Symbol(T, Decl(arrayConcat3.ts, 2, 17)) + >b : Symbol(b, Decl(arrayConcat3.ts, 2, 65)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Fn : Symbol(Fn, Decl(arrayConcat3.ts, 0, 0)) + >T1 : Symbol(T1, Decl(arrayConcat3.ts, 2, 34)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff b/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff index 2d82657c95..275ae6ef43 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayConcat3.types.diff @@ -8,3 +8,13 @@ +>doStuff : (a: Fn[], b: Fn[]) => void >a : Fn[] >b : Fn[] + + b.concat(a); + >b.concat(a) : Fn[] +->b.concat : { (...items: ConcatArray>[]): Fn[]; (...items: (Fn | ConcatArray>)[]): Fn[]; } ++>b.concat : { (...items: ConcatArray>[]): Fn[]; (...items: (ConcatArray> | Fn)[]): Fn[]; } + >b : Fn[] +->concat : { (...items: ConcatArray>[]): Fn[]; (...items: (Fn | ConcatArray>)[]): Fn[]; } ++>concat : { (...items: ConcatArray>[]): Fn[]; (...items: (ConcatArray> | Fn)[]): Fn[]; } + >a : Fn[] + } diff --git a/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff b/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff new file mode 100644 index 0000000000..0a5ec848f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayConcatMap.js.diff @@ -0,0 +1,8 @@ +--- old.arrayConcatMap.js ++++ new.arrayConcatMap.js +@@= skipped -5, +5 lines =@@ + + //// [arrayConcatMap.js] + var x = [].concat([{ a: 1 }], [{ a: 2 }]) +- .map(function (b) { return b.a; }); ++ .map(b => b.a); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff new file mode 100644 index 0000000000..bae6bfc2ef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayConstructors1.symbols.diff @@ -0,0 +1,36 @@ +--- old.arrayConstructors1.symbols ++++ new.arrayConstructors1.symbols +@@= skipped -5, +5 lines =@@ + + x = new Array(1); + >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + x = new Array('hi', 'bye'); + >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + x = new Array('hi', 'bye'); + >x : Symbol(x, Decl(arrayConstructors1.ts, 0, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var y: number[]; + >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) + + y = new Array(1); + >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + y = new Array(1,2); + >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + y = new Array(1, 2); + >y : Symbol(y, Decl(arrayConstructors1.ts, 5, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff new file mode 100644 index 0000000000..72a9cd5956 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.js.diff @@ -0,0 +1,22 @@ +--- old.arrayDestructuringInSwitch1.js ++++ new.arrayDestructuringInSwitch1.js +@@= skipped -28, +28 lines =@@ + exports.evaluate = evaluate; + function evaluate(expression) { + if (Array.isArray(expression)) { +- var operator = expression[0], operands = expression.slice(1); ++ const [operator, ...operands] = expression; + switch (operator) { + case 'and': { +- return operands.every(function (child) { return evaluate(child); }); ++ return operands.every((child) => evaluate(child)); + } + case 'not': { + return !evaluate(operands[0]); + } + default: { +- throw new Error("".concat(operator, " is not a supported operator")); ++ throw new Error(`${operator} is not a supported operator`); + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff new file mode 100644 index 0000000000..a3110cb3eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.symbols.diff @@ -0,0 +1,10 @@ +--- old.arrayDestructuringInSwitch1.symbols ++++ new.arrayDestructuringInSwitch1.symbols +@@= skipped -16, +16 lines =@@ + + if (Array.isArray(expression)) { + >Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) + >expression : Symbol(expression, Decl(arrayDestructuringInSwitch1.ts, 3, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff new file mode 100644 index 0000000000..d1f22c1f4d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch1.types.diff @@ -0,0 +1,11 @@ +--- old.arrayDestructuringInSwitch1.types ++++ new.arrayDestructuringInSwitch1.types +@@= skipped -61, +61 lines =@@ + } else { + return expression === 'true'; + >expression === 'true' : boolean +->expression : "true" | "false" ++>expression : "false" | "true" + >'true' : "true" + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff new file mode 100644 index 0000000000..844c597bfd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayDestructuringInSwitch2.js.diff @@ -0,0 +1,19 @@ +--- old.arrayDestructuringInSwitch2.js ++++ new.arrayDestructuringInSwitch2.js +@@= skipped -17, +17 lines =@@ + + //// [arrayDestructuringInSwitch2.js] + function foo(x) { +- var kind = x.kind, a = x.a; ++ const { kind, a } = x; + switch (kind) { + case "a": + return a[0]; + case "b": + return 1; + default: +- var n = a[0]; ++ const [n] = a; + return a; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff b/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff new file mode 100644 index 0000000000..879276daed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayEvery.js.diff @@ -0,0 +1,13 @@ +--- old.arrayEvery.js ++++ new.arrayEvery.js +@@= skipped -10, +10 lines =@@ + + + //// [arrayEvery.js] +-var foo = ['aaa']; +-var isString = function (x) { return typeof x === 'string'; }; ++const foo = ['aaa']; ++const isString = (x) => typeof x === 'string'; + if (foo.every(isString)) { + foo[0].slice(0); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff b/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff new file mode 100644 index 0000000000..69a0a4aa87 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayEvery.types.diff @@ -0,0 +1,10 @@ +--- old.arrayEvery.types ++++ new.arrayEvery.types +@@= skipped -10, +10 lines =@@ + >(x: unknown): x is string => typeof x === 'string' : (x: unknown) => x is string + >x : unknown + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >'string' : "string" diff --git a/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff new file mode 100644 index 0000000000..75b5ec7f57 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFilter.js.diff @@ -0,0 +1,8 @@ +--- old.arrayFilter.js ++++ new.arrayFilter.js +@@= skipped -14, +14 lines =@@ + { name: null }, + { name: 'baz' } + ]; +-foo.filter(function (x) { return x.name; }); //should accepted all possible types not only boolean! ++foo.filter(x => x.name); //should accepted all possible types not only boolean! \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff new file mode 100644 index 0000000000..4acf523d16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFind.js.diff @@ -0,0 +1,14 @@ +--- old.arrayFind.js ++++ new.arrayFind.js +@@= skipped -17, +17 lines =@@ + function isNumber(x) { + return typeof x === "number"; + } +-var arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +-var foundNumber = arrayOfStringsNumbersAndBooleans.find(isNumber); +-var readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans; +-var readonlyFoundNumber = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); ++const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; ++const foundNumber = arrayOfStringsNumbersAndBooleans.find(isNumber); ++const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans; ++const readonlyFoundNumber = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff new file mode 100644 index 0000000000..e03232e653 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFind.types.diff @@ -0,0 +1,11 @@ +--- old.arrayFind.types ++++ new.arrayFind.types +@@= skipped -7, +7 lines =@@ + + return typeof x === "number"; + >typeof x === "number" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : any + >"number" : "number" + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff new file mode 100644 index 0000000000..42599165f2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFlatMap.js.diff @@ -0,0 +1,14 @@ +--- old.arrayFlatMap.js ++++ new.arrayFlatMap.js +@@= skipped -7, +7 lines =@@ + + + //// [arrayFlatMap.js] +-var array = []; +-var readonlyArray = []; +-array.flatMap(function () { return []; }); // ok +-readonlyArray.flatMap(function () { return []; }); // ok ++const array = []; ++const readonlyArray = []; ++array.flatMap(() => []); // ok ++readonlyArray.flatMap(() => []); // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff new file mode 100644 index 0000000000..ba10fb4f92 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInference.types.diff @@ -0,0 +1,17 @@ +--- old.arrayFlatNoCrashInference.types ++++ new.arrayFlatNoCrashInference.types +@@= skipped -1, +1 lines =@@ + + === arrayFlatNoCrashInference.ts === + function foo(arr: T[], depth: number) { +->foo : (arr: T[], depth: number) => FlatArray[] ++>foo : (arr: T[], depth: number) => FlatArray[] + >arr : T[] + >depth : number + + return arr.flat(depth); +->arr.flat(depth) : FlatArray[] ++>arr.flat(depth) : FlatArray[] + >arr.flat : (this: A, depth?: D | undefined) => FlatArray[] + >arr : T[] + >flat : (this: A, depth?: D | undefined) => FlatArray[] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff index 89e78ce769..bec93992b2 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.js.diff @@ -7,4 +7,9 @@ -"use strict"; function foo(arr, depth) { return arr.flat(depth); - } \ No newline at end of file + } + + + //// [arrayFlatNoCrashInferenceDeclarations.d.ts] +-declare function foo(arr: T[], depth: number): FlatArray[]; ++declare function foo(arr: T[], depth: number): FlatArray[]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff new file mode 100644 index 0000000000..1d1a99809a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayFlatNoCrashInferenceDeclarations.types.diff @@ -0,0 +1,17 @@ +--- old.arrayFlatNoCrashInferenceDeclarations.types ++++ new.arrayFlatNoCrashInferenceDeclarations.types +@@= skipped -1, +1 lines =@@ + + === arrayFlatNoCrashInferenceDeclarations.ts === + function foo(arr: T[], depth: number) { +->foo : (arr: T[], depth: number) => FlatArray[] ++>foo : (arr: T[], depth: number) => FlatArray[] + >arr : T[] + >depth : number + + return arr.flat(depth); +->arr.flat(depth) : FlatArray[] ++>arr.flat(depth) : FlatArray[] + >arr.flat : (this: A, depth?: D | undefined) => FlatArray[] + >arr : T[] + >flat : (this: A, depth?: D | undefined) => FlatArray[] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff b/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff index 9386f60d71..59e9de3fa0 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayFrom.js.diff @@ -6,6 +6,50 @@ //// [arrayFrom.js] -// Tests fix for #20432, ensures Array.from accepts all valid inputs -// Also tests for #19682 - const inputA = []; - const inputB = []; - const inputALike = { length: 0 }; \ No newline at end of file +-var inputA = []; +-var inputB = []; +-var inputALike = { length: 0 }; +-var inputARand = getEither(inputA, inputALike); +-var inputASet = new Set(); +-var result1 = Array.from(inputA); +-var result2 = Array.from(inputA.values()); +-var result3 = Array.from(inputA.values()); // expect error +-var result4 = Array.from(inputB, function (_a) { +- var b = _a.b; +- return ({ a: b }); +-}); +-var result5 = Array.from(inputALike); +-var result6 = Array.from(inputALike); // expect error +-var result7 = Array.from(inputALike, function (_a) { +- var a = _a.a; +- return ({ b: a }); +-}); +-var result8 = Array.from(inputARand); +-var result9 = Array.from(inputARand, function (_a) { +- var a = _a.a; +- return ({ b: a }); +-}); +-var result10 = Array.from(new Set()); +-var result11 = Array.from(inputASet, function (_a) { +- var a = _a.a; +- return ({ b: a }); +-}); ++const inputA = []; ++const inputB = []; ++const inputALike = { length: 0 }; ++const inputARand = getEither(inputA, inputALike); ++const inputASet = new Set(); ++const result1 = Array.from(inputA); ++const result2 = Array.from(inputA.values()); ++const result3 = Array.from(inputA.values()); // expect error ++const result4 = Array.from(inputB, ({ b }) => ({ a: b })); ++const result5 = Array.from(inputALike); ++const result6 = Array.from(inputALike); // expect error ++const result7 = Array.from(inputALike, ({ a }) => ({ b: a })); ++const result8 = Array.from(inputARand); ++const result9 = Array.from(inputARand, ({ a }) => ({ b: a })); ++const result10 = Array.from(new Set()); ++const result11 = Array.from(inputASet, ({ a }) => ({ b: a })); + // if this is written inline, the compiler seems to infer + // the ?: as always taking the false branch, narrowing to ArrayLike, + // even when the type is written as : Iterable|ArrayLike \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff b/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff new file mode 100644 index 0000000000..94144cf6e2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayIndexWithArrayFails.js.diff @@ -0,0 +1,8 @@ +--- old.arrayIndexWithArrayFails.js ++++ new.arrayIndexWithArrayFails.js +@@= skipped -5, +5 lines =@@ + const j = arr2[arr1[0]]; // should error + + //// [arrayIndexWithArrayFails.js] +-var j = arr2[arr1[0]]; // should error ++const j = arr2[arr1[0]]; // should error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff new file mode 100644 index 0000000000..e28045d39c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralAndArrayConstructorEquivalence1.symbols.diff @@ -0,0 +1,26 @@ +--- old.arrayLiteralAndArrayConstructorEquivalence1.symbols ++++ new.arrayLiteralAndArrayConstructorEquivalence1.symbols +@@= skipped -2, +2 lines =@@ + === arrayLiteralAndArrayConstructorEquivalence1.ts === + var myCars=new Array(); + >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars3 = new Array({}); + >myCars3 : Symbol(myCars3, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 1, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars4: Array; // error + >myCars4 : Symbol(myCars4, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 2, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars5: Array[]; + >myCars5 : Symbol(myCars5, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 3, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + myCars = myCars3; + >myCars : Symbol(myCars, Decl(arrayLiteralAndArrayConstructorEquivalence1.ts, 0, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff new file mode 100644 index 0000000000..ce15ae9ba9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.js.diff @@ -0,0 +1,11 @@ +--- old.arrayLiteralComments.js ++++ new.arrayLiteralComments.js +@@= skipped -19, +19 lines =@@ + var testArrayWithFunc = [ + // Function comment + function () { +- var x = 1; ++ let x = 1; + }, + // String comment + '1', \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff new file mode 100644 index 0000000000..41d69bfd32 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralComments.types.diff @@ -0,0 +1,13 @@ +--- old.arrayLiteralComments.types ++++ new.arrayLiteralComments.types +@@= skipped -1, +1 lines =@@ + + === arrayLiteralComments.ts === + var testArrayWithFunc = [ +->testArrayWithFunc : (string | number | (() => void) | number[] | { a: number; })[] +->[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | (() => void) | number[] | { a: number; })[] ++>testArrayWithFunc : (string | number | number[] | (() => void) | { a: number; })[] ++>[ // Function comment function() { let x = 1; }, // String comment '1', // Numeric comment 2, // Object comment { a: 1 }, // Array comment [1, 2, 3]] : (string | number | number[] | (() => void) | { a: number; })[] + + // Function comment + function() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff index 0d83f3dcf1..c2c6c38b97 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.js.diff @@ -1,23 +1,31 @@ --- old.arrayLiteralContextualType.js +++ new.arrayLiteralContextualType.js -@@= skipped -32, +32 lines =@@ +@@= skipped -31, +31 lines =@@ + bar(arr); // ok because arr is Array not {}[] //// [arrayLiteralContextualType.js] - class Giraffe { -- constructor() { +-var Giraffe = /** @class */ (function () { +- function Giraffe() { - this.name = "Giraffe"; - this.neckLength = "3m"; - } -+ name = "Giraffe"; -+ neckLength = "3m"; - } - class Elephant { -- constructor() { +- return Giraffe; +-}()); +-var Elephant = /** @class */ (function () { +- function Elephant() { - this.name = "Elephant"; - this.trunkDiameter = "20cm"; - } +- return Elephant; +-}()); ++class Giraffe { ++ name = "Giraffe"; ++ neckLength = "3m"; ++} ++class Elephant { + name = "Elephant"; + trunkDiameter = "20cm"; - } ++} function foo(animals) { } - function bar(animals) { } \ No newline at end of file + function bar(animals) { } + foo([ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff new file mode 100644 index 0000000000..4367c23518 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralContextualType.types.diff @@ -0,0 +1,43 @@ +--- old.arrayLiteralContextualType.types ++++ new.arrayLiteralContextualType.types +@@= skipped -41, +41 lines =@@ + foo([ + >foo([ new Giraffe(), new Elephant()]) : void + >foo : (animals: IAnimal[]) => void +->[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[] ++>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[] + + new Giraffe(), + >new Giraffe() : Giraffe +@@= skipped -14, +14 lines =@@ + bar([ + >bar([ new Giraffe(), new Elephant()]) : void + >bar : (animals: { [n: number]: IAnimal; }) => void +->[ new Giraffe(), new Elephant()] : (Giraffe | Elephant)[] ++>[ new Giraffe(), new Elephant()] : (Elephant | Giraffe)[] + + new Giraffe(), + >new Giraffe() : Giraffe +@@= skipped -13, +13 lines =@@ + ]); // Legal because of the contextual type IAnimal provided by the parameter + + var arr = [new Giraffe(), new Elephant()]; +->arr : (Giraffe | Elephant)[] +->[new Giraffe(), new Elephant()] : (Giraffe | Elephant)[] ++>arr : (Elephant | Giraffe)[] ++>[new Giraffe(), new Elephant()] : (Elephant | Giraffe)[] + >new Giraffe() : Giraffe + >Giraffe : typeof Giraffe + >new Elephant() : Elephant +@@= skipped -10, +10 lines =@@ + foo(arr); // ok because arr is Array not {}[] + >foo(arr) : void + >foo : (animals: IAnimal[]) => void +->arr : (Giraffe | Elephant)[] ++>arr : (Elephant | Giraffe)[] + + bar(arr); // ok because arr is Array not {}[] + >bar(arr) : void + >bar : (animals: { [n: number]: IAnimal; }) => void +->arr : (Giraffe | Elephant)[] ++>arr : (Elephant | Giraffe)[] diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff new file mode 100644 index 0000000000..29ff770d71 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralInNonVarArgParameter.js.diff @@ -0,0 +1,14 @@ +--- old.arrayLiteralInNonVarArgParameter.js ++++ new.arrayLiteralInNonVarArgParameter.js +@@= skipped -6, +6 lines =@@ + + + //// [arrayLiteralInNonVarArgParameter.js] +-function panic(val) { +- var opt = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- opt[_i - 1] = arguments[_i]; +- } +-} ++function panic(val, ...opt) { } + panic([], 'one', 'two'); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff b/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff index e20b2e7900..975221fc1d 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayLiteralTypeInference.js.diff @@ -1,16 +1,52 @@ --- old.arrayLiteralTypeInference.js +++ new.arrayLiteralTypeInference.js -@@= skipped -54, +54 lines =@@ +@@= skipped -53, +53 lines =@@ + //// [arrayLiteralTypeInference.js] - class Action { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Action = /** @class */ (function () { +- function Action() { +- } +- return Action; +-}()); +-var ActionA = /** @class */ (function (_super) { +- __extends(ActionA, _super); +- function ActionA() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ActionA; +-}(Action)); +-var ActionB = /** @class */ (function (_super) { +- __extends(ActionB, _super); +- function ActionB() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ActionB; +-}(Action)); ++class Action { + id; - } - class ActionA extends Action { ++} ++class ActionA extends Action { + value; - } - class ActionB extends Action { ++} ++class ActionB extends Action { + trueNess; - } ++} var x1 = [ - { id: 2, trueness: false }, \ No newline at end of file + { id: 2, trueness: false }, + { id: 3, name: "three" } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff b/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff index 112d1c3be7..2ed80093d2 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayOfExportedClass.js.diff @@ -1,16 +1,31 @@ --- old.arrayOfExportedClass.js +++ new.arrayOfExportedClass.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + //// [arrayOfExportedClass_0.js] "use strict"; - class Car { +-var Car = /** @class */ (function () { +- function Car() { +- } +- return Car; +-}()); ++class Car { + foo; - } ++} module.exports = Car; //// [arrayOfExportedClass_1.js] "use strict"; - class Road { +-var Road = /** @class */ (function () { +- function Road() { +- } +- Road.prototype.AddCars = function (cars) { ++class Road { + cars; - AddCars(cars) { ++ AddCars(cars) { this.cars = cars; - } \ No newline at end of file +- }; +- return Road; +-}()); ++ } ++} + module.exports = Road; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff index 5684da1ffa..29087e5333 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.js.diff @@ -1,16 +1,52 @@ --- old.arrayOfSubtypeIsAssignableToReadonlyArray.js +++ new.arrayOfSubtypeIsAssignableToReadonlyArray.js -@@= skipped -22, +22 lines =@@ +@@= skipped -21, +21 lines =@@ + //// [arrayOfSubtypeIsAssignableToReadonlyArray.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(Array)); ++class A { + a; - } - class B extends A { ++} ++class B extends A { + b; - } - class C extends Array { ++} ++class C extends Array { + c; - } ++} rra = ara; - rrb = arb; // OK, Array is assignable to ReadonlyArray \ No newline at end of file + rrb = arb; // OK, Array is assignable to ReadonlyArray + rra = arb; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff new file mode 100644 index 0000000000..668dfc052b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.symbols.diff @@ -0,0 +1,26 @@ +--- old.arrayOfSubtypeIsAssignableToReadonlyArray.symbols ++++ new.arrayOfSubtypeIsAssignableToReadonlyArray.symbols +@@= skipped -12, +12 lines =@@ + class C extends Array { c } + >C : Symbol(C, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 1, 23)) + >T : Symbol(T, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 8)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 8)) + >c : Symbol(C.c, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 2, 29)) + +@@= skipped -24, +24 lines =@@ + + declare var rra: ReadonlyArray; + >rra : Symbol(rra, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 7, 11)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >A : Symbol(A, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 0)) + + declare var rrb: ReadonlyArray; + >rrb : Symbol(rrb, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 8, 11)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >B : Symbol(B, Decl(arrayOfSubtypeIsAssignableToReadonlyArray.ts, 0, 13)) + + rra = ara; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff new file mode 100644 index 0000000000..1831e051ca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.js.diff @@ -0,0 +1,15 @@ +--- old.arrayReferenceWithoutTypeArgs.js ++++ new.arrayReferenceWithoutTypeArgs.js +@@= skipped -5, +5 lines =@@ + } + + //// [arrayReferenceWithoutTypeArgs.js] +-var X = /** @class */ (function () { +- function X() { +- } +- X.prototype.f = function (a) { }; +- return X; +-}()); ++class X { ++ f(a) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff new file mode 100644 index 0000000000..d0bd24c2b5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayReferenceWithoutTypeArgs.symbols.diff @@ -0,0 +1,9 @@ +--- old.arrayReferenceWithoutTypeArgs.symbols ++++ new.arrayReferenceWithoutTypeArgs.symbols +@@= skipped -6, +6 lines =@@ + public f(a: Array) { } + >f : Symbol(X.f, Decl(arrayReferenceWithoutTypeArgs.ts, 0, 9)) + >a : Symbol(a, Decl(arrayReferenceWithoutTypeArgs.ts, 1, 13)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt b/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt index e1b1746de5..d39a86ec11 100644 --- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.errors.txt @@ -5,7 +5,7 @@ arraySigChecking.ts(22,16): error TS2322: Type 'number' is not assignable to typ ==== arraySigChecking.ts (4 errors) ==== - declare module M { + declare namespace M { interface iBar { t: any; } interface iFoo extends iBar { s: any; diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.js b/testdata/baselines/reference/submodule/compiler/arraySigChecking.js index f83b5bb3b7..12b13af0ef 100644 --- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.js +++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arraySigChecking.ts] //// //// [arraySigChecking.ts] -declare module M { +declare namespace M { interface iBar { t: any; } interface iFoo extends iBar { s: any; diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols index 10c48f6e6b..d0bccb2385 100644 --- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols +++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols @@ -1,16 +1,16 @@ //// [tests/cases/compiler/arraySigChecking.ts] //// === arraySigChecking.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(arraySigChecking.ts, 0, 0)) interface iBar { t: any; } ->iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 18)) +>iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 21)) >t : Symbol(iBar.t, Decl(arraySigChecking.ts, 1, 20)) interface iFoo extends iBar { >iFoo : Symbol(iFoo, Decl(arraySigChecking.ts, 1, 30)) ->iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 18)) +>iBar : Symbol(iBar, Decl(arraySigChecking.ts, 0, 21)) s: any; >s : Symbol(iFoo.s, Decl(arraySigChecking.ts, 2, 33)) diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff new file mode 100644 index 0000000000..fde66cb6ca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.symbols.diff @@ -0,0 +1,16 @@ +--- old.arraySigChecking.symbols ++++ new.arraySigChecking.symbols +@@= skipped -66, +66 lines =@@ + + isEmpty(new Array(3)); + >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + isEmpty(new Array(3)); + >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + isEmpty(['a']); + >isEmpty : Symbol(isEmpty, Decl(arraySigChecking.ts, 21, 19)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arraySigChecking.types b/testdata/baselines/reference/submodule/compiler/arraySigChecking.types index 0cea993b4f..d496f0dcb0 100644 --- a/testdata/baselines/reference/submodule/compiler/arraySigChecking.types +++ b/testdata/baselines/reference/submodule/compiler/arraySigChecking.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arraySigChecking.ts] //// === arraySigChecking.ts === -declare module M { +declare namespace M { >M : typeof M interface iBar { t: any; } diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff new file mode 100644 index 0000000000..eb8dff5099 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.errors.txt.diff @@ -0,0 +1,129 @@ +--- old.arrayToLocaleStringES5.errors.txt ++++ new.arrayToLocaleStringES5.errors.txt +@@= skipped -0, +0 lines =@@ +- ++arrayToLocaleStringES5.ts(4,26): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(5,26): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(9,28): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(10,28): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(14,32): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(15,32): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(19,33): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(20,33): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(24,40): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(25,40): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(29,33): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(30,33): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(34,34): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(35,34): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(39,33): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(40,33): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(44,34): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(45,34): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(49,35): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(50,35): error TS2554: Expected 0 arguments, but got 2. ++arrayToLocaleStringES5.ts(54,35): error TS2554: Expected 0 arguments, but got 1. ++arrayToLocaleStringES5.ts(55,35): error TS2554: Expected 0 arguments, but got 2. ++ ++ ++==== arrayToLocaleStringES5.ts (22 errors) ==== ++ let str: string; ++ const arr = [1, 2, 3]; ++ str = arr.toLocaleString(); // OK ++ str = arr.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const dates: readonly Date[] = [new Date(), new Date()]; ++ str = dates.toLocaleString(); // OK ++ str = dates.toLocaleString('fr'); // should be error ++ ~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const int8Array = new Int8Array(3); ++ str = int8Array.toLocaleString(); // OK ++ str = int8Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const uint8Array = new Uint8Array(3); ++ str = uint8Array.toLocaleString(); // OK ++ str = uint8Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const uint8ClampedArray = new Uint8ClampedArray(3); ++ str = uint8ClampedArray.toLocaleString(); // OK ++ str = uint8ClampedArray.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const int16Array = new Int16Array(3); ++ str = int16Array.toLocaleString(); // OK ++ str = int16Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const uint16Array = new Uint16Array(3); ++ str = uint16Array.toLocaleString(); // OK ++ str = uint16Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const int32Array = new Int32Array(3); ++ str = int32Array.toLocaleString(); // OK ++ str = int32Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const uint32Array = new Uint32Array(3); ++ str = uint32Array.toLocaleString(); // OK ++ str = uint32Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const float32Array = new Float32Array(3); ++ str = float32Array.toLocaleString(); // OK ++ str = float32Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ ++ const float64Array = new Float64Array(3); ++ str = float64Array.toLocaleString(); // OK ++ str = float64Array.toLocaleString('en-US'); // should be error ++ ~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 1. ++ str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS2554: Expected 0 arguments, but got 2. ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff new file mode 100644 index 0000000000..eb02de8910 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.js.diff @@ -0,0 +1,63 @@ +--- old.arrayToLocaleStringES5.js ++++ new.arrayToLocaleStringES5.js +@@= skipped -58, +58 lines =@@ + + + //// [arrayToLocaleStringES5.js] +-var str; +-var arr = [1, 2, 3]; ++let str; ++const arr = [1, 2, 3]; + str = arr.toLocaleString(); // OK + str = arr.toLocaleString('en-US'); // should be error + str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var dates = [new Date(), new Date()]; ++const dates = [new Date(), new Date()]; + str = dates.toLocaleString(); // OK + str = dates.toLocaleString('fr'); // should be error + str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error +-var int8Array = new Int8Array(3); ++const int8Array = new Int8Array(3); + str = int8Array.toLocaleString(); // OK + str = int8Array.toLocaleString('en-US'); // should be error + str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var uint8Array = new Uint8Array(3); ++const uint8Array = new Uint8Array(3); + str = uint8Array.toLocaleString(); // OK + str = uint8Array.toLocaleString('en-US'); // should be error + str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var uint8ClampedArray = new Uint8ClampedArray(3); ++const uint8ClampedArray = new Uint8ClampedArray(3); + str = uint8ClampedArray.toLocaleString(); // OK + str = uint8ClampedArray.toLocaleString('en-US'); // should be error + str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var int16Array = new Int16Array(3); ++const int16Array = new Int16Array(3); + str = int16Array.toLocaleString(); // OK + str = int16Array.toLocaleString('en-US'); // should be error + str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var uint16Array = new Uint16Array(3); ++const uint16Array = new Uint16Array(3); + str = uint16Array.toLocaleString(); // OK + str = uint16Array.toLocaleString('en-US'); // should be error + str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var int32Array = new Int32Array(3); ++const int32Array = new Int32Array(3); + str = int32Array.toLocaleString(); // OK + str = int32Array.toLocaleString('en-US'); // should be error + str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var uint32Array = new Uint32Array(3); ++const uint32Array = new Uint32Array(3); + str = uint32Array.toLocaleString(); // OK + str = uint32Array.toLocaleString('en-US'); // should be error + str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var float32Array = new Float32Array(3); ++const float32Array = new Float32Array(3); + str = float32Array.toLocaleString(); // OK + str = float32Array.toLocaleString('en-US'); // should be error + str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error +-var float64Array = new Float64Array(3); ++const float64Array = new Float64Array(3); + str = float64Array.toLocaleString(); // OK + str = float64Array.toLocaleString('en-US'); // should be error + str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff new file mode 100644 index 0000000000..66f5e82863 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.symbols.diff @@ -0,0 +1,342 @@ +--- old.arrayToLocaleStringES5.symbols ++++ new.arrayToLocaleStringES5.symbols +@@= skipped -8, +8 lines =@@ + + str = arr.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = arr.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>arr.toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >arr : Symbol(arr, Decl(arrayToLocaleStringES5.ts, 1, 5)) +->toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 4, 35)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 4, 54)) + + const dates: readonly Date[] = [new Date(), new Date()]; + >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + str = dates.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = dates.toLocaleString('fr'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>dates.toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >dates : Symbol(dates, Decl(arrayToLocaleStringES5.ts, 6, 5)) +->toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(ReadonlyArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >timeZone : Symbol(timeZone, Decl(arrayToLocaleStringES5.ts, 9, 34)) + + const int8Array = new Int8Array(3); + >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +->Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = int8Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int8Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int8Array.toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int8Array : Symbol(int8Array, Decl(arrayToLocaleStringES5.ts, 11, 5)) +->toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 14, 41)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 14, 60)) + + const uint8Array = new Uint8Array(3); + >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = uint8Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint8Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8Array.toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8Array : Symbol(uint8Array, Decl(arrayToLocaleStringES5.ts, 16, 5)) +->toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 19, 42)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 19, 61)) + + const uint8ClampedArray = new Uint8ClampedArray(3); + >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +->Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = uint8ClampedArray.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint8ClampedArray.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint8ClampedArray.toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint8ClampedArray : Symbol(uint8ClampedArray, Decl(arrayToLocaleStringES5.ts, 21, 5)) +->toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint8ClampedArray.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 24, 49)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 24, 68)) + + const int16Array = new Int16Array(3); + >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +->Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = int16Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int16Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int16Array.toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int16Array : Symbol(int16Array, Decl(arrayToLocaleStringES5.ts, 26, 5)) +->toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 29, 42)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 29, 61)) + + const uint16Array = new Uint16Array(3); + >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +->Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = uint16Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint16Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint16Array.toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint16Array : Symbol(uint16Array, Decl(arrayToLocaleStringES5.ts, 31, 5)) +->toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint16Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 34, 43)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 34, 62)) + + const int32Array = new Int32Array(3); + >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +->Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = int32Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int32Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>int32Array.toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >int32Array : Symbol(int32Array, Decl(arrayToLocaleStringES5.ts, 36, 5)) +->toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Int32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 39, 42)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 39, 61)) + + const uint32Array = new Uint32Array(3); + >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +->Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = uint32Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint32Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>uint32Array.toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >uint32Array : Symbol(uint32Array, Decl(arrayToLocaleStringES5.ts, 41, 5)) +->toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Uint32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 44, 43)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 44, 62)) + + const float32Array = new Float32Array(3); + >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +->Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = float32Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = float32Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float32Array.toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float32Array : Symbol(float32Array, Decl(arrayToLocaleStringES5.ts, 46, 5)) +->toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float32Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 49, 44)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 49, 63)) + + const float64Array = new Float64Array(3); + >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +->Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + str = float64Array.toLocaleString(); // OK + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = float64Array.toLocaleString('en-US'); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + + str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str : Symbol(str, Decl(arrayToLocaleStringES5.ts, 0, 3)) +->float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>float64Array.toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >float64Array : Symbol(float64Array, Decl(arrayToLocaleStringES5.ts, 51, 5)) +->toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>toLocaleString : Symbol(Float64Array.toLocaleString, Decl(lib.es5.d.ts, --, --)) + >style : Symbol(style, Decl(arrayToLocaleStringES5.ts, 54, 44)) + >currency : Symbol(currency, Decl(arrayToLocaleStringES5.ts, 54, 63)) diff --git a/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff new file mode 100644 index 0000000000..4f141920ff --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayToLocaleStringES5.types.diff @@ -0,0 +1,415 @@ +--- old.arrayToLocaleStringES5.types ++++ new.arrayToLocaleStringES5.types +@@= skipped -14, +14 lines =@@ + >str = arr.toLocaleString() : string + >str : string + >arr.toLocaleString() : string +->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>arr.toLocaleString : () => string + >arr : number[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + + str = arr.toLocaleString('en-US'); // should be error + >str = arr.toLocaleString('en-US') : string + >str : string + >arr.toLocaleString('en-US') : string +->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>arr.toLocaleString : () => string + >arr : number[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >arr.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->arr.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>arr.toLocaleString : () => string + >arr : number[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -39, +39 lines =@@ + >str = dates.toLocaleString() : string + >str : string + >dates.toLocaleString() : string +->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>dates.toLocaleString : () => string + >dates : readonly Date[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + + str = dates.toLocaleString('fr'); // should be error + >str = dates.toLocaleString('fr') : string + >str : string + >dates.toLocaleString('fr') : string +->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>dates.toLocaleString : () => string + >dates : readonly Date[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + >'fr' : "fr" + + str = dates.toLocaleString('fr', { timeZone: 'UTC' }); // should be error + >str = dates.toLocaleString('fr', { timeZone: 'UTC' }) : string + >str : string + >dates.toLocaleString('fr', { timeZone: 'UTC' }) : string +->dates.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>dates.toLocaleString : () => string + >dates : readonly Date[] +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; } ++>toLocaleString : () => string + >'fr' : "fr" + >{ timeZone: 'UTC' } : { timeZone: string; } + >timeZone : string +@@= skipped -35, +35 lines =@@ + >str = int8Array.toLocaleString() : string + >str : string + >int8Array.toLocaleString() : string +->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int8Array.toLocaleString : () => string + >int8Array : Int8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = int8Array.toLocaleString('en-US'); // should be error + >str = int8Array.toLocaleString('en-US') : string + >str : string + >int8Array.toLocaleString('en-US') : string +->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int8Array.toLocaleString : () => string + >int8Array : Int8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >int8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->int8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int8Array.toLocaleString : () => string + >int8Array : Int8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = uint8Array.toLocaleString() : string + >str : string + >uint8Array.toLocaleString() : string +->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8Array.toLocaleString : () => string + >uint8Array : Uint8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = uint8Array.toLocaleString('en-US'); // should be error + >str = uint8Array.toLocaleString('en-US') : string + >str : string + >uint8Array.toLocaleString('en-US') : string +->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8Array.toLocaleString : () => string + >uint8Array : Uint8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >uint8Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->uint8Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8Array.toLocaleString : () => string + >uint8Array : Uint8Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = uint8ClampedArray.toLocaleString() : string + >str : string + >uint8ClampedArray.toLocaleString() : string +->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8ClampedArray.toLocaleString : () => string + >uint8ClampedArray : Uint8ClampedArray +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = uint8ClampedArray.toLocaleString('en-US'); // should be error + >str = uint8ClampedArray.toLocaleString('en-US') : string + >str : string + >uint8ClampedArray.toLocaleString('en-US') : string +->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8ClampedArray.toLocaleString : () => string + >uint8ClampedArray : Uint8ClampedArray +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >uint8ClampedArray.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->uint8ClampedArray.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint8ClampedArray.toLocaleString : () => string + >uint8ClampedArray : Uint8ClampedArray +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = int16Array.toLocaleString() : string + >str : string + >int16Array.toLocaleString() : string +->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int16Array.toLocaleString : () => string + >int16Array : Int16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = int16Array.toLocaleString('en-US'); // should be error + >str = int16Array.toLocaleString('en-US') : string + >str : string + >int16Array.toLocaleString('en-US') : string +->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int16Array.toLocaleString : () => string + >int16Array : Int16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >int16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->int16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int16Array.toLocaleString : () => string + >int16Array : Int16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = uint16Array.toLocaleString() : string + >str : string + >uint16Array.toLocaleString() : string +->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint16Array.toLocaleString : () => string + >uint16Array : Uint16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = uint16Array.toLocaleString('en-US'); // should be error + >str = uint16Array.toLocaleString('en-US') : string + >str : string + >uint16Array.toLocaleString('en-US') : string +->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint16Array.toLocaleString : () => string + >uint16Array : Uint16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >uint16Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->uint16Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint16Array.toLocaleString : () => string + >uint16Array : Uint16Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = int32Array.toLocaleString() : string + >str : string + >int32Array.toLocaleString() : string +->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int32Array.toLocaleString : () => string + >int32Array : Int32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = int32Array.toLocaleString('en-US'); // should be error + >str = int32Array.toLocaleString('en-US') : string + >str : string + >int32Array.toLocaleString('en-US') : string +->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int32Array.toLocaleString : () => string + >int32Array : Int32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >int32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->int32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>int32Array.toLocaleString : () => string + >int32Array : Int32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = uint32Array.toLocaleString() : string + >str : string + >uint32Array.toLocaleString() : string +->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint32Array.toLocaleString : () => string + >uint32Array : Uint32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = uint32Array.toLocaleString('en-US'); // should be error + >str = uint32Array.toLocaleString('en-US') : string + >str : string + >uint32Array.toLocaleString('en-US') : string +->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint32Array.toLocaleString : () => string + >uint32Array : Uint32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >uint32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->uint32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>uint32Array.toLocaleString : () => string + >uint32Array : Uint32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = float32Array.toLocaleString() : string + >str : string + >float32Array.toLocaleString() : string +->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float32Array.toLocaleString : () => string + >float32Array : Float32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = float32Array.toLocaleString('en-US'); // should be error + >str = float32Array.toLocaleString('en-US') : string + >str : string + >float32Array.toLocaleString('en-US') : string +->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float32Array.toLocaleString : () => string + >float32Array : Float32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >float32Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->float32Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float32Array.toLocaleString : () => string + >float32Array : Float32Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" +@@= skipped -37, +37 lines =@@ + >str = float64Array.toLocaleString() : string + >str : string + >float64Array.toLocaleString() : string +->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float64Array.toLocaleString : () => string + >float64Array : Float64Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + + str = float64Array.toLocaleString('en-US'); // should be error + >str = float64Array.toLocaleString('en-US') : string + >str : string + >float64Array.toLocaleString('en-US') : string +->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float64Array.toLocaleString : () => string + >float64Array : Float64Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" + + str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }); // should be error + >str = float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string + >str : string + >float64Array.toLocaleString('en-US', { style: 'currency', currency: 'EUR' }) : string +->float64Array.toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>float64Array.toLocaleString : () => string + >float64Array : Float64Array +->toLocaleString : { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions): string; } ++>toLocaleString : () => string + >'en-US' : "en-US" +->{ style: 'currency', currency: 'EUR' } : { style: "currency"; currency: string; } +->style : "currency" ++>{ style: 'currency', currency: 'EUR' } : { style: string; currency: string; } ++>style : string + >'currency' : "currency" + >currency : string + >'EUR' : "EUR" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js index cffc71656b..b99e5e949b 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js +++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// //// [arrayTypeInSignatureOfInterfaceAndClass.ts] -declare module WinJS { +declare namespace WinJS { class Promise { then(success?: (value: T) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; } } -declare module Data { +declare namespace Data { export interface IListItem { itemIndex: number; key: any; diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols index 263bb0d26b..0ada87f0c0 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// === arrayTypeInSignatureOfInterfaceAndClass.ts === -declare module WinJS { +declare namespace WinJS { >WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0)) class Promise { ->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) +>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) >T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 1, 18)) then(success?: (value: T) => Promise, error?: (error: any) => Promise, progress?: (progress: any) => void): Promise; @@ -14,23 +14,23 @@ declare module WinJS { >success : Symbol(success, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 16)) >value : Symbol(value, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 27)) >T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 1, 18)) ->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) +>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) >U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13)) >error : Symbol(error, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 51)) >error : Symbol(error, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 61)) ->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) +>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) >U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13)) >progress : Symbol(progress, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 87)) >progress : Symbol(progress, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 100)) ->Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) +>Promise : Symbol(Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) >U : Symbol(U, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 2, 13)) } } -declare module Data { +declare namespace Data { >Data : Symbol(Data, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 4, 1)) export interface IListItem { ->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21)) +>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24)) >T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 6, 31)) itemIndex: number; @@ -68,8 +68,8 @@ declare module Data { >indices : Symbol(indices, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 18, 22)) >options : Symbol(options, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 18, 40)) >WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0)) ->Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) ->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21)) +>Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) +>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24)) >T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 16, 34)) } export class VirtualList implements IVirtualList { @@ -84,8 +84,8 @@ declare module Data { >indices : Symbol(indices, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 22, 29)) >options : Symbol(options, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 22, 47)) >WinJS : Symbol(WinJS, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 0)) ->Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 22)) ->IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 21)) +>Promise : Symbol(WinJS.Promise, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 0, 25)) +>IListItem : Symbol(IListItem, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 5, 24)) >T : Symbol(T, Decl(arrayTypeInSignatureOfInterfaceAndClass.ts, 20, 29)) } } diff --git a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types index eabcdbce05..08220130bd 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types +++ b/testdata/baselines/reference/submodule/compiler/arrayTypeInSignatureOfInterfaceAndClass.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrayTypeInSignatureOfInterfaceAndClass.ts] //// === arrayTypeInSignatureOfInterfaceAndClass.ts === -declare module WinJS { +declare namespace WinJS { >WinJS : typeof WinJS class Promise { @@ -17,7 +17,7 @@ declare module WinJS { >progress : any } } -declare module Data { +declare namespace Data { >Data : typeof Data export interface IListItem { diff --git a/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff b/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff index 52f285b2cd..8bfa3caa13 100644 --- a/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrayconcat.js.diff @@ -1,10 +1,25 @@ --- old.arrayconcat.js +++ new.arrayconcat.js -@@= skipped -31, +31 lines =@@ +@@= skipped -30, +30 lines =@@ + } //// [arrayconcat.js] - class parser { +-var parser = /** @class */ (function () { +- function parser() { +- } +- parser.prototype.m = function () { ++class parser { + options; - m() { ++ m() { this.options = this.options.sort(function (a, b) { - var aName = a.name.toLowerCase(); \ No newline at end of file + var aName = a.name.toLowerCase(); + var bName = b.name.toLowerCase(); +@@= skipped -17, +16 lines =@@ + return 0; + } + }); +- }; +- return parser; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff b/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff new file mode 100644 index 0000000000..8ea3093058 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrayconcat.types.diff @@ -0,0 +1,10 @@ +--- old.arrayconcat.types ++++ new.arrayconcat.types +@@= skipped -44, +44 lines =@@ + >this : this + >options : IOptions[] + >sort : (compareFn?: (a: IOptions, b: IOptions) => number) => IOptions[] +->function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => 1 | -1 | 0 ++>function(a, b) { var aName = a.name.toLowerCase(); var bName = b.name.toLowerCase(); if (aName > bName) { return 1; } else if (aName < bName) { return -1; } else { return 0; } } : (a: IOptions, b: IOptions) => -1 | 0 | 1 + >a : IOptions + >b : IOptions diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff index 9db8ead36c..06e40dc3c0 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionErrorSpan.js.diff @@ -1,13 +1,51 @@ --- old.arrowFunctionErrorSpan.js +++ new.arrowFunctionErrorSpan.js -@@= skipped -82, +82 lines =@@ +@@= skipped -58, +58 lines =@@ + //// [arrowFunctionErrorSpan.js] + function f(a) { } + // oneliner +-f(function () { }); ++f(() => { }); + // multiline, body +-f(function () { ++f(() => { + }); + // multiline 2, body +-f(function () { ++f(() => { + }); + // multiline 3, arrow on a new line +-f(function () { }); ++f(() => { }); + // multiline 4, arguments +-f(function (a, b, c, d) { }); ++f((a, b, c, d) => { }); + // single line with a comment + f(/* +- */ function () { }); ++ */ () => { }); + // multi line with a comment + f(/* +- */ function () { }); ++ */ () => { }); + // multi line with a comment 2 + f(/* +- */ function () { ++ */ () => { + }); // multi line with a comment 3 f(// comment 1 // comment 2 --() => { +-function () { +() => +// comment 3 +{ // comment 4 } - // comment 5 \ No newline at end of file + // comment 5 + ); + // body is not a block +-f(function (_) { return 1 + +- 2; }); ++f(_ => 1 + ++ 2); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff new file mode 100644 index 0000000000..5cd9b5d882 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInConstructorArgument1.js.diff @@ -0,0 +1,16 @@ +--- old.arrowFunctionInConstructorArgument1.js ++++ new.arrowFunctionInConstructorArgument1.js +@@= skipped -7, +7 lines =@@ + + + //// [arrowFunctionInConstructorArgument1.js] +-var C = /** @class */ (function () { +- function C(x) { +- } +- return C; +-}()); +-var c = new C(function () { return asdf; }); // should error ++class C { ++ constructor(x) { } ++} ++var c = new C(() => { return asdf; }); // should error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff new file mode 100644 index 0000000000..eddc34b7f4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement1.js.diff @@ -0,0 +1,8 @@ +--- old.arrowFunctionInExpressionStatement1.js ++++ new.arrowFunctionInExpressionStatement1.js +@@= skipped -3, +3 lines =@@ + () => 0; + + //// [arrowFunctionInExpressionStatement1.js] +-(function () { return 0; }); ++() => 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js index e92c5c6b80..ae6bc2fb64 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// //// [arrowFunctionInExpressionStatement2.ts] -module M { +namespace M { () => 0; } diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff new file mode 100644 index 0000000000..71f58c423f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.js.diff @@ -0,0 +1,9 @@ +--- old.arrowFunctionInExpressionStatement2.js ++++ new.arrowFunctionInExpressionStatement2.js +@@= skipped -7, +7 lines =@@ + //// [arrowFunctionInExpressionStatement2.js] + var M; + (function (M) { +- (function () { return 0; }); ++ () => 0; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols index eeb19bb759..ebfd509178 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// === arrowFunctionInExpressionStatement2.ts === -module M { +namespace M { >M : Symbol(M, Decl(arrowFunctionInExpressionStatement2.ts, 0, 0)) () => 0; diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types index af05180173..ce07c07c59 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionInExpressionStatement2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionInExpressionStatement2.ts] //// === arrowFunctionInExpressionStatement2.ts === -module M { +namespace M { >M : typeof M () => 0; diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff new file mode 100644 index 0000000000..cc982c9efe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionMissingCurlyWithSemicolon.js.diff @@ -0,0 +1,11 @@ +--- old.arrowFunctionMissingCurlyWithSemicolon.js ++++ new.arrowFunctionMissingCurlyWithSemicolon.js +@@= skipped -7, +7 lines =@@ + + //// [arrowFunctionMissingCurlyWithSemicolon.js] + // Should error at semicolon. +-var f = function () { return ; }; ++var f = () => ; + var b = 1 * 2 * 3 * 4; +-var square = function (x) { return x * x; }; ++var square = (x) => x * x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff new file mode 100644 index 0000000000..5deec6a8a6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js.diff @@ -0,0 +1,20 @@ +--- old.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js ++++ new.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js +@@= skipped -17, +17 lines =@@ + + + //// [arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.js] +-var test = function () { return ({ ++const test = () => ({ + // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. + prop: !value, // remove ! to see that errors will be gone +- run: function () { ++ run: () => { + // comment next line or remove "()" to see that errors will be gone + if (!a.b()) { + return 'special'; + } + return 'default'; + } +-}); }; ++}); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff new file mode 100644 index 0000000000..44d7145ebd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types.diff @@ -0,0 +1,28 @@ +--- old.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types ++++ new.arrowFunctionParsingDoesNotConfuseParenthesizedObjectForArrowHead.types +@@= skipped -8, +8 lines =@@ + >a : any + + const test = () => ({ +->test : () => { prop: boolean; run: () => "special" | "default"; } +->() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "special" | "default"; } +->({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "special" | "default"; } +->{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "special" | "default"; } ++>test : () => { prop: boolean; run: () => "default" | "special"; } ++>() => ({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : () => { prop: boolean; run: () => "default" | "special"; } ++>({ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }}) : { prop: boolean; run: () => "default" | "special"; } ++>{ // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. prop: !value, // remove ! to see that errors will be gone run: () => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; }} : { prop: boolean; run: () => "default" | "special"; } + + // "Identifier expected." error on "!" and two "Duplicate identifier '(Missing)'." errors on space. + prop: !value, // remove ! to see that errors will be gone +@@= skipped -12, +12 lines =@@ + >value : boolean + + run: () => { //replace arrow function with regular function to see that errors will be gone +->run : () => "special" | "default" +->() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "special" | "default" ++>run : () => "default" | "special" ++>() => { //replace arrow function with regular function to see that errors will be gone // comment next line or remove "()" to see that errors will be gone if(!a.b()) { return 'special'; } return 'default'; } : () => "default" | "special" + + // comment next line or remove "()" to see that errors will be gone + if(!a.b()) { return 'special'; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff index 675e5b6980..0109f00349 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody1.js.diff @@ -4,5 +4,5 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody1.js] --var v = a => ({}); +-var v = function (a) { return ({}); }; +var v = a => (({})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff index b77814c345..403188adf6 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody2.js.diff @@ -4,5 +4,5 @@ var v = a => {} //// [arrowFunctionWithObjectLiteralBody2.js] --var v = a => ({}); +-var v = function (a) { return ({}); }; +var v = a => (({})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff index d407145696..591fd117f0 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionWithObjectLiteralBody5.js.diff @@ -4,9 +4,11 @@ var d = () => ((({ name: "foo", message: "bar" }))); //// [arrowFunctionWithObjectLiteralBody5.js] --var a = () => ({ name: "foo", message: "bar" }); --var b = () => ({ name: "foo", message: "bar" }); +-var a = function () { return ({ name: "foo", message: "bar" }); }; +-var b = function () { return ({ name: "foo", message: "bar" }); }; +-var c = function () { return ({ name: "foo", message: "bar" }); }; +-var d = function () { return ({ name: "foo", message: "bar" }); }; +var a = () => (({ name: "foo", message: "bar" })); +var b = () => (({ name: "foo", message: "bar" })); - var c = () => ({ name: "foo", message: "bar" }); - var d = () => ({ name: "foo", message: "bar" }); \ No newline at end of file ++var c = () => ({ name: "foo", message: "bar" }); ++var d = () => ({ name: "foo", message: "bar" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt index 925b762414..392b446b4d 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.errors.txt @@ -25,7 +25,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. ==== arrowFunctionsMissingTokens.ts (24 errors) ==== - module missingArrowsWithCurly { + namespace missingArrowsWithCurly { var a = () { }; ~ !!! error TS1005: '=>' expected. @@ -47,8 +47,8 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. !!! error TS1005: '=>' expected. } - module missingCurliesWithArrow { - module withStatement { + namespace missingCurliesWithArrow { + namespace withStatement { var a = () => var k = 10;}; ~~~ !!! error TS1005: '{' expected. @@ -74,7 +74,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. !!! error TS1005: '{' expected. } - module withoutStatement { + namespace withoutStatement { var a = () => }; ~ !!! error TS1109: Expression expected. @@ -105,7 +105,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. ~ !!! error TS1128: Declaration or statement expected. - module ce_nEst_pas_une_arrow_function { + namespace ce_nEst_pas_une_arrow_function { var a = (); ~ !!! error TS1109: Expression expected. @@ -127,7 +127,7 @@ arrowFunctionsMissingTokens.ts(52,41): error TS1005: '=>' expected. !!! error TS1005: '=>' expected. } - module okay { + namespace okay { var a = () => { }; var b = (): void => { } diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js index 53d2565dfb..a7534a4bb7 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// //// [arrowFunctionsMissingTokens.ts] -module missingArrowsWithCurly { +namespace missingArrowsWithCurly { var a = () { }; var b = (): void { } @@ -13,8 +13,8 @@ module missingArrowsWithCurly { var e = (x: number, y: string): void { }; } -module missingCurliesWithArrow { - module withStatement { +namespace missingCurliesWithArrow { + namespace withStatement { var a = () => var k = 10;}; var b = (): void => var k = 10;} @@ -28,7 +28,7 @@ module missingCurliesWithArrow { var f = () => var k = 10;} } - module withoutStatement { + namespace withoutStatement { var a = () => }; var b = (): void => } @@ -43,7 +43,7 @@ module missingCurliesWithArrow { } } -module ce_nEst_pas_une_arrow_function { +namespace ce_nEst_pas_une_arrow_function { var a = (); var b = (): void; @@ -55,7 +55,7 @@ module ce_nEst_pas_une_arrow_function { var e = (x: number, y: string): void; } -module okay { +namespace okay { var a = () => { }; var b = (): void => { } diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff new file mode 100644 index 0000000000..042204f1be --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.js.diff @@ -0,0 +1,83 @@ +--- old.arrowFunctionsMissingTokens.js ++++ new.arrowFunctionsMissingTokens.js +@@= skipped -69, +69 lines =@@ + //// [arrowFunctionsMissingTokens.js] + var missingArrowsWithCurly; + (function (missingArrowsWithCurly) { +- var a = function () { }; +- var b = function () { }; +- var c = function (x) { }; +- var d = function (x, y) { }; +- var e = function (x, y) { }; ++ var a = () => { }; ++ var b = () => { }; ++ var c = (x) => { }; ++ var d = (x, y) => { }; ++ var e = (x, y) => { }; + })(missingArrowsWithCurly || (missingArrowsWithCurly = {})); + var missingCurliesWithArrow; + (function (missingCurliesWithArrow) { +- var withStatement; ++ let withStatement; + (function (withStatement) { +- var a = function () { var k = 10; }; +- var b = function () { var k = 10; }; +- var c = function (x) { var k = 10; }; +- var d = function (x, y) { var k = 10; }; +- var e = function (x, y) { var k = 10; }; +- var f = function () { var k = 10; }; ++ var a = () => { var k = 10; }; ++ var b = () => { var k = 10; }; ++ var c = (x) => { var k = 10; }; ++ var d = (x, y) => { var k = 10; }; ++ var e = (x, y) => { var k = 10; }; ++ var f = () => { var k = 10; }; + })(withStatement || (withStatement = {})); +- var withoutStatement; ++ let withoutStatement; + (function (withoutStatement) { +- var a = function () { return ; }; ++ var a = () => ; + })(withoutStatement || (withoutStatement = {})); + ; +- var b = function () { return ; }; ++ var b = () => ; + })(missingCurliesWithArrow || (missingCurliesWithArrow = {})); +-var c = function (x) { return ; }; +-; +-var d = function (x, y) { return ; }; +-; +-var e = function (x, y) { return ; }; +-; +-var f = function () { return ; }; ++var c = (x) => ; ++; ++var d = (x, y) => ; ++; ++var e = (x, y) => ; ++; ++var f = () => ; + var ce_nEst_pas_une_arrow_function; + (function (ce_nEst_pas_une_arrow_function) { + var a = (); +- var b = function () { return ; }; ++ var b = () => ; + var c = (x); +- var d = function (x, y) { return ; }; +- var e = function (x, y) { return ; }; ++ var d = (x, y) => ; ++ var e = (x, y) => ; + })(ce_nEst_pas_une_arrow_function || (ce_nEst_pas_une_arrow_function = {})); + var okay; + (function (okay) { +- var a = function () { }; +- var b = function () { }; +- var c = function (x) { }; +- var d = function (x, y) { }; +- var e = function (x, y) { }; ++ var a = () => { }; ++ var b = () => { }; ++ var c = (x) => { }; ++ var d = (x, y) => { }; ++ var e = (x, y) => { }; + })(okay || (okay = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols index fb67a28d35..10e0034c8e 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// === arrowFunctionsMissingTokens.ts === -module missingArrowsWithCurly { +namespace missingArrowsWithCurly { >missingArrowsWithCurly : Symbol(missingArrowsWithCurly, Decl(arrowFunctionsMissingTokens.ts, 0, 0)) var a = () { }; @@ -25,11 +25,11 @@ module missingArrowsWithCurly { >y : Symbol(y, Decl(arrowFunctionsMissingTokens.ts, 9, 23)) } -module missingCurliesWithArrow { +namespace missingCurliesWithArrow { >missingCurliesWithArrow : Symbol(missingCurliesWithArrow, Decl(arrowFunctionsMissingTokens.ts, 10, 1)) - module withStatement { ->withStatement : Symbol(withStatement, Decl(arrowFunctionsMissingTokens.ts, 12, 32)) + namespace withStatement { +>withStatement : Symbol(withStatement, Decl(arrowFunctionsMissingTokens.ts, 12, 35)) var a = () => var k = 10;}; >a : Symbol(a, Decl(arrowFunctionsMissingTokens.ts, 14, 11)) @@ -61,7 +61,7 @@ module missingCurliesWithArrow { >k : Symbol(k, Decl(arrowFunctionsMissingTokens.ts, 24, 25)) } - module withoutStatement { + namespace withoutStatement { >withoutStatement : Symbol(withoutStatement, Decl(arrowFunctionsMissingTokens.ts, 25, 5)) var a = () => }; @@ -89,7 +89,7 @@ module missingCurliesWithArrow { } } -module ce_nEst_pas_une_arrow_function { +namespace ce_nEst_pas_une_arrow_function { >ce_nEst_pas_une_arrow_function : Symbol(ce_nEst_pas_une_arrow_function, Decl(arrowFunctionsMissingTokens.ts, 40, 1)) var a = (); @@ -112,7 +112,7 @@ module ce_nEst_pas_une_arrow_function { >y : Symbol(y, Decl(arrowFunctionsMissingTokens.ts, 51, 23)) } -module okay { +namespace okay { >okay : Symbol(okay, Decl(arrowFunctionsMissingTokens.ts, 52, 1)) var a = () => { }; diff --git a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types index a36e955340..08a13d8c6d 100644 --- a/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types +++ b/testdata/baselines/reference/submodule/compiler/arrowFunctionsMissingTokens.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/arrowFunctionsMissingTokens.ts] //// === arrowFunctionsMissingTokens.ts === -module missingArrowsWithCurly { +namespace missingArrowsWithCurly { >missingArrowsWithCurly : typeof missingArrowsWithCurly var a = () { }; @@ -30,10 +30,10 @@ module missingArrowsWithCurly { >y : string } -module missingCurliesWithArrow { +namespace missingCurliesWithArrow { >missingCurliesWithArrow : typeof missingCurliesWithArrow - module withStatement { + namespace withStatement { >withStatement : typeof withStatement var a = () => var k = 10;}; @@ -78,7 +78,7 @@ module missingCurliesWithArrow { >10 : 10 } - module withoutStatement { + namespace withoutStatement { >withoutStatement : typeof withoutStatement var a = () => }; @@ -118,7 +118,7 @@ module missingCurliesWithArrow { } } -module ce_nEst_pas_une_arrow_function { +namespace ce_nEst_pas_une_arrow_function { >ce_nEst_pas_une_arrow_function : typeof ce_nEst_pas_une_arrow_function var a = (); @@ -151,7 +151,7 @@ module ce_nEst_pas_une_arrow_function { > : any } -module okay { +namespace okay { >okay : typeof okay var a = () => { }; diff --git a/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff b/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff index 6bd52baaf9..43d21cd42a 100644 --- a/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asiAbstract.js.diff @@ -1,13 +1,33 @@ --- old.asiAbstract.js +++ new.asiAbstract.js -@@= skipped -21, +21 lines =@@ - class NonAbstractClass { - } - class C2 { +@@= skipped -18, +18 lines =@@ + + //// [asiAbstract.js] + abstract; +-var NonAbstractClass = /** @class */ (function () { +- function NonAbstractClass() { +- } +- return NonAbstractClass; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- C2.prototype.nonAbstractFunction = function () { +- }; +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); ++class NonAbstractClass { ++} ++class C2 { + abstract; - nonAbstractFunction() { - } - } - class C3 { ++ nonAbstractFunction() { ++ } ++} ++class C3 { + abstract; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff b/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff index 36b098082a..ebde65b8fe 100644 --- a/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asiInES6Classes.js.diff @@ -1,17 +1,24 @@ --- old.asiInES6Classes.js +++ new.asiInES6Classes.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + //// [asiInES6Classes.js] - class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.defaults = { - done: false - }; - } +- Foo.prototype.bar = function () { +- return 3; ++class Foo { + defaults = { + done: false -+ }; - bar() { - return 3; - } \ No newline at end of file + }; +- return Foo; +-}()); ++ bar() { ++ return 3; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff b/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff index 952e909287..dfdd6ef777 100644 --- a/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asiPublicPrivateProtected.js.diff @@ -1,31 +1,87 @@ --- old.asiPublicPrivateProtected.js +++ new.asiPublicPrivateProtected.js -@@= skipped -48, +48 lines =@@ - } - } - class NonPublicClass2 { +@@= skipped -43, +43 lines =@@ + + //// [asiPublicPrivateProtected.js] + public; +-var NonPublicClass = /** @class */ (function () { +- function NonPublicClass() { +- } +- NonPublicClass.prototype.s = function () { +- }; +- return NonPublicClass; +-}()); +-var NonPublicClass2 = /** @class */ (function () { +- function NonPublicClass2() { +- } +- NonPublicClass2.prototype.nonPublicFunction = function () { +- }; +- return NonPublicClass2; +-}()); ++class NonPublicClass { ++ s() { ++ } ++} ++class NonPublicClass2 { + public; - nonPublicFunction() { - } - } -@@= skipped -9, +10 lines =@@ - } - } - class NonPrivateClass2 { ++ nonPublicFunction() { ++ } ++} + private; +-var NonPrivateClass = /** @class */ (function () { +- function NonPrivateClass() { +- } +- NonPrivateClass.prototype.s = function () { +- }; +- return NonPrivateClass; +-}()); +-var NonPrivateClass2 = /** @class */ (function () { +- function NonPrivateClass2() { +- } +- NonPrivateClass2.prototype.nonPrivateFunction = function () { +- }; +- return NonPrivateClass2; +-}()); ++class NonPrivateClass { ++ s() { ++ } ++} ++class NonPrivateClass2 { + private; - nonPrivateFunction() { - } - } -@@= skipped -9, +10 lines =@@ - } - } - class NonProtectedClass2 { ++ nonPrivateFunction() { ++ } ++} + protected; +-var NonProtectedClass = /** @class */ (function () { +- function NonProtectedClass() { +- } +- NonProtectedClass.prototype.s = function () { +- }; +- return NonProtectedClass; +-}()); +-var NonProtectedClass2 = /** @class */ (function () { +- function NonProtectedClass2() { +- } +- NonProtectedClass2.prototype.nonProtectedFunction = function () { +- }; +- return NonProtectedClass2; +-}()); +-var ClassWithThreeMembers = /** @class */ (function () { +- function ClassWithThreeMembers() { +- } +- return ClassWithThreeMembers; +-}()); ++class NonProtectedClass { ++ s() { ++ } ++} ++class NonProtectedClass2 { + protected; - nonProtectedFunction() { - } - } - class ClassWithThreeMembers { ++ nonProtectedFunction() { ++ } ++} ++class ClassWithThreeMembers { + public; + private; + protected; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff new file mode 100644 index 0000000000..db5e9d58ef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assertInWrapSomeTypeParameter.js.diff @@ -0,0 +1,18 @@ +--- old.assertInWrapSomeTypeParameter.js ++++ new.assertInWrapSomeTypeParameter.js +@@= skipped -7, +7 lines =@@ + } + + //// [assertInWrapSomeTypeParameter.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function (x) { ++class C { ++ foo(x) { + return null; +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff b/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff index bed1d3aed5..2b62575c83 100644 --- a/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assertionFunctionsCanNarrowByDiscriminant.js.diff @@ -5,6 +5,11 @@ //// [assertionFunctionsCanNarrowByDiscriminant.js] -"use strict"; - const animal = { type: 'cat', canMeow: true }; +-var animal = { type: 'cat', canMeow: true }; ++const animal = { type: 'cat', canMeow: true }; assertEqual(animal.type, 'cat'); - animal.canMeow; // since is cat, should not be an error \ No newline at end of file + animal.canMeow; // since is cat, should not be an error +-var animalOrUndef = { type: 'cat', canMeow: true }; ++const animalOrUndef = { type: 'cat', canMeow: true }; + assertEqual(animalOrUndef === null || animalOrUndef === void 0 ? void 0 : animalOrUndef.type, 'cat'); + animalOrUndef.canMeow; // since is cat, should not be an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assign1.js b/testdata/baselines/reference/submodule/compiler/assign1.js index af4babfa4a..c39e154983 100644 --- a/testdata/baselines/reference/submodule/compiler/assign1.js +++ b/testdata/baselines/reference/submodule/compiler/assign1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assign1.ts] //// //// [assign1.ts] -module M { +namespace M { interface I { salt:number; pepper:number; diff --git a/testdata/baselines/reference/submodule/compiler/assign1.symbols b/testdata/baselines/reference/submodule/compiler/assign1.symbols index e620d27a42..ca637620df 100644 --- a/testdata/baselines/reference/submodule/compiler/assign1.symbols +++ b/testdata/baselines/reference/submodule/compiler/assign1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assign1.ts] //// === assign1.ts === -module M { +namespace M { >M : Symbol(M, Decl(assign1.ts, 0, 0)) interface I { ->I : Symbol(I, Decl(assign1.ts, 0, 10)) +>I : Symbol(I, Decl(assign1.ts, 0, 13)) salt:number; >salt : Symbol(I.salt, Decl(assign1.ts, 1, 17)) @@ -16,7 +16,7 @@ module M { var x:I={salt:2,pepper:0}; >x : Symbol(x, Decl(assign1.ts, 6, 7)) ->I : Symbol(I, Decl(assign1.ts, 0, 10)) +>I : Symbol(I, Decl(assign1.ts, 0, 13)) >salt : Symbol(salt, Decl(assign1.ts, 6, 13)) >pepper : Symbol(pepper, Decl(assign1.ts, 6, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/assign1.types b/testdata/baselines/reference/submodule/compiler/assign1.types index 8fe84ed77e..039ca28a93 100644 --- a/testdata/baselines/reference/submodule/compiler/assign1.types +++ b/testdata/baselines/reference/submodule/compiler/assign1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assign1.ts] //// === assign1.ts === -module M { +namespace M { >M : typeof M interface I { diff --git a/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff new file mode 100644 index 0000000000..9feb112a87 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.js.diff @@ -0,0 +1,9 @@ +--- old.assignLambdaToNominalSubtypeOfFunction.js ++++ new.assignLambdaToNominalSubtypeOfFunction.js +@@= skipped -12, +12 lines =@@ + + //// [assignLambdaToNominalSubtypeOfFunction.js] + function fn(cb) { } +-fn(function (a, b) { return true; }); ++fn((a, b) => true); + fn(function (a, b) { return true; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff new file mode 100644 index 0000000000..26d5e3319a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignLambdaToNominalSubtypeOfFunction.symbols.diff @@ -0,0 +1,11 @@ +--- old.assignLambdaToNominalSubtypeOfFunction.symbols ++++ new.assignLambdaToNominalSubtypeOfFunction.symbols +@@= skipped -2, +2 lines =@@ + === assignLambdaToNominalSubtypeOfFunction.ts === + interface IResultCallback extends Function { + >IResultCallback : Symbol(IResultCallback, Decl(assignLambdaToNominalSubtypeOfFunction.ts, 0, 0)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + x: number; + >x : Symbol(IResultCallback.x, Decl(assignLambdaToNominalSubtypeOfFunction.ts, 0, 44)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt index aa2cfd5c1e..0a8b913d0f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.errors.txt @@ -2,7 +2,7 @@ assignToExistingClass.ts(8,13): error TS2629: Cannot assign to 'Mocked' because ==== assignToExistingClass.ts (1 errors) ==== - module Test { + namespace Test { class Mocked { myProp: string; } diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js index 2b5a144064..733ea242ce 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js +++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToExistingClass.ts] //// //// [assignToExistingClass.ts] -module Test { +namespace Test { class Mocked { myProp: string; } diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff index 766ff8bd25..90348cb71f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.js.diff @@ -1,10 +1,29 @@ --- old.assignToExistingClass.js +++ new.assignToExistingClass.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + //// [assignToExistingClass.js] var Test; (function (Test) { - class Mocked { +- var Mocked = /** @class */ (function () { +- function Mocked() { +- } +- return Mocked; +- }()); +- var Tester = /** @class */ (function () { +- function Tester() { +- } +- Tester.prototype.willThrowError = function () { ++ class Mocked { + myProp; - } - class Tester { - willThrowError() { \ No newline at end of file ++ } ++ class Tester { ++ willThrowError() { + Mocked = Mocked || function () { + return { myProp: "test" }; + }; +- }; +- return Tester; +- }()); ++ } ++ } + })(Test || (Test = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols index e089cd5c43..87cc1e454a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignToExistingClass.ts] //// === assignToExistingClass.ts === -module Test { +namespace Test { >Test : Symbol(Test, Decl(assignToExistingClass.ts, 0, 0)) class Mocked { ->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13)) +>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16)) myProp: string; >myProp : Symbol(Mocked.myProp, Decl(assignToExistingClass.ts, 1, 18)) @@ -18,8 +18,8 @@ module Test { >willThrowError : Symbol(Tester.willThrowError, Decl(assignToExistingClass.ts, 5, 18)) Mocked = Mocked || function () { // => Error: Invalid left-hand side of assignment expression. ->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13)) ->Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 13)) +>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16)) +>Mocked : Symbol(Mocked, Decl(assignToExistingClass.ts, 0, 16)) return { myProp: "test" }; >myProp : Symbol(myProp, Decl(assignToExistingClass.ts, 8, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types index d49869e1f6..d840424307 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types +++ b/testdata/baselines/reference/submodule/compiler/assignToExistingClass.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToExistingClass.ts] //// === assignToExistingClass.ts === -module Test { +namespace Test { >Test : typeof Test class Mocked { diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt index cc1b83bf65..66f8276193 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignToFn.errors.txt @@ -2,7 +2,7 @@ assignToFn.ts(8,5): error TS2322: Type 'string' is not assignable to type '(n: n ==== assignToFn.ts (1 errors) ==== - module M { + namespace M { interface I { f(n:number):boolean; } diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.js b/testdata/baselines/reference/submodule/compiler/assignToFn.js index 13becfdcfe..38f70b78b4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToFn.js +++ b/testdata/baselines/reference/submodule/compiler/assignToFn.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToFn.ts] //// //// [assignToFn.ts] -module M { +namespace M { interface I { f(n:number):boolean; } diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.symbols b/testdata/baselines/reference/submodule/compiler/assignToFn.symbols index cc7cbce689..d61556731a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToFn.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignToFn.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignToFn.ts] //// === assignToFn.ts === -module M { +namespace M { >M : Symbol(M, Decl(assignToFn.ts, 0, 0)) interface I { ->I : Symbol(I, Decl(assignToFn.ts, 0, 10)) +>I : Symbol(I, Decl(assignToFn.ts, 0, 13)) f(n:number):boolean; >f : Symbol(I.f, Decl(assignToFn.ts, 1, 17)) @@ -14,7 +14,7 @@ module M { var x:I={ f:function(n) { return true; } }; >x : Symbol(x, Decl(assignToFn.ts, 5, 7)) ->I : Symbol(I, Decl(assignToFn.ts, 0, 10)) +>I : Symbol(I, Decl(assignToFn.ts, 0, 13)) >f : Symbol(f, Decl(assignToFn.ts, 5, 13)) >n : Symbol(n, Decl(assignToFn.ts, 5, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/assignToFn.types b/testdata/baselines/reference/submodule/compiler/assignToFn.types index 70709a60ce..8410da50e7 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToFn.types +++ b/testdata/baselines/reference/submodule/compiler/assignToFn.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToFn.ts] //// === assignToFn.ts === -module M { +namespace M { >M : typeof M interface I { diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt b/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt index 3b0a5bb65a..cba8fa1ae1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignToModule.errors.txt @@ -2,7 +2,7 @@ assignToModule.ts(2,1): error TS2708: Cannot use namespace 'A' as a value. ==== assignToModule.ts (1 errors) ==== - module A {} + namespace A {} A = undefined; // invalid LHS ~ !!! error TS2708: Cannot use namespace 'A' as a value. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.js b/testdata/baselines/reference/submodule/compiler/assignToModule.js index 086dc5c44f..16e68d534f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToModule.js +++ b/testdata/baselines/reference/submodule/compiler/assignToModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToModule.ts] //// //// [assignToModule.ts] -module A {} +namespace A {} A = undefined; // invalid LHS //// [assignToModule.js] diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.symbols b/testdata/baselines/reference/submodule/compiler/assignToModule.symbols index 60b02202d4..978a77e1a5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignToModule.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToModule.ts] //// === assignToModule.ts === -module A {} +namespace A {} >A : Symbol(A, Decl(assignToModule.ts, 0, 0)) A = undefined; // invalid LHS diff --git a/testdata/baselines/reference/submodule/compiler/assignToModule.types b/testdata/baselines/reference/submodule/compiler/assignToModule.types index 911c2820d1..3e224a27c0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignToModule.types +++ b/testdata/baselines/reference/submodule/compiler/assignToModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignToModule.ts] //// === assignToModule.ts === -module A {} +namespace A {} A = undefined; // invalid LHS >A = undefined : undefined >A : any diff --git a/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff b/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff new file mode 100644 index 0000000000..734817438b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignToObjectTypeWithPrototypeProperty.js.diff @@ -0,0 +1,15 @@ +--- old.assignToObjectTypeWithPrototypeProperty.js ++++ new.assignToObjectTypeWithPrototypeProperty.js +@@= skipped -5, +5 lines =@@ + var x: {prototype: XEvent} = XEvent; + + //// [assignToObjectTypeWithPrototypeProperty.js] +-var XEvent = /** @class */ (function () { +- function XEvent() { +- } +- return XEvent; +-}()); ++class XEvent { ++} + var p = XEvent.prototype; + var x = XEvent; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff index 2691a4b4fc..625e588d07 100644 --- a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.errors.txt.diff @@ -2,7 +2,7 @@ +++ new.assigningFromObjectToAnythingElse.errors.txt @@= skipped -0, +0 lines =@@ -assigningFromObjectToAnythingElse.ts(3,1): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -- Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more. +- Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 11 more. +assigningFromObjectToAnythingElse.ts(3,1): error TS2322: Type 'Object' is not assignable to type 'RegExp'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more. @@ -21,7 +21,7 @@ y = x; ~ -!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? --!!! error TS2696: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more. +-!!! error TS2696: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 11 more. +!!! error TS2322: Type 'Object' is not assignable to type 'RegExp'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' is missing the following properties from type 'RegExp': exec, test, source, global, and 4 more. diff --git a/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff new file mode 100644 index 0000000000..371fb251f6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assigningFromObjectToAnythingElse.symbols.diff @@ -0,0 +1,29 @@ +--- old.assigningFromObjectToAnythingElse.symbols ++++ new.assigningFromObjectToAnythingElse.symbols +@@= skipped -6, +6 lines =@@ + + var y: RegExp; + >y : Symbol(y, Decl(assigningFromObjectToAnythingElse.ts, 1, 3)) +->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + y = x; + >y : Symbol(y, Decl(assigningFromObjectToAnythingElse.ts, 1, 3)) +@@= skipped -8, +8 lines =@@ + + var a: String = Object.create(""); + >a : Symbol(a, Decl(assigningFromObjectToAnythingElse.ts, 4, 3)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +@@= skipped -8, +8 lines =@@ + + var c: String = Object.create(1); + >c : Symbol(c, Decl(assigningFromObjectToAnythingElse.ts, 5, 3)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assigningFunctionToTupleIssuesError.js.diff b/testdata/baselines/reference/submodule/compiler/assigningFunctionToTupleIssuesError.js.diff new file mode 100644 index 0000000000..00c1a9aa6b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assigningFunctionToTupleIssuesError.js.diff @@ -0,0 +1,8 @@ +--- old.assigningFunctionToTupleIssuesError.js ++++ new.assigningFunctionToTupleIssuesError.js +@@= skipped -4, +4 lines =@@ + let b: [string] = a; + + //// [assigningFunctionToTupleIssuesError.js] +-var b = a; ++let b = a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatBug2.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug2.js.diff new file mode 100644 index 0000000000..f919f0b920 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug2.js.diff @@ -0,0 +1,55 @@ +--- old.assignmentCompatBug2.js ++++ new.assignmentCompatBug2.js +@@= skipped -45, +45 lines =@@ + b2 = { b: 0, a: 0 }; + var b3; + b3 = { +- f: function (n) { return 0; }, +- g: function (s) { return 0; }, +- m: 0, +-}; // ok +-b3 = { +- f: function (n) { return 0; }, +- g: function (s) { return 0; }, +-}; // error +-b3 = { +- f: function (n) { return 0; }, +- m: 0, +-}; // error +-b3 = { +- f: function (n) { return 0; }, +- g: function (s) { return 0; }, +- m: 0, +- n: 0, +- k: function (a) { return null; }, +-}; // ok +-b3 = { +- f: function (n) { return 0; }, +- g: function (s) { return 0; }, +- n: 0, +- k: function (a) { return null; }, ++ f: (n) => { return 0; }, ++ g: (s) => { return 0; }, ++ m: 0, ++}; // ok ++b3 = { ++ f: (n) => { return 0; }, ++ g: (s) => { return 0; }, ++}; // error ++b3 = { ++ f: (n) => { return 0; }, ++ m: 0, ++}; // error ++b3 = { ++ f: (n) => { return 0; }, ++ g: (s) => { return 0; }, ++ m: 0, ++ n: 0, ++ k: (a) => { return null; }, ++}; // ok ++b3 = { ++ f: (n) => { return 0; }, ++ g: (s) => { return 0; }, ++ n: 0, ++ k: (a) => { return null; }, + }; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.js.diff new file mode 100644 index 0000000000..03924aa810 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.js.diff @@ -0,0 +1,25 @@ +--- old.assignmentCompatBug3.js ++++ new.assignmentCompatBug3.js +@@= skipped -38, +38 lines =@@ + } + }; + } +-var C = /** @class */ (function () { +- function C() { ++class C { ++ get x() { ++ return 0; + } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return 0; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++} + function foo(test) { } + var x; + var y; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.symbols.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.symbols.diff new file mode 100644 index 0000000000..42783c4890 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug3.symbols.diff @@ -0,0 +1,11 @@ +--- old.assignmentCompatBug3.symbols ++++ new.assignmentCompatBug3.symbols +@@= skipped -21, +21 lines =@@ + + return Math.sqrt(x*x+y*y); // shouldn't be picking up "x" and "y" from the object lit + >Math.sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) + >x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) + >x : Symbol(x, Decl(assignmentCompatBug3.ts, 0, 19)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatBug5.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug5.js.diff new file mode 100644 index 0000000000..8eeb484769 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatBug5.js.diff @@ -0,0 +1,10 @@ +--- old.assignmentCompatBug5.js ++++ new.assignmentCompatBug5.js +@@= skipped -19, +19 lines =@@ + foo2(["s", "t"]); + function foo3(x) { } + ; +-foo3(function (s) { }); +-foo3(function (n) { return; }); ++foo3((s) => { }); ++foo3((n) => { return; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatInterfaceWithStringIndexSignature.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatInterfaceWithStringIndexSignature.js.diff new file mode 100644 index 0000000000..c3709287b7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatInterfaceWithStringIndexSignature.js.diff @@ -0,0 +1,17 @@ +--- old.assignmentCompatInterfaceWithStringIndexSignature.js ++++ new.assignmentCompatInterfaceWithStringIndexSignature.js +@@= skipped -18, +18 lines =@@ + + + //// [assignmentCompatInterfaceWithStringIndexSignature.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.Boz = function () { }; +- return Foo; +-}()); ++class Foo { ++ Boz() { } ++} + function Biz(map) { } + Biz(new Foo()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatOnNew.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatOnNew.js.diff new file mode 100644 index 0000000000..3ad997610e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatOnNew.js.diff @@ -0,0 +1,16 @@ +--- old.assignmentCompatOnNew.js ++++ new.assignmentCompatOnNew.js +@@= skipped -8, +8 lines =@@ + + + //// [assignmentCompatOnNew.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + ; + function bar(x) { } + bar(Foo); // Error, but should be allowed \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatWithOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatWithOverloads.js.diff new file mode 100644 index 0000000000..735f956893 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatWithOverloads.js.diff @@ -0,0 +1,16 @@ +--- old.assignmentCompatWithOverloads.js ++++ new.assignmentCompatWithOverloads.js +@@= skipped -41, +41 lines =@@ + g = f2; // Error + g = f3; // Error + g = f4; // Error +-var C = /** @class */ (function () { +- function C(x) { +- } +- return C; +-}()); ++class C { ++ constructor(x) { } ++} + var d; + d = C; // Error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.js index ef48a50242..014b53e74c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability1.ts] //// //// [assignmentCompatability1.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa = {};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.symbols index 105f5f13e5..028d9feaf1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability1.ts] //// === assignmentCompatability1.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability1.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability1.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability1.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability1.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability1.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability1.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability1.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability1.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability1.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability1.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability1.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability1.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability1.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability1.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability1.ts, 3, 1)) export var aa = {};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.types index 4a826c5cb3..26c601eb74 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability1.ts] //// === assignmentCompatability1.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa = {};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js index b8ecadf470..a522c31fce 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability10.ts] //// //// [assignmentCompatability10.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublicAndOptional { constructor(public one: T, public two?: U) {} } var x4 = new classWithPublicAndOptional(1);; export var __val__x4 = x4; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js.diff index 7737dcaf33..844f4e1afc 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.js.diff @@ -1,11 +1,21 @@ --- old.assignmentCompatability10.js +++ new.assignmentCompatability10.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithPublicAndOptional { +- var classWithPublicAndOptional = /** @class */ (function () { +- function classWithPublicAndOptional(one, two) { ++ class classWithPublicAndOptional { + one; + two; - constructor(one, two) { ++ constructor(one, two) { this.one = one; - this.two = two; \ No newline at end of file + this.two = two; + } +- return classWithPublicAndOptional; +- }()); ++ } + __test2__.classWithPublicAndOptional = classWithPublicAndOptional; + var x4 = new classWithPublicAndOptional(1); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.symbols index 92db9a5918..341f402a00 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability10.ts] //// === assignmentCompatability10.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability10.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability10.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability10.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability10.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability10.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability10.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability10.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability10.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability10.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability10.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability10.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability10.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability10.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability10.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability10.ts, 3, 1)) export class classWithPublicAndOptional { constructor(public one: T, public two?: U) {} } var x4 = new classWithPublicAndOptional(1);; ->classWithPublicAndOptional : Symbol(classWithPublicAndOptional, Decl(assignmentCompatability10.ts, 4, 18)) +>classWithPublicAndOptional : Symbol(classWithPublicAndOptional, Decl(assignmentCompatability10.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability10.ts, 5, 44)) >U : Symbol(U, Decl(assignmentCompatability10.ts, 5, 46)) >one : Symbol(classWithPublicAndOptional.one, Decl(assignmentCompatability10.ts, 5, 63)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(classWithPublicAndOptional.two, Decl(assignmentCompatability10.ts, 5, 77)) >U : Symbol(U, Decl(assignmentCompatability10.ts, 5, 46)) >x4 : Symbol(x4, Decl(assignmentCompatability10.ts, 5, 104)) ->classWithPublicAndOptional : Symbol(classWithPublicAndOptional, Decl(assignmentCompatability10.ts, 4, 18)) +>classWithPublicAndOptional : Symbol(classWithPublicAndOptional, Decl(assignmentCompatability10.ts, 4, 21)) export var __val__x4 = x4; >__val__x4 : Symbol(__val__x4, Decl(assignmentCompatability10.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.types index 1a685c0ec4..ac252be205 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability10.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability10.ts] //// === assignmentCompatability10.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithPublicAndOptional { constructor(public one: T, public two?: U) {} } var x4 = new classWithPublicAndOptional(1);; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.errors.txt index 73418f7911..2b95f6692e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability11.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability11.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: 1}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.js index 80014b6203..82de662e63 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability11.ts] //// //// [assignmentCompatability11.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: 1}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.symbols index dfb292c469..f36d1f17a5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability11.ts] //// === assignmentCompatability11.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability11.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability11.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability11.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability11.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability11.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability11.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability11.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability11.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability11.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability11.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability11.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability11.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability11.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability11.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability11.ts, 3, 1)) export var obj = {two: 1}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.types index 7a91eb1d58..412efac06b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability11.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability11.ts] //// === assignmentCompatability11.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: 1}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.errors.txt index 4156d20c5a..1e1f4da48e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability12.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability12.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: "1"}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.js index a061c54dd5..be8b5d994d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability12.ts] //// //// [assignmentCompatability12.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: "1"}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.symbols index 33aefaae8e..3e9da20487 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability12.ts] //// === assignmentCompatability12.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability12.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability12.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability12.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability12.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability12.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability12.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability12.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability12.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability12.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability12.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability12.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability12.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability12.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability12.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability12.ts, 3, 1)) export var obj = {one: "1"}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.types index 3992fe00c1..f9ea43ef7f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability12.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability12.ts] //// === assignmentCompatability12.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: "1"}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.errors.txt index 99b3a3e41f..9d65ecfafe 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability13.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability13.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: "1"}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.js index 0c5b80716e..248d3be39b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability13.ts] //// //// [assignmentCompatability13.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: "1"}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.symbols index 49f0057968..7d0be0ced3 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability13.ts] //// === assignmentCompatability13.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability13.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability13.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability13.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability13.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability13.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability13.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability13.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability13.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability13.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability13.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability13.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability13.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability13.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability13.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability13.ts, 3, 1)) export var obj = {two: "1"}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.types index 1ab649590b..5be37f6e03 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability13.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability13.ts] //// === assignmentCompatability13.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: "1"}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.errors.txt index f32b599604..a97b3c7e4e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability14.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability14.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: true}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.js index 2d64de2164..fe40338fa4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability14.ts] //// //// [assignmentCompatability14.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: true}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.symbols index 1aa645e135..35ed2f2fa6 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability14.ts] //// === assignmentCompatability14.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability14.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability14.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability14.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability14.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability14.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability14.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability14.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability14.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability14.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability14.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability14.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability14.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability14.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability14.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability14.ts, 3, 1)) export var obj = {one: true}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.types index bad99cebd1..26a05f6e2b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability14.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability14.ts] //// === assignmentCompatability14.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: true}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.errors.txt index a3726fb2e9..c89069ea94 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability15.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability15.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: true}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.js index 7bedfc7465..eaee07a0b8 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability15.ts] //// //// [assignmentCompatability15.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: true}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.symbols index f52a3ab570..39f44949af 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability15.ts] //// === assignmentCompatability15.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability15.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability15.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability15.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability15.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability15.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability15.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability15.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability15.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability15.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability15.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability15.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability15.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability15.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability15.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability15.ts, 3, 1)) export var obj = {two: true}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.types index fc365be3ef..b8fc4de204 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability15.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability15.ts] //// === assignmentCompatability15.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: true}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.errors.txt index 060dd9436a..9fa4c1d1f4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability16.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability16.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.js index 26f7d38410..e6f151a8c0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability16.ts] //// //// [assignmentCompatability16.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.symbols index 99ca24c67c..e9742f5ca0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability16.ts] //// === assignmentCompatability16.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability16.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability16.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability16.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability16.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability16.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability16.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability16.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability16.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability16.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability16.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability16.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability16.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability16.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability16.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability16.ts, 3, 1)) export var obj = {one: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.types index 8161fbab5d..1ba2006892 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability16.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability16.ts] //// === assignmentCompatability16.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.errors.txt index 5b644b0f01..2813e6c21a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability17.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability17.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.js index 3c313cfb85..4b91c72cb9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability17.ts] //// //// [assignmentCompatability17.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.symbols index 8b7055b7cd..2c0c7c8b46 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability17.ts] //// === assignmentCompatability17.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability17.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability17.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability17.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability17.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability17.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability17.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability17.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability17.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability17.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability17.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability17.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability17.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability17.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability17.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability17.ts, 3, 1)) export var obj = {two: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.types index 75c7ca2473..af7b3c1bcc 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability17.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability17.ts] //// === assignmentCompatability17.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.errors.txt index dd7d852885..d4e0768487 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability18.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability18.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.js index 0248777c90..92d0d89d21 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability18.ts] //// //// [assignmentCompatability18.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.symbols index 03503786f3..c15d5a7e92 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability18.ts] //// === assignmentCompatability18.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability18.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability18.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability18.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability18.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability18.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability18.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability18.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability18.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability18.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability18.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability18.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability18.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability18.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability18.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability18.ts, 3, 1)) export var obj = {one: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.types index 439e5a23ca..ddc9e1381c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability18.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability18.ts] //// === assignmentCompatability18.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.errors.txt index 111f623baf..bf0252f855 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability19.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability19.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.js index 97f80e669b..638c2bc22b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability19.ts] //// //// [assignmentCompatability19.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [1]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.symbols index cd1b176dc5..c983c718f1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability19.ts] //// === assignmentCompatability19.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability19.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability19.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability19.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability19.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability19.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability19.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability19.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability19.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability19.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability19.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability19.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability19.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability19.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability19.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability19.ts, 3, 1)) export var obj = {two: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.types index d83d43d3bf..d5ff53d63c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability19.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability19.ts] //// === assignmentCompatability19.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: [1]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.js index e3ddf2f1d1..5b92dfb77d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability2.ts] //// //// [assignmentCompatability2.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.symbols index fc7cfa6099..4343743324 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability2.ts] //// === assignmentCompatability2.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability2.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability2.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability2.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability2.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability2.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability2.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability2.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability2.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability2.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability2.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability2.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability2.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability2.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability2.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability2.ts, 3, 1)) export var aa:{};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.types index 1c9b7ae60c..01debdc20f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability2.ts] //// === assignmentCompatability2.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.errors.txt index 249ded8a2d..508fae8568 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability20.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability20.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: ["1"]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.js index 6497767bef..e5743ce43c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability20.ts] //// //// [assignmentCompatability20.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: ["1"]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.symbols index d8b006cd4f..452a111423 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability20.ts] //// === assignmentCompatability20.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability20.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability20.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability20.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability20.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability20.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability20.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability20.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability20.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability20.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability20.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability20.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability20.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability20.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability20.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability20.ts, 3, 1)) export var obj = {one: ["1"]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.types index 0e00e5d233..e182fecf73 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability20.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability20.ts] //// === assignmentCompatability20.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: ["1"]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.errors.txt index cdee4dd3d2..d11e65b94c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability21.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability21.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: ["1"]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.js index 3d588d6e2d..963bd13a87 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability21.ts] //// //// [assignmentCompatability21.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: ["1"]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.symbols index 4d5735d964..d4825d5643 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability21.ts] //// === assignmentCompatability21.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability21.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability21.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability21.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability21.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability21.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability21.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability21.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability21.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability21.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability21.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability21.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability21.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability21.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability21.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability21.ts, 3, 1)) export var obj = {two: ["1"]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.types index 6c3cc59502..43c1333a46 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability21.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability21.ts] //// === assignmentCompatability21.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: ["1"]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.errors.txt index da9cd1e4c5..1e54014d45 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability22.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability22.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {one: [true]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.js index 7f21694ebb..9e2994c0de 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability22.ts] //// //// [assignmentCompatability22.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: [true]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.symbols index 7ca49b21d9..0c785e2d55 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability22.ts] //// === assignmentCompatability22.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability22.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability22.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability22.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability22.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability22.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability22.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability22.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability22.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability22.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability22.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability22.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability22.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability22.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability22.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability22.ts, 3, 1)) export var obj = {one: [true]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.types index 629feacb9e..e89ccbc39a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability22.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability22.ts] //// === assignmentCompatability22.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: [true]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.errors.txt index 0b3b422b60..11d78b22c6 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability23.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability23.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = {two: [true]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.js index 3fa5f0aaef..81a3b770b9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability23.ts] //// //// [assignmentCompatability23.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {two: [true]}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.symbols index c44349cfa6..e1b5dac40d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability23.ts] //// === assignmentCompatability23.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability23.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability23.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability23.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability23.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability23.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability23.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability23.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability23.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability23.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability23.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability23.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability23.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability23.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability23.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability23.ts, 3, 1)) export var obj = {two: [true]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.types index 1955258ae1..2146d2dea4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability23.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability23.ts] //// === assignmentCompatability23.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {two: [true]}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.errors.txt index 7298208241..7c9d65f79b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability24.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj = function f(a: Tstring) { return a; };; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.js index 1e2c84b3d4..d2d6150890 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability24.ts] //// //// [assignmentCompatability24.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = function f(a: Tstring) { return a; };; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.symbols index 714fe18cfb..e4656b5e7a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability24.ts] //// === assignmentCompatability24.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability24.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability24.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability24.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability24.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability24.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability24.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability24.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability24.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability24.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability24.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability24.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability24.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability24.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability24.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability24.ts, 3, 1)) export var obj = function f(a: Tstring) { return a; };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.types index 957bbe5acb..9d875be187 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability24.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability24.ts] //// === assignmentCompatability24.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = function f(a: Tstring) { return a; };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.errors.txt index 8c1a2431ba..1365d72dbe 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability25.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability25.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{two:number;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.js index 9de3bd3f35..ddecd417f5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability25.ts] //// //// [assignmentCompatability25.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{two:number;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.symbols index 80db7327fe..3d602bb194 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability25.ts] //// === assignmentCompatability25.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability25.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability25.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability25.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability25.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability25.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability25.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability25.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability25.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability25.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability25.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability25.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability25.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability25.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability25.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability25.ts, 3, 1)) export var aa:{two:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.types index 3ae70bb42d..538b921074 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability25.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability25.ts] //// === assignmentCompatability25.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{two:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.errors.txt index 014f618d47..09f22ae33c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability26.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability26.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:string;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.js index 759f6b5d5d..c279c20af4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability26.ts] //// //// [assignmentCompatability26.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:string;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.symbols index 6ae16fc87e..a4f22faa88 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability26.ts] //// === assignmentCompatability26.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability26.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability26.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability26.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability26.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability26.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability26.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability26.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability26.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability26.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability26.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability26.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability26.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability26.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability26.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability26.ts, 3, 1)) export var aa:{one:string;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.types index 98ad790205..2edc184ee1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability26.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability26.ts] //// === assignmentCompatability26.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:string;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.errors.txt index 1dae5a7495..ec9952475f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability27.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability27.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{two:string;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.js index 3254ed0e43..13e4ee3a25 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability27.ts] //// //// [assignmentCompatability27.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{two:string;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.symbols index bdebf4cbbf..3747307bc5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability27.ts] //// === assignmentCompatability27.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability27.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability27.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability27.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability27.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability27.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability27.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability27.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability27.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability27.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability27.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability27.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability27.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability27.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability27.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability27.ts, 3, 1)) export var aa:{two:string;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.types index 032f795d15..7331c1fa20 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability27.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability27.ts] //// === assignmentCompatability27.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{two:string;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.errors.txt index fda541dc3f..91d0fe893a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability28.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability28.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:boolean;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.js index 38eeb3faf5..a01d478690 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability28.ts] //// //// [assignmentCompatability28.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:boolean;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.symbols index fce7e5fe94..0fff0f4be1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability28.ts] //// === assignmentCompatability28.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability28.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability28.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability28.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability28.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability28.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability28.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability28.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability28.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability28.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability28.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability28.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability28.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability28.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability28.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability28.ts, 3, 1)) export var aa:{one:boolean;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.types index ac07335042..181659dc1d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability28.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability28.ts] //// === assignmentCompatability28.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:boolean;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.errors.txt index 3e9056460a..43bd27f8d4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability29.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability29.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:any[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.js index 01d7f9699e..c8e322bece 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability29.ts] //// //// [assignmentCompatability29.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:any[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.symbols index 71d34eeeb5..9c17c7e4ce 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability29.ts] //// === assignmentCompatability29.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability29.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability29.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability29.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability29.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability29.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability29.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability29.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability29.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability29.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability29.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability29.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability29.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability29.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability29.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability29.ts, 3, 1)) export var aa:{one:any[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.types index e1ee78d6ad..06e894de64 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability29.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability29.ts] //// === assignmentCompatability29.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:any[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.js index b2bccf4bb2..116e44f5f0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability3.ts] //// //// [assignmentCompatability3.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj = {one: 1}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.symbols index 73a62de6a4..8c724878b8 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability3.ts] //// === assignmentCompatability3.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability3.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability3.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability3.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability3.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability3.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability3.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability3.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability3.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability3.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability3.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability3.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability3.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability3.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability3.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability3.ts, 3, 1)) export var obj = {one: 1}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.types index 58e844d517..17f357f120 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability3.ts] //// === assignmentCompatability3.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj = {one: 1}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.errors.txt index 4dfa880238..f6923c3f98 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability30.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability30.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:number[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.js index 75184f3eed..98b626d419 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability30.ts] //// //// [assignmentCompatability30.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:number[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.symbols index 484dc22fb5..7a1bc26694 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability30.ts] //// === assignmentCompatability30.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability30.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability30.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability30.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability30.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability30.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability30.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability30.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability30.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability30.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability30.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability30.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability30.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability30.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability30.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability30.ts, 3, 1)) export var aa:{one:number[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.types index 10d99884a3..8a75b8839f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability30.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability30.ts] //// === assignmentCompatability30.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:number[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.errors.txt index 680c03f7e7..695fbe45c9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability31.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability31.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:string[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.js index 072415fdf3..50670044f8 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability31.ts] //// //// [assignmentCompatability31.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:string[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.symbols index 751323fcaa..8c6afa9836 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability31.ts] //// === assignmentCompatability31.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability31.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability31.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability31.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability31.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability31.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability31.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability31.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability31.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability31.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability31.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability31.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability31.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability31.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability31.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability31.ts, 3, 1)) export var aa:{one:string[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.types index cc0670ae20..acc122b707 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability31.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability31.ts] //// === assignmentCompatability31.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:string[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.errors.txt index dd1d9838a4..3173634905 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.errors.txt @@ -4,11 +4,11 @@ assignmentCompatability32.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability32.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{one:boolean[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.js index 20d659b1c5..1e83ba4954 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability32.ts] //// //// [assignmentCompatability32.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:boolean[];};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.symbols index f2d625c4ed..7198e43ed5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability32.ts] //// === assignmentCompatability32.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability32.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability32.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability32.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability32.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability32.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability32.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability32.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability32.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability32.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability32.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability32.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability32.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability32.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability32.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability32.ts, 3, 1)) export var aa:{one:boolean[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.types index 468d87b539..c6130e4724 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability32.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability32.ts] //// === assignmentCompatability32.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:boolean[];};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.errors.txt index ca248ffd6f..ddc864025e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability33.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj: { (a: Tstring): Tstring; }; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.js index 3861690326..d54efee1ce 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability33.ts] //// //// [assignmentCompatability33.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj: { (a: Tstring): Tstring; }; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.symbols index 16c15c3802..00ebf18b0c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability33.ts] //// === assignmentCompatability33.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability33.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability33.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability33.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability33.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability33.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability33.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability33.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability33.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability33.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability33.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability33.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability33.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability33.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability33.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability33.ts, 3, 1)) export var obj: { (a: Tstring): Tstring; }; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.types index 0c7dd4a199..5dc486d3c4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability33.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability33.ts] //// === assignmentCompatability33.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj: { (a: Tstring): Tstring; }; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.errors.txt index 5519c0c36d..f04d2df6e9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability34.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var obj: { (a:Tnumber):Tnumber;}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.js index 9196251778..a754c725ba 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability34.ts] //// //// [assignmentCompatability34.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var obj: { (a:Tnumber):Tnumber;}; export var __val__obj = obj; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.symbols index 9a184ed4b5..f458b6a3fe 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability34.ts] //// === assignmentCompatability34.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability34.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability34.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability34.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability34.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability34.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability34.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability34.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability34.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability34.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability34.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability34.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability34.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability34.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability34.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability34.ts, 3, 1)) export var obj: { (a:Tnumber):Tnumber;}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.types index 7146cf17aa..cc45032537 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability34.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability34.ts] //// === assignmentCompatability34.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var obj: { (a:Tnumber):Tnumber;}; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.errors.txt index 2a1082e2ff..3c6be3e35a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability35.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability35.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{[index:number]:number;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.js index f85febc9d0..6a6110fda9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability35.ts] //// //// [assignmentCompatability35.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{[index:number]:number;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.symbols index e803f9f470..bc35b795a1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability35.ts] //// === assignmentCompatability35.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability35.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability35.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability35.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability35.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability35.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability35.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability35.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability35.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability35.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability35.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability35.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability35.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability35.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability35.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability35.ts, 3, 1)) export var aa:{[index:number]:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.types index 414ccbbc79..e3250b6e8e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability35.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability35.ts] //// === assignmentCompatability35.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{[index:number]:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.js index 4baf0f6a5f..7260e84353 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability36.ts] //// //// [assignmentCompatability36.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{[index:string]:any;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.symbols index bafaa47fe9..0a8c470d9e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability36.ts] //// === assignmentCompatability36.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability36.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability36.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability36.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability36.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability36.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability36.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability36.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability36.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability36.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability36.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability36.ts, 3, 1)) export var aa:{[index:string]:any;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.types index 80a10a78ad..094e03aa11 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability36.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability36.ts] //// === assignmentCompatability36.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{[index:string]:any;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.errors.txt index eeeaf566b5..2bac1c7c34 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability37.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{ new (param: Tnumber); };; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.js index f9864f33da..533f70bda2 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability37.ts] //// //// [assignmentCompatability37.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{ new (param: Tnumber); };; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.symbols index 71297d1b3b..b933a59cae 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability37.ts] //// === assignmentCompatability37.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability37.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability37.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability37.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability37.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability37.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability37.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability37.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability37.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability37.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability37.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability37.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability37.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability37.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability37.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability37.ts, 3, 1)) export var aa:{ new (param: Tnumber); };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.types index 6ab0925388..f8455ad97a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability37.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability37.ts] //// === assignmentCompatability37.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{ new (param: Tnumber); };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.errors.txt index d8c6d710d7..2e6538c0e9 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability38.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export var aa:{ new (param: Tstring); };; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.js index 6d8b379c81..2d1a23dfa0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability38.ts] //// //// [assignmentCompatability38.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{ new (param: Tstring); };; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.symbols index cd19f69497..7d95a42b50 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability38.ts] //// === assignmentCompatability38.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability38.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability38.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability38.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability38.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability38.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability38.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability38.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability38.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability38.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability38.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability38.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability38.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability38.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability38.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability38.ts, 3, 1)) export var aa:{ new (param: Tstring); };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.types index 386a93491b..5dc9b018db 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability38.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability38.ts] //// === assignmentCompatability38.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{ new (param: Tstring); };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.errors.txt index a3dda96f78..beab98b8a7 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability39.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability39.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export class classWithTwoPublic { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");; export var __val__x2 = x2; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js index ca124d912d..1b21e6bf75 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability39.ts] //// //// [assignmentCompatability39.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithTwoPublic { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");; export var __val__x2 = x2; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js.diff index d9085b6ee0..e82bfe4c4c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.js.diff @@ -1,11 +1,21 @@ --- old.assignmentCompatability39.js +++ new.assignmentCompatability39.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithTwoPublic { +- var classWithTwoPublic = /** @class */ (function () { +- function classWithTwoPublic(one, two) { ++ class classWithTwoPublic { + one; + two; - constructor(one, two) { ++ constructor(one, two) { this.one = one; - this.two = two; \ No newline at end of file + this.two = two; + } +- return classWithTwoPublic; +- }()); ++ } + __test2__.classWithTwoPublic = classWithTwoPublic; + var x2 = new classWithTwoPublic(1, "a"); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.symbols index 13af585b6b..9365d6b0a7 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability39.ts] //// === assignmentCompatability39.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability39.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability39.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability39.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability39.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability39.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability39.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability39.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability39.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability39.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability39.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability39.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability39.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability39.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability39.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability39.ts, 3, 1)) export class classWithTwoPublic { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");; ->classWithTwoPublic : Symbol(classWithTwoPublic, Decl(assignmentCompatability39.ts, 4, 18)) +>classWithTwoPublic : Symbol(classWithTwoPublic, Decl(assignmentCompatability39.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability39.ts, 5, 44)) >U : Symbol(U, Decl(assignmentCompatability39.ts, 5, 46)) >one : Symbol(classWithTwoPublic.one, Decl(assignmentCompatability39.ts, 5, 63)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(classWithTwoPublic.two, Decl(assignmentCompatability39.ts, 5, 77)) >U : Symbol(U, Decl(assignmentCompatability39.ts, 5, 46)) >x2 : Symbol(x2, Decl(assignmentCompatability39.ts, 5, 104)) ->classWithTwoPublic : Symbol(classWithTwoPublic, Decl(assignmentCompatability39.ts, 4, 18)) +>classWithTwoPublic : Symbol(classWithTwoPublic, Decl(assignmentCompatability39.ts, 4, 21)) export var __val__x2 = x2; >__val__x2 : Symbol(__val__x2, Decl(assignmentCompatability39.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.types index d4d3c17315..418970ac87 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability39.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability39.ts] //// === assignmentCompatability39.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithTwoPublic { constructor(public one: T, public two: U) {} } var x2 = new classWithTwoPublic(1, "a");; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.js index 6b88073c32..91f1015e66 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability4.ts] //// //// [assignmentCompatability4.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export var aa:{one:number;};; export var __val__aa = aa; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.symbols index 08e910c370..e3d24d0331 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability4.ts] //// === assignmentCompatability4.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability4.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability4.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability4.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability4.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability4.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability4.ts, 1, 58)) @@ -13,14 +13,14 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability4.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability4.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability4.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability4.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability4.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability4.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability4.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability4.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability4.ts, 3, 1)) export var aa:{one:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.types index 8ecd508c6f..029636706b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability4.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability4.ts] //// === assignmentCompatability4.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export var aa:{one:number;};; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.errors.txt index a990107339..c485802571 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability40.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability40.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export class classWithPrivate { constructor(private one: T) {} } var x5 = new classWithPrivate(1);; export var __val__x5 = x5; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js index a290a1ede7..2b8adf8828 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability40.ts] //// //// [assignmentCompatability40.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPrivate { constructor(private one: T) {} } var x5 = new classWithPrivate(1);; export var __val__x5 = x5; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js.diff index 9f604daad7..7d928b31c1 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.js.diff @@ -1,10 +1,19 @@ --- old.assignmentCompatability40.js +++ new.assignmentCompatability40.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithPrivate { +- var classWithPrivate = /** @class */ (function () { +- function classWithPrivate(one) { ++ class classWithPrivate { + one; - constructor(one) { ++ constructor(one) { this.one = one; - } \ No newline at end of file + } +- return classWithPrivate; +- }()); ++ } + __test2__.classWithPrivate = classWithPrivate; + var x5 = new classWithPrivate(1); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.symbols index bd437b5684..e9fefa797e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability40.ts] //// === assignmentCompatability40.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability40.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability40.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability40.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability40.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability40.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability40.ts, 1, 58)) @@ -13,23 +13,23 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability40.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability40.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability40.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability40.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability40.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability40.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability40.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability40.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability40.ts, 3, 1)) export class classWithPrivate { constructor(private one: T) {} } var x5 = new classWithPrivate(1);; ->classWithPrivate : Symbol(classWithPrivate, Decl(assignmentCompatability40.ts, 4, 18)) +>classWithPrivate : Symbol(classWithPrivate, Decl(assignmentCompatability40.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability40.ts, 5, 44)) >one : Symbol(classWithPrivate.one, Decl(assignmentCompatability40.ts, 5, 61)) >T : Symbol(T, Decl(assignmentCompatability40.ts, 5, 44)) >x5 : Symbol(x5, Decl(assignmentCompatability40.ts, 5, 107)) ->classWithPrivate : Symbol(classWithPrivate, Decl(assignmentCompatability40.ts, 4, 18)) +>classWithPrivate : Symbol(classWithPrivate, Decl(assignmentCompatability40.ts, 4, 21)) export var __val__x5 = x5; >__val__x5 : Symbol(__val__x5, Decl(assignmentCompatability40.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.types index a38218659e..f1baa45ea4 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability40.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability40.ts] //// === assignmentCompatability40.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithPrivate { constructor(private one: T) {} } var x5 = new classWithPrivate(1);; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.errors.txt index 7f5a1e60cb..dda4a5e7a6 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability41.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability41.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export class classWithTwoPrivate { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");; export var __val__x6 = x6; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js index 123ee2047a..54adff356d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability41.ts] //// //// [assignmentCompatability41.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithTwoPrivate { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");; export var __val__x6 = x6; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js.diff index 1b8a2724d4..5ec46db1f7 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.js.diff @@ -1,11 +1,21 @@ --- old.assignmentCompatability41.js +++ new.assignmentCompatability41.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithTwoPrivate { +- var classWithTwoPrivate = /** @class */ (function () { +- function classWithTwoPrivate(one, two) { ++ class classWithTwoPrivate { + one; + two; - constructor(one, two) { ++ constructor(one, two) { this.one = one; - this.two = two; \ No newline at end of file + this.two = two; + } +- return classWithTwoPrivate; +- }()); ++ } + __test2__.classWithTwoPrivate = classWithTwoPrivate; + var x6 = new classWithTwoPrivate(1, "a"); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.symbols index cac6ca2c3c..6b6d9fea66 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability41.ts] //// === assignmentCompatability41.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability41.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability41.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability41.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability41.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability41.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability41.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability41.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability41.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability41.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability41.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability41.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability41.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability41.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability41.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability41.ts, 3, 1)) export class classWithTwoPrivate { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");; ->classWithTwoPrivate : Symbol(classWithTwoPrivate, Decl(assignmentCompatability41.ts, 4, 18)) +>classWithTwoPrivate : Symbol(classWithTwoPrivate, Decl(assignmentCompatability41.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability41.ts, 5, 44)) >U : Symbol(U, Decl(assignmentCompatability41.ts, 5, 46)) >one : Symbol(classWithTwoPrivate.one, Decl(assignmentCompatability41.ts, 5, 63)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(classWithTwoPrivate.two, Decl(assignmentCompatability41.ts, 5, 78)) >U : Symbol(U, Decl(assignmentCompatability41.ts, 5, 46)) >x6 : Symbol(x6, Decl(assignmentCompatability41.ts, 5, 104)) ->classWithTwoPrivate : Symbol(classWithTwoPrivate, Decl(assignmentCompatability41.ts, 4, 18)) +>classWithTwoPrivate : Symbol(classWithTwoPrivate, Decl(assignmentCompatability41.ts, 4, 21)) export var __val__x6 = x6; >__val__x6 : Symbol(__val__x6, Decl(assignmentCompatability41.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.types index 233dce3cff..ec788a46bf 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability41.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability41.ts] //// === assignmentCompatability41.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithTwoPrivate { constructor(private one: T, private two: U) {} } var x6 = new classWithTwoPrivate(1, "a");; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.errors.txt index 7cd727cf1f..6ff604d075 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability42.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability42.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export class classWithPublicPrivate { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");; export var __val__x7 = x7; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js index 57bd4c0ec8..8696d2746b 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability42.ts] //// //// [assignmentCompatability42.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublicPrivate { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");; export var __val__x7 = x7; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js.diff index 4580fbdc5e..70da33fdf7 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.js.diff @@ -1,11 +1,21 @@ --- old.assignmentCompatability42.js +++ new.assignmentCompatability42.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithPublicPrivate { +- var classWithPublicPrivate = /** @class */ (function () { +- function classWithPublicPrivate(one, two) { ++ class classWithPublicPrivate { + one; + two; - constructor(one, two) { ++ constructor(one, two) { this.one = one; - this.two = two; \ No newline at end of file + this.two = two; + } +- return classWithPublicPrivate; +- }()); ++ } + __test2__.classWithPublicPrivate = classWithPublicPrivate; + var x7 = new classWithPublicPrivate(1, "a"); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.symbols index 97c6341406..916283c613 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability42.ts] //// === assignmentCompatability42.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability42.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability42.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability42.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability42.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability42.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability42.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability42.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability42.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability42.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability42.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability42.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability42.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability42.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability42.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability42.ts, 3, 1)) export class classWithPublicPrivate { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");; ->classWithPublicPrivate : Symbol(classWithPublicPrivate, Decl(assignmentCompatability42.ts, 4, 18)) +>classWithPublicPrivate : Symbol(classWithPublicPrivate, Decl(assignmentCompatability42.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability42.ts, 5, 44)) >U : Symbol(U, Decl(assignmentCompatability42.ts, 5, 46)) >one : Symbol(classWithPublicPrivate.one, Decl(assignmentCompatability42.ts, 5, 63)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(classWithPublicPrivate.two, Decl(assignmentCompatability42.ts, 5, 77)) >U : Symbol(U, Decl(assignmentCompatability42.ts, 5, 46)) >x7 : Symbol(x7, Decl(assignmentCompatability42.ts, 5, 104)) ->classWithPublicPrivate : Symbol(classWithPublicPrivate, Decl(assignmentCompatability42.ts, 4, 18)) +>classWithPublicPrivate : Symbol(classWithPublicPrivate, Decl(assignmentCompatability42.ts, 4, 21)) export var __val__x7 = x7; >__val__x7 : Symbol(__val__x7, Decl(assignmentCompatability42.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.types index 2be3f1dbcb..c442324d0e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability42.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability42.ts] //// === assignmentCompatability42.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithPublicPrivate { constructor(public one: T, private two: U) {} } var x7 = new classWithPublicPrivate(1, "a");; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.errors.txt index 9787467175..e31b507cac 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.errors.txt @@ -3,11 +3,11 @@ assignmentCompatability43.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOpt ==== assignmentCompatability43.ts (1 errors) ==== - module __test1__ { + namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } - module __test2__ { + namespace __test2__ { export interface interfaceTwo { one: T; two: U; }; var obj2: interfaceTwo = { one: 1, two: "a" };; export var __val__obj2 = obj2; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.js index a88f49755e..c9b87f6e90 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability43.ts] //// //// [assignmentCompatability43.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceTwo { one: T; two: U; }; var obj2: interfaceTwo = { one: 1, two: "a" };; export var __val__obj2 = obj2; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.symbols index 3c0464f3ec..26ed4656e0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability43.ts] //// === assignmentCompatability43.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability43.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability43.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability43.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability43.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability43.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability43.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability43.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability43.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability43.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability43.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability43.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability43.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability43.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability43.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability43.ts, 3, 1)) export interface interfaceTwo { one: T; two: U; }; var obj2: interfaceTwo = { one: 1, two: "a" };; ->interfaceTwo : Symbol(interfaceTwo, Decl(assignmentCompatability43.ts, 4, 18)) +>interfaceTwo : Symbol(interfaceTwo, Decl(assignmentCompatability43.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability43.ts, 5, 52)) >U : Symbol(U, Decl(assignmentCompatability43.ts, 5, 54)) >one : Symbol(interfaceTwo.one, Decl(assignmentCompatability43.ts, 5, 58)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(interfaceTwo.two, Decl(assignmentCompatability43.ts, 5, 66)) >U : Symbol(U, Decl(assignmentCompatability43.ts, 5, 54)) >obj2 : Symbol(obj2, Decl(assignmentCompatability43.ts, 5, 83)) ->interfaceTwo : Symbol(interfaceTwo, Decl(assignmentCompatability43.ts, 4, 18)) +>interfaceTwo : Symbol(interfaceTwo, Decl(assignmentCompatability43.ts, 4, 21)) >one : Symbol(one, Decl(assignmentCompatability43.ts, 5, 121)) >two : Symbol(two, Decl(assignmentCompatability43.ts, 5, 129)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.types index e2ee212256..d15495804d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability43.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability43.ts] //// === assignmentCompatability43.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export interface interfaceTwo { one: T; two: U; }; var obj2: interfaceTwo = { one: 1, two: "a" };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability44.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability44.js.diff new file mode 100644 index 0000000000..1fb15ee882 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability44.js.diff @@ -0,0 +1,16 @@ +--- old.assignmentCompatability44.js ++++ new.assignmentCompatability44.js +@@= skipped -8, +8 lines =@@ + + + //// [assignmentCompatability44.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { +- } +- return Foo; +-}()); +-var foo = Foo; ++class Foo { ++ constructor(x) { } ++} ++const foo = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability45.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability45.js.diff new file mode 100644 index 0000000000..cf76074b1b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability45.js.diff @@ -0,0 +1,42 @@ +--- old.assignmentCompatability45.js ++++ new.assignmentCompatability45.js +@@= skipped -10, +10 lines =@@ + + + //// [assignmentCompatability45.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B(x) { +- return _super.call(this) || this; +- } +- return B; +-}(A)); +-var b = B; ++class A { ++} ++class B extends A { ++ constructor(x) { ++ super(); ++ } ++} ++const b = B; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.js index 4794c2dfbc..1d348afb9c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability5.ts] //// //// [assignmentCompatability5.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceOne { one: T; }; var obj1: interfaceOne = { one: 1 };; export var __val__obj1 = obj1; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.symbols index 7bf4772147..99eead922a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability5.ts] //// === assignmentCompatability5.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability5.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability5.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability5.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability5.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability5.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability5.ts, 1, 58)) @@ -13,23 +13,23 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability5.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability5.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability5.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability5.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability5.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability5.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability5.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability5.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability5.ts, 3, 1)) export interface interfaceOne { one: T; }; var obj1: interfaceOne = { one: 1 };; ->interfaceOne : Symbol(interfaceOne, Decl(assignmentCompatability5.ts, 4, 18)) +>interfaceOne : Symbol(interfaceOne, Decl(assignmentCompatability5.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability5.ts, 5, 52)) >one : Symbol(interfaceOne.one, Decl(assignmentCompatability5.ts, 5, 56)) >T : Symbol(T, Decl(assignmentCompatability5.ts, 5, 52)) >obj1 : Symbol(obj1, Decl(assignmentCompatability5.ts, 5, 86)) ->interfaceOne : Symbol(interfaceOne, Decl(assignmentCompatability5.ts, 4, 18)) +>interfaceOne : Symbol(interfaceOne, Decl(assignmentCompatability5.ts, 4, 21)) >one : Symbol(one, Decl(assignmentCompatability5.ts, 5, 117)) export var __val__obj1 = obj1; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.types index cae1733087..feba6ab17c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability5.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability5.ts] //// === assignmentCompatability5.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export interface interfaceOne { one: T; }; var obj1: interfaceOne = { one: 1 };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.js index 9689109502..5bf506ecf3 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability6.ts] //// //// [assignmentCompatability6.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceWithOptional { one?: T; }; var obj3: interfaceWithOptional = { };; export var __val__obj3 = obj3; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.symbols index 744b547fce..16d875c18d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability6.ts] //// === assignmentCompatability6.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability6.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability6.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability6.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability6.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability6.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability6.ts, 1, 58)) @@ -13,23 +13,23 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability6.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability6.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability6.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability6.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability6.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability6.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability6.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability6.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability6.ts, 3, 1)) export interface interfaceWithOptional { one?: T; }; var obj3: interfaceWithOptional = { };; ->interfaceWithOptional : Symbol(interfaceWithOptional, Decl(assignmentCompatability6.ts, 4, 18)) +>interfaceWithOptional : Symbol(interfaceWithOptional, Decl(assignmentCompatability6.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability6.ts, 5, 52)) >one : Symbol(interfaceWithOptional.one, Decl(assignmentCompatability6.ts, 5, 56)) >T : Symbol(T, Decl(assignmentCompatability6.ts, 5, 52)) >obj3 : Symbol(obj3, Decl(assignmentCompatability6.ts, 5, 86)) ->interfaceWithOptional : Symbol(interfaceWithOptional, Decl(assignmentCompatability6.ts, 4, 18)) +>interfaceWithOptional : Symbol(interfaceWithOptional, Decl(assignmentCompatability6.ts, 4, 21)) export var __val__obj3 = obj3; >__val__obj3 : Symbol(__val__obj3, Decl(assignmentCompatability6.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.types index 02de561b87..4005429d3f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability6.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability6.ts] //// === assignmentCompatability6.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export interface interfaceWithOptional { one?: T; }; var obj3: interfaceWithOptional = { };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.js index 836497d977..cb7e0807a0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability7.ts] //// //// [assignmentCompatability7.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.symbols index b1b3cd9735..1eb2632535 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability7.ts] //// === assignmentCompatability7.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability7.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability7.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability7.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability7.ts, 1, 58)) @@ -13,18 +13,18 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability7.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability7.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability7.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability7.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability7.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability7.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability7.ts, 3, 1)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 4, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability7.ts, 5, 52)) >U : Symbol(U, Decl(assignmentCompatability7.ts, 5, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability7.ts, 5, 58)) @@ -32,7 +32,7 @@ module __test2__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability7.ts, 5, 66)) >U : Symbol(U, Decl(assignmentCompatability7.ts, 5, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability7.ts, 5, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 4, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability7.ts, 4, 21)) >one : Symbol(one, Decl(assignmentCompatability7.ts, 5, 139)) export var __val__obj4 = obj4; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.types index baa0898494..ab91d92a4c 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability7.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability7.ts] //// === assignmentCompatability7.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js index c269d7c2b8..c9d627aaef 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability8.ts] //// //// [assignmentCompatability8.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithPublic { constructor(public one: T) {} } var x1 = new classWithPublic(1);; export var __val__x1 = x1; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js.diff index 4626332fc2..353fc19c27 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.js.diff @@ -1,10 +1,19 @@ --- old.assignmentCompatability8.js +++ new.assignmentCompatability8.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithPublic { +- var classWithPublic = /** @class */ (function () { +- function classWithPublic(one) { ++ class classWithPublic { + one; - constructor(one) { ++ constructor(one) { this.one = one; - } \ No newline at end of file + } +- return classWithPublic; +- }()); ++ } + __test2__.classWithPublic = classWithPublic; + var x1 = new classWithPublic(1); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.symbols index 85a4e0824d..fb81f98d9a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability8.ts] //// === assignmentCompatability8.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability8.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability8.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability8.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability8.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability8.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability8.ts, 1, 58)) @@ -13,23 +13,23 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability8.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability8.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability8.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability8.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability8.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability8.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability8.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability8.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability8.ts, 3, 1)) export class classWithPublic { constructor(public one: T) {} } var x1 = new classWithPublic(1);; ->classWithPublic : Symbol(classWithPublic, Decl(assignmentCompatability8.ts, 4, 18)) +>classWithPublic : Symbol(classWithPublic, Decl(assignmentCompatability8.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability8.ts, 5, 44)) >one : Symbol(classWithPublic.one, Decl(assignmentCompatability8.ts, 5, 61)) >T : Symbol(T, Decl(assignmentCompatability8.ts, 5, 44)) >x1 : Symbol(x1, Decl(assignmentCompatability8.ts, 5, 107)) ->classWithPublic : Symbol(classWithPublic, Decl(assignmentCompatability8.ts, 4, 18)) +>classWithPublic : Symbol(classWithPublic, Decl(assignmentCompatability8.ts, 4, 21)) export var __val__x1 = x1; >__val__x1 : Symbol(__val__x1, Decl(assignmentCompatability8.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.types index d71102b263..5f0e1fddfa 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability8.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability8.ts] //// === assignmentCompatability8.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithPublic { constructor(public one: T) {} } var x1 = new classWithPublic(1);; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js index b503898910..a83bb45ca6 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability9.ts] //// //// [assignmentCompatability9.ts] -module __test1__ { +namespace __test1__ { export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; export var __val__obj4 = obj4; } -module __test2__ { +namespace __test2__ { export class classWithOptional { constructor(public one?: T) {} } var x3 = new classWithOptional();; export var __val__x3 = x3; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js.diff index 26270d9001..61a05651ea 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.js.diff @@ -1,10 +1,19 @@ --- old.assignmentCompatability9.js +++ new.assignmentCompatability9.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + })(__test1__ || (__test1__ = {})); var __test2__; (function (__test2__) { - class classWithOptional { +- var classWithOptional = /** @class */ (function () { +- function classWithOptional(one) { ++ class classWithOptional { + one; - constructor(one) { ++ constructor(one) { this.one = one; - } \ No newline at end of file + } +- return classWithOptional; +- }()); ++ } + __test2__.classWithOptional = classWithOptional; + var x3 = new classWithOptional(); + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.symbols b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.symbols index 3a487aa29f..1b1af7f88a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/assignmentCompatability9.ts] //// === assignmentCompatability9.ts === -module __test1__ { +namespace __test1__ { >__test1__ : Symbol(__test1__, Decl(assignmentCompatability9.ts, 0, 0)) export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability9.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability9.ts, 0, 21)) >T : Symbol(T, Decl(assignmentCompatability9.ts, 1, 52)) >U : Symbol(U, Decl(assignmentCompatability9.ts, 1, 54)) >one : Symbol(interfaceWithPublicAndOptional.one, Decl(assignmentCompatability9.ts, 1, 58)) @@ -13,23 +13,23 @@ module __test1__ { >two : Symbol(interfaceWithPublicAndOptional.two, Decl(assignmentCompatability9.ts, 1, 66)) >U : Symbol(U, Decl(assignmentCompatability9.ts, 1, 54)) >obj4 : Symbol(obj4, Decl(assignmentCompatability9.ts, 1, 83)) ->interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability9.ts, 0, 18)) +>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability9.ts, 0, 21)) >one : Symbol(one, Decl(assignmentCompatability9.ts, 1, 139)) export var __val__obj4 = obj4; >__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability9.ts, 2, 14)) >obj4 : Symbol(obj4, Decl(assignmentCompatability9.ts, 1, 83)) } -module __test2__ { +namespace __test2__ { >__test2__ : Symbol(__test2__, Decl(assignmentCompatability9.ts, 3, 1)) export class classWithOptional { constructor(public one?: T) {} } var x3 = new classWithOptional();; ->classWithOptional : Symbol(classWithOptional, Decl(assignmentCompatability9.ts, 4, 18)) +>classWithOptional : Symbol(classWithOptional, Decl(assignmentCompatability9.ts, 4, 21)) >T : Symbol(T, Decl(assignmentCompatability9.ts, 5, 44)) >one : Symbol(classWithOptional.one, Decl(assignmentCompatability9.ts, 5, 61)) >T : Symbol(T, Decl(assignmentCompatability9.ts, 5, 44)) >x3 : Symbol(x3, Decl(assignmentCompatability9.ts, 5, 107)) ->classWithOptional : Symbol(classWithOptional, Decl(assignmentCompatability9.ts, 4, 18)) +>classWithOptional : Symbol(classWithOptional, Decl(assignmentCompatability9.ts, 4, 21)) export var __val__x3 = x3; >__val__x3 : Symbol(__val__x3, Decl(assignmentCompatability9.ts, 6, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.types b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.types index da5bdf0884..cadac98ab8 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability9.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/assignmentCompatability9.ts] //// === assignmentCompatability9.ts === -module __test1__ { +namespace __test1__ { >__test1__ : typeof __test1__ export interface interfaceWithPublicAndOptional { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional = { one: 1 };; @@ -16,7 +16,7 @@ module __test1__ { >__val__obj4 : interfaceWithPublicAndOptional >obj4 : interfaceWithPublicAndOptional } -module __test2__ { +namespace __test2__ { >__test2__ : typeof __test2__ export class classWithOptional { constructor(public one?: T) {} } var x3 = new classWithOptional();; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.js.diff index 1f469916de..b8681f59c0 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.js.diff @@ -7,4 +7,10 @@ -// 3.8.4 Assignment Compatibility var x; // Should fail - x = ''; \ No newline at end of file + x = ''; +@@= skipped -18, +17 lines =@@ + fn(4); + fn({}); + // Should work +-fn(function (a) { }); ++fn(a => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.js.diff index d61f6de7b5..550b19774f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentCompatability_checking-call-member-off-of-function-interface.js.diff @@ -7,4 +7,10 @@ -// 3.8.4 Assignment Compatibility var x; // Should fail - x = ''; \ No newline at end of file + x = ''; +@@= skipped -18, +17 lines =@@ + fn(4); + fn({}); + // Should work +-fn(function (a) { }); ++fn(a => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentIndexedToPrimitives.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentIndexedToPrimitives.js.diff new file mode 100644 index 0000000000..0bb7df9517 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentIndexedToPrimitives.js.diff @@ -0,0 +1,30 @@ +--- old.assignmentIndexedToPrimitives.js ++++ new.assignmentIndexedToPrimitives.js +@@= skipped -18, +18 lines =@@ + + + //// [assignmentIndexedToPrimitives.js] +-var n1 = [0]; +-var n2 = ["0"]; +-var n3 = [0, "1"]; +-var n4 = [0]; +-var s1 = [0]; +-var s2 = ["0"]; +-var s3 = [0, "1"]; +-var s4 = ["0", "1"]; +-var no1 = { 0: 1 }; +-var so1 = { 0: 1 }; +-var so2 = { "0": 1 }; +-var so3 = { 0: "1" }; ++const n1 = [0]; ++const n2 = ["0"]; ++const n3 = [0, "1"]; ++const n4 = [0]; ++const s1 = [0]; ++const s2 = ["0"]; ++const s3 = [0, "1"]; ++const s4 = ["0", "1"]; ++const no1 = { 0: 1 }; ++const so1 = { 0: 1 }; ++const so2 = { "0": 1 }; ++const so3 = { 0: "1" }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentNestedInLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentNestedInLiterals.js.diff new file mode 100644 index 0000000000..37b8cdcb36 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentNestedInLiterals.js.diff @@ -0,0 +1,10 @@ +--- old.assignmentNestedInLiterals.js ++++ new.assignmentNestedInLiterals.js +@@= skipped -17, +17 lines =@@ + var aegis, a, b; + aegis = { x: a = 1, y: b = a }; + var kowloona, c, d; +-for (var _i = 0, _a = [c = 1, d = c]; _i < _a.length; _i++) { +- kowloona = _a[_i]; ++for (kowloona of [c = 1, d = c]) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentNonObjectTypeConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentNonObjectTypeConstraints.js.diff index c24e26a541..b391bb3b33 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentNonObjectTypeConstraints.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentNonObjectTypeConstraints.js.diff @@ -1,13 +1,25 @@ --- old.assignmentNonObjectTypeConstraints.js +++ new.assignmentNonObjectTypeConstraints.js -@@= skipped -27, +27 lines =@@ +@@= skipped -26, +26 lines =@@ + } foo(5); foo(0 /* E.A */); - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); ++class A { + a; - } - class B { ++} ++class B { + b; - } ++} function bar(x) { - var y = x; // Ok \ No newline at end of file + var y = x; // Ok + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentRestElementWithErrorSourceType.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentRestElementWithErrorSourceType.js.diff new file mode 100644 index 0000000000..9ce4e36bf3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentRestElementWithErrorSourceType.js.diff @@ -0,0 +1,8 @@ +--- old.assignmentRestElementWithErrorSourceType.js ++++ new.assignmentRestElementWithErrorSourceType.js +@@= skipped -5, +5 lines =@@ + + //// [assignmentRestElementWithErrorSourceType.js] + var tuple; +-c = tupel.slice(0); // intentionally misspelled ++[...c] = tupel; // intentionally misspelled \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToAnyArrayRestParameters.types.diff b/testdata/baselines/reference/submodule/compiler/assignmentToAnyArrayRestParameters.types.diff new file mode 100644 index 0000000000..f491db2594 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToAnyArrayRestParameters.types.diff @@ -0,0 +1,18 @@ +--- old.assignmentToAnyArrayRestParameters.types ++++ new.assignmentToAnyArrayRestParameters.types +@@= skipped -47, +47 lines =@@ + >T01 : any + + type T02 = string[][K | "0"]; +->T02 : string[][K | "0"] ++>T02 : string[]["0" | K] + + type T10 = T["0"]; + >T10 : T["0"] +@@= skipped -9, +9 lines =@@ + >T11 : T["0.0"] + + type T12 = T[K | "0"]; +->T12 : T[K | "0"] ++>T12 : T["0" | K] + } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToConditionalBrandedStringTemplateOrMapping.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToConditionalBrandedStringTemplateOrMapping.js.diff new file mode 100644 index 0000000000..6a1e045e51 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToConditionalBrandedStringTemplateOrMapping.js.diff @@ -0,0 +1,16 @@ +--- old.assignmentToConditionalBrandedStringTemplateOrMapping.js ++++ new.assignmentToConditionalBrandedStringTemplateOrMapping.js +@@= skipped -12, +12 lines =@@ + + + //// [assignmentToConditionalBrandedStringTemplateOrMapping.js] +-var a = null; +-var b = null; ++let a = null; ++let b = null; + a = b; +-var c = null; +-var d = null; ++let c = null; ++let d = null; + c = d; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToExpandingArrayType.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToExpandingArrayType.js.diff new file mode 100644 index 0000000000..d7cfbf9d60 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToExpandingArrayType.js.diff @@ -0,0 +1,11 @@ +--- old.assignmentToExpandingArrayType.js ++++ new.assignmentToExpandingArrayType.js +@@= skipped -30, +30 lines =@@ + + //// [assignmentToExpandingArrayType.js] + // Fixes exponential time/space in #14628 +-var x = []; ++let x = []; + x[0] = { foo: 'hi' }; + x[0] = { foo: 'hi' }; + x[0] = { foo: 'hi' }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.errors.txt index fe15bb4dcd..42f3afd4e6 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.errors.txt @@ -8,7 +8,7 @@ assignmentToFunction.ts(8,9): error TS2630: Cannot assign to 'bar' because it is ~~ !!! error TS2630: Cannot assign to 'fn' because it is a function. - module foo { + namespace foo { function xyz() { function bar() { } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js index 1d4f0b52e4..6858bf3d9a 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js @@ -4,7 +4,7 @@ function fn() { } fn = () => 3; -module foo { +namespace foo { function xyz() { function bar() { } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js.diff new file mode 100644 index 0000000000..72c30b4d9c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.js.diff @@ -0,0 +1,11 @@ +--- old.assignmentToFunction.js ++++ new.assignmentToFunction.js +@@= skipped -13, +13 lines =@@ + + //// [assignmentToFunction.js] + function fn() { } +-fn = function () { return 3; }; ++fn = () => 3; + var foo; + (function (foo) { + function xyz() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.symbols b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.symbols index 7b73b6ba2c..413331521f 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.symbols @@ -7,11 +7,11 @@ function fn() { } fn = () => 3; >fn : Symbol(fn, Decl(assignmentToFunction.ts, 0, 0)) -module foo { +namespace foo { >foo : Symbol(foo, Decl(assignmentToFunction.ts, 1, 13)) function xyz() { ->xyz : Symbol(xyz, Decl(assignmentToFunction.ts, 3, 12)) +>xyz : Symbol(xyz, Decl(assignmentToFunction.ts, 3, 15)) function bar() { >bar : Symbol(bar, Decl(assignmentToFunction.ts, 4, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.types b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.types index 6636311708..b4e6013922 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToFunction.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentToFunction.types @@ -10,7 +10,7 @@ fn = () => 3; >() => 3 : () => number >3 : 3 -module foo { +namespace foo { >foo : typeof foo function xyz() { diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToInstantiationExpression.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToInstantiationExpression.js.diff index e110519ee1..a57ab31dc5 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToInstantiationExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentToInstantiationExpression.js.diff @@ -5,12 +5,15 @@ //// [assignmentToInstantiationExpression.js] -"use strict"; - let obj = {}; --(obj.fn) = () => 1234; +-var obj = {}; +-(obj.fn) = function () { return 1234; }; +-var getValue; +-(getValue) = function () { return 1234; }; +-var getValue2; +-(getValue2) = function () { return 1234; }; ++let obj = {}; +obj.fn = () => 1234; - let getValue; --(getValue) = () => 1234; ++let getValue; +getValue = () => 1234; - let getValue2; --(getValue2) = () => 1234; ++let getValue2; +getValue2 = () => 1234; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt index 733139013e..33048e81aa 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt @@ -20,21 +20,21 @@ assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not a !!! error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. function foo() { } - module foo { + namespace foo { export var boom = 0; } var goodFundule: Function = foo; // ok function bar() { } - module bar { + namespace bar { export function apply(thisArg: string, argArray?: string) { } } var goodFundule2: Function = bar; // ok function bad() { } - module bad { + namespace bad { export var apply = 0; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt.diff new file mode 100644 index 0000000000..968df66166 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.assignmentToObjectAndFunction.errors.txt ++++ new.assignmentToObjectAndFunction.errors.txt +@@= skipped -0, +0 lines =@@ + assignmentToObjectAndFunction.ts(1,24): error TS2322: Type 'number' is not assignable to type '() => string'. +-assignmentToObjectAndFunction.ts(8,5): error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 5 more. ++assignmentToObjectAndFunction.ts(8,5): error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. + assignmentToObjectAndFunction.ts(29,5): error TS2322: Type 'typeof bad' is not assignable to type 'Function'. + Types of property 'apply' are incompatible. + Type 'number' is not assignable to type '(this: Function, thisArg: any, argArray?: any) => any'. +@@= skipped -16, +16 lines =@@ + + var errFun: Function = {}; // Error for no call signature + ~~~~~~ +-!!! error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 5 more. ++!!! error TS2740: Type '{}' is missing the following properties from type 'Function': apply, call, bind, prototype, and 3 more. + + function foo() { } + namespace foo { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js index 29e2001207..3bc4cc4bcb 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js @@ -11,21 +11,21 @@ var goodObj: Object = { var errFun: Function = {}; // Error for no call signature function foo() { } -module foo { +namespace foo { export var boom = 0; } var goodFundule: Function = foo; // ok function bar() { } -module bar { +namespace bar { export function apply(thisArg: string, argArray?: string) { } } var goodFundule2: Function = bar; // ok function bad() { } -module bad { +namespace bad { export var apply = 0; } diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js.diff new file mode 100644 index 0000000000..c0f5dcb9b5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.js.diff @@ -0,0 +1,11 @@ +--- old.assignmentToObjectAndFunction.js ++++ new.assignmentToObjectAndFunction.js +@@= skipped -33, +33 lines =@@ + //// [assignmentToObjectAndFunction.js] + var errObj = { toString: 0 }; // Error, incompatible toString + var goodObj = { +- toString: function (x) { ++ toString(x) { + return ""; + } + }; // Ok, because toString is a subtype of Object's toString \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols index cd5cbab6dc..a0d8793c56 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols @@ -25,7 +25,7 @@ var errFun: Function = {}; // Error for no call signature function foo() { } >foo : Symbol(foo, Decl(assignmentToObjectAndFunction.ts, 7, 26), Decl(assignmentToObjectAndFunction.ts, 9, 18)) -module foo { +namespace foo { >foo : Symbol(foo, Decl(assignmentToObjectAndFunction.ts, 7, 26), Decl(assignmentToObjectAndFunction.ts, 9, 18)) export var boom = 0; @@ -40,11 +40,11 @@ var goodFundule: Function = foo; // ok function bar() { } >bar : Symbol(bar, Decl(assignmentToObjectAndFunction.ts, 14, 32), Decl(assignmentToObjectAndFunction.ts, 16, 18)) -module bar { +namespace bar { >bar : Symbol(bar, Decl(assignmentToObjectAndFunction.ts, 14, 32), Decl(assignmentToObjectAndFunction.ts, 16, 18)) export function apply(thisArg: string, argArray?: string) { } ->apply : Symbol(apply, Decl(assignmentToObjectAndFunction.ts, 17, 12)) +>apply : Symbol(apply, Decl(assignmentToObjectAndFunction.ts, 17, 15)) >thisArg : Symbol(thisArg, Decl(assignmentToObjectAndFunction.ts, 18, 26)) >argArray : Symbol(argArray, Decl(assignmentToObjectAndFunction.ts, 18, 42)) } @@ -57,7 +57,7 @@ var goodFundule2: Function = bar; // ok function bad() { } >bad : Symbol(bad, Decl(assignmentToObjectAndFunction.ts, 21, 33), Decl(assignmentToObjectAndFunction.ts, 23, 18)) -module bad { +namespace bad { >bad : Symbol(bad, Decl(assignmentToObjectAndFunction.ts, 21, 33), Decl(assignmentToObjectAndFunction.ts, 23, 18)) export var apply = 0; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols.diff b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols.diff new file mode 100644 index 0000000000..44e0615732 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.symbols.diff @@ -0,0 +1,36 @@ +--- old.assignmentToObjectAndFunction.symbols ++++ new.assignmentToObjectAndFunction.symbols +@@= skipped -19, +19 lines =@@ + + var errFun: Function = {}; // Error for no call signature + >errFun : Symbol(errFun, Decl(assignmentToObjectAndFunction.ts, 7, 3)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + function foo() { } + >foo : Symbol(foo, Decl(assignmentToObjectAndFunction.ts, 7, 26), Decl(assignmentToObjectAndFunction.ts, 9, 18)) +@@= skipped -14, +14 lines =@@ + + var goodFundule: Function = foo; // ok + >goodFundule : Symbol(goodFundule, Decl(assignmentToObjectAndFunction.ts, 14, 3)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >foo : Symbol(foo, Decl(assignmentToObjectAndFunction.ts, 7, 26), Decl(assignmentToObjectAndFunction.ts, 9, 18)) + + function bar() { } +@@= skipped -17, +17 lines =@@ + + var goodFundule2: Function = bar; // ok + >goodFundule2 : Symbol(goodFundule2, Decl(assignmentToObjectAndFunction.ts, 21, 3)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >bar : Symbol(bar, Decl(assignmentToObjectAndFunction.ts, 14, 32), Decl(assignmentToObjectAndFunction.ts, 16, 18)) + + function bad() { } +@@= skipped -15, +15 lines =@@ + + var badFundule: Function = bad; // error + >badFundule : Symbol(badFundule, Decl(assignmentToObjectAndFunction.ts, 28, 3)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >bad : Symbol(bad, Decl(assignmentToObjectAndFunction.ts, 21, 33), Decl(assignmentToObjectAndFunction.ts, 23, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.types b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.types index 8835e94ec6..ac17a253dc 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentToObjectAndFunction.types @@ -27,7 +27,7 @@ var errFun: Function = {}; // Error for no call signature function foo() { } >foo : typeof foo -module foo { +namespace foo { >foo : typeof foo export var boom = 0; @@ -42,7 +42,7 @@ var goodFundule: Function = foo; // ok function bar() { } >bar : typeof bar -module bar { +namespace bar { >bar : typeof bar export function apply(thisArg: string, argArray?: string) { } @@ -58,7 +58,7 @@ var goodFundule2: Function = bar; // ok function bad() { } >bad : typeof bad -module bad { +namespace bad { >bad : typeof bad export var apply = 0; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.errors.txt b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.errors.txt index a0e6c842d9..31fed54e97 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.errors.txt @@ -7,7 +7,7 @@ assignmentToReferenceTypes.ts(16,1): error TS2630: Cannot assign to 'f' because ==== assignmentToReferenceTypes.ts (4 errors) ==== // Should all be allowed - module M { + namespace M { } M = null; ~ diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js index ac1a06dee4..8cbef3a89e 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js +++ b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js @@ -3,7 +3,7 @@ //// [assignmentToReferenceTypes.ts] // Should all be allowed -module M { +namespace M { } M = null; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js.diff b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js.diff index 569d50de4a..3dd8c7a32d 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.js.diff @@ -6,5 +6,13 @@ //// [assignmentToReferenceTypes.js] -// Should all be allowed M = null; - class C { - } \ No newline at end of file +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + C = null; + var E; + (function (E) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.symbols b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.symbols index 67caa4e9c0..2c7f5027db 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.symbols +++ b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.symbols @@ -3,7 +3,7 @@ === assignmentToReferenceTypes.ts === // Should all be allowed -module M { +namespace M { >M : Symbol(M, Decl(assignmentToReferenceTypes.ts, 0, 0)) } M = null; diff --git a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.types b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.types index 350788924e..d8cc97d284 100644 --- a/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.types +++ b/testdata/baselines/reference/submodule/compiler/assignmentToReferenceTypes.types @@ -3,7 +3,7 @@ === assignmentToReferenceTypes.ts === // Should all be allowed -module M { +namespace M { } M = null; >M = null : null diff --git a/testdata/baselines/reference/submodule/compiler/asyncArrowInClassES5.js.diff b/testdata/baselines/reference/submodule/compiler/asyncArrowInClassES5.js.diff index 27a288a967..1c3db8723d 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncArrowInClassES5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncArrowInClassES5.js.diff @@ -4,14 +4,16 @@ //// [asyncArrowInClassES5.js] // https://github.com/Microsoft/TypeScript/issues/16924 // Should capture `this` --let Test = (() => { -- var _a; -- class Test { +-var Test = /** @class */ (function () { +- function Test() { - } +- var _a; - _a = Test; -- Test.member = (x) => __awaiter(_a, void 0, void 0, function* () { }); +- Test.member = function (x) { return __awaiter(_a, void 0, void 0, function () { return __generator(_a, function (_b) { +- return [2 /*return*/]; +- }); }); }; - return Test; --})(); +-}()); +class Test { + static member = async (x) => { }; +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncAwaitWithCapturedBlockScopeVar.js.diff b/testdata/baselines/reference/submodule/compiler/asyncAwaitWithCapturedBlockScopeVar.js.diff index d56df6bd4a..f59041b606 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncAwaitWithCapturedBlockScopeVar.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncAwaitWithCapturedBlockScopeVar.js.diff @@ -5,42 +5,143 @@ //// [asyncAwaitWithCapturedBlockScopeVar.js] -function fn1() { -- return __awaiter(this, void 0, void 0, function* () { -- let ar = []; -- for (let i = 0; i < 1; i++) { -- yield 1; -- ar.push(() => i); -- } +- return __awaiter(this, void 0, void 0, function () { +- var ar, _loop_1, i; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- ar = []; +- _loop_1 = function (i) { +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, 1]; +- case 1: +- _b.sent(); +- ar.push(function () { return i; }); +- return [2 /*return*/]; +- } +- }); +- }; +- i = 0; +- _a.label = 1; +- case 1: +- if (!(i < 1)) return [3 /*break*/, 4]; +- return [5 /*yield**/, _loop_1(i)]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function fn2() { -- return __awaiter(this, void 0, void 0, function* () { -- let ar = []; -- for (let i = 0; i < 1; i++) { -- yield 1; -- ar.push(() => i); -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var ar, _loop_2, i, state_1; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- ar = []; +- _loop_2 = function (i) { +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, 1]; +- case 1: +- _b.sent(); +- ar.push(function () { return i; }); +- return [2 /*return*/, "break"]; +- } +- }); +- }; +- i = 0; +- _a.label = 1; +- case 1: +- if (!(i < 1)) return [3 /*break*/, 4]; +- return [5 /*yield**/, _loop_2(i)]; +- case 2: +- state_1 = _a.sent(); +- if (state_1 === "break") +- return [3 /*break*/, 4]; +- _a.label = 3; +- case 3: +- i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function fn3() { -- return __awaiter(this, void 0, void 0, function* () { -- let ar = []; -- for (let i = 0; i < 1; i++) { -- yield 1; -- ar.push(() => i); -- continue; -- } +- return __awaiter(this, void 0, void 0, function () { +- var ar, _loop_3, i; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- ar = []; +- _loop_3 = function (i) { +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, 1]; +- case 1: +- _b.sent(); +- ar.push(function () { return i; }); +- return [2 /*return*/, "continue"]; +- } +- }); +- }; +- i = 0; +- _a.label = 1; +- case 1: +- if (!(i < 1)) return [3 /*break*/, 4]; +- return [5 /*yield**/, _loop_3(i)]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function fn4() { -- return __awaiter(this, void 0, void 0, function* () { -- let ar = []; -- for (let i = 0; i < 1; i++) { -- yield 1; -- ar.push(() => i); -- return 1; -- } +- return __awaiter(this, void 0, void 0, function () { +- var ar, _loop_4, i, state_2; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- ar = []; +- _loop_4 = function (i) { +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, 1]; +- case 1: +- _b.sent(); +- ar.push(function () { return i; }); +- return [2 /*return*/, { value: 1 }]; +- } +- }); +- }; +- i = 0; +- _a.label = 1; +- case 1: +- if (!(i < 1)) return [3 /*break*/, 4]; +- return [5 /*yield**/, _loop_4(i)]; +- case 2: +- state_2 = _a.sent(); +- if (typeof state_2 === "object") +- return [2 /*return*/, state_2.value]; +- _a.label = 3; +- case 3: +- i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); +async function fn1() { + let ar = []; diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionContextuallyTypedReturns.types.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionContextuallyTypedReturns.types.diff index e6400fbc44..8bd5a7b0b8 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionContextuallyTypedReturns.types.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionContextuallyTypedReturns.types.diff @@ -13,10 +13,15 @@ f(v => v ? [0] : Promise.reject()); >f(v => v ? [0] : Promise.reject()) : void ->f : (cb: (v: boolean) => [0] | PromiseLike<[0]>) => void +->v => v ? [0] : Promise.reject() : (v: boolean) => [0] | Promise<[0]> +>f : (cb: (v: boolean) => PromiseLike<[0]> | [0]) => void - >v => v ? [0] : Promise.reject() : (v: boolean) => Promise<[0]> | [0] ++>v => v ? [0] : Promise.reject() : (v: boolean) => Promise<[0]> | [0] >v : boolean - >v ? [0] : Promise.reject() : Promise<[0]> | [0] +->v ? [0] : Promise.reject() : [0] | Promise<[0]> ++>v ? [0] : Promise.reject() : Promise<[0]> | [0] + >v : boolean + >[0] : [0] + >0 : 0 @@= skipped -20, +20 lines =@@ f(async v => v ? [0] : Promise.reject()); @@ -25,8 +30,24 @@ +>f : (cb: (v: boolean) => PromiseLike<[0]> | [0]) => void >async v => v ? [0] : Promise.reject() : (v: boolean) => Promise<[0]> >v : boolean - >v ? [0] : Promise.reject() : Promise<[0]> | [0] -@@= skipped -82, +82 lines =@@ +->v ? [0] : Promise.reject() : [0] | Promise<[0]> ++>v ? [0] : Promise.reject() : Promise<[0]> | [0] + >v : boolean + >[0] : [0] + >0 : 0 +@@= skipped -55, +55 lines =@@ + h(v => v ? (abc) => { } : Promise.reject()); + >h(v => v ? (abc) => { } : Promise.reject()) : void + >h : (cb: (v: boolean) => MyCallback | PromiseLike) => void +->v => v ? (abc) => { } : Promise.reject() : (v: boolean) => ((abc: string) => void) | Promise ++>v => v ? (abc) => { } : Promise.reject() : (v: boolean) => Promise | ((abc: string) => void) + >v : boolean +->v ? (abc) => { } : Promise.reject() : ((abc: string) => void) | Promise ++>v ? (abc) => { } : Promise.reject() : Promise | ((abc: string) => void) + >v : boolean + >(abc) => { } : (abc: string) => void + >abc : string +@@= skipped -27, +27 lines =@@ // repro from #29196 const increment: ( diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.errors.txt.diff new file mode 100644 index 0000000000..3b6b22f92a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.asyncFunctionNoReturnType.errors.txt ++++ new.asyncFunctionNoReturnType.errors.txt +@@= skipped -0, +0 lines =@@ +- ++error TS2468: Cannot find global value 'Promise'. ++asyncFunctionNoReturnType.ts(1,1): error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. ++ ++ ++!!! error TS2468: Cannot find global value 'Promise'. ++==== asyncFunctionNoReturnType.ts (1 errors) ==== ++ async () => { ++ ~~~~~~~~~~~~~ ++!!! error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. ++ if (window) ++ return; ++ } ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.js.diff index a4f6a99b2f..14fb55e40b 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionNoReturnType.js.diff @@ -13,9 +13,42 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; --() => __awaiter(this, void 0, void 0, function* () { +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-var _this = this; +-(function () { return __awaiter(_this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- if (window) +- return [2 /*return*/]; +- return [2 /*return*/]; +- }); +-}); }); +async () => { - if (window) - return; --}); ++ if (window) ++ return; +}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.errors.txt.diff deleted file mode 100644 index 72beb7473c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.asyncFunctionReturnExpressionErrorSpans.errors.txt -+++ new.asyncFunctionReturnExpressionErrorSpans.errors.txt -@@= skipped -0, +0 lines =@@ --asyncFunctionReturnExpressionErrorSpans.ts(11,28): error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - asyncFunctionReturnExpressionErrorSpans.ts(16,21): error TS2322: Type 'number' is not assignable to type 'string'. - - --==== asyncFunctionReturnExpressionErrorSpans.ts (2 errors) ==== -+==== asyncFunctionReturnExpressionErrorSpans.ts (1 errors) ==== - interface Foo { - bar: { - baz: { -@@= skipped -13, +12 lines =@@ - } - - async function asyncFoo(): Promise { -- ~~~~~~~~~~~~ --!!! error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - return { - bar: { - baz: { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.js.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.js.diff index 44e9bc7849..94bc9a68b0 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.js.diff @@ -13,23 +13,53 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; --function asyncFoo() { -- return __awaiter(this, void 0, void 0, function* () { -- return { -- bar: { -- baz: { -- inner: { -- thing: 1 -- } +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +async function asyncFoo() { + return { + bar: { + baz: { + inner: { + thing: 1 - } ++ } } -- }; +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-function asyncFoo() { +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/, { +- bar: { +- baz: { +- inner: { +- thing: 1 +- } +- } +- } +- }]; +- }); - }); + } + }; diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.symbols.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.symbols.diff new file mode 100644 index 0000000000..f2badbf730 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionReturnExpressionErrorSpans.symbols.diff @@ -0,0 +1,11 @@ +--- old.asyncFunctionReturnExpressionErrorSpans.symbols ++++ new.asyncFunctionReturnExpressionErrorSpans.symbols +@@= skipped -21, +21 lines =@@ + + async function asyncFoo(): Promise { + >asyncFoo : Symbol(asyncFoo, Decl(asyncFunctionReturnExpressionErrorSpans.ts, 8, 1)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + >Foo : Symbol(Foo, Decl(asyncFunctionReturnExpressionErrorSpans.ts, 0, 0)) + + return { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.js.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.js.diff index c50a92ee97..5d097c2c15 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.js.diff @@ -13,19 +13,56 @@ - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +-}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } -}; var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) -@@= skipped -21, +11 lines =@@ +@@= skipped -48, +11 lines =@@ } return t; }; --(_a) => __awaiter(this, void 0, void 0, function* () { +-var _this = this; +-(function (_a) { return __awaiter(_this, void 0, void 0, function () { +- var _b; +- var foo = _a.foo, bar = _a.bar, rest = __rest(_a, ["foo", "bar"]); +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = bar; +- return [4 /*yield*/, foo]; +- case 1: return [2 /*return*/, _b.apply(void 0, [_c.sent()])]; +- } +- }); +-}); }); +// https://github.com/Microsoft/TypeScript/issues/19187 +async (_a) => { - var { foo, bar } = _a, rest = __rest(_a, ["foo", "bar"]); -- return bar(yield foo); --}); ++ var { foo, bar } = _a, rest = __rest(_a, ["foo", "bar"]); + return bar(await foo); +}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.types.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.types.diff new file mode 100644 index 0000000000..1cce8a6d52 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionTempVariableScoping.types.diff @@ -0,0 +1,11 @@ +--- old.asyncFunctionTempVariableScoping.types ++++ new.asyncFunctionTempVariableScoping.types +@@= skipped -3, +3 lines =@@ + // https://github.com/Microsoft/TypeScript/issues/19187 + + async ({ foo, bar, ...rest }) => bar(await foo); +->async ({ foo, bar, ...rest }) => bar(await foo) : ({ foo, bar, ...rest }: { [x: string]: any; foo: any; bar: any; }) => Promise ++>async ({ foo, bar, ...rest }) => bar(await foo) : ({ foo, bar, ...rest }: { [x: string]: any; bar: any; foo: any; }) => Promise + >foo : any + >bar : any + >rest : { [x: string]: any; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/asyncFunctionWithForStatementNoInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/asyncFunctionWithForStatementNoInitializer.js.diff index 50f2f67e25..403dcedbed 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncFunctionWithForStatementNoInitializer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncFunctionWithForStatementNoInitializer.js.diff @@ -13,33 +13,75 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -function test1() { -- return __awaiter(this, void 0, void 0, function* () { -- let i = 0; -- let limit = 10; -- for (; i < limit; ++i) { -- } +- return __awaiter(this, void 0, void 0, function () { +- var i, limit; +- return __generator(this, function (_a) { +- i = 0; +- limit = 10; +- for (; i < limit; ++i) { +- } +- return [2 /*return*/]; +- }); - }); -} -function test2() { -- return __awaiter(this, void 0, void 0, function* () { -- let i = 0; -- let limit = 10; -- for (i = 1; i < limit; ++i) { -- } +- return __awaiter(this, void 0, void 0, function () { +- var i, limit; +- return __generator(this, function (_a) { +- i = 0; +- limit = 10; +- for (i = 1; i < limit; ++i) { +- } +- return [2 /*return*/]; +- }); - }); -} -function test3() { -- return __awaiter(this, void 0, void 0, function* () { -- let i = 0; -- for (;; ++i) { -- } +- return __awaiter(this, void 0, void 0, function () { +- var i; +- return __generator(this, function (_a) { +- i = 0; +- for (;; ++i) { +- } +- return [2 /*return*/]; +- }); - }); -} -function test4() { -- return __awaiter(this, void 0, void 0, function* () { -- for (;;) { -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- for (;;) { +- } +- return [2 /*return*/]; +- }); - }); +async function test1() { + let i = 0; diff --git a/testdata/baselines/reference/submodule/compiler/asyncImportNestedYield.js.diff b/testdata/baselines/reference/submodule/compiler/asyncImportNestedYield.js.diff index 4e0ed2c606..042c8d62b9 100644 --- a/testdata/baselines/reference/submodule/compiler/asyncImportNestedYield.js.diff +++ b/testdata/baselines/reference/submodule/compiler/asyncImportNestedYield.js.diff @@ -4,6 +4,33 @@ } //// [asyncImportNestedYield.js] +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); @@ -18,8 +45,17 @@ - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -function foo() { -- return __asyncGenerator(this, arguments, function* foo_1() { -- Promise.resolve("".concat((yield __await(Promise.resolve("".concat(yield yield __await("foo"))).then(function (s) { return require(s); }))).default)).then(function (s) { return require(s); }); +- return __asyncGenerator(this, arguments, function foo_1() { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, __await("foo")]; +- case 1: return [4 /*yield*/, _a.sent()]; +- case 2: return [4 /*yield*/, __await.apply(void 0, [Promise.resolve("".concat(_a.sent())).then(function (s) { return require(s); })])]; +- case 3: +- Promise.resolve("".concat((_a.sent()).default)).then(function (s) { return require(s); }); +- return [2 /*return*/]; +- } +- }); - }); +async function* foo() { + Promise.resolve(`${(await Promise.resolve(`${yield "foo"}`).then(s => require(s))).default}`).then(s => require(s)); diff --git a/testdata/baselines/reference/submodule/compiler/augmentArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/augmentArray.symbols.diff new file mode 100644 index 0000000000..d14a36a0c2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentArray.symbols.diff @@ -0,0 +1,13 @@ +--- old.augmentArray.symbols ++++ new.augmentArray.symbols +@@= skipped -1, +1 lines =@@ + + === augmentArray.ts === + interface Array { +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(augmentArray.ts, 0, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(augmentArray.ts, 0, 0)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(augmentArray.ts, 0, 16)) + + (): any[]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.errors.txt index 5dc80d0a39..aa0e7459cf 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.errors.txt @@ -2,7 +2,7 @@ augmentedClassWithPrototypePropertyOnModule.ts(3,9): error TS2300: Duplicate ide ==== augmentedClassWithPrototypePropertyOnModule.ts (1 errors) ==== - declare module m { + declare namespace m { var f; var prototype; // This should be error since prototype would be static property on class m ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.js b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.js index 83d359a309..b9db7b5030 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// //// [augmentedClassWithPrototypePropertyOnModule.ts] -declare module m { +declare namespace m { var f; var prototype; // This should be error since prototype would be static property on class m } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.symbols b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.symbols index 1bf180daf0..0a19cdac84 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// === augmentedClassWithPrototypePropertyOnModule.ts === -declare module m { +declare namespace m { >m : Symbol(m, Decl(augmentedClassWithPrototypePropertyOnModule.ts, 0, 0), Decl(augmentedClassWithPrototypePropertyOnModule.ts, 3, 1)) var f; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.types b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.types index 1a648e26eb..96de86bd55 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedClassWithPrototypePropertyOnModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/augmentedClassWithPrototypePropertyOnModule.ts] //// === augmentedClassWithPrototypePropertyOnModule.ts === -declare module m { +declare namespace m { >m : typeof m var f; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypeBracketNamedPropertyAccess.symbols.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypeBracketNamedPropertyAccess.symbols.diff new file mode 100644 index 0000000000..b43153ef94 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypeBracketNamedPropertyAccess.symbols.diff @@ -0,0 +1,11 @@ +--- old.augmentedTypeBracketNamedPropertyAccess.symbols ++++ new.augmentedTypeBracketNamedPropertyAccess.symbols +@@= skipped -7, +7 lines =@@ + >data : Symbol(Object.data, Decl(augmentedTypeBracketNamedPropertyAccess.ts, 0, 18)) + } + interface Function { +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 2, 1)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(augmentedTypeBracketNamedPropertyAccess.ts, 2, 1)) + + functionData: string; + >functionData : Symbol(Function.functionData, Decl(augmentedTypeBracketNamedPropertyAccess.ts, 3, 20)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.js.diff new file mode 100644 index 0000000000..c96be7bc87 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass.js.diff @@ -0,0 +1,29 @@ +--- old.augmentedTypesClass.js ++++ new.augmentedTypesClass.js +@@= skipped -10, +10 lines =@@ + + //// [augmentedTypesClass.js] + //// class then var +-var c1 = /** @class */ (function () { +- function c1() { +- } +- c1.prototype.foo = function () { }; +- return c1; +-}()); ++class c1 { ++ foo() { } ++} + var c1 = 1; // error + //// class then enum +-var c4 = /** @class */ (function () { +- function c4() { +- } +- c4.prototype.foo = function () { }; +- return c4; +-}()); ++class c4 { ++ foo() { } ++} + (function (c4) { + c4[c4["One"] = 0] = "One"; + })(c4 || (c4 = {})); // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.js.diff new file mode 100644 index 0000000000..a1517b0bcc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2.js.diff @@ -0,0 +1,49 @@ +--- old.augmentedTypesClass2.js ++++ new.augmentedTypesClass2.js +@@= skipped -34, +34 lines =@@ + //// [augmentedTypesClass2.js] + // Checking class with other things in type space not value space + // class then interface +-var c11 = /** @class */ (function () { +- function c11() { +- } +- c11.prototype.foo = function () { ++class c11 { ++ foo() { + return 1; +- }; +- return c11; +-}()); ++ } ++} + // class then class - covered + // class then enum +-var c33 = /** @class */ (function () { +- function c33() { +- } +- c33.prototype.foo = function () { ++class c33 { ++ foo() { + return 1; +- }; +- return c33; +-}()); ++ } ++} + (function (c33) { + c33[c33["One"] = 0] = "One"; + })(c33 || (c33 = {})); + ; + // class then import +-var c44 = /** @class */ (function () { +- function c44() { +- } +- c44.prototype.foo = function () { ++class c44 { ++ foo() { + return 1; +- }; +- return c44; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2a.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2a.js.diff new file mode 100644 index 0000000000..cdcf4df928 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass2a.js.diff @@ -0,0 +1,18 @@ +--- old.augmentedTypesClass2a.js ++++ new.augmentedTypesClass2a.js +@@= skipped -7, +7 lines =@@ + + //// [augmentedTypesClass2a.js] + //// class then function +-var c2 = /** @class */ (function () { +- function c2() { +- } +- c2.prototype.foo = function () { }; +- return c2; +-}()); // error ++class c2 { ++ foo() { } ++} // error + function c2() { } // error +-var c2 = function () { }; ++var c2 = () => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js index 57a356d639..262b861001 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js @@ -3,13 +3,13 @@ //// [augmentedTypesClass3.ts] // class then module class c5 { public foo() { } } -module c5 { } // should be ok +namespace c5 { } // should be ok class c5a { public foo() { } } -module c5a { var y = 2; } // should be ok +namespace c5a { var y = 2; } // should be ok class c5b { public foo() { } } -module c5b { export var y = 2; } // should be ok +namespace c5b { export var y = 2; } // should be ok //// class then import class c5c { public foo() { } } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js.diff new file mode 100644 index 0000000000..1d1c01a58c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.js.diff @@ -0,0 +1,50 @@ +--- old.augmentedTypesClass3.js ++++ new.augmentedTypesClass3.js +@@= skipped -16, +16 lines =@@ + + //// [augmentedTypesClass3.js] + // class then module +-var c5 = /** @class */ (function () { +- function c5() { +- } +- c5.prototype.foo = function () { }; +- return c5; +-}()); +-var c5a = /** @class */ (function () { +- function c5a() { +- } +- c5a.prototype.foo = function () { }; +- return c5a; +-}()); ++class c5 { ++ foo() { } ++} ++class c5a { ++ foo() { } ++} + (function (c5a) { + var y = 2; + })(c5a || (c5a = {})); // should be ok +-var c5b = /** @class */ (function () { +- function c5b() { +- } +- c5b.prototype.foo = function () { }; +- return c5b; +-}()); ++class c5b { ++ foo() { } ++} + (function (c5b) { + c5b.y = 2; + })(c5b || (c5b = {})); // should be ok + //// class then import +-var c5c = /** @class */ (function () { +- function c5c() { +- } +- c5c.prototype.foo = function () { }; +- return c5c; +-}()); ++class c5c { ++ foo() { } ++} + //import c5c = require(''); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.symbols index 92feb7012c..a323206f0c 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.symbols @@ -6,28 +6,28 @@ class c5 { public foo() { } } >c5 : Symbol(c5, Decl(augmentedTypesClass3.ts, 0, 0), Decl(augmentedTypesClass3.ts, 1, 29)) >foo : Symbol(c5.foo, Decl(augmentedTypesClass3.ts, 1, 10)) -module c5 { } // should be ok +namespace c5 { } // should be ok >c5 : Symbol(c5, Decl(augmentedTypesClass3.ts, 0, 0), Decl(augmentedTypesClass3.ts, 1, 29)) class c5a { public foo() { } } ->c5a : Symbol(c5a, Decl(augmentedTypesClass3.ts, 2, 13), Decl(augmentedTypesClass3.ts, 4, 30)) +>c5a : Symbol(c5a, Decl(augmentedTypesClass3.ts, 2, 16), Decl(augmentedTypesClass3.ts, 4, 30)) >foo : Symbol(c5a.foo, Decl(augmentedTypesClass3.ts, 4, 11)) -module c5a { var y = 2; } // should be ok ->c5a : Symbol(c5a, Decl(augmentedTypesClass3.ts, 2, 13), Decl(augmentedTypesClass3.ts, 4, 30)) ->y : Symbol(y, Decl(augmentedTypesClass3.ts, 5, 16)) +namespace c5a { var y = 2; } // should be ok +>c5a : Symbol(c5a, Decl(augmentedTypesClass3.ts, 2, 16), Decl(augmentedTypesClass3.ts, 4, 30)) +>y : Symbol(y, Decl(augmentedTypesClass3.ts, 5, 19)) class c5b { public foo() { } } ->c5b : Symbol(c5b, Decl(augmentedTypesClass3.ts, 5, 25), Decl(augmentedTypesClass3.ts, 7, 30)) +>c5b : Symbol(c5b, Decl(augmentedTypesClass3.ts, 5, 28), Decl(augmentedTypesClass3.ts, 7, 30)) >foo : Symbol(c5b.foo, Decl(augmentedTypesClass3.ts, 7, 11)) -module c5b { export var y = 2; } // should be ok ->c5b : Symbol(c5b, Decl(augmentedTypesClass3.ts, 5, 25), Decl(augmentedTypesClass3.ts, 7, 30)) ->y : Symbol(y, Decl(augmentedTypesClass3.ts, 8, 23)) +namespace c5b { export var y = 2; } // should be ok +>c5b : Symbol(c5b, Decl(augmentedTypesClass3.ts, 5, 28), Decl(augmentedTypesClass3.ts, 7, 30)) +>y : Symbol(y, Decl(augmentedTypesClass3.ts, 8, 26)) //// class then import class c5c { public foo() { } } ->c5c : Symbol(c5c, Decl(augmentedTypesClass3.ts, 8, 32)) +>c5c : Symbol(c5c, Decl(augmentedTypesClass3.ts, 8, 35)) >foo : Symbol(c5c.foo, Decl(augmentedTypesClass3.ts, 11, 11)) //import c5c = require(''); diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.types index f98458ab8a..4f0db0411b 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass3.types @@ -6,13 +6,13 @@ class c5 { public foo() { } } >c5 : c5 >foo : () => void -module c5 { } // should be ok +namespace c5 { } // should be ok class c5a { public foo() { } } >c5a : c5a >foo : () => void -module c5a { var y = 2; } // should be ok +namespace c5a { var y = 2; } // should be ok >c5a : typeof c5a >y : number >2 : 2 @@ -21,7 +21,7 @@ class c5b { public foo() { } } >c5b : c5b >foo : () => void -module c5b { export var y = 2; } // should be ok +namespace c5b { export var y = 2; } // should be ok >c5b : typeof c5b >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesClass4.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass4.js.diff new file mode 100644 index 0000000000..a4c03c9cc2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesClass4.js.diff @@ -0,0 +1,24 @@ +--- old.augmentedTypesClass4.js ++++ new.augmentedTypesClass4.js +@@= skipped -7, +7 lines =@@ + + //// [augmentedTypesClass4.js] + //// class then class +-var c3 = /** @class */ (function () { +- function c3() { +- } +- c3.prototype.foo = function () { }; +- return c3; +-}()); // error +-var c3 = /** @class */ (function () { +- function c3() { +- } +- c3.prototype.bar = function () { }; +- return c3; +-}()); // error ++class c3 { ++ foo() { } ++} // error ++class c3 { ++ bar() { } ++} // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.errors.txt index a8e9752429..9f38532548 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.errors.txt @@ -61,13 +61,13 @@ augmentedTypesEnum.ts(21,12): error TS2432: In an enum with multiple declaration // enum then internal module enum e6 { One } - module e6 { } // ok + namespace e6 { } // ok enum e6a { One } - module e6a { var y = 2; } // should be error + namespace e6a { var y = 2; } // should be error enum e6b { One } - module e6b { export var y = 2; } // should be error + namespace e6b { export var y = 2; } // should be error // enum then import, messes with error reporting //enum e7 { One } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js index 562cd226c4..53aca02cd2 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js @@ -25,13 +25,13 @@ enum e5a { One } // error // enum then internal module enum e6 { One } -module e6 { } // ok +namespace e6 { } // ok enum e6a { One } -module e6a { var y = 2; } // should be error +namespace e6a { var y = 2; } // should be error enum e6b { One } -module e6b { export var y = 2; } // should be error +namespace e6b { export var y = 2; } // should be error // enum then import, messes with error reporting //enum e7 { One } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js.diff new file mode 100644 index 0000000000..8307f4cc16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.js.diff @@ -0,0 +1,25 @@ +--- old.augmentedTypesEnum.js ++++ new.augmentedTypesEnum.js +@@= skipped -53, +53 lines =@@ + (function (e3) { + e3[e3["One"] = 0] = "One"; + })(e3 || (e3 = {})); // error +-var e3 = function () { }; // error ++var e3 = () => { }; // error + // enum then class + var e4; + (function (e4) { + e4[e4["One"] = 0] = "One"; + })(e4 || (e4 = {})); // error +-var e4 = /** @class */ (function () { +- function e4() { +- } +- e4.prototype.foo = function () { }; +- return e4; +-}()); // error ++class e4 { ++ foo() { } ++} // error + // enum then enum + var e5; + (function (e5) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.symbols index 1dd7fe3f24..8ab3996f17 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.symbols @@ -55,24 +55,24 @@ enum e6 { One } >e6 : Symbol(e6, Decl(augmentedTypesEnum.ts, 20, 16), Decl(augmentedTypesEnum.ts, 23, 15)) >One : Symbol(e6.One, Decl(augmentedTypesEnum.ts, 23, 9)) -module e6 { } // ok +namespace e6 { } // ok >e6 : Symbol(e6, Decl(augmentedTypesEnum.ts, 20, 16), Decl(augmentedTypesEnum.ts, 23, 15)) enum e6a { One } ->e6a : Symbol(e6a, Decl(augmentedTypesEnum.ts, 24, 13), Decl(augmentedTypesEnum.ts, 26, 16)) +>e6a : Symbol(e6a, Decl(augmentedTypesEnum.ts, 24, 16), Decl(augmentedTypesEnum.ts, 26, 16)) >One : Symbol(e6a.One, Decl(augmentedTypesEnum.ts, 26, 10)) -module e6a { var y = 2; } // should be error ->e6a : Symbol(e6a, Decl(augmentedTypesEnum.ts, 24, 13), Decl(augmentedTypesEnum.ts, 26, 16)) ->y : Symbol(y, Decl(augmentedTypesEnum.ts, 27, 16)) +namespace e6a { var y = 2; } // should be error +>e6a : Symbol(e6a, Decl(augmentedTypesEnum.ts, 24, 16), Decl(augmentedTypesEnum.ts, 26, 16)) +>y : Symbol(y, Decl(augmentedTypesEnum.ts, 27, 19)) enum e6b { One } ->e6b : Symbol(e6b, Decl(augmentedTypesEnum.ts, 27, 25), Decl(augmentedTypesEnum.ts, 29, 16)) +>e6b : Symbol(e6b, Decl(augmentedTypesEnum.ts, 27, 28), Decl(augmentedTypesEnum.ts, 29, 16)) >One : Symbol(e6b.One, Decl(augmentedTypesEnum.ts, 29, 10)) -module e6b { export var y = 2; } // should be error ->e6b : Symbol(e6b, Decl(augmentedTypesEnum.ts, 27, 25), Decl(augmentedTypesEnum.ts, 29, 16)) ->y : Symbol(y, Decl(augmentedTypesEnum.ts, 30, 23)) +namespace e6b { export var y = 2; } // should be error +>e6b : Symbol(e6b, Decl(augmentedTypesEnum.ts, 27, 28), Decl(augmentedTypesEnum.ts, 29, 16)) +>y : Symbol(y, Decl(augmentedTypesEnum.ts, 30, 26)) // enum then import, messes with error reporting //enum e7 { One } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types index dec6d88e23..ed7654f36f 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum.types @@ -57,13 +57,13 @@ enum e6 { One } >e6 : e6 >One : e6.One -module e6 { } // ok +namespace e6 { } // ok enum e6a { One } >e6a : e6a >One : e6a.One -module e6a { var y = 2; } // should be error +namespace e6a { var y = 2; } // should be error >e6a : typeof e6a >y : number >2 : 2 @@ -72,7 +72,7 @@ enum e6b { One } >e6b : e6b >One : e6b.One -module e6b { export var y = 2; } // should be error +namespace e6b { export var y = 2; } // should be error >e6b : typeof e6b >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.js.diff new file mode 100644 index 0000000000..525f0d1d96 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum2.js.diff @@ -0,0 +1,20 @@ +--- old.augmentedTypesEnum2.js ++++ new.augmentedTypesEnum2.js +@@= skipped -33, +33 lines =@@ + e2[e2["One"] = 0] = "One"; + })(e2 || (e2 = {})); + ; // error +-var e2 = /** @class */ (function () { +- function e2() { +- } +- e2.prototype.foo = function () { ++class e2 { ++ foo() { + return 1; +- }; +- return e2; +-}()); ++ } ++} + //enum then enum - covered + //enum then import - covered \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.errors.txt index a50b453180..4c075d9de5 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.errors.txt @@ -2,15 +2,15 @@ augmentedTypesEnum3.ts(16,5): error TS2432: In an enum with multiple declaration ==== augmentedTypesEnum3.ts (1 errors) ==== - module E { + namespace E { var t; } enum E { } enum F { } - module F { var t; } + namespace F { var t; } - module A { + namespace A { var o; } enum A { @@ -21,6 +21,6 @@ augmentedTypesEnum3.ts(16,5): error TS2432: In an enum with multiple declaration ~ !!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. } - module A { + namespace A { var p; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.js index fbb2b81c09..8973e76529 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/augmentedTypesEnum3.ts] //// //// [augmentedTypesEnum3.ts] -module E { +namespace E { var t; } enum E { } enum F { } -module F { var t; } +namespace F { var t; } -module A { +namespace A { var o; } enum A { @@ -18,7 +18,7 @@ enum A { enum A { c } -module A { +namespace A { var p; } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.symbols index 5b852406f2..33adc33610 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/augmentedTypesEnum3.ts] //// === augmentedTypesEnum3.ts === -module E { +namespace E { >E : Symbol(E, Decl(augmentedTypesEnum3.ts, 0, 0), Decl(augmentedTypesEnum3.ts, 2, 1)) var t; @@ -13,30 +13,30 @@ enum E { } enum F { } >F : Symbol(F, Decl(augmentedTypesEnum3.ts, 3, 10), Decl(augmentedTypesEnum3.ts, 5, 10)) -module F { var t; } +namespace F { var t; } >F : Symbol(F, Decl(augmentedTypesEnum3.ts, 3, 10), Decl(augmentedTypesEnum3.ts, 5, 10)) ->t : Symbol(t, Decl(augmentedTypesEnum3.ts, 6, 14)) +>t : Symbol(t, Decl(augmentedTypesEnum3.ts, 6, 17)) -module A { ->A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 19), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) +namespace A { +>A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 22), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) var o; >o : Symbol(o, Decl(augmentedTypesEnum3.ts, 9, 7)) } enum A { ->A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 19), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) +>A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 22), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) b >b : Symbol(A.b, Decl(augmentedTypesEnum3.ts, 11, 8)) } enum A { ->A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 19), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) +>A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 22), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) c >c : Symbol(A.c, Decl(augmentedTypesEnum3.ts, 14, 8)) } -module A { ->A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 19), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) +namespace A { +>A : Symbol(A, Decl(augmentedTypesEnum3.ts, 6, 22), Decl(augmentedTypesEnum3.ts, 10, 1), Decl(augmentedTypesEnum3.ts, 13, 1), Decl(augmentedTypesEnum3.ts, 16, 1)) var p; >p : Symbol(p, Decl(augmentedTypesEnum3.ts, 18, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types index 1c03e61795..8d6eeffb8b 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesEnum3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/augmentedTypesEnum3.ts] //// === augmentedTypesEnum3.ts === -module E { +namespace E { >E : typeof E var t; @@ -13,11 +13,11 @@ enum E { } enum F { } >F : F -module F { var t; } +namespace F { var t; } >F : typeof F >t : any -module A { +namespace A { >A : typeof A var o; @@ -35,7 +35,7 @@ enum A { c >c : A.b } -module A { +namespace A { >A : typeof A var p; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.errors.txt index 241e746460..031960a175 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.errors.txt @@ -65,16 +65,16 @@ augmentedTypesFunction.ts(21,6): error TS2567: Enum declarations can only merge // function then internal module function y5() { } - module y5 { } // ok since module is not instantiated + namespace y5 { } // ok since module is not instantiated function y5a() { } - module y5a { var y = 2; } // should be an error + namespace y5a { var y = 2; } // should be an error function y5b() { } - module y5b { export var y = 3; } // should be an error + namespace y5b { export var y = 3; } // should be an error function y5c() { } - module y5c { export interface I { foo(): void } } // should be an error + namespace y5c { export interface I { foo(): void } } // should be an error // function then import, messes with other errors //function y6() { } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js index ea55579bea..4da5627a3e 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js @@ -25,16 +25,16 @@ enum y4 { One } // error // function then internal module function y5() { } -module y5 { } // ok since module is not instantiated +namespace y5 { } // ok since module is not instantiated function y5a() { } -module y5a { var y = 2; } // should be an error +namespace y5a { var y = 2; } // should be an error function y5b() { } -module y5b { export var y = 3; } // should be an error +namespace y5b { export var y = 3; } // should be an error function y5c() { } -module y5c { export interface I { foo(): void } } // should be an error +namespace y5c { export interface I { foo(): void } } // should be an error // function then import, messes with other errors //function y6() { } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js.diff new file mode 100644 index 0000000000..f28dfbfc2b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.js.diff @@ -0,0 +1,30 @@ +--- old.augmentedTypesFunction.js ++++ new.augmentedTypesFunction.js +@@= skipped -47, +47 lines =@@ + function y2() { } // error + function y2() { } // error + function y2a() { } // error +-var y2a = function () { }; // error ++var y2a = () => { }; // error + // function then class + function y3() { } // error +-var y3 = /** @class */ (function () { +- function y3() { +- } +- return y3; +-}()); // error ++class y3 { ++} // error + function y3a() { } // error +-var y3a = /** @class */ (function () { +- function y3a() { +- } +- y3a.prototype.foo = function () { }; +- return y3a; +-}()); // error ++class y3a { ++ foo() { } ++} // error + // function then enum + function y4() { } // error + (function (y4) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.symbols index 14814c2cf9..8e34acdea8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.symbols @@ -47,30 +47,30 @@ enum y4 { One } // error function y5() { } >y5 : Symbol(y5, Decl(augmentedTypesFunction.ts, 20, 15), Decl(augmentedTypesFunction.ts, 23, 17)) -module y5 { } // ok since module is not instantiated +namespace y5 { } // ok since module is not instantiated >y5 : Symbol(y5, Decl(augmentedTypesFunction.ts, 20, 15), Decl(augmentedTypesFunction.ts, 23, 17)) function y5a() { } ->y5a : Symbol(y5a, Decl(augmentedTypesFunction.ts, 24, 13), Decl(augmentedTypesFunction.ts, 26, 18)) +>y5a : Symbol(y5a, Decl(augmentedTypesFunction.ts, 24, 16), Decl(augmentedTypesFunction.ts, 26, 18)) -module y5a { var y = 2; } // should be an error ->y5a : Symbol(y5a, Decl(augmentedTypesFunction.ts, 24, 13), Decl(augmentedTypesFunction.ts, 26, 18)) ->y : Symbol(y, Decl(augmentedTypesFunction.ts, 27, 16)) +namespace y5a { var y = 2; } // should be an error +>y5a : Symbol(y5a, Decl(augmentedTypesFunction.ts, 24, 16), Decl(augmentedTypesFunction.ts, 26, 18)) +>y : Symbol(y, Decl(augmentedTypesFunction.ts, 27, 19)) function y5b() { } ->y5b : Symbol(y5b, Decl(augmentedTypesFunction.ts, 27, 25), Decl(augmentedTypesFunction.ts, 29, 18)) +>y5b : Symbol(y5b, Decl(augmentedTypesFunction.ts, 27, 28), Decl(augmentedTypesFunction.ts, 29, 18)) -module y5b { export var y = 3; } // should be an error ->y5b : Symbol(y5b, Decl(augmentedTypesFunction.ts, 27, 25), Decl(augmentedTypesFunction.ts, 29, 18)) ->y : Symbol(y, Decl(augmentedTypesFunction.ts, 30, 23)) +namespace y5b { export var y = 3; } // should be an error +>y5b : Symbol(y5b, Decl(augmentedTypesFunction.ts, 27, 28), Decl(augmentedTypesFunction.ts, 29, 18)) +>y : Symbol(y, Decl(augmentedTypesFunction.ts, 30, 26)) function y5c() { } ->y5c : Symbol(y5c, Decl(augmentedTypesFunction.ts, 30, 32), Decl(augmentedTypesFunction.ts, 32, 18)) +>y5c : Symbol(y5c, Decl(augmentedTypesFunction.ts, 30, 35), Decl(augmentedTypesFunction.ts, 32, 18)) -module y5c { export interface I { foo(): void } } // should be an error ->y5c : Symbol(y5c, Decl(augmentedTypesFunction.ts, 30, 32), Decl(augmentedTypesFunction.ts, 32, 18)) ->I : Symbol(I, Decl(augmentedTypesFunction.ts, 33, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesFunction.ts, 33, 33)) +namespace y5c { export interface I { foo(): void } } // should be an error +>y5c : Symbol(y5c, Decl(augmentedTypesFunction.ts, 30, 35), Decl(augmentedTypesFunction.ts, 32, 18)) +>I : Symbol(I, Decl(augmentedTypesFunction.ts, 33, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesFunction.ts, 33, 36)) // function then import, messes with other errors //function y6() { } diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types index 6d4445fb0c..ce658a7708 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesFunction.types @@ -49,12 +49,12 @@ enum y4 { One } // error function y5() { } >y5 : () => void -module y5 { } // ok since module is not instantiated +namespace y5 { } // ok since module is not instantiated function y5a() { } >y5a : typeof y5a -module y5a { var y = 2; } // should be an error +namespace y5a { var y = 2; } // should be an error >y5a : typeof y5a >y : number >2 : 2 @@ -62,7 +62,7 @@ module y5a { var y = 2; } // should be an error function y5b() { } >y5b : typeof y5b -module y5b { export var y = 3; } // should be an error +namespace y5b { export var y = 3; } // should be an error >y5b : typeof y5b >y : number >3 : 3 @@ -70,7 +70,7 @@ module y5b { export var y = 3; } // should be an error function y5c() { } >y5c : () => void -module y5c { export interface I { foo(): void } } // should be an error +namespace y5c { export interface I { foo(): void } } // should be an error >foo : () => void // function then import, messes with other errors diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.js.diff index cae881d4fe..e625d03dc1 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.js.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesInterface.js.diff @@ -5,6 +5,18 @@ //// [augmentedTypesInterface.js] -// interface then interface - class i2 { - bar() { - return 1; \ No newline at end of file +-var i2 = /** @class */ (function () { +- function i2() { +- } +- i2.prototype.bar = function () { ++class i2 { ++ bar() { + return 1; +- }; +- return i2; +-}()); ++ } ++} + var i3; + (function (i3) { + i3[i3["One"] = 0] = "One"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.errors.txt index c5e17402e5..94ce669b68 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.errors.txt @@ -1,40 +1,40 @@ -augmentedTypesModules.ts(5,8): error TS2300: Duplicate identifier 'm1a'. +augmentedTypesModules.ts(5,11): error TS2300: Duplicate identifier 'm1a'. augmentedTypesModules.ts(6,5): error TS2300: Duplicate identifier 'm1a'. -augmentedTypesModules.ts(8,8): error TS2300: Duplicate identifier 'm1b'. +augmentedTypesModules.ts(8,11): error TS2300: Duplicate identifier 'm1b'. augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. -augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. +augmentedTypesModules.ts(16,11): error TS2300: Duplicate identifier 'm1d'. augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. -augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(25,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(28,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules.ts(51,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== augmentedTypesModules.ts (9 errors) ==== // module then var - module m1 { } + namespace m1 { } var m1 = 1; // Should be allowed - module m1a { var y = 2; } // error - ~~~ + namespace m1a { var y = 2; } // error + ~~~ !!! error TS2300: Duplicate identifier 'm1a'. var m1a = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'm1a'. - module m1b { export var y = 2; } // error - ~~~ + namespace m1b { export var y = 2; } // error + ~~~ !!! error TS2300: Duplicate identifier 'm1b'. var m1b = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'm1b'. - module m1c { + namespace m1c { export interface I { foo(): void; } } var m1c = 1; // Should be allowed - module m1d { // error - ~~~ + namespace m1d { // error + ~~~ !!! error TS2300: Duplicate identifier 'm1d'. export class I { foo() { } } } @@ -43,85 +43,85 @@ augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be !!! error TS2300: Duplicate identifier 'm1d'. // module then function - module m2 { } + namespace m2 { } function m2() { }; // ok since the module is not instantiated - module m2a { var y = 2; } - ~~~ + namespace m2a { var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2a() { }; // error since the module is instantiated - module m2b { export var y = 2; } - ~~~ + namespace m2b { export var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2b() { }; // error since the module is instantiated // should be errors to have function first function m2c() { }; - module m2c { export var y = 2; } + namespace m2c { export var y = 2; } - module m2d { } + namespace m2d { } declare function m2d(): void; declare function m2e(): void; - module m2e { } + namespace m2e { } function m2f() { }; - module m2f { export interface I { foo(): void } } + namespace m2f { export interface I { foo(): void } } function m2g() { }; - module m2g { export class C { foo() { } } } + namespace m2g { export class C { foo() { } } } // module then class - module m3 { } + namespace m3 { } class m3 { } // ok since the module is not instantiated - module m3a { var y = 2; } - ~~~ + namespace m3a { var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } - module m3b { var y = 2; } + namespace m3b { var y = 2; } class m3c { foo() { } } - module m3c { export var y = 2; } + namespace m3c { export var y = 2; } declare class m3d { foo(): void } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } - module m3e { export var y = 2; } + namespace m3e { export var y = 2; } declare class m3e { foo(): void } declare class m3f { foo(): void } - module m3f { export interface I { foo(): void } } + namespace m3f { export interface I { foo(): void } } declare class m3g { foo(): void } - module m3g { export class C { foo() { } } } + namespace m3g { export class C { foo() { } } } // module then enum // should be errors - module m4 { } + namespace m4 { } enum m4 { } - module m4a { var y = 2; } + namespace m4a { var y = 2; } enum m4a { One } - module m4b { export var y = 2; } + namespace m4b { export var y = 2; } enum m4b { One } - module m4c { interface I { foo(): void } } + namespace m4c { interface I { foo(): void } } enum m4c { One } - module m4d { class C { foo() { } } } + namespace m4d { class C { foo() { } } } enum m4d { One } //// module then module - module m5 { export var y = 2; } - module m5 { export interface I { foo(): void } } // should already be reasonably well covered + namespace m5 { export var y = 2; } + namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered // module then import - module m6 { export var y = 2; } + namespace m6 { export var y = 2; } //import m6 = require(''); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js index 4e090cef99..1ec3070df5 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js @@ -2,100 +2,100 @@ //// [augmentedTypesModules.ts] // module then var -module m1 { } +namespace m1 { } var m1 = 1; // Should be allowed -module m1a { var y = 2; } // error +namespace m1a { var y = 2; } // error var m1a = 1; // error -module m1b { export var y = 2; } // error +namespace m1b { export var y = 2; } // error var m1b = 1; // error -module m1c { +namespace m1c { export interface I { foo(): void; } } var m1c = 1; // Should be allowed -module m1d { // error +namespace m1d { // error export class I { foo() { } } } var m1d = 1; // error // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated -module m2a { var y = 2; } +namespace m2a { var y = 2; } function m2a() { }; // error since the module is instantiated -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } function m2b() { }; // error since the module is instantiated // should be errors to have function first function m2c() { }; -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } -module m2d { } +namespace m2d { } declare function m2d(): void; declare function m2e(): void; -module m2e { } +namespace m2e { } function m2f() { }; -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } function m2g() { }; -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } // module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated -module m3a { var y = 2; } +namespace m3a { var y = 2; } class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } -module m3b { var y = 2; } +namespace m3b { var y = 2; } class m3c { foo() { } } -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } declare class m3d { foo(): void } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } declare class m3e { foo(): void } declare class m3f { foo(): void } -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } declare class m3g { foo(): void } -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } -module m4a { var y = 2; } +namespace m4a { var y = 2; } enum m4a { One } -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } enum m4b { One } -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } enum m4c { One } -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } enum m4d { One } //// module then module -module m5 { export var y = 2; } -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export var y = 2; } +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered // module then import -module m6 { export var y = 2; } +namespace m6 { export var y = 2; } //import m6 = require(''); diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js.diff new file mode 100644 index 0000000000..041c419105 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.js.diff @@ -0,0 +1,109 @@ +--- old.augmentedTypesModules.js ++++ new.augmentedTypesModules.js +@@= skipped -113, +113 lines =@@ + var m1c = 1; // Should be allowed + var m1d; + (function (m1d) { +- var I = /** @class */ (function () { +- function I() { +- } +- I.prototype.foo = function () { }; +- return I; +- }()); ++ class I { ++ foo() { } ++ } + m1d.I = I; + })(m1d || (m1d = {})); + var m1d = 1; // error +@@= skipped -34, +31 lines =@@ + function m2g() { } + ; + (function (m2g) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + m2g.C = C; + })(m2g || (m2g = {})); +-var m3 = /** @class */ (function () { +- function m3() { +- } +- return m3; +-}()); // ok since the module is not instantiated ++class m3 { ++} // ok since the module is not instantiated + var m3a; + (function (m3a) { + var y = 2; + })(m3a || (m3a = {})); +-var m3a = /** @class */ (function () { +- function m3a() { +- } +- m3a.prototype.foo = function () { }; +- return m3a; +-}()); // error, class isn't ambient or declared before the module +-var m3b = /** @class */ (function () { +- function m3b() { +- } +- m3b.prototype.foo = function () { }; +- return m3b; +-}()); ++class m3a { ++ foo() { } ++} // error, class isn't ambient or declared before the module ++class m3b { ++ foo() { } ++} + (function (m3b) { + var y = 2; + })(m3b || (m3b = {})); +-var m3c = /** @class */ (function () { +- function m3c() { +- } +- m3c.prototype.foo = function () { }; +- return m3c; +-}()); ++class m3c { ++ foo() { } ++} + (function (m3c) { + m3c.y = 2; + })(m3c || (m3c = {})); +@@= skipped -51, +36 lines =@@ + })(m3e || (m3e = {})); + var m3g; + (function (m3g) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + m3g.C = C; + })(m3g || (m3g = {})); + var m4; +@@= skipped -31, +28 lines =@@ + })(m4c || (m4c = {})); + var m4d; + (function (m4d) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + })(m4d || (m4d = {})); + (function (m4d) { + m4d[m4d["One"] = 0] = "One"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.symbols index 4358e5cc59..2a4802125a 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.symbols @@ -2,225 +2,225 @@ === augmentedTypesModules.ts === // module then var -module m1 { } +namespace m1 { } >m1 : Symbol(m1, Decl(augmentedTypesModules.ts, 0, 0), Decl(augmentedTypesModules.ts, 2, 3)) var m1 = 1; // Should be allowed >m1 : Symbol(m1, Decl(augmentedTypesModules.ts, 0, 0), Decl(augmentedTypesModules.ts, 2, 3)) -module m1a { var y = 2; } // error +namespace m1a { var y = 2; } // error >m1a : Symbol(m1a, Decl(augmentedTypesModules.ts, 2, 11)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 4, 16)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 4, 19)) var m1a = 1; // error >m1a : Symbol(m1a, Decl(augmentedTypesModules.ts, 5, 3)) -module m1b { export var y = 2; } // error +namespace m1b { export var y = 2; } // error >m1b : Symbol(m1b, Decl(augmentedTypesModules.ts, 5, 12)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 7, 23)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 7, 26)) var m1b = 1; // error >m1b : Symbol(m1b, Decl(augmentedTypesModules.ts, 8, 3)) -module m1c { +namespace m1c { >m1c : Symbol(m1c, Decl(augmentedTypesModules.ts, 8, 12), Decl(augmentedTypesModules.ts, 13, 3)) export interface I { foo(): void; } ->I : Symbol(I, Decl(augmentedTypesModules.ts, 10, 12)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 10, 15)) >foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 11, 24)) } var m1c = 1; // Should be allowed >m1c : Symbol(m1c, Decl(augmentedTypesModules.ts, 8, 12), Decl(augmentedTypesModules.ts, 13, 3)) -module m1d { // error +namespace m1d { // error >m1d : Symbol(m1d, Decl(augmentedTypesModules.ts, 13, 12)) export class I { foo() { } } ->I : Symbol(I, Decl(augmentedTypesModules.ts, 15, 12)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 15, 15)) >foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 16, 20)) } var m1d = 1; // error >m1d : Symbol(m1d, Decl(augmentedTypesModules.ts, 18, 3)) // module then function -module m2 { } ->m2 : Symbol(m2, Decl(augmentedTypesModules.ts, 21, 13), Decl(augmentedTypesModules.ts, 18, 12)) +namespace m2 { } +>m2 : Symbol(m2, Decl(augmentedTypesModules.ts, 21, 16), Decl(augmentedTypesModules.ts, 18, 12)) function m2() { }; // ok since the module is not instantiated ->m2 : Symbol(m2, Decl(augmentedTypesModules.ts, 21, 13), Decl(augmentedTypesModules.ts, 18, 12)) +>m2 : Symbol(m2, Decl(augmentedTypesModules.ts, 21, 16), Decl(augmentedTypesModules.ts, 18, 12)) -module m2a { var y = 2; } ->m2a : Symbol(m2a, Decl(augmentedTypesModules.ts, 24, 25), Decl(augmentedTypesModules.ts, 22, 18)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 24, 16)) +namespace m2a { var y = 2; } +>m2a : Symbol(m2a, Decl(augmentedTypesModules.ts, 24, 28), Decl(augmentedTypesModules.ts, 22, 18)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 24, 19)) function m2a() { }; // error since the module is instantiated ->m2a : Symbol(m2a, Decl(augmentedTypesModules.ts, 24, 25), Decl(augmentedTypesModules.ts, 22, 18)) +>m2a : Symbol(m2a, Decl(augmentedTypesModules.ts, 24, 28), Decl(augmentedTypesModules.ts, 22, 18)) -module m2b { export var y = 2; } ->m2b : Symbol(m2b, Decl(augmentedTypesModules.ts, 27, 32), Decl(augmentedTypesModules.ts, 25, 19)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 27, 23)) +namespace m2b { export var y = 2; } +>m2b : Symbol(m2b, Decl(augmentedTypesModules.ts, 27, 35), Decl(augmentedTypesModules.ts, 25, 19)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 27, 26)) function m2b() { }; // error since the module is instantiated ->m2b : Symbol(m2b, Decl(augmentedTypesModules.ts, 27, 32), Decl(augmentedTypesModules.ts, 25, 19)) +>m2b : Symbol(m2b, Decl(augmentedTypesModules.ts, 27, 35), Decl(augmentedTypesModules.ts, 25, 19)) // should be errors to have function first function m2c() { }; >m2c : Symbol(m2c, Decl(augmentedTypesModules.ts, 28, 19), Decl(augmentedTypesModules.ts, 31, 19)) -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } >m2c : Symbol(m2c, Decl(augmentedTypesModules.ts, 28, 19), Decl(augmentedTypesModules.ts, 31, 19)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 32, 23)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 32, 26)) -module m2d { } ->m2d : Symbol(m2d, Decl(augmentedTypesModules.ts, 34, 14), Decl(augmentedTypesModules.ts, 32, 32)) +namespace m2d { } +>m2d : Symbol(m2d, Decl(augmentedTypesModules.ts, 34, 17), Decl(augmentedTypesModules.ts, 32, 35)) declare function m2d(): void; ->m2d : Symbol(m2d, Decl(augmentedTypesModules.ts, 34, 14), Decl(augmentedTypesModules.ts, 32, 32)) +>m2d : Symbol(m2d, Decl(augmentedTypesModules.ts, 34, 17), Decl(augmentedTypesModules.ts, 32, 35)) declare function m2e(): void; >m2e : Symbol(m2e, Decl(augmentedTypesModules.ts, 35, 29), Decl(augmentedTypesModules.ts, 37, 29)) -module m2e { } +namespace m2e { } >m2e : Symbol(m2e, Decl(augmentedTypesModules.ts, 35, 29), Decl(augmentedTypesModules.ts, 37, 29)) function m2f() { }; ->m2f : Symbol(m2f, Decl(augmentedTypesModules.ts, 38, 14), Decl(augmentedTypesModules.ts, 40, 19)) +>m2f : Symbol(m2f, Decl(augmentedTypesModules.ts, 38, 17), Decl(augmentedTypesModules.ts, 40, 19)) -module m2f { export interface I { foo(): void } } ->m2f : Symbol(m2f, Decl(augmentedTypesModules.ts, 38, 14), Decl(augmentedTypesModules.ts, 40, 19)) ->I : Symbol(I, Decl(augmentedTypesModules.ts, 41, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 41, 33)) +namespace m2f { export interface I { foo(): void } } +>m2f : Symbol(m2f, Decl(augmentedTypesModules.ts, 38, 17), Decl(augmentedTypesModules.ts, 40, 19)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 41, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 41, 36)) function m2g() { }; ->m2g : Symbol(m2g, Decl(augmentedTypesModules.ts, 41, 49), Decl(augmentedTypesModules.ts, 43, 19)) +>m2g : Symbol(m2g, Decl(augmentedTypesModules.ts, 41, 52), Decl(augmentedTypesModules.ts, 43, 19)) -module m2g { export class C { foo() { } } } ->m2g : Symbol(m2g, Decl(augmentedTypesModules.ts, 41, 49), Decl(augmentedTypesModules.ts, 43, 19)) ->C : Symbol(C, Decl(augmentedTypesModules.ts, 44, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 44, 29)) +namespace m2g { export class C { foo() { } } } +>m2g : Symbol(m2g, Decl(augmentedTypesModules.ts, 41, 52), Decl(augmentedTypesModules.ts, 43, 19)) +>C : Symbol(C, Decl(augmentedTypesModules.ts, 44, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 44, 32)) // module then class -module m3 { } ->m3 : Symbol(m3, Decl(augmentedTypesModules.ts, 44, 43), Decl(augmentedTypesModules.ts, 47, 13)) +namespace m3 { } +>m3 : Symbol(m3, Decl(augmentedTypesModules.ts, 44, 46), Decl(augmentedTypesModules.ts, 47, 16)) class m3 { } // ok since the module is not instantiated ->m3 : Symbol(m3, Decl(augmentedTypesModules.ts, 44, 43), Decl(augmentedTypesModules.ts, 47, 13)) +>m3 : Symbol(m3, Decl(augmentedTypesModules.ts, 44, 46), Decl(augmentedTypesModules.ts, 47, 16)) -module m3a { var y = 2; } ->m3a : Symbol(m3a, Decl(augmentedTypesModules.ts, 48, 12), Decl(augmentedTypesModules.ts, 50, 25)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 50, 16)) +namespace m3a { var y = 2; } +>m3a : Symbol(m3a, Decl(augmentedTypesModules.ts, 48, 12), Decl(augmentedTypesModules.ts, 50, 28)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 50, 19)) class m3a { foo() { } } // error, class isn't ambient or declared before the module ->m3a : Symbol(m3a, Decl(augmentedTypesModules.ts, 48, 12), Decl(augmentedTypesModules.ts, 50, 25)) +>m3a : Symbol(m3a, Decl(augmentedTypesModules.ts, 48, 12), Decl(augmentedTypesModules.ts, 50, 28)) >foo : Symbol(m3a.foo, Decl(augmentedTypesModules.ts, 51, 11)) class m3b { foo() { } } >m3b : Symbol(m3b, Decl(augmentedTypesModules.ts, 51, 23), Decl(augmentedTypesModules.ts, 53, 23)) >foo : Symbol(m3b.foo, Decl(augmentedTypesModules.ts, 53, 11)) -module m3b { var y = 2; } +namespace m3b { var y = 2; } >m3b : Symbol(m3b, Decl(augmentedTypesModules.ts, 51, 23), Decl(augmentedTypesModules.ts, 53, 23)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 54, 16)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 54, 19)) class m3c { foo() { } } ->m3c : Symbol(m3c, Decl(augmentedTypesModules.ts, 54, 25), Decl(augmentedTypesModules.ts, 56, 23)) +>m3c : Symbol(m3c, Decl(augmentedTypesModules.ts, 54, 28), Decl(augmentedTypesModules.ts, 56, 23)) >foo : Symbol(m3c.foo, Decl(augmentedTypesModules.ts, 56, 11)) -module m3c { export var y = 2; } ->m3c : Symbol(m3c, Decl(augmentedTypesModules.ts, 54, 25), Decl(augmentedTypesModules.ts, 56, 23)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 57, 23)) +namespace m3c { export var y = 2; } +>m3c : Symbol(m3c, Decl(augmentedTypesModules.ts, 54, 28), Decl(augmentedTypesModules.ts, 56, 23)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 57, 26)) declare class m3d { foo(): void } ->m3d : Symbol(m3d, Decl(augmentedTypesModules.ts, 57, 32), Decl(augmentedTypesModules.ts, 59, 33)) +>m3d : Symbol(m3d, Decl(augmentedTypesModules.ts, 57, 35), Decl(augmentedTypesModules.ts, 59, 33)) >foo : Symbol(m3d.foo, Decl(augmentedTypesModules.ts, 59, 19)) -module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(augmentedTypesModules.ts, 57, 32), Decl(augmentedTypesModules.ts, 59, 33)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 60, 23)) +namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(augmentedTypesModules.ts, 57, 35), Decl(augmentedTypesModules.ts, 59, 33)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 60, 26)) -module m3e { export var y = 2; } ->m3e : Symbol(m3e, Decl(augmentedTypesModules.ts, 60, 32), Decl(augmentedTypesModules.ts, 62, 32)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 62, 23)) +namespace m3e { export var y = 2; } +>m3e : Symbol(m3e, Decl(augmentedTypesModules.ts, 60, 35), Decl(augmentedTypesModules.ts, 62, 35)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 62, 26)) declare class m3e { foo(): void } ->m3e : Symbol(m3e, Decl(augmentedTypesModules.ts, 60, 32), Decl(augmentedTypesModules.ts, 62, 32)) +>m3e : Symbol(m3e, Decl(augmentedTypesModules.ts, 60, 35), Decl(augmentedTypesModules.ts, 62, 35)) >foo : Symbol(m3e.foo, Decl(augmentedTypesModules.ts, 63, 19)) declare class m3f { foo(): void } >m3f : Symbol(m3f, Decl(augmentedTypesModules.ts, 63, 33), Decl(augmentedTypesModules.ts, 65, 33)) >foo : Symbol(m3f.foo, Decl(augmentedTypesModules.ts, 65, 19)) -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } >m3f : Symbol(m3f, Decl(augmentedTypesModules.ts, 63, 33), Decl(augmentedTypesModules.ts, 65, 33)) ->I : Symbol(I, Decl(augmentedTypesModules.ts, 66, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 66, 33)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 66, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 66, 36)) declare class m3g { foo(): void } ->m3g : Symbol(m3g, Decl(augmentedTypesModules.ts, 66, 49), Decl(augmentedTypesModules.ts, 68, 33)) +>m3g : Symbol(m3g, Decl(augmentedTypesModules.ts, 66, 52), Decl(augmentedTypesModules.ts, 68, 33)) >foo : Symbol(m3g.foo, Decl(augmentedTypesModules.ts, 68, 19)) -module m3g { export class C { foo() { } } } ->m3g : Symbol(m3g, Decl(augmentedTypesModules.ts, 66, 49), Decl(augmentedTypesModules.ts, 68, 33)) ->C : Symbol(C, Decl(augmentedTypesModules.ts, 69, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 69, 29)) +namespace m3g { export class C { foo() { } } } +>m3g : Symbol(m3g, Decl(augmentedTypesModules.ts, 66, 52), Decl(augmentedTypesModules.ts, 68, 33)) +>C : Symbol(C, Decl(augmentedTypesModules.ts, 69, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 69, 32)) // module then enum // should be errors -module m4 { } ->m4 : Symbol(m4, Decl(augmentedTypesModules.ts, 69, 43), Decl(augmentedTypesModules.ts, 73, 13)) +namespace m4 { } +>m4 : Symbol(m4, Decl(augmentedTypesModules.ts, 69, 46), Decl(augmentedTypesModules.ts, 73, 16)) enum m4 { } ->m4 : Symbol(m4, Decl(augmentedTypesModules.ts, 69, 43), Decl(augmentedTypesModules.ts, 73, 13)) +>m4 : Symbol(m4, Decl(augmentedTypesModules.ts, 69, 46), Decl(augmentedTypesModules.ts, 73, 16)) -module m4a { var y = 2; } ->m4a : Symbol(m4a, Decl(augmentedTypesModules.ts, 74, 11), Decl(augmentedTypesModules.ts, 76, 25)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 76, 16)) +namespace m4a { var y = 2; } +>m4a : Symbol(m4a, Decl(augmentedTypesModules.ts, 74, 11), Decl(augmentedTypesModules.ts, 76, 28)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 76, 19)) enum m4a { One } ->m4a : Symbol(m4a, Decl(augmentedTypesModules.ts, 74, 11), Decl(augmentedTypesModules.ts, 76, 25)) +>m4a : Symbol(m4a, Decl(augmentedTypesModules.ts, 74, 11), Decl(augmentedTypesModules.ts, 76, 28)) >One : Symbol(m4a.One, Decl(augmentedTypesModules.ts, 77, 10)) -module m4b { export var y = 2; } ->m4b : Symbol(m4b, Decl(augmentedTypesModules.ts, 77, 16), Decl(augmentedTypesModules.ts, 79, 32)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 79, 23)) +namespace m4b { export var y = 2; } +>m4b : Symbol(m4b, Decl(augmentedTypesModules.ts, 77, 16), Decl(augmentedTypesModules.ts, 79, 35)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 79, 26)) enum m4b { One } ->m4b : Symbol(m4b, Decl(augmentedTypesModules.ts, 77, 16), Decl(augmentedTypesModules.ts, 79, 32)) +>m4b : Symbol(m4b, Decl(augmentedTypesModules.ts, 77, 16), Decl(augmentedTypesModules.ts, 79, 35)) >One : Symbol(m4b.One, Decl(augmentedTypesModules.ts, 80, 10)) -module m4c { interface I { foo(): void } } ->m4c : Symbol(m4c, Decl(augmentedTypesModules.ts, 80, 16), Decl(augmentedTypesModules.ts, 82, 42)) ->I : Symbol(I, Decl(augmentedTypesModules.ts, 82, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 82, 26)) +namespace m4c { interface I { foo(): void } } +>m4c : Symbol(m4c, Decl(augmentedTypesModules.ts, 80, 16), Decl(augmentedTypesModules.ts, 82, 45)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 82, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 82, 29)) enum m4c { One } ->m4c : Symbol(m4c, Decl(augmentedTypesModules.ts, 80, 16), Decl(augmentedTypesModules.ts, 82, 42)) +>m4c : Symbol(m4c, Decl(augmentedTypesModules.ts, 80, 16), Decl(augmentedTypesModules.ts, 82, 45)) >One : Symbol(m4c.One, Decl(augmentedTypesModules.ts, 83, 10)) -module m4d { class C { foo() { } } } ->m4d : Symbol(m4d, Decl(augmentedTypesModules.ts, 83, 16), Decl(augmentedTypesModules.ts, 85, 36)) ->C : Symbol(C, Decl(augmentedTypesModules.ts, 85, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 85, 22)) +namespace m4d { class C { foo() { } } } +>m4d : Symbol(m4d, Decl(augmentedTypesModules.ts, 83, 16), Decl(augmentedTypesModules.ts, 85, 39)) +>C : Symbol(C, Decl(augmentedTypesModules.ts, 85, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules.ts, 85, 25)) enum m4d { One } ->m4d : Symbol(m4d, Decl(augmentedTypesModules.ts, 83, 16), Decl(augmentedTypesModules.ts, 85, 36)) +>m4d : Symbol(m4d, Decl(augmentedTypesModules.ts, 83, 16), Decl(augmentedTypesModules.ts, 85, 39)) >One : Symbol(m4d.One, Decl(augmentedTypesModules.ts, 86, 10)) //// module then module -module m5 { export var y = 2; } ->m5 : Symbol(m5, Decl(augmentedTypesModules.ts, 86, 16), Decl(augmentedTypesModules.ts, 90, 31)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 90, 22)) +namespace m5 { export var y = 2; } +>m5 : Symbol(m5, Decl(augmentedTypesModules.ts, 86, 16), Decl(augmentedTypesModules.ts, 90, 34)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 90, 25)) -module m5 { export interface I { foo(): void } } // should already be reasonably well covered ->m5 : Symbol(m5, Decl(augmentedTypesModules.ts, 86, 16), Decl(augmentedTypesModules.ts, 90, 31)) ->I : Symbol(I, Decl(augmentedTypesModules.ts, 91, 11)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 91, 32)) +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered +>m5 : Symbol(m5, Decl(augmentedTypesModules.ts, 86, 16), Decl(augmentedTypesModules.ts, 90, 34)) +>I : Symbol(I, Decl(augmentedTypesModules.ts, 91, 14)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules.ts, 91, 35)) // module then import -module m6 { export var y = 2; } ->m6 : Symbol(m6, Decl(augmentedTypesModules.ts, 91, 48)) ->y : Symbol(y, Decl(augmentedTypesModules.ts, 94, 22)) +namespace m6 { export var y = 2; } +>m6 : Symbol(m6, Decl(augmentedTypesModules.ts, 91, 51)) +>y : Symbol(y, Decl(augmentedTypesModules.ts, 94, 25)) //import m6 = require(''); diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types index db5d03d9f7..ce1215ae85 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules.types @@ -2,12 +2,12 @@ === augmentedTypesModules.ts === // module then var -module m1 { } +namespace m1 { } var m1 = 1; // Should be allowed >m1 : number >1 : 1 -module m1a { var y = 2; } // error +namespace m1a { var y = 2; } // error >m1a : typeof m1a >y : number >2 : 2 @@ -16,7 +16,7 @@ var m1a = 1; // error >m1a : number >1 : 1 -module m1b { export var y = 2; } // error +namespace m1b { export var y = 2; } // error >m1b : typeof m1b >y : number >2 : 2 @@ -25,7 +25,7 @@ var m1b = 1; // error >m1b : number >1 : 1 -module m1c { +namespace m1c { export interface I { foo(): void; } >foo : () => void } @@ -33,7 +33,7 @@ var m1c = 1; // Should be allowed >m1c : number >1 : 1 -module m1d { // error +namespace m1d { // error >m1d : typeof m1d export class I { foo() { } } @@ -45,11 +45,11 @@ var m1d = 1; // error >1 : 1 // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated >m2 : () => void -module m2a { var y = 2; } +namespace m2a { var y = 2; } >m2a : typeof m2a >y : number >2 : 2 @@ -57,7 +57,7 @@ module m2a { var y = 2; } function m2a() { }; // error since the module is instantiated >m2a : typeof m2a -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } >m2b : typeof m2b >y : number >2 : 2 @@ -69,40 +69,40 @@ function m2b() { }; // error since the module is instantiated function m2c() { }; >m2c : typeof m2c -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } >m2c : typeof m2c >y : number >2 : 2 -module m2d { } +namespace m2d { } declare function m2d(): void; >m2d : () => void declare function m2e(): void; >m2e : () => void -module m2e { } +namespace m2e { } function m2f() { }; >m2f : () => void -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } >foo : () => void function m2g() { }; >m2g : typeof m2g -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } >m2g : typeof m2g >C : C >foo : () => void // module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated >m3 : m3 -module m3a { var y = 2; } +namespace m3a { var y = 2; } >m3a : typeof m3a >y : number >2 : 2 @@ -115,7 +115,7 @@ class m3b { foo() { } } >m3b : m3b >foo : () => void -module m3b { var y = 2; } +namespace m3b { var y = 2; } >m3b : typeof m3b >y : number >2 : 2 @@ -124,7 +124,7 @@ class m3c { foo() { } } >m3c : m3c >foo : () => void -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } >m3c : typeof m3c >y : number >2 : 2 @@ -133,12 +133,12 @@ declare class m3d { foo(): void } >m3d : m3d >foo : () => void -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } >m3e : typeof m3e >y : number >2 : 2 @@ -151,25 +151,25 @@ declare class m3f { foo(): void } >m3f : m3f >foo : () => void -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } >foo : () => void declare class m3g { foo(): void } >m3g : m3g >foo : () => void -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } >m3g : typeof m3g >C : C >foo : () => void // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } >m4 : m4 -module m4a { var y = 2; } +namespace m4a { var y = 2; } >m4a : typeof m4a >y : number >2 : 2 @@ -178,7 +178,7 @@ enum m4a { One } >m4a : m4a >One : m4a.One -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } >m4b : typeof m4b >y : number >2 : 2 @@ -187,14 +187,14 @@ enum m4b { One } >m4b : m4b >One : m4b.One -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } >foo : () => void enum m4c { One } >m4c : m4c >One : m4c.One -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } >m4d : typeof m4d >C : C >foo : () => void @@ -205,16 +205,16 @@ enum m4d { One } //// module then module -module m5 { export var y = 2; } +namespace m5 { export var y = 2; } >m5 : typeof m5 >y : number >2 : 2 -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered >foo : () => void // module then import -module m6 { export var y = 2; } +namespace m6 { export var y = 2; } >m6 : typeof m6 >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.errors.txt index 2407ac456e..25e85b4d96 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.errors.txt @@ -1,40 +1,40 @@ -augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. -augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(5,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(8,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules2.ts(14,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== augmentedTypesModules2.ts (3 errors) ==== // module then function - module m2 { } + namespace m2 { } function m2() { }; // ok since the module is not instantiated - module m2a { var y = 2; } - ~~~ + namespace m2a { var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2a() { }; // error since the module is instantiated - module m2b { export var y = 2; } - ~~~ + namespace m2b { export var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2b() { }; // error since the module is instantiated function m2c() { }; - module m2c { export var y = 2; } + namespace m2c { export var y = 2; } - module m2cc { export var y = 2; } - ~~~~ + namespace m2cc { export var y = 2; } + ~~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2cc() { }; // error to have module first - module m2d { } + namespace m2d { } declare function m2d(): void; declare function m2e(): void; - module m2e { } + namespace m2e { } function m2f() { }; - module m2f { export interface I { foo(): void } } + namespace m2f { export interface I { foo(): void } } function m2g() { }; - module m2g { export class C { foo() { } } } + namespace m2g { export class C { foo() { } } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js index 4995e1b0d6..b1ec007ab8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js @@ -2,32 +2,32 @@ //// [augmentedTypesModules2.ts] // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated -module m2a { var y = 2; } +namespace m2a { var y = 2; } function m2a() { }; // error since the module is instantiated -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } function m2b() { }; // error since the module is instantiated function m2c() { }; -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } -module m2cc { export var y = 2; } +namespace m2cc { export var y = 2; } function m2cc() { }; // error to have module first -module m2d { } +namespace m2d { } declare function m2d(): void; declare function m2e(): void; -module m2e { } +namespace m2e { } function m2f() { }; -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } function m2g() { }; -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } //// [augmentedTypesModules2.js] diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js.diff new file mode 100644 index 0000000000..688e562525 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.js.diff @@ -0,0 +1,17 @@ +--- old.augmentedTypesModules2.js ++++ new.augmentedTypesModules2.js +@@= skipped -60, +60 lines =@@ + function m2g() { } + ; + (function (m2g) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + m2g.C = C; + })(m2g || (m2g = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.symbols index 431cb3bc38..b0245a08a8 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.symbols @@ -2,65 +2,65 @@ === augmentedTypesModules2.ts === // module then function -module m2 { } ->m2 : Symbol(m2, Decl(augmentedTypesModules2.ts, 1, 13), Decl(augmentedTypesModules2.ts, 0, 0)) +namespace m2 { } +>m2 : Symbol(m2, Decl(augmentedTypesModules2.ts, 1, 16), Decl(augmentedTypesModules2.ts, 0, 0)) function m2() { }; // ok since the module is not instantiated ->m2 : Symbol(m2, Decl(augmentedTypesModules2.ts, 1, 13), Decl(augmentedTypesModules2.ts, 0, 0)) +>m2 : Symbol(m2, Decl(augmentedTypesModules2.ts, 1, 16), Decl(augmentedTypesModules2.ts, 0, 0)) -module m2a { var y = 2; } ->m2a : Symbol(m2a, Decl(augmentedTypesModules2.ts, 4, 25), Decl(augmentedTypesModules2.ts, 2, 18)) ->y : Symbol(y, Decl(augmentedTypesModules2.ts, 4, 16)) +namespace m2a { var y = 2; } +>m2a : Symbol(m2a, Decl(augmentedTypesModules2.ts, 4, 28), Decl(augmentedTypesModules2.ts, 2, 18)) +>y : Symbol(y, Decl(augmentedTypesModules2.ts, 4, 19)) function m2a() { }; // error since the module is instantiated ->m2a : Symbol(m2a, Decl(augmentedTypesModules2.ts, 4, 25), Decl(augmentedTypesModules2.ts, 2, 18)) +>m2a : Symbol(m2a, Decl(augmentedTypesModules2.ts, 4, 28), Decl(augmentedTypesModules2.ts, 2, 18)) -module m2b { export var y = 2; } ->m2b : Symbol(m2b, Decl(augmentedTypesModules2.ts, 7, 32), Decl(augmentedTypesModules2.ts, 5, 19)) ->y : Symbol(y, Decl(augmentedTypesModules2.ts, 7, 23)) +namespace m2b { export var y = 2; } +>m2b : Symbol(m2b, Decl(augmentedTypesModules2.ts, 7, 35), Decl(augmentedTypesModules2.ts, 5, 19)) +>y : Symbol(y, Decl(augmentedTypesModules2.ts, 7, 26)) function m2b() { }; // error since the module is instantiated ->m2b : Symbol(m2b, Decl(augmentedTypesModules2.ts, 7, 32), Decl(augmentedTypesModules2.ts, 5, 19)) +>m2b : Symbol(m2b, Decl(augmentedTypesModules2.ts, 7, 35), Decl(augmentedTypesModules2.ts, 5, 19)) function m2c() { }; >m2c : Symbol(m2c, Decl(augmentedTypesModules2.ts, 8, 19), Decl(augmentedTypesModules2.ts, 10, 19)) -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } >m2c : Symbol(m2c, Decl(augmentedTypesModules2.ts, 8, 19), Decl(augmentedTypesModules2.ts, 10, 19)) ->y : Symbol(y, Decl(augmentedTypesModules2.ts, 11, 23)) +>y : Symbol(y, Decl(augmentedTypesModules2.ts, 11, 26)) -module m2cc { export var y = 2; } ->m2cc : Symbol(m2cc, Decl(augmentedTypesModules2.ts, 13, 33), Decl(augmentedTypesModules2.ts, 11, 32)) ->y : Symbol(y, Decl(augmentedTypesModules2.ts, 13, 24)) +namespace m2cc { export var y = 2; } +>m2cc : Symbol(m2cc, Decl(augmentedTypesModules2.ts, 13, 36), Decl(augmentedTypesModules2.ts, 11, 35)) +>y : Symbol(y, Decl(augmentedTypesModules2.ts, 13, 27)) function m2cc() { }; // error to have module first ->m2cc : Symbol(m2cc, Decl(augmentedTypesModules2.ts, 13, 33), Decl(augmentedTypesModules2.ts, 11, 32)) +>m2cc : Symbol(m2cc, Decl(augmentedTypesModules2.ts, 13, 36), Decl(augmentedTypesModules2.ts, 11, 35)) -module m2d { } ->m2d : Symbol(m2d, Decl(augmentedTypesModules2.ts, 16, 14), Decl(augmentedTypesModules2.ts, 14, 20)) +namespace m2d { } +>m2d : Symbol(m2d, Decl(augmentedTypesModules2.ts, 16, 17), Decl(augmentedTypesModules2.ts, 14, 20)) declare function m2d(): void; ->m2d : Symbol(m2d, Decl(augmentedTypesModules2.ts, 16, 14), Decl(augmentedTypesModules2.ts, 14, 20)) +>m2d : Symbol(m2d, Decl(augmentedTypesModules2.ts, 16, 17), Decl(augmentedTypesModules2.ts, 14, 20)) declare function m2e(): void; >m2e : Symbol(m2e, Decl(augmentedTypesModules2.ts, 17, 29), Decl(augmentedTypesModules2.ts, 19, 29)) -module m2e { } +namespace m2e { } >m2e : Symbol(m2e, Decl(augmentedTypesModules2.ts, 17, 29), Decl(augmentedTypesModules2.ts, 19, 29)) function m2f() { }; ->m2f : Symbol(m2f, Decl(augmentedTypesModules2.ts, 20, 14), Decl(augmentedTypesModules2.ts, 22, 19)) +>m2f : Symbol(m2f, Decl(augmentedTypesModules2.ts, 20, 17), Decl(augmentedTypesModules2.ts, 22, 19)) -module m2f { export interface I { foo(): void } } ->m2f : Symbol(m2f, Decl(augmentedTypesModules2.ts, 20, 14), Decl(augmentedTypesModules2.ts, 22, 19)) ->I : Symbol(I, Decl(augmentedTypesModules2.ts, 23, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules2.ts, 23, 33)) +namespace m2f { export interface I { foo(): void } } +>m2f : Symbol(m2f, Decl(augmentedTypesModules2.ts, 20, 17), Decl(augmentedTypesModules2.ts, 22, 19)) +>I : Symbol(I, Decl(augmentedTypesModules2.ts, 23, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules2.ts, 23, 36)) function m2g() { }; ->m2g : Symbol(m2g, Decl(augmentedTypesModules2.ts, 23, 49), Decl(augmentedTypesModules2.ts, 25, 19)) +>m2g : Symbol(m2g, Decl(augmentedTypesModules2.ts, 23, 52), Decl(augmentedTypesModules2.ts, 25, 19)) -module m2g { export class C { foo() { } } } ->m2g : Symbol(m2g, Decl(augmentedTypesModules2.ts, 23, 49), Decl(augmentedTypesModules2.ts, 25, 19)) ->C : Symbol(C, Decl(augmentedTypesModules2.ts, 26, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules2.ts, 26, 29)) +namespace m2g { export class C { foo() { } } } +>m2g : Symbol(m2g, Decl(augmentedTypesModules2.ts, 23, 52), Decl(augmentedTypesModules2.ts, 25, 19)) +>C : Symbol(C, Decl(augmentedTypesModules2.ts, 26, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules2.ts, 26, 32)) diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.types index 517fa49104..a4106c42f5 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules2.types @@ -2,11 +2,11 @@ === augmentedTypesModules2.ts === // module then function -module m2 { } +namespace m2 { } function m2() { }; // ok since the module is not instantiated >m2 : () => void -module m2a { var y = 2; } +namespace m2a { var y = 2; } >m2a : typeof m2a >y : number >2 : 2 @@ -14,7 +14,7 @@ module m2a { var y = 2; } function m2a() { }; // error since the module is instantiated >m2a : typeof m2a -module m2b { export var y = 2; } +namespace m2b { export var y = 2; } >m2b : typeof m2b >y : number >2 : 2 @@ -25,12 +25,12 @@ function m2b() { }; // error since the module is instantiated function m2c() { }; >m2c : typeof m2c -module m2c { export var y = 2; } +namespace m2c { export var y = 2; } >m2c : typeof m2c >y : number >2 : 2 -module m2cc { export var y = 2; } +namespace m2cc { export var y = 2; } >m2cc : typeof m2cc >y : number >2 : 2 @@ -38,25 +38,25 @@ module m2cc { export var y = 2; } function m2cc() { }; // error to have module first >m2cc : typeof m2cc -module m2d { } +namespace m2d { } declare function m2d(): void; >m2d : () => void declare function m2e(): void; >m2e : () => void -module m2e { } +namespace m2e { } function m2f() { }; >m2f : () => void -module m2f { export interface I { foo(): void } } +namespace m2f { export interface I { foo(): void } } >foo : () => void function m2g() { }; >m2g : typeof m2g -module m2g { export class C { foo() { } } } +namespace m2g { export class C { foo() { } } } >m2g : typeof m2g >C : C >foo : () => void diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.errors.txt index c93b9b5b3f..dc6265ffbe 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.errors.txt @@ -1,12 +1,12 @@ -augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +augmentedTypesModules3.ts(5,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== augmentedTypesModules3.ts (1 errors) ==== //// module then class - module m3 { } + namespace m3 { } class m3 { } // ok since the module is not instantiated - module m3a { var y = 2; } - ~~~ + namespace m3a { var y = 2; } + ~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js index 5fd45ace84..5fff2254b4 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js @@ -2,10 +2,10 @@ //// [augmentedTypesModules3.ts] //// module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated -module m3a { var y = 2; } +namespace m3a { var y = 2; } class m3a { foo() { } } // error, class isn't ambient or declared before the module //// [augmentedTypesModules3.js] diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js.diff new file mode 100644 index 0000000000..571c42bce9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.js.diff @@ -0,0 +1,26 @@ +--- old.augmentedTypesModules3.js ++++ new.augmentedTypesModules3.js +@@= skipped -8, +8 lines =@@ + class m3a { foo() { } } // error, class isn't ambient or declared before the module + + //// [augmentedTypesModules3.js] +-var m3 = /** @class */ (function () { +- function m3() { +- } +- return m3; +-}()); // ok since the module is not instantiated ++class m3 { ++} // ok since the module is not instantiated + var m3a; + (function (m3a) { + var y = 2; + })(m3a || (m3a = {})); +-var m3a = /** @class */ (function () { +- function m3a() { +- } +- m3a.prototype.foo = function () { }; +- return m3a; +-}()); // error, class isn't ambient or declared before the module ++class m3a { ++ foo() { } ++} // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.symbols index 53527859d1..b820f4345d 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.symbols @@ -2,17 +2,17 @@ === augmentedTypesModules3.ts === //// module then class -module m3 { } ->m3 : Symbol(m3, Decl(augmentedTypesModules3.ts, 0, 0), Decl(augmentedTypesModules3.ts, 1, 13)) +namespace m3 { } +>m3 : Symbol(m3, Decl(augmentedTypesModules3.ts, 0, 0), Decl(augmentedTypesModules3.ts, 1, 16)) class m3 { } // ok since the module is not instantiated ->m3 : Symbol(m3, Decl(augmentedTypesModules3.ts, 0, 0), Decl(augmentedTypesModules3.ts, 1, 13)) +>m3 : Symbol(m3, Decl(augmentedTypesModules3.ts, 0, 0), Decl(augmentedTypesModules3.ts, 1, 16)) -module m3a { var y = 2; } ->m3a : Symbol(m3a, Decl(augmentedTypesModules3.ts, 2, 12), Decl(augmentedTypesModules3.ts, 4, 25)) ->y : Symbol(y, Decl(augmentedTypesModules3.ts, 4, 16)) +namespace m3a { var y = 2; } +>m3a : Symbol(m3a, Decl(augmentedTypesModules3.ts, 2, 12), Decl(augmentedTypesModules3.ts, 4, 28)) +>y : Symbol(y, Decl(augmentedTypesModules3.ts, 4, 19)) class m3a { foo() { } } // error, class isn't ambient or declared before the module ->m3a : Symbol(m3a, Decl(augmentedTypesModules3.ts, 2, 12), Decl(augmentedTypesModules3.ts, 4, 25)) +>m3a : Symbol(m3a, Decl(augmentedTypesModules3.ts, 2, 12), Decl(augmentedTypesModules3.ts, 4, 28)) >foo : Symbol(m3a.foo, Decl(augmentedTypesModules3.ts, 5, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.types index d242152cd6..1e2a64c968 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3.types @@ -2,11 +2,11 @@ === augmentedTypesModules3.ts === //// module then class -module m3 { } +namespace m3 { } class m3 { } // ok since the module is not instantiated >m3 : m3 -module m3a { var y = 2; } +namespace m3a { var y = 2; } >m3a : typeof m3a >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js index f4448218f2..b5029a3aae 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js @@ -2,22 +2,22 @@ //// [augmentedTypesModules3b.ts] class m3b { foo() { } } -module m3b { var y = 2; } +namespace m3b { var y = 2; } class m3c { foo() { } } -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } declare class m3d { foo(): void } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } declare class m3e { foo(): void } declare class m3f { foo(): void } -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } declare class m3g { foo(): void } -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } //// [augmentedTypesModules3b.js] diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js.diff new file mode 100644 index 0000000000..cf59df5f7a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.js.diff @@ -0,0 +1,45 @@ +--- old.augmentedTypesModules3b.js ++++ new.augmentedTypesModules3b.js +@@= skipped -20, +20 lines =@@ + + + //// [augmentedTypesModules3b.js] +-var m3b = /** @class */ (function () { +- function m3b() { +- } +- m3b.prototype.foo = function () { }; +- return m3b; +-}()); ++class m3b { ++ foo() { } ++} + (function (m3b) { + var y = 2; + })(m3b || (m3b = {})); +-var m3c = /** @class */ (function () { +- function m3c() { +- } +- m3c.prototype.foo = function () { }; +- return m3c; +-}()); ++class m3c { ++ foo() { } ++} + (function (m3c) { + m3c.y = 2; + })(m3c || (m3c = {})); +@@= skipped -28, +22 lines =@@ + })(m3e || (m3e = {})); + var m3g; + (function (m3g) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + m3g.C = C; + })(m3g || (m3g = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.symbols index 50faf044a6..6e23da421a 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.symbols @@ -5,49 +5,49 @@ class m3b { foo() { } } >m3b : Symbol(m3b, Decl(augmentedTypesModules3b.ts, 0, 0), Decl(augmentedTypesModules3b.ts, 0, 23)) >foo : Symbol(m3b.foo, Decl(augmentedTypesModules3b.ts, 0, 11)) -module m3b { var y = 2; } +namespace m3b { var y = 2; } >m3b : Symbol(m3b, Decl(augmentedTypesModules3b.ts, 0, 0), Decl(augmentedTypesModules3b.ts, 0, 23)) ->y : Symbol(y, Decl(augmentedTypesModules3b.ts, 1, 16)) +>y : Symbol(y, Decl(augmentedTypesModules3b.ts, 1, 19)) class m3c { foo() { } } ->m3c : Symbol(m3c, Decl(augmentedTypesModules3b.ts, 1, 25), Decl(augmentedTypesModules3b.ts, 3, 23)) +>m3c : Symbol(m3c, Decl(augmentedTypesModules3b.ts, 1, 28), Decl(augmentedTypesModules3b.ts, 3, 23)) >foo : Symbol(m3c.foo, Decl(augmentedTypesModules3b.ts, 3, 11)) -module m3c { export var y = 2; } ->m3c : Symbol(m3c, Decl(augmentedTypesModules3b.ts, 1, 25), Decl(augmentedTypesModules3b.ts, 3, 23)) ->y : Symbol(y, Decl(augmentedTypesModules3b.ts, 4, 23)) +namespace m3c { export var y = 2; } +>m3c : Symbol(m3c, Decl(augmentedTypesModules3b.ts, 1, 28), Decl(augmentedTypesModules3b.ts, 3, 23)) +>y : Symbol(y, Decl(augmentedTypesModules3b.ts, 4, 26)) declare class m3d { foo(): void } ->m3d : Symbol(m3d, Decl(augmentedTypesModules3b.ts, 4, 32), Decl(augmentedTypesModules3b.ts, 6, 33)) +>m3d : Symbol(m3d, Decl(augmentedTypesModules3b.ts, 4, 35), Decl(augmentedTypesModules3b.ts, 6, 33)) >foo : Symbol(m3d.foo, Decl(augmentedTypesModules3b.ts, 6, 19)) -module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(augmentedTypesModules3b.ts, 4, 32), Decl(augmentedTypesModules3b.ts, 6, 33)) ->y : Symbol(y, Decl(augmentedTypesModules3b.ts, 7, 23)) +namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(augmentedTypesModules3b.ts, 4, 35), Decl(augmentedTypesModules3b.ts, 6, 33)) +>y : Symbol(y, Decl(augmentedTypesModules3b.ts, 7, 26)) -module m3e { export var y = 2; } ->m3e : Symbol(m3e, Decl(augmentedTypesModules3b.ts, 7, 32), Decl(augmentedTypesModules3b.ts, 9, 32)) ->y : Symbol(y, Decl(augmentedTypesModules3b.ts, 9, 23)) +namespace m3e { export var y = 2; } +>m3e : Symbol(m3e, Decl(augmentedTypesModules3b.ts, 7, 35), Decl(augmentedTypesModules3b.ts, 9, 35)) +>y : Symbol(y, Decl(augmentedTypesModules3b.ts, 9, 26)) declare class m3e { foo(): void } ->m3e : Symbol(m3e, Decl(augmentedTypesModules3b.ts, 7, 32), Decl(augmentedTypesModules3b.ts, 9, 32)) +>m3e : Symbol(m3e, Decl(augmentedTypesModules3b.ts, 7, 35), Decl(augmentedTypesModules3b.ts, 9, 35)) >foo : Symbol(m3e.foo, Decl(augmentedTypesModules3b.ts, 10, 19)) declare class m3f { foo(): void } >m3f : Symbol(m3f, Decl(augmentedTypesModules3b.ts, 10, 33), Decl(augmentedTypesModules3b.ts, 12, 33)) >foo : Symbol(m3f.foo, Decl(augmentedTypesModules3b.ts, 12, 19)) -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } >m3f : Symbol(m3f, Decl(augmentedTypesModules3b.ts, 10, 33), Decl(augmentedTypesModules3b.ts, 12, 33)) ->I : Symbol(I, Decl(augmentedTypesModules3b.ts, 13, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules3b.ts, 13, 33)) +>I : Symbol(I, Decl(augmentedTypesModules3b.ts, 13, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules3b.ts, 13, 36)) declare class m3g { foo(): void } ->m3g : Symbol(m3g, Decl(augmentedTypesModules3b.ts, 13, 49), Decl(augmentedTypesModules3b.ts, 15, 33)) +>m3g : Symbol(m3g, Decl(augmentedTypesModules3b.ts, 13, 52), Decl(augmentedTypesModules3b.ts, 15, 33)) >foo : Symbol(m3g.foo, Decl(augmentedTypesModules3b.ts, 15, 19)) -module m3g { export class C { foo() { } } } ->m3g : Symbol(m3g, Decl(augmentedTypesModules3b.ts, 13, 49), Decl(augmentedTypesModules3b.ts, 15, 33)) ->C : Symbol(C, Decl(augmentedTypesModules3b.ts, 16, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules3b.ts, 16, 29)) +namespace m3g { export class C { foo() { } } } +>m3g : Symbol(m3g, Decl(augmentedTypesModules3b.ts, 13, 52), Decl(augmentedTypesModules3b.ts, 15, 33)) +>C : Symbol(C, Decl(augmentedTypesModules3b.ts, 16, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules3b.ts, 16, 32)) diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.types index 3e694aac7d..bcdbfda49f 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules3b.types @@ -5,7 +5,7 @@ class m3b { foo() { } } >m3b : m3b >foo : () => void -module m3b { var y = 2; } +namespace m3b { var y = 2; } >m3b : typeof m3b >y : number >2 : 2 @@ -14,7 +14,7 @@ class m3c { foo() { } } >m3c : m3c >foo : () => void -module m3c { export var y = 2; } +namespace m3c { export var y = 2; } >m3c : typeof m3c >y : number >2 : 2 @@ -23,12 +23,12 @@ declare class m3d { foo(): void } >m3d : m3d >foo : () => void -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 -module m3e { export var y = 2; } +namespace m3e { export var y = 2; } >m3e : typeof m3e >y : number >2 : 2 @@ -41,14 +41,14 @@ declare class m3f { foo(): void } >m3f : m3f >foo : () => void -module m3f { export interface I { foo(): void } } +namespace m3f { export interface I { foo(): void } } >foo : () => void declare class m3g { foo(): void } >m3g : m3g >foo : () => void -module m3g { export class C { foo() { } } } +namespace m3g { export class C { foo() { } } } >m3g : typeof m3g >C : C >foo : () => void diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js index dca37fc384..5fb8bedfec 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js @@ -3,25 +3,25 @@ //// [augmentedTypesModules4.ts] // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } -module m4a { var y = 2; } +namespace m4a { var y = 2; } enum m4a { One } -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } enum m4b { One } -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } enum m4c { One } -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } enum m4d { One } //// module then module -module m5 { export var y = 2; } -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export var y = 2; } +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered //// [augmentedTypesModules4.js] diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js.diff new file mode 100644 index 0000000000..e2464a84af --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.js.diff @@ -0,0 +1,18 @@ +--- old.augmentedTypesModules4.js ++++ new.augmentedTypesModules4.js +@@= skipped -47, +47 lines =@@ + })(m4c || (m4c = {})); + var m4d; + (function (m4d) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + })(m4d || (m4d = {})); + (function (m4d) { + m4d[m4d["One"] = 0] = "One"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.symbols index 0da1a5be9b..046e734c01 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.symbols @@ -3,54 +3,54 @@ === augmentedTypesModules4.ts === // module then enum // should be errors -module m4 { } ->m4 : Symbol(m4, Decl(augmentedTypesModules4.ts, 0, 0), Decl(augmentedTypesModules4.ts, 2, 13)) +namespace m4 { } +>m4 : Symbol(m4, Decl(augmentedTypesModules4.ts, 0, 0), Decl(augmentedTypesModules4.ts, 2, 16)) enum m4 { } ->m4 : Symbol(m4, Decl(augmentedTypesModules4.ts, 0, 0), Decl(augmentedTypesModules4.ts, 2, 13)) +>m4 : Symbol(m4, Decl(augmentedTypesModules4.ts, 0, 0), Decl(augmentedTypesModules4.ts, 2, 16)) -module m4a { var y = 2; } ->m4a : Symbol(m4a, Decl(augmentedTypesModules4.ts, 3, 11), Decl(augmentedTypesModules4.ts, 5, 25)) ->y : Symbol(y, Decl(augmentedTypesModules4.ts, 5, 16)) +namespace m4a { var y = 2; } +>m4a : Symbol(m4a, Decl(augmentedTypesModules4.ts, 3, 11), Decl(augmentedTypesModules4.ts, 5, 28)) +>y : Symbol(y, Decl(augmentedTypesModules4.ts, 5, 19)) enum m4a { One } ->m4a : Symbol(m4a, Decl(augmentedTypesModules4.ts, 3, 11), Decl(augmentedTypesModules4.ts, 5, 25)) +>m4a : Symbol(m4a, Decl(augmentedTypesModules4.ts, 3, 11), Decl(augmentedTypesModules4.ts, 5, 28)) >One : Symbol(m4a.One, Decl(augmentedTypesModules4.ts, 6, 10)) -module m4b { export var y = 2; } ->m4b : Symbol(m4b, Decl(augmentedTypesModules4.ts, 6, 16), Decl(augmentedTypesModules4.ts, 8, 32)) ->y : Symbol(y, Decl(augmentedTypesModules4.ts, 8, 23)) +namespace m4b { export var y = 2; } +>m4b : Symbol(m4b, Decl(augmentedTypesModules4.ts, 6, 16), Decl(augmentedTypesModules4.ts, 8, 35)) +>y : Symbol(y, Decl(augmentedTypesModules4.ts, 8, 26)) enum m4b { One } ->m4b : Symbol(m4b, Decl(augmentedTypesModules4.ts, 6, 16), Decl(augmentedTypesModules4.ts, 8, 32)) +>m4b : Symbol(m4b, Decl(augmentedTypesModules4.ts, 6, 16), Decl(augmentedTypesModules4.ts, 8, 35)) >One : Symbol(m4b.One, Decl(augmentedTypesModules4.ts, 9, 10)) -module m4c { interface I { foo(): void } } ->m4c : Symbol(m4c, Decl(augmentedTypesModules4.ts, 9, 16), Decl(augmentedTypesModules4.ts, 11, 42)) ->I : Symbol(I, Decl(augmentedTypesModules4.ts, 11, 12)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules4.ts, 11, 26)) +namespace m4c { interface I { foo(): void } } +>m4c : Symbol(m4c, Decl(augmentedTypesModules4.ts, 9, 16), Decl(augmentedTypesModules4.ts, 11, 45)) +>I : Symbol(I, Decl(augmentedTypesModules4.ts, 11, 15)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules4.ts, 11, 29)) enum m4c { One } ->m4c : Symbol(m4c, Decl(augmentedTypesModules4.ts, 9, 16), Decl(augmentedTypesModules4.ts, 11, 42)) +>m4c : Symbol(m4c, Decl(augmentedTypesModules4.ts, 9, 16), Decl(augmentedTypesModules4.ts, 11, 45)) >One : Symbol(m4c.One, Decl(augmentedTypesModules4.ts, 12, 10)) -module m4d { class C { foo() { } } } ->m4d : Symbol(m4d, Decl(augmentedTypesModules4.ts, 12, 16), Decl(augmentedTypesModules4.ts, 14, 36)) ->C : Symbol(C, Decl(augmentedTypesModules4.ts, 14, 12)) ->foo : Symbol(C.foo, Decl(augmentedTypesModules4.ts, 14, 22)) +namespace m4d { class C { foo() { } } } +>m4d : Symbol(m4d, Decl(augmentedTypesModules4.ts, 12, 16), Decl(augmentedTypesModules4.ts, 14, 39)) +>C : Symbol(C, Decl(augmentedTypesModules4.ts, 14, 15)) +>foo : Symbol(C.foo, Decl(augmentedTypesModules4.ts, 14, 25)) enum m4d { One } ->m4d : Symbol(m4d, Decl(augmentedTypesModules4.ts, 12, 16), Decl(augmentedTypesModules4.ts, 14, 36)) +>m4d : Symbol(m4d, Decl(augmentedTypesModules4.ts, 12, 16), Decl(augmentedTypesModules4.ts, 14, 39)) >One : Symbol(m4d.One, Decl(augmentedTypesModules4.ts, 15, 10)) //// module then module -module m5 { export var y = 2; } ->m5 : Symbol(m5, Decl(augmentedTypesModules4.ts, 15, 16), Decl(augmentedTypesModules4.ts, 19, 31)) ->y : Symbol(y, Decl(augmentedTypesModules4.ts, 19, 22)) +namespace m5 { export var y = 2; } +>m5 : Symbol(m5, Decl(augmentedTypesModules4.ts, 15, 16), Decl(augmentedTypesModules4.ts, 19, 34)) +>y : Symbol(y, Decl(augmentedTypesModules4.ts, 19, 25)) -module m5 { export interface I { foo(): void } } // should already be reasonably well covered ->m5 : Symbol(m5, Decl(augmentedTypesModules4.ts, 15, 16), Decl(augmentedTypesModules4.ts, 19, 31)) ->I : Symbol(I, Decl(augmentedTypesModules4.ts, 20, 11)) ->foo : Symbol(I.foo, Decl(augmentedTypesModules4.ts, 20, 32)) +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered +>m5 : Symbol(m5, Decl(augmentedTypesModules4.ts, 15, 16), Decl(augmentedTypesModules4.ts, 19, 34)) +>I : Symbol(I, Decl(augmentedTypesModules4.ts, 20, 14)) +>foo : Symbol(I.foo, Decl(augmentedTypesModules4.ts, 20, 35)) diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types index efa0d6cf2d..fc8add11b7 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesModules4.types @@ -3,11 +3,11 @@ === augmentedTypesModules4.ts === // module then enum // should be errors -module m4 { } +namespace m4 { } enum m4 { } >m4 : m4 -module m4a { var y = 2; } +namespace m4a { var y = 2; } >m4a : typeof m4a >y : number >2 : 2 @@ -16,7 +16,7 @@ enum m4a { One } >m4a : m4a >One : m4a.One -module m4b { export var y = 2; } +namespace m4b { export var y = 2; } >m4b : typeof m4b >y : number >2 : 2 @@ -25,14 +25,14 @@ enum m4b { One } >m4b : m4b >One : m4b.One -module m4c { interface I { foo(): void } } +namespace m4c { interface I { foo(): void } } >foo : () => void enum m4c { One } >m4c : m4c >One : m4c.One -module m4d { class C { foo() { } } } +namespace m4d { class C { foo() { } } } >m4d : typeof m4d >C : C >foo : () => void @@ -43,11 +43,11 @@ enum m4d { One } //// module then module -module m5 { export var y = 2; } +namespace m5 { export var y = 2; } >m5 : typeof m5 >y : number >2 : 2 -module m5 { export interface I { foo(): void } } // should already be reasonably well covered +namespace m5 { export interface I { foo(): void } } // should already be reasonably well covered >foo : () => void diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.errors.txt b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.errors.txt index 724b5660fd..8b555c46c2 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.errors.txt @@ -8,9 +8,9 @@ augmentedTypesVar.ts(17,7): error TS2300: Duplicate identifier 'x4a'. augmentedTypesVar.ts(20,5): error TS2567: Enum declarations can only merge with namespace or other enum declarations. augmentedTypesVar.ts(21,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations. augmentedTypesVar.ts(27,5): error TS2300: Duplicate identifier 'x6a'. -augmentedTypesVar.ts(28,8): error TS2300: Duplicate identifier 'x6a'. +augmentedTypesVar.ts(28,11): error TS2300: Duplicate identifier 'x6a'. augmentedTypesVar.ts(30,5): error TS2300: Duplicate identifier 'x6b'. -augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. +augmentedTypesVar.ts(31,11): error TS2300: Duplicate identifier 'x6b'. ==== augmentedTypesVar.ts (13 errors) ==== @@ -57,20 +57,20 @@ augmentedTypesVar.ts(31,8): error TS2300: Duplicate identifier 'x6b'. // var then module var x6 = 1; - module x6 { } // ok since non-instantiated + namespace x6 { } // ok since non-instantiated var x6a = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'x6a'. - module x6a { var y = 2; } // error since instantiated - ~~~ + namespace x6a { var y = 2; } // error since instantiated + ~~~ !!! error TS2300: Duplicate identifier 'x6a'. var x6b = 1; // error ~~~ !!! error TS2300: Duplicate identifier 'x6b'. - module x6b { export var y = 2; } // error - ~~~ + namespace x6b { export var y = 2; } // error + ~~~ !!! error TS2300: Duplicate identifier 'x6b'. // var then import, messes with other error reporting diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js index 01977e4031..583772f561 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js @@ -25,13 +25,13 @@ enum x5 { One } // error // var then module var x6 = 1; -module x6 { } // ok since non-instantiated +namespace x6 { } // ok since non-instantiated var x6a = 1; // error -module x6a { var y = 2; } // error since instantiated +namespace x6a { var y = 2; } // error since instantiated var x6b = 1; // error -module x6b { export var y = 2; } // error +namespace x6b { export var y = 2; } // error // var then import, messes with other error reporting //var x7 = 1; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js.diff b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js.diff index 95d143a81c..b8a6e81e4e 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js.diff +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.js.diff @@ -1,7 +1,30 @@ --- old.augmentedTypesVar.js +++ new.augmentedTypesVar.js -@@= skipped -56, +56 lines =@@ - } // error +@@= skipped -45, +45 lines =@@ + var x2 = 1; // error + function x2() { } // error + var x3 = 1; +-var x3 = function () { }; // error ++var x3 = () => { }; // error + // var then class + var x4 = 1; // error +-var x4 = /** @class */ (function () { +- function x4() { +- } +- return x4; +-}()); // error ++class x4 { ++} // error + var x4a = 1; // error +-var x4a = /** @class */ (function () { +- function x4a() { +- } +- x4a.prototype.foo = function () { }; +- return x4a; +-}()); // error ++class x4a { ++ foo() { } ++} // error // var then enum var x5 = 1; -var x5; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.symbols b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.symbols index c98dabfd20..0ee1d7776c 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.symbols +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.symbols @@ -47,22 +47,22 @@ enum x5 { One } // error var x6 = 1; >x6 : Symbol(x6, Decl(augmentedTypesVar.ts, 23, 3), Decl(augmentedTypesVar.ts, 23, 11)) -module x6 { } // ok since non-instantiated +namespace x6 { } // ok since non-instantiated >x6 : Symbol(x6, Decl(augmentedTypesVar.ts, 23, 3), Decl(augmentedTypesVar.ts, 23, 11)) var x6a = 1; // error >x6a : Symbol(x6a, Decl(augmentedTypesVar.ts, 26, 3)) -module x6a { var y = 2; } // error since instantiated +namespace x6a { var y = 2; } // error since instantiated >x6a : Symbol(x6a, Decl(augmentedTypesVar.ts, 26, 12)) ->y : Symbol(y, Decl(augmentedTypesVar.ts, 27, 16)) +>y : Symbol(y, Decl(augmentedTypesVar.ts, 27, 19)) var x6b = 1; // error >x6b : Symbol(x6b, Decl(augmentedTypesVar.ts, 29, 3)) -module x6b { export var y = 2; } // error +namespace x6b { export var y = 2; } // error >x6b : Symbol(x6b, Decl(augmentedTypesVar.ts, 29, 12)) ->y : Symbol(y, Decl(augmentedTypesVar.ts, 30, 23)) +>y : Symbol(y, Decl(augmentedTypesVar.ts, 30, 26)) // var then import, messes with other error reporting //var x7 = 1; diff --git a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types index dfcf1dbbfd..d90a9d7dc5 100644 --- a/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types +++ b/testdata/baselines/reference/submodule/compiler/augmentedTypesVar.types @@ -56,13 +56,13 @@ var x6 = 1; >x6 : number >1 : 1 -module x6 { } // ok since non-instantiated +namespace x6 { } // ok since non-instantiated var x6a = 1; // error >x6a : number >1 : 1 -module x6a { var y = 2; } // error since instantiated +namespace x6a { var y = 2; } // error since instantiated >x6a : typeof x6a >y : number >2 : 2 @@ -71,7 +71,7 @@ var x6b = 1; // error >x6b : number >1 : 1 -module x6b { export var y = 2; } // error +namespace x6b { export var y = 2; } // error >x6b : typeof x6b >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/autoAsiForStaticsInClassDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/autoAsiForStaticsInClassDeclaration.js.diff index d3ad6957de..5264d0a9d1 100644 --- a/testdata/baselines/reference/submodule/compiler/autoAsiForStaticsInClassDeclaration.js.diff +++ b/testdata/baselines/reference/submodule/compiler/autoAsiForStaticsInClassDeclaration.js.diff @@ -1,9 +1,15 @@ --- old.autoAsiForStaticsInClassDeclaration.js +++ new.autoAsiForStaticsInClassDeclaration.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + } //// [autoAsiForStaticsInClassDeclaration.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + static x; + static y; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/autoLift2.js.diff b/testdata/baselines/reference/submodule/compiler/autoLift2.js.diff new file mode 100644 index 0000000000..2611e18c23 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/autoLift2.js.diff @@ -0,0 +1,31 @@ +--- old.autoLift2.js ++++ new.autoLift2.js +@@= skipped -33, +33 lines =@@ + + + //// [autoLift2.js] +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + this.foo; + any; + this.bar; + any; + } +- A.prototype.baz = function () { +- var _this = this; ++ baz() { + this.foo = "foo"; + this.bar = "bar"; +- [1, 2].forEach(function (p) { return _this.foo; }); +- [1, 2].forEach(function (p) { return _this.bar; }); +- }; +- return A; +-}()); ++ [1, 2].forEach((p) => this.foo); ++ [1, 2].forEach((p) => this.bar); ++ } ++} + var a = new A(); + a.baz(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/autolift3.js.diff b/testdata/baselines/reference/submodule/compiler/autolift3.js.diff new file mode 100644 index 0000000000..d563ae2843 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/autolift3.js.diff @@ -0,0 +1,22 @@ +--- old.autolift3.js ++++ new.autolift3.js +@@= skipped -32, +32 lines =@@ + + + //// [autolift3.js] +-var B = /** @class */ (function () { +- function B() { ++class B { ++ constructor() { + function foo() { } + foo(); + var a = 0; +@@= skipped -17, +17 lines =@@ + return inner; + })(); + } +- return B; +-}()); ++} + var b = new B(); + b.foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/autolift4.js.diff b/testdata/baselines/reference/submodule/compiler/autolift4.js.diff index 425be45ce6..c46ef746e3 100644 --- a/testdata/baselines/reference/submodule/compiler/autolift4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/autolift4.js.diff @@ -4,33 +4,58 @@ //// [autolift4.js] --let Point = (() => { -- class Point { -- constructor(x, y) { -- this.x = x; -- this.y = y; -- } -- getDist() { -- return Math.sqrt(this.x * this.x + this.y * this.y); -- } -- } -- Point.origin = new Point(0, 0); -- return Point; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; -})(); +-var Point = /** @class */ (function () { +- function Point(x, y) { +class Point { + x; + y; + constructor(x, y) { -+ this.x = x; -+ this.y = y; -+ } + this.x = x; + this.y = y; + } +- Point.prototype.getDist = function () { + getDist() { -+ return Math.sqrt(this.x * this.x + this.y * this.y); + return Math.sqrt(this.x * this.x + this.y * this.y); +- }; +- Point.origin = new Point(0, 0); +- return Point; +-}()); +-var Point3D = /** @class */ (function (_super) { +- __extends(Point3D, _super); +- function Point3D(x, y, z, m) { +- var _this = _super.call(this, x, y) || this; +- _this.z = z; +- return _this; +- } +- Point3D.prototype.getDist = function () { + } + static origin = new Point(0, 0); +} - class Point3D extends Point { ++class Point3D extends Point { + z; - constructor(x, y, z, m) { - super(x, y); - this.z = z; \ No newline at end of file ++ constructor(x, y, z, m) { ++ super(x, y); ++ this.z = z; ++ } ++ getDist() { + return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.m); +- }; +- return Point3D; +-}(Point)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/autolift4.symbols.diff b/testdata/baselines/reference/submodule/compiler/autolift4.symbols.diff new file mode 100644 index 0000000000..8a8ac077fd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/autolift4.symbols.diff @@ -0,0 +1,20 @@ +--- old.autolift4.symbols ++++ new.autolift4.symbols +@@= skipped -13, +13 lines =@@ + + return Math.sqrt(this.x*this.x + this.y*this.y); + >Math.sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) + >this.x : Symbol(Point.x, Decl(autolift4.ts, 2, 16)) + >this : Symbol(Point, Decl(autolift4.ts, 0, 0)) +@@= skipped -41, +41 lines =@@ + + return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.m); + >Math.sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) + >this.x : Symbol(Point.x, Decl(autolift4.ts, 2, 16)) + >this : Symbol(Point3D, Decl(autolift4.ts, 9, 1)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/avoid.js.diff b/testdata/baselines/reference/submodule/compiler/avoid.js.diff new file mode 100644 index 0000000000..9dc8213f59 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/avoid.js.diff @@ -0,0 +1,18 @@ +--- old.avoid.js ++++ new.avoid.js +@@= skipped -28, +28 lines =@@ + var why = f(); // error void fn + var w; + w = f(); // error void fn +-var C = /** @class */ (function () { +- function C() { ++class C { ++ g() { + } +- C.prototype.g = function () { +- }; +- return C; +-}()); ++} + var z = new C().g(); // error void fn + var N = new f(); // ok with void fn \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/awaitUnionPromise.types.diff b/testdata/baselines/reference/submodule/compiler/awaitUnionPromise.types.diff new file mode 100644 index 0000000000..1c14b6d9d5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/awaitUnionPromise.types.diff @@ -0,0 +1,16 @@ +--- old.awaitUnionPromise.types ++++ new.awaitUnionPromise.types +@@= skipped -37, +37 lines =@@ + let b = await x.next2(); + >b : number | AsyncEnumeratorDone + >await x.next2() : number | AsyncEnumeratorDone +->x.next2() : Promise | Promise +->x.next2 : () => Promise | Promise ++>x.next2() : Promise | Promise ++>x.next2 : () => Promise | Promise + >x : IAsyncEnumerator +->next2 : () => Promise | Promise ++>next2 : () => Promise | Promise + + let c = await x.next3(); + >c : number | {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.errors.txt.diff new file mode 100644 index 0000000000..9086ceb15e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.awaitedTypeNoLib.errors.txt ++++ new.awaitedTypeNoLib.errors.txt +@@= skipped -7, +7 lines =@@ + error TS2318: Cannot find global type 'RegExp'. + error TS2318: Cannot find global type 'String'. + awaitedTypeNoLib.ts(3,15): error TS2304: Cannot find name 'PromiseLike'. +-awaitedTypeNoLib.ts(18,27): error TS2345: Argument of type 'NotPromise | Thenable>' is not assignable to parameter of type 'Thenable'. ++awaitedTypeNoLib.ts(18,27): error TS2345: Argument of type 'Thenable> | NotPromise' is not assignable to parameter of type 'Thenable'. + Type 'NotPromise' is not assignable to type 'Thenable'. + Type 'TResult | (TResult extends PromiseLike ? never : TResult)' is not assignable to type 'Thenable'. + Type 'Thenable & TResult' is not assignable to type 'Thenable'. +@@= skipped -39, +39 lines =@@ + // #58547 This previously was a Debug Failure. False expression: type provided should not be a non-generic 'promise'-like. + this.resolvePromise(result, resolve); + ~~~~~~ +-!!! error TS2345: Argument of type 'NotPromise | Thenable>' is not assignable to parameter of type 'Thenable'. ++!!! error TS2345: Argument of type 'Thenable> | NotPromise' is not assignable to parameter of type 'Thenable'. + !!! error TS2345: Type 'NotPromise' is not assignable to type 'Thenable'. + !!! error TS2345: Type 'TResult | (TResult extends PromiseLike ? never : TResult)' is not assignable to type 'Thenable'. + !!! error TS2345: Type 'Thenable & TResult' is not assignable to type 'Thenable'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.js.diff b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.js.diff new file mode 100644 index 0000000000..99d1c270fd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.js.diff @@ -0,0 +1,25 @@ +--- old.awaitedTypeNoLib.js ++++ new.awaitedTypeNoLib.js +@@= skipped -28, +28 lines =@@ + } + + //// [awaitedTypeNoLib.js] +-var Thenable = /** @class */ (function () { +- function Thenable() { +- } +- Thenable.prototype.then = function (a) { }; +- Thenable.prototype.handleResolve = function (result, resolve) { ++class Thenable { ++ then(a) { } ++ handleResolve(result, resolve) { + if (result instanceof Thenable) { + // #58547 This previously was a Debug Failure. False expression: type provided should not be a non-generic 'promise'-like. + this.resolvePromise(result, resolve); + } +- }; +- Thenable.prototype.resolvePromise = function (result, resolve) { }; +- return Thenable; +-}()); ++ } ++ resolvePromise(result, resolve) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.types.diff b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.types.diff index 09dd1f45f8..8c812ec480 100644 --- a/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.types.diff +++ b/testdata/baselines/reference/submodule/compiler/awaitedTypeNoLib.types.diff @@ -8,4 +8,26 @@ +>handleResolve : (result: Thenable> | NotPromise, resolve: Receiver) => void result: NotPromise | Thenable>, - >result : Thenable> | NotPromise \ No newline at end of file +->result : NotPromise | Thenable> ++>result : Thenable> | NotPromise + + resolve: Receiver, + >resolve : Receiver +@@= skipped -11, +11 lines =@@ + ) { + if (result instanceof Thenable) { + >result instanceof Thenable : boolean +->result : NotPromise | Thenable> ++>result : Thenable> | NotPromise + >Thenable : typeof Thenable + + // #58547 This previously was a Debug Failure. False expression: type provided should not be a non-generic 'promise'-like. +@@= skipped -9, +9 lines =@@ + >this.resolvePromise : (result: Thenable, resolve: Receiver) => void + >this : this + >resolvePromise : (result: Thenable, resolve: Receiver) => void +->result : NotPromise | Thenable> ++>result : Thenable> | NotPromise + >resolve : Receiver + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/badArraySyntax.js.diff b/testdata/baselines/reference/submodule/compiler/badArraySyntax.js.diff index 978b4e22a6..04d6e338ac 100644 --- a/testdata/baselines/reference/submodule/compiler/badArraySyntax.js.diff +++ b/testdata/baselines/reference/submodule/compiler/badArraySyntax.js.diff @@ -1,13 +1,18 @@ --- old.badArraySyntax.js +++ new.badArraySyntax.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + //// [badArraySyntax.js] - class Z { -- constructor() { +-var Z = /** @class */ (function () { +- function Z() { - this.x = ""; - } +- return Z; +-}()); ++class Z { + x = ""; - } ++} var a1 = []; - var a2 = new Z[]; \ No newline at end of file + var a2 = new Z[]; + var a3 = new Z[](); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/badInferenceLowerPriorityThanGoodInference.js.diff b/testdata/baselines/reference/submodule/compiler/badInferenceLowerPriorityThanGoodInference.js.diff index c2f7f0e6f4..68704faec3 100644 --- a/testdata/baselines/reference/submodule/compiler/badInferenceLowerPriorityThanGoodInference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/badInferenceLowerPriorityThanGoodInference.js.diff @@ -5,6 +5,17 @@ //// [badInferenceLowerPriorityThanGoodInference.js] -// Repro from #13118 - const result = canYouInferThis(() => ({ +-var result = canYouInferThis(function () { return ({ ++const result = canYouInferThis(() => ({ a: { BLAH: 33 }, - b: x => { } \ No newline at end of file +- b: function (x) { } +-}); }); ++ b: x => { } ++})); + result.BLAH; + // Repro from #26629 + function goofus(f) { } +-goofus(function (a) { return ({ dog: function () { return a; } }); }); +-goofus(function (a) { return ({ dog: function () { return a; } }); }); ++goofus((a) => ({ dog() { return a; } })); ++goofus((a) => ({ dog: function () { return a; } })); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/badThisBinding.js.diff b/testdata/baselines/reference/submodule/compiler/badThisBinding.js.diff new file mode 100644 index 0000000000..bd18fde760 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/badThisBinding.js.diff @@ -0,0 +1,23 @@ +--- old.badThisBinding.js ++++ new.badThisBinding.js +@@= skipped -15, +15 lines =@@ + } + + //// [badThisBinding.js] +-var Greeter = /** @class */ (function () { +- function Greeter() { +- var _this = this; +- foo(function () { +- bar(function () { +- var x = _this; ++class Greeter { ++ constructor() { ++ foo(() => { ++ bar(() => { ++ var x = this; + }); + }); + } +- return Greeter; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseCheck.js.diff b/testdata/baselines/reference/submodule/compiler/baseCheck.js.diff index 5c79c2df35..9e0a1926fb 100644 --- a/testdata/baselines/reference/submodule/compiler/baseCheck.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseCheck.js.diff @@ -1,24 +1,109 @@ --- old.baseCheck.js +++ new.baseCheck.js -@@= skipped -48, +48 lines =@@ - } - } - class D extends C { +@@= skipped -31, +31 lines =@@ + + + //// [baseCheck.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C(x, y) { +- } +- return C; +-}()); +-var ELoc = /** @class */ (function (_super) { +- __extends(ELoc, _super); +- function ELoc(x) { +- return _super.call(this, 0, x) || this; +- } +- return ELoc; +-}(C)); +-var ELocVar = /** @class */ (function (_super) { +- __extends(ELocVar, _super); +- function ELocVar(x) { +- return _super.call(this, 0, loc) || this; +- } +- ELocVar.prototype.m = function () { ++class C { ++ constructor(x, y) { } ++} ++class ELoc extends C { ++ constructor(x) { ++ super(0, x); ++ } ++} ++class ELocVar extends C { ++ constructor(x) { ++ super(0, loc); ++ } ++ m() { + var loc = 10; +- }; +- return ELocVar; +-}(C)); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D(z) { +- var _this = _super.call(this, _this.z) || this; +- _this.z = z; +- return _this; +- } +- return D; +-}(C)); // too few params +-var E = /** @class */ (function (_super) { +- __extends(E, _super); +- function E(z) { +- var _this = _super.call(this, 0, _this.z) || this; +- _this.z = z; +- return _this; +- } +- return E; +-}(C)); +-var F = /** @class */ (function (_super) { +- __extends(F, _super); +- function F(z) { +- var _this = _super.call(this, "hello", _this.z) || this; +- _this.z = z; +- return _this; +- } +- return F; +-}(C)); // first param type ++ } ++} ++class D extends C { + z; - constructor(z) { - super(this.z); - this.z = z; - } - } // too few params - class E extends C { ++ constructor(z) { ++ super(this.z); ++ this.z = z; ++ } ++} // too few params ++class E extends C { + z; - constructor(z) { - super(0, this.z); - this.z = z; - } - } - class F extends C { ++ constructor(z) { ++ super(0, this.z); ++ this.z = z; ++ } ++} ++class F extends C { + z; - constructor(z) { - super("hello", this.z); - this.z = z; \ No newline at end of file ++ constructor(z) { ++ super("hello", this.z); ++ this.z = z; ++ } ++} // first param type + function f() { + if (x < 10) { + x = 11; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseClassImprovedMismatchErrors.js.diff b/testdata/baselines/reference/submodule/compiler/baseClassImprovedMismatchErrors.js.diff index f0f05d3eef..a24f4157ab 100644 --- a/testdata/baselines/reference/submodule/compiler/baseClassImprovedMismatchErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseClassImprovedMismatchErrors.js.diff @@ -1,22 +1,65 @@ --- old.baseClassImprovedMismatchErrors.js +++ new.baseClassImprovedMismatchErrors.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + } //// [baseClassImprovedMismatchErrors.js] - class Base { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.fn = function () { +- return 10; +- }; +- return Base; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived.prototype.fn = function () { +- return 10; +- }; +- return Derived; +-}(Base)); +-var DerivedInterface = /** @class */ (function () { +- function DerivedInterface() { +- } +- DerivedInterface.prototype.fn = function () { +- return 10; +- }; +- return DerivedInterface; +-}()); ++class Base { + n; - fn() { - return 10; - } - } - class Derived extends Base { ++ fn() { ++ return 10; ++ } ++} ++class Derived extends Base { + n; - fn() { - return 10; - } - } - class DerivedInterface { ++ fn() { ++ return 10; ++ } ++} ++class DerivedInterface { + n; - fn() { - return 10; - } \ No newline at end of file ++ fn() { ++ return 10; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseConstraintOfDecorator.js.diff b/testdata/baselines/reference/submodule/compiler/baseConstraintOfDecorator.js.diff index 9c5edea7ce..6190935247 100644 --- a/testdata/baselines/reference/submodule/compiler/baseConstraintOfDecorator.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseConstraintOfDecorator.js.diff @@ -1,10 +1,73 @@ --- old.baseConstraintOfDecorator.js +++ new.baseConstraintOfDecorator.js -@@= skipped -34, +34 lines =@@ - }; - } - class MyClass { +@@= skipped -22, +22 lines =@@ + + //// [baseConstraintOfDecorator.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.classExtender = classExtender; + exports.classExtender2 = classExtender2; + function classExtender(superClass, _instanceModifier) { +- return /** @class */ (function (_super) { +- __extends(decoratorFunc, _super); +- function decoratorFunc() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- var _this = _super.apply(this, args) || this; +- _instanceModifier(_this, args); +- return _this; ++ return class decoratorFunc extends superClass { ++ constructor(...args) { ++ super(...args); ++ _instanceModifier(this, args); + } +- return decoratorFunc; +- }(superClass)); +-} +-var MyClass = /** @class */ (function () { +- function MyClass() { +- } +- return MyClass; +-}()); ++ }; ++} ++class MyClass { + x; - } ++} function classExtender2(superClass, _instanceModifier) { - return class decoratorFunc extends superClass { \ No newline at end of file +- return /** @class */ (function (_super) { +- __extends(decoratorFunc, _super); +- function decoratorFunc() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- var _this = _super.apply(this, args) || this; +- _instanceModifier(_this, args); +- return _this; ++ return class decoratorFunc extends superClass { ++ constructor(...args) { ++ super(...args); ++ _instanceModifier(this, args); + } +- return decoratorFunc; +- }(superClass)); ++ }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseExpressionTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/baseExpressionTypeParameters.js.diff index b1fea8af2d..a7a241d00b 100644 --- a/testdata/baselines/reference/submodule/compiler/baseExpressionTypeParameters.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseExpressionTypeParameters.js.diff @@ -1,10 +1,51 @@ --- old.baseExpressionTypeParameters.js +++ new.baseExpressionTypeParameters.js -@@= skipped -18, +18 lines =@@ +@@= skipped -16, +16 lines =@@ + + //// [baseExpressionTypeParameters.js] // Repro from #17829 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); function base() { - class Base { +- var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +- }()); ++ class Base { + static prop; - } ++ } return Base; - } \ No newline at end of file + } +-var Gen = /** @class */ (function (_super) { +- __extends(Gen, _super); +- function Gen() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Gen; +-}(base())); // Error, T not in scope +-var Spec = /** @class */ (function (_super) { +- __extends(Spec, _super); +- function Spec() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Spec; +-}(Gen)); ++class Gen extends base() { ++} // Error, T not in scope ++class Spec extends Gen { ++} + Spec.prop; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseIndexSignatureResolution.js.diff b/testdata/baselines/reference/submodule/compiler/baseIndexSignatureResolution.js.diff index e7d85d2305..7747706084 100644 --- a/testdata/baselines/reference/submodule/compiler/baseIndexSignatureResolution.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseIndexSignatureResolution.js.diff @@ -1,13 +1,42 @@ --- old.baseIndexSignatureResolution.js +++ new.baseIndexSignatureResolution.js -@@= skipped -27, +27 lines =@@ +@@= skipped -26, +26 lines =@@ + */ //// [baseIndexSignatureResolution.js] - class Base { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(Base)); ++class Base { + a; - } - class Derived extends Base { ++} ++class Derived extends Base { + b; - } ++} var x = null; - var y = x[0]; \ No newline at end of file + var y = x[0]; + /* \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseTypeAfterDerivedType.js.diff b/testdata/baselines/reference/submodule/compiler/baseTypeAfterDerivedType.js.diff new file mode 100644 index 0000000000..9c7c0f47a2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/baseTypeAfterDerivedType.js.diff @@ -0,0 +1,20 @@ +--- old.baseTypeAfterDerivedType.js ++++ new.baseTypeAfterDerivedType.js +@@= skipped -18, +18 lines =@@ + + + //// [baseTypeAfterDerivedType.js] +-var Derived2 = /** @class */ (function () { +- function Derived2() { +- } +- Derived2.prototype.method = function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- }; +- return Derived2; +-}()); ++class Derived2 { ++ method(...args) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseTypeOrderChecking.js.diff b/testdata/baselines/reference/submodule/compiler/baseTypeOrderChecking.js.diff index 8574b30dab..42cb7b4834 100644 --- a/testdata/baselines/reference/submodule/compiler/baseTypeOrderChecking.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseTypeOrderChecking.js.diff @@ -1,10 +1,55 @@ --- old.baseTypeOrderChecking.js +++ new.baseTypeOrderChecking.js -@@= skipped -44, +44 lines =@@ - class Class2 extends Class1 { - } - class Class3 { +@@= skipped -38, +38 lines =@@ + + + //// [baseTypeOrderChecking.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var someVariable; +-var Class1 = /** @class */ (function () { +- function Class1() { +- } +- return Class1; +-}()); +-var Class2 = /** @class */ (function (_super) { +- __extends(Class2, _super); +- function Class2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Class2; +-}(Class1)); +-var Class3 = /** @class */ (function () { +- function Class3() { +- } +- return Class3; +-}()); +-var Class4 = /** @class */ (function (_super) { +- __extends(Class4, _super); +- function Class4() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Class4; +-}(Class3)); ++class Class1 { ++} ++class Class2 extends Class1 { ++} ++class Class3 { + memberVariable; - } - class Class4 extends Class3 { - } \ No newline at end of file ++} ++class Class4 extends Class3 { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseTypePrivateMemberClash.js.diff b/testdata/baselines/reference/submodule/compiler/baseTypePrivateMemberClash.js.diff index 78f1063cdd..e113bcbecf 100644 --- a/testdata/baselines/reference/submodule/compiler/baseTypePrivateMemberClash.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseTypePrivateMemberClash.js.diff @@ -1,11 +1,22 @@ --- old.baseTypePrivateMemberClash.js +++ new.baseTypePrivateMemberClash.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + interface Z extends X, Y { } //// [baseTypePrivateMemberClash.js] - class X { +-var X = /** @class */ (function () { +- function X() { +- } +- return X; +-}()); +-var Y = /** @class */ (function () { +- function Y() { +- } +- return Y; +-}()); ++class X { + m; - } - class Y { ++} ++class Y { + m; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/baseTypeWrappingInstantiationChain.js.diff b/testdata/baselines/reference/submodule/compiler/baseTypeWrappingInstantiationChain.js.diff index d1f755b076..d78111f77b 100644 --- a/testdata/baselines/reference/submodule/compiler/baseTypeWrappingInstantiationChain.js.diff +++ b/testdata/baselines/reference/submodule/compiler/baseTypeWrappingInstantiationChain.js.diff @@ -1,10 +1,76 @@ --- old.baseTypeWrappingInstantiationChain.js +++ new.baseTypeWrappingInstantiationChain.js -@@= skipped -38, +38 lines =@@ - method(t) { } - } - class Wrapper { +@@= skipped -29, +29 lines =@@ + + + //// [baseTypeWrappingInstantiationChain.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var CBaseBase = /** @class */ (function () { +- function CBaseBase(x) { +- } +- return CBaseBase; +-}()); +-var CBase = /** @class */ (function (_super) { +- __extends(CBase, _super); +- function CBase() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return CBase; +-}(CBaseBase)); +-var Parameter = /** @class */ (function () { +- function Parameter() { +- } +- Parameter.prototype.method = function (t) { }; +- return Parameter; +-}()); +-var Wrapper = /** @class */ (function () { +- function Wrapper() { +- } +- return Wrapper; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C.prototype.works = function () { ++class CBaseBase { ++ constructor(x) { } ++} ++class CBase extends CBaseBase { ++} ++class Parameter { ++ method(t) { } ++} ++class Wrapper { + property; - } - class C extends CBase { - works() { \ No newline at end of file ++} ++class C extends CBase { ++ works() { + new CBaseBase(this); +- }; +- C.prototype.alsoWorks = function () { ++ } ++ alsoWorks() { + new CBase(this); // Should not error, parameter is of type Parameter> +- }; +- C.prototype.method = function (t) { }; +- return C; +-}(CBase)); ++ } ++ method(t) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bases.js.diff b/testdata/baselines/reference/submodule/compiler/bases.js.diff new file mode 100644 index 0000000000..415bc5e20e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bases.js.diff @@ -0,0 +1,47 @@ +--- old.bases.js ++++ new.bases.js +@@= skipped -22, +22 lines =@@ + + + //// [bases.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function () { +- function B() { ++class B { ++ constructor() { + this.y; + any; + } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- var _this = this; +- _this.x; ++} ++class C extends B { ++ constructor() { ++ this.x; + any; +- return _this; + } +- return C; +-}(B)); ++} + new C().x; + new C().y; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bestChoiceType.js.diff b/testdata/baselines/reference/submodule/compiler/bestChoiceType.js.diff new file mode 100644 index 0000000000..1669cddf14 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bestChoiceType.js.diff @@ -0,0 +1,25 @@ +--- old.bestChoiceType.js ++++ new.bestChoiceType.js +@@= skipped -21, +21 lines =@@ + + //// [bestChoiceType.js] + // Repro from #10041 +-(''.match(/ /) || []).map(function (s) { return s.toLowerCase(); }); ++(''.match(/ /) || []).map(s => s.toLowerCase()); + // Similar cases + function f1() { +- var x = ''.match(/ /); +- var y = x || []; +- var z = y.map(function (s) { return s.toLowerCase(); }); ++ let x = ''.match(/ /); ++ let y = x || []; ++ let z = y.map(s => s.toLowerCase()); + } + function f2() { +- var x = ''.match(/ /); +- var y = x ? x : []; +- var z = y.map(function (s) { return s.toLowerCase(); }); ++ let x = ''.match(/ /); ++ let y = x ? x : []; ++ let z = y.map(s => s.toLowerCase()); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bestChoiceType.symbols.diff b/testdata/baselines/reference/submodule/compiler/bestChoiceType.symbols.diff new file mode 100644 index 0000000000..c661c14de7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bestChoiceType.symbols.diff @@ -0,0 +1,35 @@ +--- old.bestChoiceType.symbols ++++ new.bestChoiceType.symbols +@@= skipped -4, +4 lines =@@ + + (''.match(/ /) || []).map(s => s.toLowerCase()); + >(''.match(/ /) || []).map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) ++>match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) + >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >s : Symbol(s, Decl(bestChoiceType.ts, 2, 26)) + >s : Symbol(s, Decl(bestChoiceType.ts, 2, 26)) +@@= skipped -13, +13 lines =@@ + + let x = ''.match(/ /); + >x : Symbol(x, Decl(bestChoiceType.ts, 7, 7)) +->''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) ++>match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) + + let y = x || []; + >y : Symbol(y, Decl(bestChoiceType.ts, 8, 7)) +@@= skipped -21, +21 lines =@@ + + let x = ''.match(/ /); + >x : Symbol(x, Decl(bestChoiceType.ts, 13, 7)) +->''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) ++>match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) + + let y = x ? x : []; + >y : Symbol(y, Decl(bestChoiceType.ts, 14, 7)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bestChoiceType.types.diff b/testdata/baselines/reference/submodule/compiler/bestChoiceType.types.diff new file mode 100644 index 0000000000..5f8bcde99f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bestChoiceType.types.diff @@ -0,0 +1,54 @@ +--- old.bestChoiceType.types ++++ new.bestChoiceType.types +@@= skipped -8, +8 lines =@@ + >(''.match(/ /) || []) : RegExpMatchArray | [] + >''.match(/ /) || [] : RegExpMatchArray | [] + >''.match(/ /) : RegExpMatchArray | null +->''.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>''.match : (regexp: string | RegExp) => RegExpMatchArray | null + >'' : "" +->match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>match : (regexp: string | RegExp) => RegExpMatchArray | null + >/ / : RegExp + >[] : [] + >map : ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) +@@= skipped -21, +21 lines =@@ + let x = ''.match(/ /); + >x : RegExpMatchArray | null + >''.match(/ /) : RegExpMatchArray | null +->''.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>''.match : (regexp: string | RegExp) => RegExpMatchArray | null + >'' : "" +->match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>match : (regexp: string | RegExp) => RegExpMatchArray | null + >/ / : RegExp + + let y = x || []; +@@= skipped -31, +31 lines =@@ + let x = ''.match(/ /); + >x : RegExpMatchArray | null + >''.match(/ /) : RegExpMatchArray | null +->''.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>''.match : (regexp: string | RegExp) => RegExpMatchArray | null + >'' : "" +->match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>match : (regexp: string | RegExp) => RegExpMatchArray | null + >/ / : RegExp + + let y = x ? x : []; +->y : RegExpMatchArray | never[] +->x ? x : [] : RegExpMatchArray | never[] ++>y : never[] | RegExpMatchArray ++>x ? x : [] : never[] | RegExpMatchArray + >x : RegExpMatchArray | null + >x : RegExpMatchArray + >[] : never[] +@@= skipped -16, +16 lines =@@ + >z : any[] + >y.map(s => s.toLowerCase()) : any[] + >y.map : ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) +->y : RegExpMatchArray | never[] ++>y : never[] | RegExpMatchArray + >map : ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) + >s => s.toLowerCase() : (s: any) => any + >s : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bigintAmbientMinimal.js.diff b/testdata/baselines/reference/submodule/compiler/bigintAmbientMinimal.js.diff new file mode 100644 index 0000000000..048ce4e923 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bigintAmbientMinimal.js.diff @@ -0,0 +1,8 @@ +--- old.bigintAmbientMinimal.js ++++ new.bigintAmbientMinimal.js +@@= skipped -14, +14 lines =@@ + + //// [main.js] + // Non-ambient for comparison +-var regular = 456n; ++const regular = 456n; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.js.diff b/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.js.diff new file mode 100644 index 0000000000..34b3b52151 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.js.diff @@ -0,0 +1,49 @@ +--- old.bigintWithoutLib.js ++++ new.bigintWithoutLib.js +@@= skipped -61, +61 lines =@@ + //// [bigintWithoutLib.js] + // Every line should error because these builtins are not declared + // Test BigInt functions +-var bigintVal = BigInt(123); ++let bigintVal = BigInt(123); + bigintVal = BigInt("456"); + new BigInt(123); + bigintVal = BigInt.asIntN(8, 0xffffn); + bigintVal = BigInt.asUintN(8, 0xffffn); + bigintVal = bigintVal.valueOf(); // should error - bigintVal inferred as {} +-var stringVal = bigintVal.toString(); // should not error - bigintVal inferred as {} ++let stringVal = bigintVal.toString(); // should not error - bigintVal inferred as {} + stringVal = bigintVal.toString(2); // should error - bigintVal inferred as {} + stringVal = bigintVal.toLocaleString(); // should not error - bigintVal inferred as {} + stringVal = bigintVal.toLocaleString('de-DE'); // should not error - bigintVal inferred as {} + stringVal = bigintVal.toLocaleString('de-DE', { style: 'currency' }); // should not error - bigintVal inferred as {} + stringVal = bigintVal.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' }); // should not error - bigintVal inferred as {} + // Test BigInt64Array +-var bigIntArray = new BigInt64Array(); ++let bigIntArray = new BigInt64Array(); + bigIntArray = new BigInt64Array(10); + bigIntArray = new BigInt64Array([1n, 2n, 3n]); + bigIntArray = new BigInt64Array([1, 2, 3]); + bigIntArray = new BigInt64Array(new ArrayBuffer(80)); + bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8); + bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3); +-var len = bigIntArray.length; ++let len = bigIntArray.length; + bigIntArray.length = 10; +-var arrayBufferLike = bigIntArray; ++let arrayBufferLike = bigIntArray; + // Test BigUint64Array +-var bigUintArray = new BigUint64Array(); ++let bigUintArray = new BigUint64Array(); + bigUintArray = new BigUint64Array(10); + bigUintArray = new BigUint64Array([1n, 2n, 3n]); + bigUintArray = new BigUint64Array([1, 2, 3]); +@@= skipped -35, +35 lines =@@ + bigIntArray.length = 10; + arrayBufferLike = bigIntArray; + // Test added DataView methods +-var dataView = new DataView(new ArrayBuffer(80)); ++const dataView = new DataView(new ArrayBuffer(80)); + dataView.setBigInt64(1, -1n); + dataView.setBigInt64(1, -1n, true); + dataView.setBigInt64(1, -1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.symbols.diff b/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.symbols.diff new file mode 100644 index 0000000000..12b9e613aa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bigintWithoutLib.symbols.diff @@ -0,0 +1,51 @@ +--- old.bigintWithoutLib.symbols ++++ new.bigintWithoutLib.symbols +@@= skipped -77, +77 lines =@@ + + bigIntArray = new BigInt64Array(new ArrayBuffer(80)); + >bigIntArray : Symbol(bigIntArray, Decl(bigintWithoutLib.ts, 17, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8); + >bigIntArray : Symbol(bigIntArray, Decl(bigintWithoutLib.ts, 17, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3); + >bigIntArray : Symbol(bigIntArray, Decl(bigintWithoutLib.ts, 17, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + let len: number = bigIntArray.length; + >len : Symbol(len, Decl(bigintWithoutLib.ts, 24, 3)) +@@= skipped -38, +38 lines =@@ + + bigUintArray = new BigUint64Array(new ArrayBuffer(80)); + >bigUintArray : Symbol(bigUintArray, Decl(bigintWithoutLib.ts, 29, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8); + >bigUintArray : Symbol(bigUintArray, Decl(bigintWithoutLib.ts, 29, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8, 3); + >bigUintArray : Symbol(bigUintArray, Decl(bigintWithoutLib.ts, 29, 3)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + len = bigIntArray.length; + >len : Symbol(len, Decl(bigintWithoutLib.ts, 24, 3)) +@@= skipped -24, +24 lines =@@ + // Test added DataView methods + const dataView = new DataView(new ArrayBuffer(80)); + >dataView : Symbol(dataView, Decl(bigintWithoutLib.ts, 41, 5)) +->DataView : Symbol(DataView, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>DataView : Symbol(DataView, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>ArrayBuffer : Symbol(ArrayBuffer, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + dataView.setBigInt64(1, -1n); + >dataView : Symbol(dataView, Decl(bigintWithoutLib.ts, 41, 5)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/binaryArithmeticControlFlowGraphNotTooLarge.js.diff b/testdata/baselines/reference/submodule/compiler/binaryArithmeticControlFlowGraphNotTooLarge.js.diff index 0f3f03b632..3546878ddd 100644 --- a/testdata/baselines/reference/submodule/compiler/binaryArithmeticControlFlowGraphNotTooLarge.js.diff +++ b/testdata/baselines/reference/submodule/compiler/binaryArithmeticControlFlowGraphNotTooLarge.js.diff @@ -6,5 +6,8 @@ //// [binaryArithmeticControlFlowGraphNotTooLarge.js] -"use strict"; // Repro from #29926 (expanded 10x for good measure) - const foo = function () { - var a, b, c, d, ab, bc, cd, da, blocks = this.blocks; \ No newline at end of file +-var foo = function () { ++const foo = function () { + var a, b, c, d, ab, bc, cd, da, blocks = this.blocks; + if (this.first) { + a = blocks[0] - 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bind1.errors.txt b/testdata/baselines/reference/submodule/compiler/bind1.errors.txt index a324676ec8..d708932bcd 100644 --- a/testdata/baselines/reference/submodule/compiler/bind1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/bind1.errors.txt @@ -2,7 +2,7 @@ bind1.ts(2,31): error TS2304: Cannot find name 'I'. ==== bind1.ts (1 errors) ==== - module M { + namespace M { export class C implements I {} // this should be an unresolved symbol I error ~ !!! error TS2304: Cannot find name 'I'. diff --git a/testdata/baselines/reference/submodule/compiler/bind1.js b/testdata/baselines/reference/submodule/compiler/bind1.js index 4074bbe66d..d1bcb2ce3a 100644 --- a/testdata/baselines/reference/submodule/compiler/bind1.js +++ b/testdata/baselines/reference/submodule/compiler/bind1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/bind1.ts] //// //// [bind1.ts] -module M { +namespace M { export class C implements I {} // this should be an unresolved symbol I error } diff --git a/testdata/baselines/reference/submodule/compiler/bind1.js.diff b/testdata/baselines/reference/submodule/compiler/bind1.js.diff new file mode 100644 index 0000000000..17445ab654 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bind1.js.diff @@ -0,0 +1,15 @@ +--- old.bind1.js ++++ new.bind1.js +@@= skipped -9, +9 lines =@@ + //// [bind1.js] + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); // this should be an unresolved symbol I error ++ class C { ++ } // this should be an unresolved symbol I error + M.C = C; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bind1.symbols b/testdata/baselines/reference/submodule/compiler/bind1.symbols index 7d039976d2..9c9441f690 100644 --- a/testdata/baselines/reference/submodule/compiler/bind1.symbols +++ b/testdata/baselines/reference/submodule/compiler/bind1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/bind1.ts] //// === bind1.ts === -module M { +namespace M { >M : Symbol(M, Decl(bind1.ts, 0, 0)) export class C implements I {} // this should be an unresolved symbol I error ->C : Symbol(C, Decl(bind1.ts, 0, 10)) +>C : Symbol(C, Decl(bind1.ts, 0, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/bind1.types b/testdata/baselines/reference/submodule/compiler/bind1.types index 62ebde3a11..8ee80afa59 100644 --- a/testdata/baselines/reference/submodule/compiler/bind1.types +++ b/testdata/baselines/reference/submodule/compiler/bind1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/bind1.ts] //// === bind1.ts === -module M { +namespace M { >M : typeof M export class C implements I {} // this should be an unresolved symbol I error diff --git a/testdata/baselines/reference/submodule/compiler/bindingPatternCannotBeOnlyInferenceSource.js.diff b/testdata/baselines/reference/submodule/compiler/bindingPatternCannotBeOnlyInferenceSource.js.diff new file mode 100644 index 0000000000..00872671f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bindingPatternCannotBeOnlyInferenceSource.js.diff @@ -0,0 +1,51 @@ +--- old.bindingPatternCannotBeOnlyInferenceSource.js ++++ new.bindingPatternCannotBeOnlyInferenceSource.js +@@= skipped -28, +28 lines =@@ + + + //// [bindingPatternCannotBeOnlyInferenceSource.js] +-var _a = f(); // error (only in strictNullChecks) +-var p1 = f().p1; // error +-var _b = f(); // error +-var _c = f(), e1 = _c[0], e2 = _c[1]; // error +-var funcs1 = { +- funcA: function (a) { }, +- funcB: function (b, bb) { }, +- funcC: function (c, cc, ccc) { }, ++const {} = f(); // error (only in strictNullChecks) ++const { p1 } = f(); // error ++const [] = f(); // error ++const [e1, e2] = f(); // error ++const funcs1 = { ++ funcA: (a) => { }, ++ funcB: (b, bb) => { }, ++ funcC: (c, cc, ccc) => { }, + }; +-var _d = useReduxDispatch1(function (d, f) { return ({ +- funcA: function () { +- var p = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- p[_i] = arguments[_i]; +- } +- return d(f.funcA.apply(f, p)); +- }, // p should be inferrable +- funcB: function () { +- var p = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- p[_i] = arguments[_i]; +- } +- return d(f.funcB.apply(f, p)); +- }, +- funcC: function () { +- var p = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- p[_i] = arguments[_i]; +- } +- return d(f.funcC.apply(f, p)); +- }, +-}); }); ++const {} = useReduxDispatch1((d, f) => ({ ++ funcA: (...p) => d(f.funcA(...p)), // p should be inferrable ++ funcB: (...p) => d(f.funcB(...p)), ++ funcC: (...p) => d(f.funcC(...p)), ++})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bindingPatternContextualTypeDoesNotCauseWidening.js.diff b/testdata/baselines/reference/submodule/compiler/bindingPatternContextualTypeDoesNotCauseWidening.js.diff new file mode 100644 index 0000000000..2154261bc2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bindingPatternContextualTypeDoesNotCauseWidening.js.diff @@ -0,0 +1,10 @@ +--- old.bindingPatternContextualTypeDoesNotCauseWidening.js ++++ new.bindingPatternContextualTypeDoesNotCauseWidening.js +@@= skipped -6, +6 lines =@@ + + + //// [bindingPatternContextualTypeDoesNotCauseWidening.js] +-var _ = pick(['b'], { a: 'a', b: 'b' }); // T: "b" +-var _a = pick(['b'], { a: 'a', b: 'b' }); // T: "b" | "a" ??? (before fix) ++const _ = pick(['b'], { a: 'a', b: 'b' }); // T: "b" ++const {} = pick(['b'], { a: 'a', b: 'b' }); // T: "b" | "a" ??? (before fix) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bindingPatternInParameter01.js.diff b/testdata/baselines/reference/submodule/compiler/bindingPatternInParameter01.js.diff new file mode 100644 index 0000000000..53be5454c9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bindingPatternInParameter01.js.diff @@ -0,0 +1,13 @@ +--- old.bindingPatternInParameter01.js ++++ new.bindingPatternInParameter01.js +@@= skipped -8, +8 lines =@@ + + + //// [bindingPatternInParameter01.js] +-var nestedArray = [[[1, 2]], [[3, 4]]]; +-nestedArray.forEach(function (_a) { +- var _b = _a[0], a = _b[0], b = _b[1]; ++const nestedArray = [[[1, 2]], [[3, 4]]]; ++nestedArray.forEach(([[a, b]]) => { + console.log(a, b); + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.js.diff b/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.js.diff index 48138bb639..b757b51130 100644 --- a/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.js.diff +++ b/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.js.diff @@ -6,7 +6,7 @@ "use strict"; -var _a, _b, _c, _d; Object.defineProperty(exports, "__esModule", { value: true }); --_a = undefined, _b = _a[2], _c = _b[1], _d = _b[3]; +-exports._e = (_a = undefined, _b = _a[2], _c = _b[1], _d = _b[3]); +[, , [, [], , []]] = undefined; diff --git a/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.types.diff b/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.types.diff new file mode 100644 index 0000000000..37c668aba4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bindingPatternOmittedExpressionNesting.types.diff @@ -0,0 +1,12 @@ +--- old.bindingPatternOmittedExpressionNesting.types ++++ new.bindingPatternOmittedExpressionNesting.types +@@= skipped -1, +1 lines =@@ + + === bindingPatternOmittedExpressionNesting.ts === + export let [,,[,[],,[],]] = undefined as any; +-> : undefined +-> : undefined +-> : undefined +-> : undefined + >undefined as any : any + >undefined : undefined diff --git a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js index a16277a0de..9d7b76f32b 100644 --- a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js +++ b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js @@ -3,7 +3,7 @@ //// [binopAssignmentShouldHaveType.ts] declare var console; "use strict"; -module Test { +namespace Test { export class Bug { getName():string { return "name"; diff --git a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js.diff b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js.diff new file mode 100644 index 0000000000..6db342fc0a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.js.diff @@ -0,0 +1,28 @@ +--- old.binopAssignmentShouldHaveType.js ++++ new.binopAssignmentShouldHaveType.js +@@= skipped -24, +24 lines =@@ + "use strict"; + var Test; + (function (Test) { +- var Bug = /** @class */ (function () { +- function Bug() { +- } +- Bug.prototype.getName = function () { ++ class Bug { ++ getName() { + return "name"; +- }; +- Bug.prototype.bug = function () { ++ } ++ bug() { + var name = null; + if ((name = this.getName()).length > 0) { + console.log(name); + } +- }; +- return Bug; +- }()); ++ } ++ } + Test.Bug = Bug; + })(Test || (Test = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.symbols b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.symbols index 805b0530b4..3590bcb596 100644 --- a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.symbols +++ b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.symbols @@ -5,11 +5,11 @@ declare var console; >console : Symbol(console, Decl(binopAssignmentShouldHaveType.ts, 0, 11)) "use strict"; -module Test { +namespace Test { >Test : Symbol(Test, Decl(binopAssignmentShouldHaveType.ts, 1, 13)) export class Bug { ->Bug : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 13)) +>Bug : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 16)) getName():string { >getName : Symbol(Bug.getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19)) @@ -26,7 +26,7 @@ module Test { >(name= this.getName()).length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >name : Symbol(name, Decl(binopAssignmentShouldHaveType.ts, 8, 6)) >this.getName : Symbol(Bug.getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19)) ->this : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 13)) +>this : Symbol(Bug, Decl(binopAssignmentShouldHaveType.ts, 2, 16)) >getName : Symbol(Bug.getName, Decl(binopAssignmentShouldHaveType.ts, 3, 19)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.types b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.types index e97c04a815..b13db1d59c 100644 --- a/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.types +++ b/testdata/baselines/reference/submodule/compiler/binopAssignmentShouldHaveType.types @@ -7,7 +7,7 @@ declare var console; "use strict"; >"use strict" : "use strict" -module Test { +namespace Test { >Test : typeof Test export class Bug { diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingCaptureThisInFunction.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingCaptureThisInFunction.js.diff new file mode 100644 index 0000000000..1cb88b99b8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingCaptureThisInFunction.js.diff @@ -0,0 +1,21 @@ +--- old.blockScopedBindingCaptureThisInFunction.js ++++ new.blockScopedBindingCaptureThisInFunction.js +@@= skipped -10, +10 lines =@@ + + //// [blockScopedBindingCaptureThisInFunction.js] + // https://github.com/Microsoft/TypeScript/issues/11038 +-(function () { return function () { +- var _loop_1 = function (someKey) { +- this_1.helloWorld(); +- (function () { return someKey; }); +- }; +- var this_1 = this; +- for (var someKey in {}) { +- _loop_1(someKey); ++() => function () { ++ for (let someKey in {}) { ++ this.helloWorld(); ++ () => someKey; + } +-}; }); ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingUsedBeforeDef.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingUsedBeforeDef.js.diff new file mode 100644 index 0000000000..bb23429acd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingUsedBeforeDef.js.diff @@ -0,0 +1,18 @@ +--- old.blockScopedBindingUsedBeforeDef.js ++++ new.blockScopedBindingUsedBeforeDef.js +@@= skipped -11, +11 lines =@@ + + //// [blockScopedBindingUsedBeforeDef.js] + // 1: +-for (var _i = 0, _a = [{}]; _i < _a.length; _i++) { +- var _b = a, a = _a[_i][_b]; ++for (let { [a]: a } of [{}]) + continue; +-} + // 2: +-for (var _c = {}, _d = a, a = _c[_d]; false;) ++for (let { [a]: a } = {}; false;) + continue; + // 3: +-var _e = {}, _f = b, b = _e[_f]; ++let { [b]: b } = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsInDownlevelGenerator.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsInDownlevelGenerator.js.diff new file mode 100644 index 0000000000..15fe74a229 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsInDownlevelGenerator.js.diff @@ -0,0 +1,96 @@ +--- old.blockScopedBindingsInDownlevelGenerator.js ++++ new.blockScopedBindingsInDownlevelGenerator.js +@@= skipped -8, +8 lines =@@ + } + + //// [blockScopedBindingsInDownlevelGenerator.js] +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; ++function* a() { ++ for (const i of [1, 2, 3]) { ++ (() => i)(); ++ yield i; + } +-}; +-var __values = (this && this.__values) || function(o) { +- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; +- if (m) return m.call(o); +- if (o && typeof o.length === "number") return { +- next: function () { +- if (o && i >= o.length) o = void 0; +- return { value: o && o[i++], done: !o }; +- } +- }; +- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +-}; +-function a() { +- var _loop_1, _a, _b, i, e_1_1; +- var e_1, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _loop_1 = function (i) { +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- (function () { return i; })(); +- return [4 /*yield*/, i]; +- case 1: +- _e.sent(); +- return [2 /*return*/]; +- } +- }); +- }; +- _d.label = 1; +- case 1: +- _d.trys.push([1, 6, 7, 8]); +- _a = __values([1, 2, 3]), _b = _a.next(); +- _d.label = 2; +- case 2: +- if (!!_b.done) return [3 /*break*/, 5]; +- i = _b.value; +- return [5 /*yield**/, _loop_1(i)]; +- case 3: +- _d.sent(); +- _d.label = 4; +- case 4: +- _b = _a.next(); +- return [3 /*break*/, 2]; +- case 5: return [3 /*break*/, 8]; +- case 6: +- e_1_1 = _d.sent(); +- e_1 = { error: e_1_1 }; +- return [3 /*break*/, 8]; +- case 7: +- try { +- if (_b && !_b.done && (_c = _a.return)) _c.call(_a); +- } +- finally { if (e_1) throw e_1.error; } +- return [7 /*endfinally*/]; +- case 8: return [2 /*return*/]; +- } +- }); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop1.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop1.js.diff index 058b92665d..1444738e77 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop1.js.diff @@ -4,7 +4,16 @@ //// [blockScopedBindingsReassignedInLoop1.js] (function () { 'use strict'; +- var _loop_1 = function (i) { +- (function () { return use(++i); })(); +- out_i_1 = i; +- }; +- var out_i_1; +- for (var i = 0; i < 9; ++i) { +- _loop_1(i); +- i = out_i_1; + 'use strict'; - for (let i = 0; i < 9; ++i) { - (() => use(++i))(); - } \ No newline at end of file ++ for (let i = 0; i < 9; ++i) { ++ (() => use(++i))(); + } + })(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop2.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop2.js.diff new file mode 100644 index 0000000000..30675c089b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop2.js.diff @@ -0,0 +1,114 @@ +--- old.blockScopedBindingsReassignedInLoop2.js ++++ new.blockScopedBindingsReassignedInLoop2.js +@@= skipped -43, +43 lines =@@ + } + + //// [blockScopedBindingsReassignedInLoop2.js] +-var _loop_1 = function (x, y) { +- var a = function () { return x++ + y++; }; ++for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) { +- return out_x_1 = x, out_y_1 = y, "break"; +- } +- else { +- y = 5; +- } +- out_x_1 = x; +- out_y_1 = y; +-}; +-var out_x_1, out_y_1; +-for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_1 = _loop_1(x, y); +- x = out_x_1; +- y = out_y_1; +- if (state_1 === "break") + break; +-} +-var _loop_2 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_2 = x, out_y_2 = y, "continue"; +- } +- else { +- y = 5; +- } +- out_x_2 = x; +- out_y_2 = y; +-}; +-var out_x_2, out_y_2; +-for (var x = 1, y = 2; x < y; ++x, --y) { +- _loop_2(x, y); +- x = out_x_2; +- y = out_y_2; +-} +-var _loop_3 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_3 = x, out_y_3 = y, "break-loop"; +- } +- else { +- y = 5; +- } +- out_x_3 = x; +- out_y_3 = y; +-}; +-var out_x_3, out_y_3; +-loop: for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_2 = _loop_3(x, y); +- x = out_x_3; +- y = out_y_3; +- switch (state_2) { +- case "break-loop": break loop; +- } +-} +-var _loop_4 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_4 = x, out_y_4 = y, "continue-loop"; +- } +- else { +- y = 5; +- } +- out_x_4 = x; +- out_y_4 = y; +-}; +-var out_x_4, out_y_4; +-loop: for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_3 = _loop_4(x, y); +- x = out_x_4; +- y = out_y_4; +- switch (state_3) { +- case "continue-loop": continue loop; ++ } ++ else { ++ y = 5; ++ } ++} ++for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ continue; ++ } ++ else { ++ y = 5; ++ } ++} ++loop: for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ break loop; ++ } ++ else { ++ y = 5; ++ } ++} ++loop: for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ continue loop; ++ } ++ else { ++ y = 5; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop3.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop3.js.diff new file mode 100644 index 0000000000..f4c381a6b3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop3.js.diff @@ -0,0 +1,232 @@ +--- old.blockScopedBindingsReassignedInLoop3.js ++++ new.blockScopedBindingsReassignedInLoop3.js +@@= skipped -93, +93 lines =@@ + + + //// [blockScopedBindingsReassignedInLoop3.js] +-var _loop_1 = function (x, y) { +- var a = function () { return x++ + y++; }; ++for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) { +- return out_x_1 = x, out_y_1 = y, "break"; +- } +- else { +- var _loop_5 = function (a_1) { +- var f = function () { return a_1; }; +- if (a_1) { +- a_1 = x; +- return out_a_1 = a_1, "break"; +- } +- else { +- y++; +- } +- out_a_1 = a_1; +- }; +- var out_a_1; +- for (var a_1 = 1; a_1 < 5; --a_1) { +- var state_4 = _loop_5(a_1); +- a_1 = out_a_1; +- if (state_4 === "break") +- break; +- } +- y = 5; +- } +- out_x_1 = x; +- out_y_1 = y; +-}; +-var out_x_1, out_y_1; +-for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_1 = _loop_1(x, y); +- x = out_x_1; +- y = out_y_1; +- if (state_1 === "break") + break; +-} +-var _loop_2 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_2 = x, out_y_2 = y, "continue"; +- } +- else { +- var _loop_6 = function (a_2) { +- var f = function () { return a_2; }; +- if (a_2) { +- a_2 = x; +- return out_a_2 = a_2, "continue"; +- } +- else { +- y++; +- } +- out_a_2 = a_2; +- }; +- var out_a_2; +- for (var a_2 = 1; a_2 < 5; --a_2) { +- _loop_6(a_2); +- a_2 = out_a_2; +- } +- y = 5; +- } +- out_x_2 = x; +- out_y_2 = y; +-}; +-var out_x_2, out_y_2; +-for (var x = 1, y = 2; x < y; ++x, --y) { +- _loop_2(x, y); +- x = out_x_2; +- y = out_y_2; +-} +-var _loop_3 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_3 = x, out_y_3 = y, "break-loop2"; +- } +- else { +- var _loop_7 = function (a_3) { +- var f = function () { return a_3; }; +- if (a_3) { +- a_3 = x; +- return out_a_3 = a_3, "break-loop1"; +- } +- else { +- y++; +- return out_a_3 = a_3, "break-loop2"; +- } +- out_a_3 = a_3; +- }; +- var out_a_3; +- loop1: for (var a_3 = 1; a_3 < 5; --a_3) { +- var state_5 = _loop_7(a_3); +- a_3 = out_a_3; +- switch (state_5) { +- case "break-loop1": break loop1; +- case "break-loop2": return state_5; +- } +- } +- y = 5; +- } +- out_x_3 = x; +- out_y_3 = y; +-}; +-var out_x_3, out_y_3; +-loop2: for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_2 = _loop_3(x, y); +- x = out_x_3; +- y = out_y_3; +- switch (state_2) { +- case "break-loop2": break loop2; +- } +-} +-var _loop_4 = function (x, y) { +- var a = function () { return x++ + y++; }; +- if (x == 1) { +- return out_x_4 = x, out_y_4 = y, "continue-loop2"; +- } +- else { +- var _loop_8 = function (a_4) { +- var f = function () { return a_4; }; +- if (a_4) { +- a_4 = x; +- return out_a_4 = a_4, "continue-loop1"; +- } +- else { +- y++; +- return out_a_4 = a_4, "continue-loop2"; +- } +- out_a_4 = a_4; +- }; +- var out_a_4; +- loop1: for (var a_4 = 1; a_4 < 5; --a_4) { +- var state_6 = _loop_8(a_4); +- a_4 = out_a_4; +- switch (state_6) { +- case "continue-loop1": continue loop1; +- case "continue-loop2": return state_6; +- } +- } +- y = 5; +- } +- out_x_4 = x; +- out_y_4 = y; +-}; +-var out_x_4, out_y_4; +-loop2: for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_3 = _loop_4(x, y); +- x = out_x_4; +- y = out_y_4; +- switch (state_3) { +- case "continue-loop2": continue loop2; ++ } ++ else { ++ for (let a = 1; a < 5; --a) { ++ let f = () => a; ++ if (a) { ++ a = x; ++ break; ++ } ++ else { ++ y++; ++ } ++ } ++ y = 5; ++ } ++} ++for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ continue; ++ } ++ else { ++ for (let a = 1; a < 5; --a) { ++ let f = () => a; ++ if (a) { ++ a = x; ++ continue; ++ } ++ else { ++ y++; ++ } ++ } ++ y = 5; ++ } ++} ++loop2: for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ break loop2; ++ } ++ else { ++ loop1: for (let a = 1; a < 5; --a) { ++ let f = () => a; ++ if (a) { ++ a = x; ++ break loop1; ++ } ++ else { ++ y++; ++ break loop2; ++ } ++ } ++ y = 5; ++ } ++} ++loop2: for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; ++ if (x == 1) { ++ continue loop2; ++ } ++ else { ++ loop1: for (let a = 1; a < 5; --a) { ++ let f = () => a; ++ if (a) { ++ a = x; ++ continue loop1; ++ } ++ else { ++ y++; ++ continue loop2; ++ } ++ } ++ y = 5; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop4.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop4.js.diff new file mode 100644 index 0000000000..cde7462e7e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop4.js.diff @@ -0,0 +1,29 @@ +--- old.blockScopedBindingsReassignedInLoop4.js ++++ new.blockScopedBindingsReassignedInLoop4.js +@@= skipped -14, +14 lines =@@ + + //// [blockScopedBindingsReassignedInLoop4.js] + function f1() { +- var _loop_1 = function (x, y) { +- var a = function () { return x++ + y++; }; ++ for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) { +- return { value: 1 }; ++ return 1; + } + else { + y = 5; + } +- out_x_1 = x; +- out_y_1 = y; +- }; +- var out_x_1, out_y_1; +- for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_1 = _loop_1(x, y); +- x = out_x_1; +- y = out_y_1; +- if (typeof state_1 === "object") +- return state_1.value; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop5.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop5.js.diff new file mode 100644 index 0000000000..f3aaa13f8b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop5.js.diff @@ -0,0 +1,26 @@ +--- old.blockScopedBindingsReassignedInLoop5.js ++++ new.blockScopedBindingsReassignedInLoop5.js +@@= skipped -10, +10 lines =@@ + + + //// [blockScopedBindingsReassignedInLoop5.js] +-var _loop_1 = function (x, y) { +- var a = function () { return x++ + y++; }; ++for (let x = 1, y = 2; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) +- return out_x_1 = x, out_y_1 = y, "break"; ++ break; + else + y = 5; +- out_x_1 = x; +- out_y_1 = y; +-}; +-var out_x_1, out_y_1; +-for (var x = 1, y = 2; x < y; ++x, --y) { +- var state_1 = _loop_1(x, y); +- x = out_x_1; +- y = out_y_1; +- if (state_1 === "break") +- break; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop6.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop6.js.diff new file mode 100644 index 0000000000..e10d32c657 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedBindingsReassignedInLoop6.js.diff @@ -0,0 +1,59 @@ +--- old.blockScopedBindingsReassignedInLoop6.js ++++ new.blockScopedBindingsReassignedInLoop6.js +@@= skipped -32, +32 lines =@@ + + //// [blockScopedBindingsReassignedInLoop6.js] + function f1() { +- var _loop_1 = function (x, y) { +- var a = function () { return x++ + y++; }; ++ for (let [x, y] = [1, 2]; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) +- return out_x_1 = x, out_y_1 = y, "break"; ++ break; + else if (y == 2) + y = 5; + else +- return { value: void 0 }; +- out_x_1 = x; +- out_y_1 = y; +- }; +- var out_x_1, out_y_1; +- for (var _a = [1, 2], x = _a[0], y = _a[1]; x < y; ++x, --y) { +- var state_1 = _loop_1(x, y); +- x = out_x_1; +- y = out_y_1; +- if (typeof state_1 === "object") +- return state_1.value; +- if (state_1 === "break") +- break; ++ return; + } + } + function f2() { +- var _loop_2 = function (x, y) { +- var a = function () { return x++ + y++; }; ++ for (let [{ a: x, b: { c: y } }] = [{ a: 1, b: { c: 2 } }]; x < y; ++x, --y) { ++ let a = () => x++ + y++; + if (x == 1) +- return out_x_2 = x, out_y_2 = y, "break"; ++ break; + else if (y == 2) + y = 5; + else +- return { value: void 0 }; +- out_x_2 = x; +- out_y_2 = y; +- }; +- var out_x_2, out_y_2; +- for (var _a = [{ a: 1, b: { c: 2 } }][0], x = _a.a, y = _a.b.c; x < y; ++x, --y) { +- var state_2 = _loop_2(x, y); +- x = out_x_2; +- y = out_y_2; +- if (typeof state_2 === "object") +- return state_2.value; +- if (state_2 === "break") +- break; ++ return; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.js.diff new file mode 100644 index 0000000000..8f9c7a5ee0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef.js.diff @@ -0,0 +1,19 @@ +--- old.blockScopedEnumVariablesUseBeforeDef.js ++++ new.blockScopedEnumVariablesUseBeforeDef.js +@@= skipped -22, +22 lines =@@ + //// [blockScopedEnumVariablesUseBeforeDef.js] + function foo1() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); +@@= skipped -8, +8 lines =@@ + function foo2() { + return 0 /* E.A */; + } +-var config = { ++const config = { + a: 2 /* AfterObject.A */, + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.js.diff new file mode 100644 index 0000000000..0022f5fa1d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_isolatedModules.js.diff @@ -0,0 +1,25 @@ +--- old.blockScopedEnumVariablesUseBeforeDef_isolatedModules.js ++++ new.blockScopedEnumVariablesUseBeforeDef_isolatedModules.js +@@= skipped -22, +22 lines =@@ + //// [blockScopedEnumVariablesUseBeforeDef_isolatedModules.js] + function foo1() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } + function foo2() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } +-var config = { ++const config = { + a: AfterObject.A, + }; + var AfterObject; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.js.diff new file mode 100644 index 0000000000..091d919d80 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_preserve.js.diff @@ -0,0 +1,25 @@ +--- old.blockScopedEnumVariablesUseBeforeDef_preserve.js ++++ new.blockScopedEnumVariablesUseBeforeDef_preserve.js +@@= skipped -22, +22 lines =@@ + //// [blockScopedEnumVariablesUseBeforeDef_preserve.js] + function foo1() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } + function foo2() { + return 0 /* E.A */; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } +-var config = { ++const config = { + a: 2 /* AfterObject.A */, + }; + var AfterObject; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js.diff new file mode 100644 index 0000000000..51f8328e97 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js.diff @@ -0,0 +1,25 @@ +--- old.blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js ++++ new.blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js +@@= skipped -22, +22 lines =@@ + //// [blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js] + function foo1() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } + function foo2() { + return E.A; +- var E; ++ let E; + (function (E) { + E[E["A"] = 0] = "A"; + })(E || (E = {})); + } +-var config = { ++const config = { + a: AfterObject.A, + }; + var AfterObject; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictClass.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictClass.js.diff new file mode 100644 index 0000000000..89131926ec --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationInStrictClass.js.diff @@ -0,0 +1,22 @@ +--- old.blockScopedFunctionDeclarationInStrictClass.js ++++ new.blockScopedFunctionDeclarationInStrictClass.js +@@= skipped -11, +11 lines =@@ + } + + //// [blockScopedFunctionDeclarationInStrictClass.js] +-var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.method = function () { ++class c { ++ method() { + if (true) { + function foo() { } + foo(); // ok + } + foo(); // not ok +- }; +- return c; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/blockScopedVariablesUseBeforeDef.js.diff b/testdata/baselines/reference/submodule/compiler/blockScopedVariablesUseBeforeDef.js.diff index 6ccdd13b93..1d0efa27cd 100644 --- a/testdata/baselines/reference/submodule/compiler/blockScopedVariablesUseBeforeDef.js.diff +++ b/testdata/baselines/reference/submodule/compiler/blockScopedVariablesUseBeforeDef.js.diff @@ -13,6 +13,33 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); @@ -31,57 +58,125 @@ - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; function foo0() { - let a = x; - let x; -@@= skipped -62, +36 lines =@@ +- var a = x; +- var x; ++ let a = x; ++ let x; + } + function foo1() { +- var a = function () { return x; }; +- var x; ++ let a = () => x; ++ let x; + } + function foo2() { +- var a = function () { return x; }; +- var x; ++ let a = function () { return x; }; ++ let x; + } + function foo3() { +- var X = /** @class */ (function () { +- function X() { +- } +- X.prototype.m = function () { return x; }; +- return X; +- }()); +- var x; ++ class X { ++ m() { return x; } ++ } ++ let x; + } + function foo4() { +- var y = /** @class */ (function () { +- function y() { +- } +- y.prototype.m = function () { return x; }; +- return y; +- }()); +- var x; ++ let y = class { ++ m() { return x; } ++ }; ++ let x; + } + function foo5() { +- var x = function () { return y; }; +- var y = function () { return x; }; ++ let x = () => y; ++ let y = () => x; + } + function foo6() { + function f() { + return x; + } +- var x; ++ let x; } function foo7() { - class A { -- constructor() { +- var A = /** @class */ (function () { +- function A() { - this.a = x; - } +- return A; +- }()); +- var x; ++ class A { + a = x; - } - let x; ++ } ++ let x; } function foo8() { - let y = class { -- constructor() { +- var y = /** @class */ (function () { +- function class_1() { - this.a = x; - } +- return class_1; +- }()); +- var x; ++ let y = class { + a = x; - }; - let x; ++ }; ++ let x; } function foo9() { - var _a; -- let y = (_a = class { -- }, +- var y = (_a = /** @class */ (function () { +- function class_2() { +- } +- return class_2; +- }()), - __setFunctionName(_a, "y"), - _a.a = x, - _a); +- var x; + let y = class { + static a = x; + }; - let x; ++ let x; } function foo10() { -- let A = (() => { -- class A { +- var A = /** @class */ (function () { +- function A() { - } - A.a = x; - return A; -- })(); +- }()); +- var x; + class A { + static a = x; + } - let x; ++ let x; } function foo11() { function f() { - var _a; -- let y = (_a = class { -- }, +- var y = (_a = /** @class */ (function () { +- function class_3() { +- } +- return class_3; +- }()), - __setFunctionName(_a, "y"), - _a.a = x, - _a); @@ -89,26 +184,79 @@ + static a = x; + }; } - let x; +- var x; ++ let x; } function foo12() { function f() { - let y = class { +- var y = /** @class */ (function () { +- function class_4() { ++ let y = class { + a; - constructor() { ++ constructor() { this.a = x; } -@@= skipped -81, +69 lines =@@ - let [a] = (() => a)(); +- return class_4; +- }()); ++ }; + } +- var x; ++ let x; + } + function foo13() { +- var a = { ++ let a = { + get a() { return x; } + }; +- var x; ++ let x; + } + function foo14() { +- var a = { ++ let a = { + a: x + }; +- var x; ++ let x; + } + function foo15() { + // https://github.com/microsoft/TypeScript/issues/42678 +- var _a = (function () { +- (function () { return console.log(a); })(); // should error ++ const [a, b,] = (() => { ++ (() => console.log(a))(); // should error + console.log(a); // should error +- var b = function () { return a; }; // should be ok ++ const b = () => a; // should be ok + return [ + 0, + 0, + ]; +- })(), a = _a[0], b = _a[1]; ++ })(); + } + function foo16() { +- var a = (function () { return a; })()[0]; ++ let [a] = (() => a)(); } function foo17() { -- const promise = (() => __awaiter(this, void 0, void 0, function* () { -- promise; -- foo; -- yield null; -- promise; -- foo; -- }))(); +- var _this = this; +- var promise = (function () { return __awaiter(_this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- promise; +- foo; +- return [4 /*yield*/, null]; +- case 1: +- _a.sent(); +- promise; +- foo; +- return [2 /*return*/]; +- } +- }); +- }); })(); +- var foo = 1; + const promise = (async () => { + promise; + foo; @@ -116,21 +264,51 @@ + promise; + foo; + })(); - const foo = 1; ++ const foo = 1; } // #30907 -@@= skipped -17, +17 lines =@@ + function wrapI1() { +- var iter = (function foo() { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- iter; +- return [4 /*yield*/, 1]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); ++ const iter = (function* foo() { ++ iter; ++ yield 1; })(); } function wrapI2() { -- const iter = (function foo() { -- return __asyncGenerator(this, arguments, function* foo_1() { -- iter; -- yield yield __await(1); +- var iter = (function foo() { +- return __asyncGenerator(this, arguments, function foo_1() { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- iter; +- return [4 /*yield*/, __await(1)]; +- case 1: return [4 /*yield*/, _a.sent()]; +- case 2: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); + const iter = (async function* foo() { + iter; + yield 1; })(); } - function foo18() { \ No newline at end of file + function foo18() { +- var a = (function () { return Enum.Yes; })(); +- var Enum; ++ let a = (() => Enum.Yes)(); ++ let Enum; + (function (Enum) { + Enum[Enum["No"] = 0] = "No"; + Enum[Enum["Yes"] = 1] = "Yes"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.errors.txt b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.errors.txt index 0c1f2baf59..e63c4c3e3d 100644 --- a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.errors.txt @@ -132,7 +132,7 @@ bluebirdStaticThis.ts(60,73): error TS2694: Namespace '"bluebirdStaticThis".Prom static filter(dit: typeof Promise, values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise; } - export declare module Promise { + export declare namespace Promise { export interface Thenable { then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable; diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js index 55615b7166..666abc41e9 100644 --- a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js @@ -111,7 +111,7 @@ export declare class Promise implements Promise.Thenable { static filter(dit: typeof Promise, values: R[], filterer: (item: R, index: number, arrayLength: number) => boolean): Promise; } -export declare module Promise { +export declare namespace Promise { export interface Thenable { then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable; diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js.diff b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js.diff new file mode 100644 index 0000000000..880628290a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.js.diff @@ -0,0 +1,18 @@ +--- old.bluebirdStaticThis.js ++++ new.bluebirdStaticThis.js +@@= skipped -146, +146 lines =@@ + var arr; + var foo; + var fooProm; +-fooProm = Promise.try(Promise, function () { ++fooProm = Promise.try(Promise, () => { + return foo; + }); +-fooProm = Promise.try(Promise, function () { ++fooProm = Promise.try(Promise, () => { + return foo; + }, arr); +-fooProm = Promise.try(Promise, function () { ++fooProm = Promise.try(Promise, () => { + return foo; + }, arr, x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols index c4acc5445d..2d0beb5843 100644 --- a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols @@ -8,9 +8,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 4, 29)) ->Promise.Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Promise.Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 4, 29)) constructor(callback: (resolve: (thenableOrResult: R | Promise.Thenable) => void, reject: (error: any) => void) => void); @@ -19,7 +19,7 @@ export declare class Promise implements Promise.Thenable { >thenableOrResult : Symbol(thenableOrResult, Decl(bluebirdStaticThis.ts, 5, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 4, 29)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 4, 29)) >reject : Symbol(reject, Decl(bluebirdStaticThis.ts, 5, 85)) >error : Symbol(error, Decl(bluebirdStaticThis.ts, 5, 95)) @@ -31,7 +31,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >fn : Symbol(fn, Decl(bluebirdStaticThis.ts, 6, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 6, 15)) >args : Symbol(args, Decl(bluebirdStaticThis.ts, 6, 69)) >ctx : Symbol(ctx, Decl(bluebirdStaticThis.ts, 6, 83)) @@ -57,7 +57,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >fn : Symbol(fn, Decl(bluebirdStaticThis.ts, 9, 42)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 9, 19)) >args : Symbol(args, Decl(bluebirdStaticThis.ts, 9, 73)) >ctx : Symbol(ctx, Decl(bluebirdStaticThis.ts, 9, 87)) @@ -97,7 +97,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >value : Symbol(value, Decl(bluebirdStaticThis.ts, 15, 42)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 15, 19)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 15, 19)) @@ -144,7 +144,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >value : Symbol(value, Decl(bluebirdStaticThis.ts, 23, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 23, 16)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 23, 16)) @@ -184,7 +184,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >value : Symbol(value, Decl(bluebirdStaticThis.ts, 32, 40)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 32, 17)) >ms : Symbol(ms, Decl(bluebirdStaticThis.ts, 32, 68)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -264,9 +264,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 48, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 48, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 48, 15)) @@ -278,7 +278,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 49, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 49, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 49, 15)) @@ -290,7 +290,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 50, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 50, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 50, 15)) @@ -331,9 +331,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 56, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 56, 18)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -347,7 +347,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 57, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 57, 18)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -361,7 +361,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 58, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 58, 18)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -387,9 +387,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 61, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 61, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 61, 15)) @@ -401,7 +401,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 62, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 62, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 62, 15)) @@ -413,7 +413,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 63, 38)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 63, 15)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 63, 15)) @@ -435,9 +435,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 66, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 66, 16)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 66, 16)) @@ -449,7 +449,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 67, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 67, 16)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 67, 16)) @@ -461,7 +461,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 68, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 68, 16)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 68, 16)) @@ -483,9 +483,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 71, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 71, 16)) >count : Symbol(count, Decl(bluebirdStaticThis.ts, 71, 88)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -498,7 +498,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 72, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 72, 16)) >count : Symbol(count, Decl(bluebirdStaticThis.ts, 72, 70)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -511,7 +511,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 73, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 73, 16)) >count : Symbol(count, Decl(bluebirdStaticThis.ts, 73, 70)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) @@ -535,7 +535,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 76, 39)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 76, 16)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 76, 16)) @@ -558,9 +558,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 79, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 79, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 79, 90)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 79, 100)) @@ -568,7 +568,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 79, 108)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 79, 123)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 79, 17)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 79, 17)) @@ -581,9 +581,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 80, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 80, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 80, 90)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 80, 100)) @@ -602,7 +602,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 81, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 81, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 81, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 81, 82)) @@ -610,7 +610,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 81, 90)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 81, 105)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 81, 17)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 81, 17)) @@ -623,7 +623,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 82, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 82, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 82, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 82, 82)) @@ -642,7 +642,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 83, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 83, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 83, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 83, 82)) @@ -650,7 +650,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 83, 90)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 83, 105)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 83, 17)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 83, 17)) @@ -663,7 +663,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 84, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 84, 15)) >mapper : Symbol(mapper, Decl(bluebirdStaticThis.ts, 84, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 84, 82)) @@ -688,7 +688,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 85, 72)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 85, 87)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 85, 17)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 85, 17)) @@ -718,9 +718,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 88, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 88, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 88, 93)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 88, 104)) @@ -730,7 +730,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 88, 125)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 88, 140)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 88, 20)) >initialValue : Symbol(initialValue, Decl(bluebirdStaticThis.ts, 88, 185)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 88, 20)) @@ -745,9 +745,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 89, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 89, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 89, 93)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 89, 104)) @@ -770,7 +770,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 91, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 91, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 91, 75)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 91, 86)) @@ -780,7 +780,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 91, 107)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 91, 122)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 91, 20)) >initialValue : Symbol(initialValue, Decl(bluebirdStaticThis.ts, 91, 167)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 91, 20)) @@ -795,7 +795,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 92, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 92, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 92, 75)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 92, 86)) @@ -818,7 +818,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 94, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 94, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 94, 75)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 94, 86)) @@ -828,7 +828,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 94, 107)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 94, 122)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 94, 20)) >initialValue : Symbol(initialValue, Decl(bluebirdStaticThis.ts, 94, 167)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 94, 20)) @@ -843,7 +843,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 95, 44)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 95, 18)) >reducer : Symbol(reducer, Decl(bluebirdStaticThis.ts, 95, 75)) >total : Symbol(total, Decl(bluebirdStaticThis.ts, 95, 86)) @@ -874,7 +874,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 97, 89)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 97, 104)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 97, 20)) >initialValue : Symbol(initialValue, Decl(bluebirdStaticThis.ts, 97, 149)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 97, 20)) @@ -909,9 +909,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 100, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 100, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 100, 90)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 100, 102)) @@ -919,7 +919,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 100, 110)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 100, 125)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 100, 18)) @@ -930,9 +930,9 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 101, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 101, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 101, 90)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 101, 102)) @@ -949,7 +949,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 102, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 102, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 102, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 102, 84)) @@ -957,7 +957,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 102, 92)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 102, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 102, 18)) @@ -968,7 +968,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 103, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 103, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 103, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 103, 84)) @@ -985,7 +985,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 104, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 104, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 104, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 104, 84)) @@ -993,7 +993,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 104, 92)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 104, 107)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 104, 18)) @@ -1004,7 +1004,7 @@ export declare class Promise implements Promise.Thenable { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >values : Symbol(values, Decl(bluebirdStaticThis.ts, 105, 41)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 105, 18)) >filterer : Symbol(filterer, Decl(bluebirdStaticThis.ts, 105, 72)) >item : Symbol(item, Decl(bluebirdStaticThis.ts, 105, 84)) @@ -1027,7 +1027,7 @@ export declare class Promise implements Promise.Thenable { >index : Symbol(index, Decl(bluebirdStaticThis.ts, 106, 74)) >arrayLength : Symbol(arrayLength, Decl(bluebirdStaticThis.ts, 106, 89)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) ->Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Promise.Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 106, 18)) @@ -1047,11 +1047,11 @@ export declare class Promise implements Promise.Thenable { >R : Symbol(R, Decl(bluebirdStaticThis.ts, 107, 18)) } -export declare module Promise { +export declare namespace Promise { >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) export interface Thenable { ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 111, 27)) then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; @@ -1060,13 +1060,13 @@ export declare module Promise { >onFulfilled : Symbol(onFulfilled, Decl(bluebirdStaticThis.ts, 112, 10)) >value : Symbol(value, Decl(bluebirdStaticThis.ts, 112, 24)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 111, 27)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 112, 7)) >onRejected : Symbol(onRejected, Decl(bluebirdStaticThis.ts, 112, 49)) >error : Symbol(error, Decl(bluebirdStaticThis.ts, 112, 63)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 112, 7)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 112, 7)) then(onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable; @@ -1075,12 +1075,12 @@ export declare module Promise { >onFulfilled : Symbol(onFulfilled, Decl(bluebirdStaticThis.ts, 113, 10)) >value : Symbol(value, Decl(bluebirdStaticThis.ts, 113, 24)) >R : Symbol(R, Decl(bluebirdStaticThis.ts, 111, 27)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 113, 7)) >onRejected : Symbol(onRejected, Decl(bluebirdStaticThis.ts, 113, 49)) >error : Symbol(error, Decl(bluebirdStaticThis.ts, 113, 64)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 113, 7)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 113, 7)) then(onFulfilled: (value: R) => U, onRejected: (error: any) => Thenable): Thenable; @@ -1092,9 +1092,9 @@ export declare module Promise { >U : Symbol(U, Decl(bluebirdStaticThis.ts, 114, 7)) >onRejected : Symbol(onRejected, Decl(bluebirdStaticThis.ts, 114, 39)) >error : Symbol(error, Decl(bluebirdStaticThis.ts, 114, 53)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 114, 7)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 114, 7)) then(onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): Thenable; @@ -1107,7 +1107,7 @@ export declare module Promise { >onRejected : Symbol(onRejected, Decl(bluebirdStaticThis.ts, 115, 40)) >error : Symbol(error, Decl(bluebirdStaticThis.ts, 115, 55)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 115, 7)) ->Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 31)) +>Thenable : Symbol(Thenable, Decl(bluebirdStaticThis.ts, 110, 34)) >U : Symbol(U, Decl(bluebirdStaticThis.ts, 115, 7)) } diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols.diff b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols.diff new file mode 100644 index 0000000000..db31a3352e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.symbols.diff @@ -0,0 +1,44 @@ +--- old.bluebirdStaticThis.symbols ++++ new.bluebirdStaticThis.symbols +@@= skipped -80, +80 lines =@@ + >dit : Symbol(dit, Decl(bluebirdStaticThis.ts, 12, 18)) + >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) + >fn : Symbol(fn, Decl(bluebirdStaticThis.ts, 12, 38)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + static resolve(dit: typeof Promise): Promise; + >resolve : Symbol(Promise.resolve, Decl(bluebirdStaticThis.ts, 12, 63), Decl(bluebirdStaticThis.ts, 14, 55), Decl(bluebirdStaticThis.ts, 15, 83)) +@@= skipped -132, +132 lines =@@ + >dit : Symbol(dit, Decl(bluebirdStaticThis.ts, 36, 21)) + >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) + >nodeFunction : Symbol(nodeFunction, Decl(bluebirdStaticThis.ts, 36, 41)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >receiver : Symbol(receiver, Decl(bluebirdStaticThis.ts, 36, 65)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + static promisifyAll(dit: typeof Promise, target: Object): Object; + >promisifyAll : Symbol(Promise.promisifyAll, Decl(bluebirdStaticThis.ts, 36, 92)) +@@= skipped -18, +18 lines =@@ + >dit : Symbol(dit, Decl(bluebirdStaticThis.ts, 40, 24)) + >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) + >generatorFunction : Symbol(generatorFunction, Decl(bluebirdStaticThis.ts, 40, 44)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + static spawn(dit: typeof Promise, generatorFunction: Function): Promise; + >spawn : Symbol(Promise.spawn, Decl(bluebirdStaticThis.ts, 40, 84)) +@@= skipped -9, +9 lines =@@ + >dit : Symbol(dit, Decl(bluebirdStaticThis.ts, 42, 20)) + >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) + >generatorFunction : Symbol(generatorFunction, Decl(bluebirdStaticThis.ts, 42, 40)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Promise : Symbol(Promise, Decl(bluebirdStaticThis.ts, 0, 0), Decl(bluebirdStaticThis.ts, 108, 1)) + >R : Symbol(R, Decl(bluebirdStaticThis.ts, 42, 17)) diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types index 07f420eba6..f463c7d03c 100644 --- a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types @@ -648,7 +648,7 @@ export declare class Promise implements Promise.Thenable { >arrayLength : number } -export declare module Promise { +export declare namespace Promise { export interface Thenable { then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; >then : { (onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; (onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U): Thenable; (onFulfilled: (value: R) => U, onRejected: (error: any) => Thenable): Thenable; (onFulfilled?: (value: R) => U, onRejected?: (error: any) => U): Thenable; } diff --git a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types.diff b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types.diff index d0e26ce763..87e9797b9c 100644 --- a/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types.diff +++ b/testdata/baselines/reference/submodule/compiler/bluebirdStaticThis.types.diff @@ -488,7 +488,7 @@ >Promise : typeof Promise >values : R[] @@= skipped -13, +13 lines =@@ - export declare module Promise { + export declare namespace Promise { export interface Thenable { then(onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; ->then : { (onFulfilled: (value: R) => Thenable, onRejected: (error: any) => Thenable): Thenable; (onFulfilled: (value: R) => Thenable, onRejected?: (error: any) => U_1): Thenable; (onFulfilled: (value: R) => U_1, onRejected: (error: any) => Thenable): Thenable; (onFulfilled?: (value: R) => U_1, onRejected?: (error: any) => U_1): Thenable; } diff --git a/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.js.diff b/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.js.diff new file mode 100644 index 0000000000..445551a550 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.js.diff @@ -0,0 +1,11 @@ +--- old.booleanFilterAnyArray.js ++++ new.booleanFilterAnyArray.js +@@= skipped -33, +33 lines =@@ + var ys = realanys.filter(Boolean); + var foo = [{ name: 'x' }]; + var foor; +-var foor = foo.filter(function (x) { return x.name; }); ++var foor = foo.filter(x => x.name); + var foos; +-var foos = [true, true, false, null].filter(function (thing) { return thing !== null; }); ++var foos = [true, true, false, null].filter((thing) => thing !== null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.symbols.diff new file mode 100644 index 0000000000..ccb33af1f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/booleanFilterAnyArray.symbols.diff @@ -0,0 +1,20 @@ +--- old.booleanFilterAnyArray.symbols ++++ new.booleanFilterAnyArray.symbols +@@= skipped -82, +82 lines =@@ + + var foor: Array<{name: string}> + >foor : Symbol(foor, Decl(booleanFilterAnyArray.ts, 20, 3), Decl(booleanFilterAnyArray.ts, 21, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >name : Symbol(name, Decl(booleanFilterAnyArray.ts, 20, 17)) + + var foor = foo.filter(x => x.name) +@@= skipped -15, +15 lines =@@ + + var foos: Array + >foos : Symbol(foos, Decl(booleanFilterAnyArray.ts, 22, 3), Decl(booleanFilterAnyArray.ts, 23, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) + >foos : Symbol(foos, Decl(booleanFilterAnyArray.ts, 22, 3), Decl(booleanFilterAnyArray.ts, 23, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.errors.txt.diff deleted file mode 100644 index 4953ebe83c..0000000000 --- a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.errors.txt.diff +++ /dev/null @@ -1,35 +0,0 @@ ---- old.booleanLiteralsContextuallyTypedFromUnion.errors.txt -+++ new.booleanLiteralsContextuallyTypedFromUnion.errors.txt -@@= skipped -0, +0 lines =@@ --error TS2318: Cannot find global type 'CallableFunction'. --error TS2318: Cannot find global type 'NewableFunction'. -- -- --!!! error TS2318: Cannot find global type 'CallableFunction'. --!!! error TS2318: Cannot find global type 'NewableFunction'. --==== booleanLiteralsContextuallyTypedFromUnion.tsx (0 errors) ==== -- interface A { isIt: true; text: string; } -- interface B { isIt: false; value: number; } -- type C = A | B; -- const isIt = Math.random() > 0.5; -- const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; -- const cc: C = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; -- -- type ComponentProps = -- | { -- optionalBool: true; -- mandatoryFn: () => void; -- } -- | { -- optionalBool: false; -- }; -- -- let Funk = (_props: ComponentProps) =>
Hello
; -- -- let Fail1 = () => { }} optionalBool={true} /> -- let Fail2 = () => { }} optionalBool={true as true} /> -- let True = true as true; -- let Fail3 = () => { }} optionalBool={True} /> -- let attrs2 = { optionalBool: true as true, mandatoryFn: () => { } } -- let Success = () => -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.js.diff b/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.js.diff index ac480824b4..2eee8e1185 100644 --- a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.js.diff +++ b/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.js.diff @@ -5,6 +5,23 @@ //// [booleanLiteralsContextuallyTypedFromUnion.jsx] -"use strict"; - const isIt = Math.random() > 0.5; - const c = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; - const cc = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; \ No newline at end of file +-var isIt = Math.random() > 0.5; +-var c = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; +-var cc = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; +-var Funk = function (_props) { return
Hello
; }; +-var Fail1 = function () { return ; }; +-var Fail2 = function () { return ; }; +-var True = true; +-var Fail3 = function () { return ; }; +-var attrs2 = { optionalBool: true, mandatoryFn: function () { } }; +-var Success = function () { return ; }; ++const isIt = Math.random() > 0.5; ++const c = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; ++const cc = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; ++let Funk = (_props) =>
Hello
; ++let Fail1 = () => { }} optionalBool={true}/>; ++let Fail2 = () => { }} optionalBool={true}/>; ++let True = true; ++let Fail3 = () => { }} optionalBool={True}/>; ++let attrs2 = { optionalBool: true, mandatoryFn: () => { } }; ++let Success = () => ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.symbols.diff b/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.symbols.diff index 36bf710170..d5f50934a3 100644 --- a/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/booleanLiteralsContextuallyTypedFromUnion.symbols.diff @@ -1,15 +1,11 @@ --- old.booleanLiteralsContextuallyTypedFromUnion.symbols +++ new.booleanLiteralsContextuallyTypedFromUnion.symbols -@@= skipped -17, +17 lines =@@ - +@@= skipped -18, +18 lines =@@ const isIt = Math.random() > 0.5; >isIt : Symbol(isIt, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 3, 5)) -->Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) -->Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) -->random : Symbol(Math.random, Decl(lib.d.ts, --, --)) -+>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -+>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; - >c : Symbol(c, Decl(booleanLiteralsContextuallyTypedFromUnion.tsx, 4, 5)) \ No newline at end of file + const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff new file mode 100644 index 0000000000..ecee2ebee0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/builtinIterator.errors.txt.diff @@ -0,0 +1,38 @@ +--- old.builtinIterator.errors.txt ++++ new.builtinIterator.errors.txt +@@= skipped -19, +19 lines =@@ + Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorYieldResult'. + Types of property 'done' are incompatible. + Type 'boolean' is not assignable to type 'false'. +-builtinIterator.ts(70,29): error TS2345: Argument of type 'Generator' is not assignable to parameter of type 'Iterator | Iterable'. ++builtinIterator.ts(70,29): error TS2345: Argument of type 'Generator' is not assignable to parameter of type 'Iterable | Iterator'. + Type 'Generator' is not assignable to type 'Iterator'. + Types of property 'next' are incompatible. + Type '(...[value]: [] | [boolean]) => IteratorResult' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult'. +@@= skipped -9, +9 lines =@@ + Type '[undefined]' is not assignable to type '[] | [boolean]'. + Type '[undefined]' is not assignable to type '[boolean]'. + Type 'undefined' is not assignable to type 'boolean'. +-builtinIterator.ts(73,35): error TS2322: Type 'Generator' is not assignable to type 'Iterator | Iterable'. ++builtinIterator.ts(73,35): error TS2322: Type 'Generator' is not assignable to type 'Iterable | Iterator'. + Type 'Generator' is not assignable to type 'Iterator'. + Types of property 'next' are incompatible. + Type '(...[value]: [] | [boolean]) => IteratorResult' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult'. +@@= skipped -110, +110 lines =@@ + declare const g1: Generator; + const iter1 = Iterator.from(g1); + ~~ +-!!! error TS2345: Argument of type 'Generator' is not assignable to parameter of type 'Iterator | Iterable'. ++!!! error TS2345: Argument of type 'Generator' is not assignable to parameter of type 'Iterable | Iterator'. + !!! error TS2345: Type 'Generator' is not assignable to type 'Iterator'. + !!! error TS2345: Types of property 'next' are incompatible. + !!! error TS2345: Type '(...[value]: [] | [boolean]) => IteratorResult' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult'. +@@= skipped -13, +13 lines =@@ + declare const iter2: IteratorObject; + const iter3 = iter2.flatMap(() => g1); + ~~ +-!!! error TS2322: Type 'Generator' is not assignable to type 'Iterator | Iterable'. ++!!! error TS2322: Type 'Generator' is not assignable to type 'Iterable | Iterator'. + !!! error TS2322: Type 'Generator' is not assignable to type 'Iterator'. + !!! error TS2322: Types of property 'next' are incompatible. + !!! error TS2322: Type '(...[value]: [] | [boolean]) => IteratorResult' is not assignable to type '(...[value]: [] | [undefined]) => IteratorResult'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/builtinIterator.types.diff b/testdata/baselines/reference/submodule/compiler/builtinIterator.types.diff index 7bc1f0d12f..6d76f1d29f 100644 --- a/testdata/baselines/reference/submodule/compiler/builtinIterator.types.diff +++ b/testdata/baselines/reference/submodule/compiler/builtinIterator.types.diff @@ -24,7 +24,50 @@ >{ next() { return { done: Math.random() < .5, value: "a string", }; },} : { next(): { done: boolean; value: string; }; } next() { -@@= skipped -192, +192 lines =@@ +@@= skipped -38, +38 lines =@@ + } + + const mappedGen = gen().map(x => x === 0 ? "zero" : "other"); +->mappedGen : IteratorObject<"zero" | "other", undefined, unknown> +->gen().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown> ++>mappedGen : IteratorObject<"other" | "zero", undefined, unknown> ++>gen().map(x => x === 0 ? "zero" : "other") : IteratorObject<"other" | "zero", undefined, unknown> + >gen().map : (callbackfn: (value: number, index: number) => U) => IteratorObject + >gen() : Generator + >gen : () => Generator + >map : (callbackfn: (value: number, index: number) => U) => IteratorObject +->x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other" ++>x => x === 0 ? "zero" : "other" : (x: number) => "other" | "zero" + >x : number +->x === 0 ? "zero" : "other" : "zero" | "other" ++>x === 0 ? "zero" : "other" : "other" | "zero" + >x === 0 : boolean + >x : number + >0 : 0 +@@= skipped -16, +16 lines =@@ + >"other" : "other" + + const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other"); +->mappedValues : IteratorObject<"zero" | "other", undefined, unknown> +->[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown> ++>mappedValues : IteratorObject<"other" | "zero", undefined, unknown> ++>[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : IteratorObject<"other" | "zero", undefined, unknown> + >[0, 1, 2].values().map : (callbackfn: (value: number, index: number) => U) => IteratorObject + >[0, 1, 2].values() : ArrayIterator + >[0, 1, 2].values : () => ArrayIterator +@@= skipped -11, +11 lines =@@ + >2 : 2 + >values : () => ArrayIterator + >map : (callbackfn: (value: number, index: number) => U) => IteratorObject +->x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other" ++>x => x === 0 ? "zero" : "other" : (x: number) => "other" | "zero" + >x : number +->x === 0 ? "zero" : "other" : "zero" | "other" ++>x === 0 ? "zero" : "other" : "other" | "zero" + >x === 0 : boolean + >x : number + >0 : 0 +@@= skipped -127, +127 lines =@@ const iter1 = Iterator.from(g1); >iter1 : IteratorObject >Iterator.from(g1) : IteratorObject @@ -35,4 +78,15 @@ +>from : (value: Iterable | Iterator) => IteratorObject >g1 : Generator - declare const iter2: IteratorObject; \ No newline at end of file + declare const iter2: IteratorObject; +@@= skipped -11, +11 lines =@@ + const iter3 = iter2.flatMap(() => g1); + >iter3 : IteratorObject + >iter2.flatMap(() => g1) : IteratorObject +->iter2.flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => IteratorObject ++>iter2.flatMap : (callback: (value: string, index: number) => Iterable | Iterator) => IteratorObject + >iter2 : IteratorObject +->flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => IteratorObject ++>flatMap : (callback: (value: string, index: number) => Iterable | Iterator) => IteratorObject + >() => g1 : () => Generator + >g1 : Generator diff --git a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff b/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff index 6236676ccd..d063d7f93e 100644 --- a/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/cachedContextualTypes.js.diff @@ -6,5 +6,17 @@ "use strict"; -// Repro from #52198 Object.defineProperty(exports, "__esModule", { value: true }); - class MenuWorkbenchToolBar { - constructor(options) { } \ No newline at end of file +-var MenuWorkbenchToolBar = /** @class */ (function () { +- function MenuWorkbenchToolBar(options) { +- } +- return MenuWorkbenchToolBar; +-}()); ++class MenuWorkbenchToolBar { ++ constructor(options) { } ++} + createInstance(MenuWorkbenchToolBar, { + toolbarOptions: { +- foo: function (bar) { return bar; } ++ foo(bar) { return bar; } + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.js.diff b/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.js.diff new file mode 100644 index 0000000000..362e91c9e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.js.diff @@ -0,0 +1,21 @@ +--- old.callOfConditionalTypeWithConcreteBranches.js ++++ new.callOfConditionalTypeWithConcreteBranches.js +@@= skipped -51, +51 lines =@@ + arg(10); + } + // Legal invocations are not problematic +-fn(function (m) { return m.toFixed(); }); +-fn(function (m) { return m.toFixed(); }); ++fn(m => m.toFixed()); ++fn(m => m.toFixed()); + function fn2(arg) { + function useT(_arg) { } + // Expected: OK +- arg(function (arg) { return useT(arg); }); ++ arg(arg => useT(arg)); + } + // Legal invocations are not problematic +-fn2(function (m) { return m(42); }); +-fn2(function (m) { return m(42); }); ++fn2(m => m(42)); ++fn2(m => m(42)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.symbols.diff b/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.symbols.diff new file mode 100644 index 0000000000..ae8844e1b1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOfConditionalTypeWithConcreteBranches.symbols.diff @@ -0,0 +1,11 @@ +--- old.callOfConditionalTypeWithConcreteBranches.symbols ++++ new.callOfConditionalTypeWithConcreteBranches.symbols +@@= skipped -102, +102 lines =@@ + >args : Symbol(args, Decl(callOfConditionalTypeWithConcreteBranches.ts, 33, 49)) + >Parameters : Symbol(Parameters, Decl(lib.es5.d.ts, --, --)) + >V : Symbol(V, Decl(callOfConditionalTypeWithConcreteBranches.ts, 33, 7)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + // vscode - another `Parameters` example + export type AddFirstParameterToFunctions = { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOnClass.js.diff b/testdata/baselines/reference/submodule/compiler/callOnClass.js.diff new file mode 100644 index 0000000000..aa46a8d740 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOnClass.js.diff @@ -0,0 +1,14 @@ +--- old.callOnClass.js ++++ new.callOnClass.js +@@= skipped -6, +6 lines =@@ + + + //// [callOnClass.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + var c = C(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloadViaElementAccessExpression.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloadViaElementAccessExpression.js.diff new file mode 100644 index 0000000000..03332758d5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloadViaElementAccessExpression.js.diff @@ -0,0 +1,21 @@ +--- old.callOverloadViaElementAccessExpression.js ++++ new.callOverloadViaElementAccessExpression.js +@@= skipped -13, +13 lines =@@ + var r2: number = c['foo'](''); + + //// [callOverloadViaElementAccessExpression.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function (x) { ++class C { ++ foo(x) { + return null; +- }; +- return C; +-}()); ++ } ++} + var c = new C(); + var r = c['foo'](1); + var r2 = c['foo'](''); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads1.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloads1.js.diff new file mode 100644 index 0000000000..871cf1f58d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads1.js.diff @@ -0,0 +1,20 @@ +--- old.callOverloads1.js ++++ new.callOverloads1.js +@@= skipped -19, +19 lines =@@ + Foo(); + + //// [callOverloads1.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { ++class Foo { ++ bar1() { } ++ constructor(x) { + // WScript.Echo("Constructor function has executed"); + } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}()); ++} + function F1(a) { return a; } + var f1 = new Foo("hey"); + f1.bar1(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads2.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloads2.js.diff new file mode 100644 index 0000000000..3f3d94697a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads2.js.diff @@ -0,0 +1,20 @@ +--- old.callOverloads2.js ++++ new.callOverloads2.js +@@= skipped -25, +25 lines =@@ + + + //// [callOverloads2.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { ++class Foo { ++ bar1() { } ++ constructor(x) { + // WScript.Echo("Constructor function has executed"); + } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}()); ++} + function F1(s) { return s; } // error + function F1(a) { return a; } // error + var f1 = new Foo("hey"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads2.symbols.diff b/testdata/baselines/reference/submodule/compiler/callOverloads2.symbols.diff new file mode 100644 index 0000000000..6226ff89b3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads2.symbols.diff @@ -0,0 +1,11 @@ +--- old.callOverloads2.symbols ++++ new.callOverloads2.symbols +@@= skipped -33, +33 lines =@@ + declare function Gar(s:String); // expect no error + >Gar : Symbol(Gar, Decl(callOverloads2.ts, 13, 23)) + >s : Symbol(s, Decl(callOverloads2.ts, 15, 21)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var f1 = new Foo("hey"); + >f1 : Symbol(f1, Decl(callOverloads2.ts, 17, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads3.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloads3.js.diff new file mode 100644 index 0000000000..50ea5b44d0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads3.js.diff @@ -0,0 +1,20 @@ +--- old.callOverloads3.js ++++ new.callOverloads3.js +@@= skipped -19, +19 lines =@@ + + + //// [callOverloads3.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { ++class Foo { ++ bar1() { } ++ constructor(x) { + // WScript.Echo("Constructor function has executed"); + } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}()); ++} + //class Foo(s: String); + var f1 = new Foo("hey"); + f1.bar1(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads4.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloads4.js.diff new file mode 100644 index 0000000000..71e23cf00c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads4.js.diff @@ -0,0 +1,20 @@ +--- old.callOverloads4.js ++++ new.callOverloads4.js +@@= skipped -19, +19 lines =@@ + + + //// [callOverloads4.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { ++class Foo { ++ bar1() { } ++ constructor(x) { + // WScript.Echo("Constructor function has executed"); + } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}()); ++} + var f1 = new Foo("hey"); + f1.bar1(); + Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callOverloads5.js.diff b/testdata/baselines/reference/submodule/compiler/callOverloads5.js.diff new file mode 100644 index 0000000000..c379bcd5a7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callOverloads5.js.diff @@ -0,0 +1,20 @@ +--- old.callOverloads5.js ++++ new.callOverloads5.js +@@= skipped -21, +21 lines =@@ + + + //// [callOverloads5.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { ++class Foo { ++ bar1(a) { } ++ constructor(x) { + // WScript.Echo("Constructor function has executed"); + } +- Foo.prototype.bar1 = function (a) { }; +- return Foo; +-}()); ++} + //class Foo(s: String); + var f1 = new Foo("hey"); + f1.bar1("a"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callbacksDontShareTypes.js.diff b/testdata/baselines/reference/submodule/compiler/callbacksDontShareTypes.js.diff new file mode 100644 index 0000000000..332f38e85d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/callbacksDontShareTypes.js.diff @@ -0,0 +1,14 @@ +--- old.callbacksDontShareTypes.js ++++ new.callbacksDontShareTypes.js +@@= skipped -22, +22 lines =@@ + //// [callbacksDontShareTypes.js] + var _; + var c2; +-var rf1 = function (x) { return x.toFixed(); }; +-var r1a = _.map(c2, function (x) { return x.toFixed(); }); ++var rf1 = (x) => { return x.toFixed(); }; ++var r1a = _.map(c2, (x) => { return x.toFixed(); }); + var r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors +-var r5a = _.map(c2, function (x) { return x.toFixed(); }); ++var r5a = _.map(c2, (x) => { return x.toFixed(); }); + var r5b = _.map(c2, rf1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.js.diff index 2f48bfa689..3eb4daa268 100644 --- a/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.js.diff +++ b/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.js.diff @@ -8,4 +8,49 @@ +const react_1 = __importDefault(require("react")); // Simple calls from real usecases function test1() { - function test(t) { \ No newline at end of file + function test(t) { +- var z = t.getValue("bar"); // Should be fine ++ const z = t.getValue("bar"); // Should be fine + } + } + function test2() { +- var messages = { +- foo: function (options) { return "Foo"; }, +- bar: function (options) { return "Bar"; }, +- }; +- var test1 = function (type) { +- return messages[type]({ a: "A", b: 0 }); +- }; ++ const messages = { ++ foo: (options) => "Foo", ++ bar: (options) => "Bar", ++ }; ++ const test1 = (type) => messages[type]({ a: "A", b: 0 }); + } + function test3(items) { +- items.forEach(function (item) { return console.log(item); }); ++ items.forEach(item => console.log(item)); + } + function test4(arg1, arg2, arg3, arg4, arg5, arg6) { + arg1(); +@@= skipped -42, +40 lines =@@ + function test5() { + // Pair of non-like intrinsics + function render(url) { +- var Tag = url ? 'a' : 'button'; ++ const Tag = url ? 'a' : 'button'; + return react_1.default.createElement(Tag, null, "test"); + } + // Union of all intrinsics and components of `any` + function App(props) { +- var Comp = props.component; ++ const Comp = props.component; + return (react_1.default.createElement(Comp, null)); + } + // custom components with non-subset props + function render2() { + var C = null; +- var a = react_1.default.createElement(C, { p: true }); ++ const a = react_1.default.createElement(C, { p: true }); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.types.diff b/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.types.diff index 7302d17c4b..7aa6f491e5 100644 --- a/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.types.diff +++ b/testdata/baselines/reference/submodule/compiler/callsOnComplexSignatures.types.diff @@ -1,16 +1,56 @@ --- old.callsOnComplexSignatures.types +++ new.callsOnComplexSignatures.types -@@= skipped -76, +76 lines =@@ +@@= skipped -9, +9 lines =@@ + >test1 : () => void + + type stringType1 = "foo" | "bar"; +->stringType1 : "foo" | "bar" ++>stringType1 : "bar" | "foo" + + type stringType2 = "baz" | "bar"; + >stringType2 : "bar" | "baz" + + interface Temp1 { + getValue(name: stringType1): number; +->getValue : (name: "foo" | "bar") => number +->name : "foo" | "bar" ++>getValue : (name: "bar" | "foo") => number ++>name : "bar" | "foo" + } + + interface Temp2 { +@@= skipped -24, +24 lines =@@ + const z = t.getValue("bar"); // Should be fine + >z : string | number + >t.getValue("bar") : string | number +->t.getValue : ((name: "foo" | "bar") => number) | ((name: "bar" | "baz") => string) ++>t.getValue : ((name: "bar" | "foo") => number) | ((name: "bar" | "baz") => string) + >t : Temp1 | Temp2 +->getValue : ((name: "foo" | "bar") => number) | ((name: "bar" | "baz") => string) ++>getValue : ((name: "bar" | "foo") => number) | ((name: "bar" | "baz") => string) + >"bar" : "bar" + } + } +@@= skipped -43, +43 lines =@@ }; const test1 = (type: "foo" | "bar") => ->test1 : (type: "foo" | "bar") => string ->(type: "foo" | "bar") => messages[type]({ a: "A", b: 0 }) : (type: "foo" | "bar") => string +->type : "foo" | "bar" +>test1 : (type: "bar" | "foo") => string +>(type: "foo" | "bar") => messages[type]({ a: "A", b: 0 }) : (type: "bar" | "foo") => string - >type : "bar" | "foo" ++>type : "bar" | "foo" messages[type]({ a: "A", b: 0 }); + >messages[type]({ a: "A", b: 0 }) : string + >messages[type] : ((options: { [key: string]: any; b: number; }) => string) | ((options: { [key: string]: any; a: string; }) => string) + >messages : Messages +->type : "foo" | "bar" ++>type : "bar" | "foo" + >{ a: "A", b: 0 } : { a: string; b: number; } + >a : string + >"A" : "A" @@= skipped -35, +35 lines =@@ } diff --git a/testdata/baselines/reference/submodule/compiler/cannotInvokeNewOnErrorExpression.js.diff b/testdata/baselines/reference/submodule/compiler/cannotInvokeNewOnErrorExpression.js.diff new file mode 100644 index 0000000000..8c1f3284e3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cannotInvokeNewOnErrorExpression.js.diff @@ -0,0 +1,15 @@ +--- old.cannotInvokeNewOnErrorExpression.js ++++ new.cannotInvokeNewOnErrorExpression.js +@@= skipped -9, +9 lines =@@ + //// [cannotInvokeNewOnErrorExpression.js] + var M; + (function (M) { +- var ClassA = /** @class */ (function () { +- function ClassA() { +- } +- return ClassA; +- }()); ++ class ClassA { ++ } + })(M || (M = {})); + var t = new M.ClassA[]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/captureSuperPropertyAccessInSuperCall01.js.diff b/testdata/baselines/reference/submodule/compiler/captureSuperPropertyAccessInSuperCall01.js.diff new file mode 100644 index 0000000000..fd7d3ceba2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/captureSuperPropertyAccessInSuperCall01.js.diff @@ -0,0 +1,45 @@ +--- old.captureSuperPropertyAccessInSuperCall01.js ++++ new.captureSuperPropertyAccessInSuperCall01.js +@@= skipped -13, +13 lines =@@ + } + + //// [captureSuperPropertyAccessInSuperCall01.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A(f) { +- } +- A.prototype.blah = function () { return ""; }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- var _this = _super.call(this, function () { return _super.prototype.blah.call(_this); }) || this; +- return _this; +- } +- return B; +-}(A)); ++class A { ++ constructor(f) { ++ } ++ blah() { return ""; } ++} ++class B extends A { ++ constructor() { ++ super(() => { return super.blah(); }); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/captureThisInSuperCall.js.diff b/testdata/baselines/reference/submodule/compiler/captureThisInSuperCall.js.diff new file mode 100644 index 0000000000..c8fa3d3ffc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/captureThisInSuperCall.js.diff @@ -0,0 +1,42 @@ +--- old.captureThisInSuperCall.js ++++ new.captureThisInSuperCall.js +@@= skipped -10, +10 lines =@@ + } + + //// [captureThisInSuperCall.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A(p) { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- var _this = _super.call(this, { test: function () { return _this.someMethod(); } }) || this; +- return _this; +- } +- B.prototype.someMethod = function () { }; +- return B; +-}(A)); ++class A { ++ constructor(p) { } ++} ++class B extends A { ++ constructor() { super({ test: () => this.someMethod() }); } ++ someMethod() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop1.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop1.js.diff new file mode 100644 index 0000000000..093e4142b1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop1.js.diff @@ -0,0 +1,338 @@ +--- old.capturedLetConstInLoop1.js ++++ new.capturedLetConstInLoop1.js +@@= skipped -140, +140 lines =@@ + } + + //// [capturedLetConstInLoop1.js] +-var _loop_1 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; + //==== let +-for (var x in {}) { +- _loop_1(x); +-} +-var _loop_2 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x = _a[_i]; +- _loop_2(x); +-} +-var _loop_3 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var x = 0; x < 1; ++x) { +- _loop_3(x); +-} +-var _loop_4 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +-}; +-while (1 === 1) { +- _loop_4(); +-} +-var _loop_5 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +-}; +-do { +- _loop_5(); +-} while (1 === 1); +-var _loop_6 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var y = 0; y < 1; ++y) { +- _loop_6(y); +-} +-var _loop_7 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-for (var x = 0, y = 1; x < 1; ++x) { +- _loop_7(x, y); +-} +-var _loop_8 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-while (1 === 1) { +- _loop_8(); +-} +-var _loop_9 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-do { +- _loop_9(); +-} while (1 === 1); +-var _loop_10 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-for (var y = 0; y < 1; ++y) { +- _loop_10(y); +-} +-var _loop_init_1 = function () { +- var y = (use(function () { return y; }), 0); +- out_y_1 = y; +-}; +-var out_y_1; +-_loop_init_1(); +-for (var y = out_y_1; y < 1; ++y) { +-} +-var _loop_11 = function (y) { +- if (inc_1) +- ++y; +- else +- inc_1 = true; +- if (!(use(function () { return y; }), y < 1)) +- return out_y_2 = y, "break"; +- out_y_2 = y; +-}; +-var out_y_2, inc_1 = false; +-for (var y = 0;;) { +- var state_1 = _loop_11(y); +- y = out_y_2; +- if (state_1 === "break") +- break; +-} +-var _loop_12 = function (y) { +- if (inc_2) +- use(function () { return y; }), ++y; +- else +- inc_2 = true; +- out_y_3 = y; +-}; +-var out_y_3, inc_2 = false; +-for (var y = 0; y < 1;) { +- _loop_12(y); +- y = out_y_3; +-} +-var _loop_init_2 = function () { +- var y = (use(function () { return y; }), 0); +- out_y_4 = y; +-}; +-var _loop_13 = function (y) { +- if (inc_3) +- use(function () { return y; }), ++y; +- else +- inc_3 = true; +- if (!(use(function () { return y; }), y < 1)) +- return out_y_4 = y, "break"; +- use(function () { return y; }); +- out_y_4 = y; +-}; +-var out_y_4, inc_3 = false; +-_loop_init_2(); +-for (var y = out_y_4;;) { +- var state_2 = _loop_13(y); +- y = out_y_4; +- if (state_2 === "break") +- break; +-} +-var _loop_14 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; ++for (let x in {}) { ++ (function () { return x; }); ++ (() => x); ++} ++for (let x of []) { ++ (function () { return x; }); ++ (() => x); ++} ++for (let x = 0; x < 1; ++x) { ++ (function () { return x; }); ++ (() => x); ++} ++while (1 === 1) { ++ let x; ++ (function () { return x; }); ++ (() => x); ++} ++do { ++ let x; ++ (function () { return x; }); ++ (() => x); ++} while (1 === 1); ++for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x; }); ++ (() => x); ++} ++for (let x = 0, y = 1; x < 1; ++x) { ++ (function () { return x + y; }); ++ (() => x + y); ++} ++while (1 === 1) { ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++} ++do { ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++} while (1 === 1); ++for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++} ++for (let y = (use(() => y), 0); y < 1; ++y) { ++} ++for (let y = 0; use(() => y), y < 1; ++y) { ++} ++for (let y = 0; y < 1; use(() => y), ++y) { ++} ++for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) { ++ use(() => y); ++} + //=========const +-for (var x in {}) { +- _loop_14(x); +-} +-var _loop_15 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var _b = 0, _c = []; _b < _c.length; _b++) { +- var x = _c[_b]; +- _loop_15(x); +-} +-var _loop_16 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var x = 0; x < 1;) { +- _loop_16(x); +-} +-var _loop_17 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +-}; +-while (1 === 1) { +- _loop_17(); +-} +-var _loop_18 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +-}; +-do { +- _loop_18(); +-} while (1 === 1); +-var _loop_19 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +-}; +-for (var y = 0; y < 1;) { +- _loop_19(y); +-} +-var _loop_20 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-for (var x = 0, y = 1; x < 1;) { +- _loop_20(x, y); +-} +-var _loop_21 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-while (1 === 1) { +- _loop_21(); +-} +-var _loop_22 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-do { +- _loop_22(); +-} while (1 === 1); +-var _loop_23 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +-}; +-for (var y = 0; y < 1;) { +- _loop_23(y); +-} +-var _loop_24 = function (sx) { +- (function () { return sobj[sx]; }); +-}; +-for (var sx in sobj) { +- _loop_24(sx); +-} +-var _loop_25 = function (ix) { +- (function () { return iobj[ix]; }); +-}; +-for (var ix in iobj) { +- _loop_25(ix); ++for (const x in {}) { ++ (function () { return x; }); ++ (() => x); ++} ++for (const x of []) { ++ (function () { return x; }); ++ (() => x); ++} ++for (const x = 0; x < 1;) { ++ (function () { return x; }); ++ (() => x); ++} ++while (1 === 1) { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++} ++do { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++} while (1 === 1); ++for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++} ++for (const x = 0, y = 1; x < 1;) { ++ (function () { return x + y; }); ++ (() => x + y); ++} ++while (1 === 1) { ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++} ++do { ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++} while (1 === 1); ++for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++} ++for (let sx in sobj) { ++ (() => sobj[sx]); ++} ++for (let ix in iobj) { ++ (() => iobj[ix]); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop10.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop10.js.diff new file mode 100644 index 0000000000..d09a12c0da --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop10.js.diff @@ -0,0 +1,124 @@ +--- old.capturedLetConstInLoop10.js ++++ new.capturedLetConstInLoop10.js +@@= skipped -47, +47 lines =@@ + } + + //// [capturedLetConstInLoop10.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { +- var _loop_1 = function (x) { +- var f = function () { return x; }; +- this_1.bar(f()); +- }; +- var this_1 = this; +- for (var _i = 0, _a = [0]; _i < _a.length; _i++) { +- var x = _a[_i]; +- _loop_1(x); +- } +- }; +- A.prototype.bar = function (a) { +- }; +- A.prototype.baz = function () { +- var _loop_2 = function (x) { +- var a = function () { return x; }; +- var _loop_3 = function (y) { +- var b = function () { return y; }; +- this_2.bar(b()); +- }; +- for (var _b = 0, _c = [1]; _b < _c.length; _b++) { +- var y = _c[_b]; +- _loop_3(y); +- } +- this_2.bar(a()); +- }; +- var this_2 = this; +- for (var _i = 0, _a = [1]; _i < _a.length; _i++) { +- var x = _a[_i]; +- _loop_2(x); +- } +- }; +- A.prototype.baz2 = function () { +- var _loop_4 = function (x) { +- var a = function () { return x; }; +- this_3.bar(a()); +- var _loop_5 = function (y) { +- var b = function () { return y; }; +- this_3.bar(b()); +- }; +- for (var _b = 0, _c = [1]; _b < _c.length; _b++) { +- var y = _c[_b]; +- _loop_5(y); +- } +- }; +- var this_3 = this; +- for (var _i = 0, _a = [1]; _i < _a.length; _i++) { +- var x = _a[_i]; +- _loop_4(x); +- } +- }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.foo = function () { +- var _this = this; +- var a = function () { +- var _loop_6 = function (x) { +- var f = function () { return x; }; +- _this.bar(f()); +- }; +- for (var _i = 0, _a = [0]; _i < _a.length; _i++) { +- var x = _a[_i]; +- _loop_6(x); +- } +- }; +- }; +- B.prototype.bar = function (a) { +- }; +- return B; +-}()); ++class A { ++ foo() { ++ for (let x of [0]) { ++ let f = function () { return x; }; ++ this.bar(f()); ++ } ++ } ++ bar(a) { ++ } ++ baz() { ++ for (let x of [1]) { ++ let a = function () { return x; }; ++ for (let y of [1]) { ++ let b = function () { return y; }; ++ this.bar(b()); ++ } ++ this.bar(a()); ++ } ++ } ++ baz2() { ++ for (let x of [1]) { ++ let a = function () { return x; }; ++ this.bar(a()); ++ for (let y of [1]) { ++ let b = function () { return y; }; ++ this.bar(b()); ++ } ++ } ++ } ++} ++class B { ++ foo() { ++ let a = () => { ++ for (let x of [0]) { ++ let f = () => x; ++ this.bar(f()); ++ } ++ }; ++ } ++ bar(a) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop11.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop11.js.diff new file mode 100644 index 0000000000..54be650a1a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop11.js.diff @@ -0,0 +1,31 @@ +--- old.capturedLetConstInLoop11.js ++++ new.capturedLetConstInLoop11.js +@@= skipped -15, +15 lines =@@ + } + + //// [capturedLetConstInLoop11.js] +-var _loop_1 = function () { +- var x = 1; +- (function () { return x; }); +-}; + for (;;) { +- _loop_1(); ++ let x = 1; ++ () => x; + } + function foo() { +- var _loop_2 = function () { +- var a = 0; ++ for (;;) { ++ const a = 0; + switch (a) { +- case 0: return { value: function () { return a; } }; ++ case 0: return () => a; + } +- }; +- for (;;) { +- var state_1 = _loop_2(); +- if (typeof state_1 === "object") +- return state_1.value; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop12.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop12.js.diff index ef038f19f1..f17db2622c 100644 --- a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop12.js.diff +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop12.js.diff @@ -4,13 +4,37 @@ //// [capturedLetConstInLoop12.js] (function () { "use strict"; +- var _loop_1 = function (i) { +- (function () { +- var _a; +- return _a = [i + 1], i = _a[0], _a; +- })(); +- out_i_1 = i; +- }; +- var out_i_1; +- for (var i = 0; i < 4; i++) { +- _loop_1(i); +- i = out_i_1; + "use strict"; - for (let i = 0; i < 4; i++) { - (() => [i] = [i + 1])(); ++ for (let i = 0; i < 4; i++) { ++ (() => [i] = [i + 1])(); } })(); (function () { -+ "use strict"; "use strict"; - for (let i = 0; i < 4; i++) { - (() => ({ a: i } = { a: i + 1 }))(); \ No newline at end of file +- var _loop_2 = function (i) { +- (function () { +- var _a; +- return (_a = { a: i + 1 }, i = _a.a, _a); +- })(); +- out_i_2 = i; +- }; +- var out_i_2; +- for (var i = 0; i < 4; i++) { +- _loop_2(i); +- i = out_i_2; ++ "use strict"; ++ for (let i = 0; i < 4; i++) { ++ (() => ({ a: i } = { a: i + 1 }))(); + } + })(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop13.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop13.js.diff new file mode 100644 index 0000000000..bddda8209b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop13.js.diff @@ -0,0 +1,45 @@ +--- old.capturedLetConstInLoop13.js ++++ new.capturedLetConstInLoop13.js +@@= skipped -24, +24 lines =@@ + new Main(); + + //// [capturedLetConstInLoop13.js] +-var Main = /** @class */ (function () { +- function Main() { ++class Main { ++ constructor() { + this.register("a", "b", "c"); + } +- Main.prototype.register = function () { +- var _this = this; +- var names = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- names[_i] = arguments[_i]; +- } +- var _loop_1 = function (name_1) { +- var _b; +- this_1.bar((_b = {}, +- _b[name_1 + ".a"] = function () { _this.foo(name_1); }, +- _b)); +- }; +- var this_1 = this; +- for (var _a = 0, names_1 = names; _a < names_1.length; _a++) { +- var name_1 = names_1[_a]; +- _loop_1(name_1); +- } +- }; +- Main.prototype.bar = function (a) { }; +- Main.prototype.foo = function (name) { }; +- return Main; +-}()); ++ register(...names) { ++ for (let name of names) { ++ this.bar({ ++ [name + ".a"]: () => { this.foo(name); }, ++ }); ++ } ++ } ++ bar(a) { } ++ foo(name) { } ++} + new Main(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop14.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop14.js.diff index 049deb24aa..d3ba4333af 100644 --- a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop14.js.diff +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop14.js.diff @@ -7,4 +7,19 @@ -"use strict"; function use(v) { } function foo(x) { - var v = 1; \ No newline at end of file + var v = 1; +- var _loop_1 = function () { +- var x_1 = v; +- v = 2; +- (function () { return x_1 + v; }); +- }; +- var v, v; + do { +- _loop_1(); ++ let x = v; ++ var v; ++ var v = 2; ++ () => x + v; + } while (false); + use(v); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop2.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop2.js.diff new file mode 100644 index 0000000000..8e87c6deca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop2.js.diff @@ -0,0 +1,320 @@ +--- old.capturedLetConstInLoop2.js ++++ new.capturedLetConstInLoop2.js +@@= skipped -178, +178 lines =@@ + //// [capturedLetConstInLoop2.js] + // ========let + function foo0(x) { +- var _loop_1 = function (x_1) { +- var a = arguments_1.length; +- (function () { return x_1 + a; }); +- (function () { return x_1 + a; }); +- }; +- var arguments_1 = arguments; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_1 = _a[_i]; +- _loop_1(x_1); ++ for (let x of []) { ++ let a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo0_1(x) { +- var _loop_2 = function (x_2) { +- var a = arguments_2.length; +- (function () { return x_2 + a; }); +- (function () { return x_2 + a; }); +- }; +- var arguments_2 = arguments; +- for (var x_2 in []) { +- _loop_2(x_2); ++ for (let x in []) { ++ let a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo1(x) { +- var _loop_3 = function (x_3) { +- var a = arguments_3.length; +- (function () { return x_3 + a; }); +- (function () { return x_3 + a; }); +- }; +- var arguments_3 = arguments; +- for (var x_3 = 0; x_3 < 1; ++x_3) { +- _loop_3(x_3); ++ for (let x = 0; x < 1; ++x) { ++ let a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo2(x) { +- var _loop_4 = function () { +- var a = arguments_4.length; +- (function () { return x + a; }); +- (function () { return x + a; }); +- }; +- var arguments_4 = arguments; + while (1 === 1) { +- _loop_4(); ++ let a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo3(x) { +- var _loop_5 = function () { +- var x_4; +- var a = arguments_5.length; +- (function () { return x_4 + a; }); +- (function () { return x_4 + a; }); +- }; +- var arguments_5 = arguments; + do { +- _loop_5(); ++ let x; ++ let a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } while (1 === 1); + } + function foo4(x) { +- var _loop_6 = function (y) { +- var a = arguments_6.length; +- var x_5 = 1; +- (function () { return x_5 + a; }); +- (function () { return x_5 + a; }); +- }; +- var arguments_6 = arguments; +- for (var y = 0; y < 1; ++y) { +- _loop_6(y); ++ for (let y = 0; y < 1; ++y) { ++ let a = arguments.length; ++ let x = 1; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo5(x) { +- var _loop_7 = function (x_6, y) { +- var a = arguments_7.length; +- (function () { return x_6 + y + a; }); +- (function () { return x_6 + y + a; }); +- }; +- var arguments_7 = arguments; +- for (var x_6 = 0, y = 1; x_6 < 1; ++x_6) { +- _loop_7(x_6, y); ++ for (let x = 0, y = 1; x < 1; ++x) { ++ let a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } + function foo6(x) { +- var _loop_8 = function () { +- var x_7, y; +- var a = arguments_8.length; +- (function () { return x_7 + y + a; }); +- (function () { return x_7 + y + a; }); +- }; +- var arguments_8 = arguments; + while (1 === 1) { +- _loop_8(); ++ let x, y; ++ let a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } + function foo7(x) { +- var _loop_9 = function () { +- var x_8, y; +- var a = arguments_9.length; +- (function () { return x_8 + y + a; }); +- (function () { return x_8 + y + a; }); +- }; +- var arguments_9 = arguments; + do { +- _loop_9(); ++ let x, y; ++ let a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } while (1 === 1); + } + function foo8(x) { +- var _loop_10 = function (y) { +- var x_9 = 1; +- var a = arguments_10.length; +- (function () { return x_9 + y + a; }); +- (function () { return x_9 + y + a; }); +- }; +- var arguments_10 = arguments; +- for (var y = 0; y < 1; ++y) { +- _loop_10(y); ++ for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ let a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } + ///=======const + function foo0_c(x) { +- var _loop_11 = function (x_10) { +- var a = arguments_11.length; +- (function () { return x_10 + a; }); +- (function () { return x_10 + a; }); +- }; +- var arguments_11 = arguments; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_10 = _a[_i]; +- _loop_11(x_10); ++ for (const x of []) { ++ const a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo0_1_c(x) { +- var _loop_12 = function (x_11) { +- var a = arguments_12.length; +- (function () { return x_11 + a; }); +- (function () { return x_11 + a; }); +- }; +- var arguments_12 = arguments; +- for (var x_11 in []) { +- _loop_12(x_11); ++ for (const x in []) { ++ const a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo1_c(x) { +- var _loop_13 = function (x_12) { +- var a = arguments_13.length; +- (function () { return x_12 + a; }); +- (function () { return x_12 + a; }); +- }; +- var arguments_13 = arguments; +- for (var x_12 = 0; x_12 < 1;) { +- _loop_13(x_12); ++ for (const x = 0; x < 1;) { ++ const a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo2_c(x) { +- var _loop_14 = function () { +- var a = arguments_14.length; +- (function () { return x + a; }); +- (function () { return x + a; }); +- }; +- var arguments_14 = arguments; + while (1 === 1) { +- _loop_14(); ++ const a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo3_c(x) { +- var _loop_15 = function () { +- var x_13 = 1; +- var a = arguments_15.length; +- (function () { return x_13 + a; }); +- (function () { return x_13 + a; }); +- }; +- var arguments_15 = arguments; + do { +- _loop_15(); ++ const x = 1; ++ const a = arguments.length; ++ (function () { return x + a; }); ++ (() => x + a); + } while (1 === 1); + } + function foo4_c(x) { +- var _loop_16 = function (y) { +- var a = arguments_16.length; +- var x_14 = 1; +- (function () { return x_14 + a; }); +- (function () { return x_14 + a; }); +- }; +- var arguments_16 = arguments; +- for (var y = 0; y < 1;) { +- _loop_16(y); ++ for (const y = 0; y < 1;) { ++ const a = arguments.length; ++ const x = 1; ++ (function () { return x + a; }); ++ (() => x + a); + } + } + function foo5_c(x) { +- var _loop_17 = function (x_15, y) { +- var a = arguments_17.length; +- (function () { return x_15 + y + a; }); +- (function () { return x_15 + y + a; }); +- }; +- var arguments_17 = arguments; +- for (var x_15 = 0, y = 1; x_15 < 1;) { +- _loop_17(x_15, y); ++ for (const x = 0, y = 1; x < 1;) { ++ const a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } + function foo6_c(x) { +- var _loop_18 = function () { +- var x_16 = 1, y = 1; +- var a = arguments_18.length; +- (function () { return x_16 + y + a; }); +- (function () { return x_16 + y + a; }); +- }; +- var arguments_18 = arguments; + while (1 === 1) { +- _loop_18(); ++ const x = 1, y = 1; ++ const a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } + function foo7_c(x) { +- var _loop_19 = function () { +- var x_17 = 1, y = 1; +- var a = arguments_19.length; +- (function () { return x_17 + y + a; }); +- (function () { return x_17 + y + a; }); +- }; +- var arguments_19 = arguments; + do { +- _loop_19(); ++ const x = 1, y = 1; ++ const a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } while (1 === 1); + } + function foo8_c(x) { +- var _loop_20 = function (y) { +- var x_18 = 1; +- var a = arguments_20.length; +- (function () { return x_18 + y + a; }); +- (function () { return x_18 + y + a; }); +- }; +- var arguments_20 = arguments; +- for (var y = 0; y < 1;) { +- _loop_20(y); ++ for (const y = 0; y < 1;) { ++ const x = 1; ++ const a = arguments.length; ++ (function () { return x + y + a; }); ++ (() => x + y + a); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop3.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop3.js.diff new file mode 100644 index 0000000000..9cb6d7c2f1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop3.js.diff @@ -0,0 +1,342 @@ +--- old.capturedLetConstInLoop3.js ++++ new.capturedLetConstInLoop3.js +@@= skipped -220, +220 lines =@@ + + //// [capturedLetConstInLoop3.js] + function foo0(x) { +- var _loop_1 = function (x_1) { +- v = x_1; +- (function () { return x_1 + v; }); +- (function () { return x_1 + v; }); +- }; +- var v; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_1 = _a[_i]; +- _loop_1(x_1); ++ for (let x of []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo0_1(x) { +- var _loop_2 = function (x_2) { +- v = x_2; +- (function () { return x_2 + v; }); +- (function () { return x_2 + v; }); +- }; +- var v; +- for (var x_2 in []) { +- _loop_2(x_2); ++ for (let x in []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo1(x) { +- var _loop_3 = function (x_3) { +- v = x_3; +- (function () { return x_3 + v; }); +- (function () { return x_3 + v; }); +- }; +- var v; +- for (var x_3 = 0; x_3 < 1; ++x_3) { +- _loop_3(x_3); ++ for (let x = 0; x < 1; ++x) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo2(x) { +- var _loop_4 = function () { +- var x_4 = 1; +- v = x_4; +- (function () { return x_4 + v; }); +- (function () { return x_4 + v; }); +- }; +- var v; + while (1 === 1) { +- _loop_4(); ++ let x = 1; ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo3(x) { +- var _loop_5 = function () { +- var x_5; +- (function () { return x_5 + v; }); +- (function () { return x_5 + v; }); +- }; +- var v; + do { +- _loop_5(); ++ let x; ++ var v; ++ (function () { return x + v; }); ++ (() => x + v); + } while (1 === 1); + use(v); + } + function foo4(x) { +- var _loop_6 = function (y) { +- v = y; +- var x_6 = 1; +- (function () { return x_6 + v; }); +- (function () { return x_6 + v; }); +- }; +- var v; +- for (var y = 0; y < 1; ++y) { +- _loop_6(y); ++ for (let y = 0; y < 1; ++y) { ++ var v = y; ++ let x = 1; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo5(x) { +- var _loop_7 = function (x_7, y) { +- v = x_7; +- (function () { return x_7 + y + v; }); +- (function () { return x_7 + y + v; }); +- }; +- var v; +- for (var x_7 = 0, y = 1; x_7 < 1; ++x_7) { +- _loop_7(x_7, y); ++ for (let x = 0, y = 1; x < 1; ++x) { ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } + function foo6(x) { +- var _loop_8 = function () { +- var x_8, y; +- v = x_8; +- (function () { return x_8 + y + v; }); +- (function () { return x_8 + y + v; }); +- }; +- var v; + while (1 === 1) { +- _loop_8(); ++ let x, y; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } + function foo7(x) { +- var _loop_9 = function () { +- var x_9, y; +- v = x_9; +- (function () { return x_9 + y + v; }); +- (function () { return x_9 + y + v; }); +- }; +- var v; + do { +- _loop_9(); ++ let x, y; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } while (1 === 1); + use(v); + } + function foo8(x) { +- var _loop_10 = function (y) { +- var x_10 = 1; +- v = x_10; +- (function () { return x_10 + y + v; }); +- (function () { return x_10 + y + v; }); +- }; +- var v; +- for (var y = 0; y < 1; ++y) { +- _loop_10(y); ++ for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } + //===const + function foo0_c(x) { +- var _loop_11 = function (x_11) { +- v = x_11; +- (function () { return x_11 + v; }); +- (function () { return x_11 + v; }); +- }; +- var v; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_11 = _a[_i]; +- _loop_11(x_11); ++ for (const x of []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo0_1_c(x) { +- var _loop_12 = function (x_12) { +- v = x_12; +- (function () { return x_12 + v; }); +- (function () { return x_12 + v; }); +- }; +- var v; +- for (var x_12 in []) { +- _loop_12(x_12); ++ for (const x in []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo1_c(x) { +- var _loop_13 = function (x_13) { +- v = x_13; +- (function () { return x_13 + v; }); +- (function () { return x_13 + v; }); +- }; +- var v; +- for (var x_13 = 0; x_13 < 1;) { +- _loop_13(x_13); ++ for (const x = 0; x < 1;) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo2_c(x) { +- var _loop_14 = function () { +- var x_14 = 1; +- v = x_14; +- (function () { return x_14 + v; }); +- (function () { return x_14 + v; }); +- }; +- var v; + while (1 === 1) { +- _loop_14(); ++ const x = 1; ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo3_c(x) { +- var _loop_15 = function () { +- var x_15 = 1; +- (function () { return x_15 + v; }); +- (function () { return x_15 + v; }); +- }; +- var v; + do { +- _loop_15(); ++ const x = 1; ++ var v; ++ (function () { return x + v; }); ++ (() => x + v); + } while (1 === 1); + use(v); + } + function foo4_c(x) { +- var _loop_16 = function (y) { +- v = y; +- var x_16 = 1; +- (function () { return x_16 + v; }); +- (function () { return x_16 + v; }); +- }; +- var v; +- for (var y = 0; y < 1;) { +- _loop_16(y); ++ for (const y = 0; y < 1;) { ++ var v = y; ++ const x = 1; ++ (function () { return x + v; }); ++ (() => x + v); + } + use(v); + } + function foo5_c(x) { +- var _loop_17 = function (x_17, y) { +- v = x_17; +- (function () { return x_17 + y + v; }); +- (function () { return x_17 + y + v; }); +- }; +- var v; +- for (var x_17 = 0, y = 1; x_17 < 1;) { +- _loop_17(x_17, y); ++ for (const x = 0, y = 1; x < 1;) { ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } + function foo6_c(x) { +- var _loop_18 = function () { +- var x_18 = 1, y = 1; +- v = x_18; +- (function () { return x_18 + y + v; }); +- (function () { return x_18 + y + v; }); +- }; +- var v; + while (1 === 1) { +- _loop_18(); ++ const x = 1, y = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } + function foo7_c(x) { +- var _loop_19 = function () { +- var x_19 = 1, y = 1; +- v = x_19; +- (function () { return x_19 + y + v; }); +- (function () { return x_19 + y + v; }); +- }; +- var v; + do { +- _loop_19(); ++ const x = 1, y = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } while (1 === 1); + use(v); + } + function foo8_c(x) { +- var _loop_20 = function (y) { +- var x_20 = 1; +- v = x_20; +- (function () { return x_20 + y + v; }); +- (function () { return x_20 + y + v; }); +- }; +- var v; +- for (var y = 0; y < 1;) { +- _loop_20(y); ++ for (const y = 0; y < 1;) { ++ const x = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); + } + use(v); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop5.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop5.js.diff new file mode 100644 index 0000000000..c9a72a9db7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop5.js.diff @@ -0,0 +1,491 @@ +--- old.capturedLetConstInLoop5.js ++++ new.capturedLetConstInLoop5.js +@@= skipped -283, +283 lines =@@ + //// [capturedLetConstInLoop5.js] + //====let + function foo0(x) { +- var _loop_1 = function (x_1) { +- v = x_1; +- (function () { return x_1 + v; }); +- (function () { return x_1 + v; }); +- if (x_1 == 1) { +- return { value: void 0 }; ++ for (let x of []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_1 = _a[_i]; +- var state_1 = _loop_1(x_1); +- if (typeof state_1 === "object") +- return state_1.value; + } + use(v); + } + function foo00(x) { +- var _loop_2 = function (x_2) { +- v = x_2; +- (function () { return x_2 + v; }); +- (function () { return x_2 + v; }); +- if (x_2 == "1") { +- return { value: void 0 }; ++ for (let x in []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == "1") { ++ return; + } +- }; +- var v; +- for (var x_2 in []) { +- var state_2 = _loop_2(x_2); +- if (typeof state_2 === "object") +- return state_2.value; + } + use(v); + } + function foo1(x) { +- var _loop_3 = function (x_3) { +- v = x_3; +- (function () { return x_3 + v; }); +- (function () { return x_3 + v; }); +- if (x_3 == 1) { +- return { value: void 0 }; ++ for (let x = 0; x < 1; ++x) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var x_3 = 0; x_3 < 1; ++x_3) { +- var state_3 = _loop_3(x_3); +- if (typeof state_3 === "object") +- return state_3.value; + } + use(v); + } + function foo2(x) { +- var _loop_4 = function () { +- var x_4 = 1; +- v = x_4; +- (function () { return x_4 + v; }); +- (function () { return x_4 + v; }); +- if (x_4 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + while (1 === 1) { +- var state_4 = _loop_4(); +- if (typeof state_4 === "object") +- return state_4.value; ++ let x = 1; ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; ++ } + } + use(v); + } + function foo3(x) { +- var _loop_5 = function () { +- var x_5; +- (function () { return x_5 + v; }); +- (function () { return x_5 + v; }); +- if (x_5 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + do { +- var state_5 = _loop_5(); +- if (typeof state_5 === "object") +- return state_5.value; ++ let x; ++ var v; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; ++ } + } while (1 === 1); + use(v); + } + function foo4(x) { +- var _loop_6 = function (y) { +- v = y; +- var x_6 = 1; +- (function () { return x_6 + v; }); +- (function () { return x_6 + v; }); +- if (x_6 == 1) { +- return { value: void 0 }; ++ for (let y = 0; y < 1; ++y) { ++ var v = y; ++ let x = 1; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var y = 0; y < 1; ++y) { +- var state_6 = _loop_6(y); +- if (typeof state_6 === "object") +- return state_6.value; + } + use(v); + } + function foo5(x) { +- var _loop_7 = function (x_7, y) { +- v = x_7; +- (function () { return x_7 + y + v; }); +- (function () { return x_7 + y + v; }); +- if (x_7 == 1) { +- return { value: void 0 }; ++ for (let x = 0, y = 1; x < 1; ++x) { ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var x_7 = 0, y = 1; x_7 < 1; ++x_7) { +- var state_7 = _loop_7(x_7, y); +- if (typeof state_7 === "object") +- return state_7.value; + } + use(v); + } + function foo6(x) { +- var _loop_8 = function () { +- var x_8, y; +- v = x_8; +- (function () { return x_8 + y + v; }); +- (function () { return x_8 + y + v; }); +- if (x_8 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + while (1 === 1) { +- var state_8 = _loop_8(); +- if (typeof state_8 === "object") +- return state_8.value; ++ let x, y; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; ++ } + } + ; + use(v); + } + function foo7(x) { +- var _loop_9 = function () { +- var x_9, y; +- v = x_9; +- (function () { return x_9 + y + v; }); +- (function () { return x_9 + y + v; }); +- if (x_9 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + do { +- var state_9 = _loop_9(); +- if (typeof state_9 === "object") +- return state_9.value; ++ let x, y; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; ++ } + } while (1 === 1); + use(v); + } + function foo8(x) { +- var _loop_10 = function (y) { +- var x_10 = 1; +- v = x_10; +- (function () { return x_10 + y + v; }); +- (function () { return x_10 + y + v; }); +- if (x_10 == 1) { +- return { value: void 0 }; ++ for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var y = 0; y < 1; ++y) { +- var state_10 = _loop_10(y); +- if (typeof state_10 === "object") +- return state_10.value; + } + use(v); + } + //====const + function foo0_c(x) { +- var _loop_11 = function (x_11) { +- v = x_11; +- (function () { return x_11 + v; }); +- (function () { return x_11 + v; }); +- if (x_11 == 1) { +- return { value: void 0 }; ++ for (const x of []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_11 = _a[_i]; +- var state_11 = _loop_11(x_11); +- if (typeof state_11 === "object") +- return state_11.value; + } + use(v); + } + function foo00_c(x) { +- var _loop_12 = function (x_12) { +- v = x_12; +- (function () { return x_12 + v; }); +- (function () { return x_12 + v; }); +- if (x_12 == "1") { +- return { value: void 0 }; ++ for (const x in []) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == "1") { ++ return; + } +- }; +- var v; +- for (var x_12 in []) { +- var state_12 = _loop_12(x_12); +- if (typeof state_12 === "object") +- return state_12.value; + } + use(v); + } + function foo1_c(x) { +- var _loop_13 = function (x_13) { +- v = x_13; +- (function () { return x_13 + v; }); +- (function () { return x_13 + v; }); +- if (x_13 == 1) { +- return { value: void 0 }; ++ for (const x = 0; x < 1;) { ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var x_13 = 0; x_13 < 1;) { +- var state_13 = _loop_13(x_13); +- if (typeof state_13 === "object") +- return state_13.value; + } + use(v); + } + function foo2_c(x) { +- var _loop_14 = function () { +- var x_14 = 1; +- v = x_14; +- (function () { return x_14 + v; }); +- (function () { return x_14 + v; }); +- if (x_14 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + while (1 === 1) { +- var state_14 = _loop_14(); +- if (typeof state_14 === "object") +- return state_14.value; ++ const x = 1; ++ var v = x; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; ++ } + } + use(v); + } + function foo3_c(x) { +- var _loop_15 = function () { +- var x_15 = 1; +- (function () { return x_15 + v; }); +- (function () { return x_15 + v; }); +- if (x_15 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + do { +- var state_15 = _loop_15(); +- if (typeof state_15 === "object") +- return state_15.value; ++ const x = 1; ++ var v; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; ++ } + } while (1 === 1); + use(v); + } + function foo4_c(x) { +- var _loop_16 = function (y) { +- v = y; +- var x_16 = 1; +- (function () { return x_16 + v; }); +- (function () { return x_16 + v; }); +- if (x_16 == 1) { +- return { value: void 0 }; ++ for (const y = 0; y < 1;) { ++ var v = y; ++ let x = 1; ++ (function () { return x + v; }); ++ (() => x + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var y = 0; y < 1;) { +- var state_16 = _loop_16(y); +- if (typeof state_16 === "object") +- return state_16.value; + } + use(v); + } + function foo5_c(x) { +- var _loop_17 = function (x_17, y) { +- v = x_17; +- (function () { return x_17 + y + v; }); +- (function () { return x_17 + y + v; }); +- if (x_17 == 1) { +- return { value: void 0 }; ++ for (const x = 0, y = 1; x < 1;) { ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var x_17 = 0, y = 1; x_17 < 1;) { +- var state_17 = _loop_17(x_17, y); +- if (typeof state_17 === "object") +- return state_17.value; + } + use(v); + } + function foo6_c(x) { +- var _loop_18 = function () { +- var x_18 = 1, y = 1; +- v = x_18; +- (function () { return x_18 + y + v; }); +- (function () { return x_18 + y + v; }); +- if (x_18 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + while (1 === 1) { +- var state_18 = _loop_18(); +- if (typeof state_18 === "object") +- return state_18.value; ++ const x = 1, y = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; ++ } + } + use(v); + } + function foo7_c(x) { +- var _loop_19 = function () { +- var x_19 = 1, y = 1; +- v = x_19; +- (function () { return x_19 + y + v; }); +- (function () { return x_19 + y + v; }); +- if (x_19 == 1) { +- return { value: void 0 }; +- } +- }; +- var v; + do { +- var state_19 = _loop_19(); +- if (typeof state_19 === "object") +- return state_19.value; ++ const x = 1, y = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; ++ } + } while (1 === 1); + use(v); + } + function foo8_c(x) { +- var _loop_20 = function (y) { +- var x_20 = 1; +- v = x_20; +- (function () { return x_20 + y + v; }); +- (function () { return x_20 + y + v; }); +- if (x_20 == 1) { +- return { value: void 0 }; ++ for (const y = 0; y < 1;) { ++ const x = 1; ++ var v = x; ++ (function () { return x + y + v; }); ++ (() => x + y + v); ++ if (x == 1) { ++ return; + } +- }; +- var v; +- for (var y = 0; y < 1;) { +- var state_20 = _loop_20(y); +- if (typeof state_20 === "object") +- return state_20.value; + } + use(v); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop6.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop6.js.diff new file mode 100644 index 0000000000..53b5db8206 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop6.js.diff @@ -0,0 +1,523 @@ +--- old.capturedLetConstInLoop6.js ++++ new.capturedLetConstInLoop6.js +@@= skipped -240, +240 lines =@@ + + + //// [capturedLetConstInLoop6.js] +-var _loop_1 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; + // ====let +-for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x = _a[_i]; +- var state_1 = _loop_1(x); +- if (state_1 === "break") ++for (let x of []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; ++ } ++ if (x == 2) { ++ continue; ++ } + } +-var _loop_2 = function (x) { +- (function () { return x; }); +- (function () { return x; }); ++for (let x in []) { ++ (function () { return x; }); ++ (() => x); + if (x == "1") { +- return "break"; ++ break; + } + if (x == "2") { +- return "continue"; +- } +-}; +-for (var x in []) { +- var state_2 = _loop_2(x); +- if (state_2 === "break") +- break; +-} +-var _loop_3 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var x = 0; x < 1; ++x) { +- var state_3 = _loop_3(x); +- if (state_3 === "break") +- break; +-} +-var _loop_4 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-while (1 === 1) { +- var state_4 = _loop_4(); +- if (state_4 === "break") +- break; +-} +-var _loop_5 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-do { +- var state_5 = _loop_5(); +- if (state_5 === "break") +- break; +-} while (1 === 1); +-var _loop_6 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var y = 0; y < 1; ++y) { +- var state_6 = _loop_6(y); +- if (state_6 === "break") +- break; +-} +-var _loop_7 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var x = 0, y = 1; x < 1; ++x) { +- var state_7 = _loop_7(x, y); +- if (state_7 === "break") +- break; +-} +-var _loop_8 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-while (1 === 1) { +- var state_8 = _loop_8(); +- if (state_8 === "break") +- break; +-} +-var _loop_9 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-do { +- var state_9 = _loop_9(); +- if (state_9 === "break") +- break; +-} while (1 === 1); +-var _loop_10 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var y = 0; y < 1; ++y) { +- var state_10 = _loop_10(y); +- if (state_10 === "break") +- break; +-} +-var _loop_11 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; ++ continue; ++ } ++} ++for (let x = 0; x < 1; ++x) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++while (1 === 1) { ++ let x; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++do { ++ let x; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} while (1 === 1); ++for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++for (let x = 0, y = 1; x < 1; ++x) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++while (1 === 1) { ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++do { ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} while (1 === 1); ++for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} + // ====const +-for (var _b = 0, _c = []; _b < _c.length; _b++) { +- var x = _c[_b]; +- var state_11 = _loop_11(x); +- if (state_11 === "break") ++for (const x of []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; ++ } ++ if (x == 2) { ++ continue; ++ } + } +-var _loop_12 = function (x) { +- (function () { return x; }); +- (function () { return x; }); ++for (const x in []) { ++ (function () { return x; }); ++ (() => x); + if (x == "1") { +- return "break"; ++ break; + } + if (x == "2") { +- return "continue"; +- } +-}; +-for (var x in []) { +- var state_12 = _loop_12(x); +- if (state_12 === "break") +- break; +-} +-var _loop_13 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var x = 0; x < 1;) { +- var state_13 = _loop_13(x); +- if (state_13 === "break") +- break; +-} +-var _loop_14 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-while (1 === 1) { +- var state_14 = _loop_14(); +- if (state_14 === "break") +- break; +-} +-var _loop_15 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-do { +- var state_15 = _loop_15(); +- if (state_15 === "break") +- break; +-} while (1 === 1); +-var _loop_16 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var y = 0; y < 1;) { +- var state_16 = _loop_16(y); +- if (state_16 === "break") +- break; +-} +-var _loop_17 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var x = 0, y = 1; x < 1;) { +- var state_17 = _loop_17(x, y); +- if (state_17 === "break") +- break; +-} +-var _loop_18 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-while (1 === 1) { +- var state_18 = _loop_18(); +- if (state_18 === "break") +- break; +-} +-var _loop_19 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-do { +- var state_19 = _loop_19(); +- if (state_19 === "break") +- break; +-} while (1 === 1); +-var _loop_20 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 2) { +- return "continue"; +- } +-}; +-for (var y = 0; y < 1;) { +- var state_20 = _loop_20(y); +- if (state_20 === "break") +- break; ++ continue; ++ } ++} ++for (const x = 0; x < 1;) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++while (1 === 1) { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++do { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} while (1 === 1); ++for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++for (const x = 0, y = 1; x < 1;) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++while (1 === 1) { ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} ++do { ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } ++} while (1 === 1); ++for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 2) { ++ continue; ++ } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop7.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop7.js.diff new file mode 100644 index 0000000000..e90c60b29e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop7.js.diff @@ -0,0 +1,816 @@ +--- old.capturedLetConstInLoop7.js ++++ new.capturedLetConstInLoop7.js +@@= skipped -377, +377 lines =@@ + } + + //// [capturedLetConstInLoop7.js] +-var _loop_1 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l0"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l0"; +- } +-}; + //===let +-l0: for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x = _a[_i]; +- var state_1 = _loop_1(x); +- if (state_1 === "break") +- break; +- switch (state_1) { +- case "break-l0": break l0; +- case "continue-l0": continue l0; +- } +-} +-var _loop_2 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == "1") { +- return "break"; +- } +- if (x == "1") { +- return "break-l00"; +- } +- if (x == "2") { +- return "continue"; +- } +- if (x == "2") { +- return "continue-l00"; +- } +-}; +-l00: for (var x in []) { +- var state_2 = _loop_2(x); +- if (state_2 === "break") +- break; +- switch (state_2) { +- case "break-l00": break l00; +- case "continue-l00": continue l00; +- } +-} +-var _loop_3 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l1"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1"; +- } +-}; +-l1: for (var x = 0; x < 1; ++x) { +- var state_3 = _loop_3(x); +- if (state_3 === "break") +- break; +- switch (state_3) { +- case "break-l1": break l1; +- case "continue-l1": continue l1; +- } +-} +-var _loop_4 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l2"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l2"; +- } +-}; ++l0: for (let x of []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l0; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l0; ++ } ++} ++l00: for (let x in []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == "1") { ++ break; ++ } ++ if (x == "1") { ++ break l00; ++ } ++ if (x == "2") { ++ continue; ++ } ++ if (x == "2") { ++ continue l00; ++ } ++} ++l1: for (let x = 0; x < 1; ++x) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l1; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1; ++ } ++} + l2: while (1 === 1) { +- var state_4 = _loop_4(); +- if (state_4 === "break") ++ let x; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; +- switch (state_4) { +- case "break-l2": break l2; +- case "continue-l2": continue l2; ++ } ++ if (x == 1) { ++ break l2; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l2; + } + } +-var _loop_5 = function () { +- var x; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l3"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l3"; +- } +-}; + l3: do { +- var state_5 = _loop_5(); +- if (state_5 === "break") ++ let x; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; +- switch (state_5) { +- case "break-l3": break l3; +- case "continue-l3": continue l3; ++ } ++ if (x == 1) { ++ break l3; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l3; + } + } while (1 === 1); +-var _loop_6 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l4"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l4"; +- } +-}; +-l4: for (var y = 0; y < 1; ++y) { +- var state_6 = _loop_6(y); +- if (state_6 === "break") +- break; +- switch (state_6) { +- case "break-l4": break l4; +- case "continue-l4": continue l4; +- } +-} +-var _loop_7 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l5"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l5"; +- } +-}; +-l5: for (var x = 0, y = 1; x < 1; ++x) { +- var state_7 = _loop_7(x, y); +- if (state_7 === "break") +- break; +- switch (state_7) { +- case "break-l5": break l5; +- case "continue-l5": continue l5; +- } +-} +-var _loop_8 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l6"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l6"; +- } +-}; ++l4: for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l4; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l4; ++ } ++} ++l5: for (let x = 0, y = 1; x < 1; ++x) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l5; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l5; ++ } ++} + l6: while (1 === 1) { +- var state_8 = _loop_8(); +- if (state_8 === "break") ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_8) { +- case "break-l6": break l6; +- case "continue-l6": continue l6; ++ } ++ if (x == 1) { ++ break l6; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l6; + } + } +-var _loop_9 = function () { +- var x, y; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l7"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l7"; +- } +-}; + l7: do { +- var state_9 = _loop_9(); +- if (state_9 === "break") ++ let x, y; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_9) { +- case "break-l7": break l7; +- case "continue-l7": continue l7; ++ } ++ if (x == 1) { ++ break l7; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l7; + } + } while (1 === 1); +-var _loop_10 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l8"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l8"; +- } +-}; +-l8: for (var y = 0; y < 1; ++y) { +- var state_10 = _loop_10(y); +- if (state_10 === "break") ++l8: for (let y = 0; y < 1; ++y) { ++ let x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_10) { +- case "break-l8": break l8; +- case "continue-l8": continue l8; ++ } ++ if (x == 1) { ++ break l8; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l8; + } + } +-var _loop_11 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l0_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l0_c"; +- } +-}; + //===const +-l0_c: for (var _b = 0, _c = []; _b < _c.length; _b++) { +- var x = _c[_b]; +- var state_11 = _loop_11(x); +- if (state_11 === "break") +- break; +- switch (state_11) { +- case "break-l0_c": break l0_c; +- case "continue-l0_c": continue l0_c; +- } +-} +-var _loop_12 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == "1") { +- return "break"; +- } +- if (x == "1") { +- return "break-l00_c"; +- } +- if (x == "2") { +- return "continue"; +- } +- if (x == "2") { +- return "continue-l00_c"; +- } +-}; +-l00_c: for (var x in []) { +- var state_12 = _loop_12(x); +- if (state_12 === "break") +- break; +- switch (state_12) { +- case "break-l00_c": break l00_c; +- case "continue-l00_c": continue l00_c; +- } +-} +-var _loop_13 = function (x) { +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l1_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1_c"; +- } +-}; +-l1_c: for (var x = 0; x < 1;) { +- var state_13 = _loop_13(x); +- if (state_13 === "break") +- break; +- switch (state_13) { +- case "break-l1_c": break l1_c; +- case "continue-l1_c": continue l1_c; +- } +-} +-var _loop_14 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l2_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l2_c"; +- } +-}; ++l0_c: for (const x of []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l0_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l0_c; ++ } ++} ++l00_c: for (const x in []) { ++ (function () { return x; }); ++ (() => x); ++ if (x == "1") { ++ break; ++ } ++ if (x == "1") { ++ break l00_c; ++ } ++ if (x == "2") { ++ continue; ++ } ++ if (x == "2") { ++ continue l00_c; ++ } ++} ++l1_c: for (const x = 0; x < 1;) { ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l1_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1_c; ++ } ++} + l2_c: while (1 === 1) { +- var state_14 = _loop_14(); +- if (state_14 === "break") ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; +- switch (state_14) { +- case "break-l2_c": break l2_c; +- case "continue-l2_c": continue l2_c; ++ } ++ if (x == 1) { ++ break l2_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l2_c; + } + } +-var _loop_15 = function () { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l3_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l3_c"; +- } +-}; + l3_c: do { +- var state_15 = _loop_15(); +- if (state_15 === "break") ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { + break; +- switch (state_15) { +- case "break-l3_c": break l3_c; +- case "continue-l3_c": continue l3_c; ++ } ++ if (x == 1) { ++ break l3_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l3_c; + } + } while (1 === 1); +-var _loop_16 = function (y) { +- var x = 1; +- (function () { return x; }); +- (function () { return x; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l4_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l4_c"; +- } +-}; +-l4_c: for (var y = 0; y < 1;) { +- var state_16 = _loop_16(y); +- if (state_16 === "break") +- break; +- switch (state_16) { +- case "break-l4_c": break l4_c; +- case "continue-l4_c": continue l4_c; +- } +-} +-var _loop_17 = function (x, y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l5_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l5_c"; +- } +-}; +-l5_c: for (var x = 0, y = 1; x < 1;) { +- var state_17 = _loop_17(x, y); +- if (state_17 === "break") +- break; +- switch (state_17) { +- case "break-l5_c": break l5_c; +- case "continue-l5_c": continue l5_c; +- } +-} +-var _loop_18 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l6_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l6_c"; +- } +-}; ++l4_c: for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x; }); ++ (() => x); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l4_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l4_c; ++ } ++} ++l5_c: for (const x = 0, y = 1; x < 1;) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { ++ break; ++ } ++ if (x == 1) { ++ break l5_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l5_c; ++ } ++} + l6_c: while (1 === 1) { +- var state_18 = _loop_18(); +- if (state_18 === "break") ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_18) { +- case "break-l6_c": break l6_c; +- case "continue-l6_c": continue l6_c; ++ } ++ if (x == 1) { ++ break l6_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l6_c; + } + } +-var _loop_19 = function () { +- var x = 1, y = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l7_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l7_c"; +- } +-}; + l7_c: do { +- var state_19 = _loop_19(); +- if (state_19 === "break") ++ const x = 1, y = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_19) { +- case "break-l7_c": break l7_c; +- case "continue-l7_c": continue l7_c; ++ } ++ if (x == 1) { ++ break l7_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l7_c; + } + } while (1 === 1); +-var _loop_20 = function (y) { +- var x = 1; +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l8_c"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l8_c"; +- } +-}; +-l8_c: for (var y = 0; y < 1;) { +- var state_20 = _loop_20(y); +- if (state_20 === "break") ++l8_c: for (const y = 0; y < 1;) { ++ const x = 1; ++ (function () { return x + y; }); ++ (() => x + y); ++ if (x == 1) { + break; +- switch (state_20) { +- case "break-l8_c": break l8_c; +- case "continue-l8_c": continue l8_c; ++ } ++ if (x == 1) { ++ break l8_c; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l8_c; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop8.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop8.js.diff new file mode 100644 index 0000000000..908089a316 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop8.js.diff @@ -0,0 +1,274 @@ +--- old.capturedLetConstInLoop8.js ++++ new.capturedLetConstInLoop8.js +@@= skipped -129, +129 lines =@@ + + //// [capturedLetConstInLoop8.js] + function foo() { +- l0: for (var z = 0; z < 1; ++z) { +- var _loop_1 = function (x) { +- var _loop_2 = function (y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (y == 1) { +- return "break"; +- } +- if (y == 1) { +- return "break-l1"; +- } +- if (y == 1) { +- return "break-ll1"; +- } +- if (y == 1) { +- return "continue-l0"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1"; +- } +- if (x == 2) { +- return "continue-ll1"; +- } +- if (x == 2) { +- return { value: "123" }; +- } +- if (x == 3) { +- return { value: void 0 }; +- } +- }; +- ll1: for (var y = 0; y < 1; ++y) { +- var state_2 = _loop_2(y); +- if (typeof state_2 === "object") +- return state_2; +- if (state_2 === "break") ++ l0: for (let z = 0; z < 1; ++z) { ++ l1: for (let x = 0; x < 1; ++x) { ++ ll1: for (let y = 0; y < 1; ++y) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (y == 1) { + break; +- switch (state_2) { +- case "break-l1": return state_2; +- case "break-ll1": break ll1; +- case "continue-l0": return state_2; +- case "continue-l1": return state_2; +- case "continue-ll1": continue ll1; +- } +- } +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l1"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1"; +- } +- if (x == 2) { +- return "continue-l0"; +- } +- if (x == 2) { +- return { value: "456" }; +- } +- if (x == 3) { +- return { value: void 0 }; +- } +- }; +- l1: for (var x = 0; x < 1; ++x) { +- var state_1 = _loop_1(x); +- if (typeof state_1 === "object") +- return state_1.value; +- if (state_1 === "break") ++ } ++ if (y == 1) { ++ break l1; ++ } ++ if (y == 1) { ++ break ll1; ++ } ++ if (y == 1) { ++ continue l0; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1; ++ } ++ if (x == 2) { ++ continue ll1; ++ } ++ if (x == 2) { ++ return "123"; ++ } ++ if (x == 3) { ++ return; ++ } ++ } ++ if (x == 1) { + break; +- switch (state_1) { +- case "break-l1": break l1; +- case "continue-l0": continue l0; +- case "continue-l1": continue l1; ++ } ++ if (x == 1) { ++ break l1; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1; ++ } ++ if (x == 2) { ++ continue l0; ++ } ++ if (x == 2) { ++ return "456"; ++ } ++ if (x == 3) { ++ return; + } + } + } + } + function foo_c() { +- l0: for (var z = 0; z < 1;) { +- var _loop_3 = function (x) { +- var _loop_4 = function (y) { +- (function () { return x + y; }); +- (function () { return x + y; }); +- if (y == 1) { +- return "break"; +- } +- if (y == 1) { +- return "break-l1"; +- } +- if (y == 1) { +- return "break-ll1"; +- } +- if (y == 1) { +- return "continue-l0"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1"; +- } +- if (x == 2) { +- return "continue-ll1"; +- } +- if (x == 2) { +- return { value: "123" }; +- } +- if (x == 3) { +- return { value: void 0 }; +- } +- }; +- ll1: for (var y = 0; y < 1;) { +- var state_4 = _loop_4(y); +- if (typeof state_4 === "object") +- return state_4; +- if (state_4 === "break") ++ l0: for (const z = 0; z < 1;) { ++ l1: for (const x = 0; x < 1;) { ++ ll1: for (const y = 0; y < 1;) { ++ (function () { return x + y; }); ++ (() => x + y); ++ if (y == 1) { + break; +- switch (state_4) { +- case "break-l1": return state_4; +- case "break-ll1": break ll1; +- case "continue-l0": return state_4; +- case "continue-l1": return state_4; +- case "continue-ll1": continue ll1; +- } +- } +- if (x == 1) { +- return "break"; +- } +- if (x == 1) { +- return "break-l1"; +- } +- if (x == 2) { +- return "continue"; +- } +- if (x == 2) { +- return "continue-l1"; +- } +- if (x == 2) { +- return "continue-l0"; +- } +- if (x == 2) { +- return { value: "456" }; +- } +- if (x == 3) { +- return { value: void 0 }; +- } +- }; +- l1: for (var x = 0; x < 1;) { +- var state_3 = _loop_3(x); +- if (typeof state_3 === "object") +- return state_3.value; +- if (state_3 === "break") ++ } ++ if (y == 1) { ++ break l1; ++ } ++ if (y == 1) { ++ break ll1; ++ } ++ if (y == 1) { ++ continue l0; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1; ++ } ++ if (x == 2) { ++ continue ll1; ++ } ++ if (x == 2) { ++ return "123"; ++ } ++ if (x == 3) { ++ return; ++ } ++ } ++ if (x == 1) { + break; +- switch (state_3) { +- case "break-l1": break l1; +- case "continue-l0": continue l0; +- case "continue-l1": continue l1; ++ } ++ if (x == 1) { ++ break l1; ++ } ++ if (x == 2) { ++ continue; ++ } ++ if (x == 2) { ++ continue l1; ++ } ++ if (x == 2) { ++ continue l0; ++ } ++ if (x == 2) { ++ return "456"; ++ } ++ if (x == 3) { ++ return; + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop9.js.diff b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop9.js.diff index b4776581f6..d62bf7556c 100644 --- a/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop9.js.diff +++ b/testdata/baselines/reference/submodule/compiler/capturedLetConstInLoop9.js.diff @@ -1,10 +1,200 @@ --- old.capturedLetConstInLoop9.js +++ new.capturedLetConstInLoop9.js -@@= skipped -236, +236 lines =@@ +@@= skipped -140, +140 lines =@@ + } + + //// [capturedLetConstInLoop9.js] +-var _loop_1 = function (x) { +- var x_1; +- (function () { return x_1; }); ++for (let x = 0; x < 1; ++x) { ++ let x; ++ (function () { return x; }); + { +- var x_2; +- (function () { return x_2; }); ++ let x; ++ (function () { return x; }); + } + try { } + catch (e) { +- var x_3; +- (function () { return x_3; }); ++ let x; ++ (function () { return x; }); + } +- switch (x_1) { ++ switch (x) { + case 1: +- var x_4; +- (function () { return x_4; }); ++ let x; ++ (function () { return x; }); + break; + } +- var _loop_2 = function () { +- var x_5; +- (function () { return x_5; }); +- }; + while (1 == 1) { +- _loop_2(); ++ let x; ++ (function () { return x; }); + } +- var A = /** @class */ (function () { +- function A() { ++ class A { ++ m() { ++ return x + 1; + } +- A.prototype.m = function () { +- return x_1 + 1; +- }; +- return A; +- }()); +-}; +-for (var x = 0; x < 1; ++x) { +- _loop_1(x); ++ } + } + function foo() { +- var _loop_3 = function (a) { +- var _b; ++ l0: for (let a of []) { + if (a === 1) { +- return "break"; ++ break; + } + if (a === 2) { +- return "break-l0"; ++ break l0; + } +- for (var _c = 0, _d = []; _c < _d.length; _c++) { +- var b = _d[_c]; +- _b = [{ x: 1, y: 2 }][0], x = _b.x, z = _b.y; ++ for (let b of []) { ++ var [{ x, y: z }] = [{ x: 1, y: 2 }]; + if (b === 1) { + break; + } + if (b === 2) { +- return "break-l0"; ++ break l0; + } + l1: if (b === 3) { + break l1; + } +- return { value: 50 }; ++ return 50; + } +- var _loop_4 = function (b) { +- var _g; +- _g = [{ x1: 1, y: arguments_1.length }][0], x1 = _g.x1, z1 = _g.y; ++ for (let b of []) { ++ var [{ x1, y: z1 }] = [{ x1: 1, y: arguments.length }]; + if (b === 1) { +- return "break"; +- } +- if (b === 2) { +- return "break-l0"; +- } +- (function () { return b; }); +- return { value: 100 }; +- }; +- for (var _e = 0, _f = []; _e < _f.length; _e++) { +- var b = _f[_e]; +- var state_2 = _loop_4(b); +- if (typeof state_2 === "object") +- return state_2; +- if (state_2 === "break") + break; +- switch (state_2) { +- case "break-l0": return state_2; +- } +- } +- (function () { return a; }); +- }; +- var arguments_1 = arguments, x, z, x1, z1; +- l0: for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var a = _a[_i]; +- var state_1 = _loop_3(a); +- if (typeof state_1 === "object") +- return state_1.value; +- if (state_1 === "break") +- break; +- switch (state_1) { +- case "break-l0": break l0; +- } ++ } ++ if (b === 2) { ++ break l0; ++ } ++ () => b; ++ return 100; ++ } ++ () => a; + } + use(x); + use(z); +@@= skipped -103, +68 lines =@@ + use(z1); + } + function foo2() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x = _a[_i]; ++ for (let x of []) { + if (x === 1) { + break; + } +@@= skipped -20, +19 lines =@@ + case 1: break; + case 2: continue; + } +- for (var _b = 0, _c = []; _b < _c.length; _b++) { +- var y = _c[_b]; ++ for (let y of []) { + switch (y) { + case 1: break; + case 2: continue; +@@= skipped -9, +8 lines =@@ + } } } - class C { +-var C = /** @class */ (function () { +- function C(N) { ++class C { + N; - constructor(N) { ++ constructor(N) { this.N = N; - } \ No newline at end of file + } +- C.prototype.foo = function () { +- var _this = this; +- var _loop_5 = function (i) { +- var f = function () { return _this.N * i; }; +- }; +- for (var i = 0; i < 100; i++) { +- _loop_5(i); ++ foo() { ++ for (let i = 0; i < 100; i++) { ++ let f = () => this.N * i; + } +- }; +- return C; +-}()); ++ } ++} + function foo3() { +- var x = arguments.length; +- var _loop_6 = function (y) { +- var z = arguments_2.length; ++ let x = arguments.length; ++ for (let y of []) { ++ let z = arguments.length; + (function () { return y + z + arguments.length; }); +- }; +- var arguments_2 = arguments; +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var y = _a[_i]; +- _loop_6(y); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.js.diff b/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.js.diff index e208cc7efa..1e06052451 100644 --- a/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/capturedParametersInInitializers2.js.diff @@ -8,15 +8,25 @@ - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); -}; --function foo(y = (_a = class { -- get [x]() { return x; } -- constructor() { x; } -- [z]() { return z; } -- }, -- __setFunctionName(_a, "y"), -- _a.c = x, -- _a), x = 1, z = 2) { +-function foo(y, x, z) { - var _a; +- if (y === void 0) { y = (_a = /** @class */ (function () { +- function class_1() { +- x; +- } +- Object.defineProperty(class_1.prototype, x, { +- get: function () { return x; }, +- enumerable: false, +- configurable: true +- }); +- class_1.prototype[z] = function () { return z; }; +- return class_1; +- }()), +- __setFunctionName(_a, "y"), +- _a.c = x, +- _a); } +- if (x === void 0) { x = 1; } +- if (z === void 0) { z = 2; } +function foo(y = class { + static c = x; + get [x]() { return x; } @@ -25,14 +35,17 @@ +}, x = 1, z = 2) { y.c; } --function foo2(y = (_a = class { -- constructor() { -- this[_b] = x; -- } -- }, -- _b = x, -- _a), x = 1) { -- var _b, _a; +-function foo2(y, x) { +- var _a, _b; +- if (y === void 0) { y = (_b = /** @class */ (function () { +- function class_2() { +- this[_a] = x; +- } +- return class_2; +- }()), +- _a = x, +- _b); } +- if (x === void 0) { x = 1; } +function foo2(y = class { + [x] = x; +}, x = 1) { diff --git a/testdata/baselines/reference/submodule/compiler/capturedShorthandPropertyAssignmentNoCheck.js.diff b/testdata/baselines/reference/submodule/compiler/capturedShorthandPropertyAssignmentNoCheck.js.diff new file mode 100644 index 0000000000..c634ad5f16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedShorthandPropertyAssignmentNoCheck.js.diff @@ -0,0 +1,20 @@ +--- old.capturedShorthandPropertyAssignmentNoCheck.js ++++ new.capturedShorthandPropertyAssignmentNoCheck.js +@@= skipped -9, +9 lines =@@ + + + //// [capturedShorthandPropertyAssignmentNoCheck.js] +-var fns = []; +-var _loop_1 = function (value) { +- fns.push(function () { return ({ value: value }); }); +-}; +-for (var _i = 0, _a = [1, 2, 3]; _i < _a.length; _i++) { +- var value = _a[_i]; +- _loop_1(value); ++const fns = []; ++for (const value of [1, 2, 3]) { ++ fns.push(() => ({ value })); + } +-var result = fns.map(function (fn) { return fn(); }); ++const result = fns.map(fn => fn()); + console.log(result); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/capturedVarInLoop.js.diff b/testdata/baselines/reference/submodule/compiler/capturedVarInLoop.js.diff new file mode 100644 index 0000000000..39557f3638 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/capturedVarInLoop.js.diff @@ -0,0 +1,18 @@ +--- old.capturedVarInLoop.js ++++ new.capturedVarInLoop.js +@@= skipped -7, +7 lines =@@ + } + + //// [capturedVarInLoop.js] +-var _loop_1 = function () { +- str = 'x', len = str.length; +- var lambda1 = function (y) { }; +- var lambda2 = function () { return lambda1(len); }; +-}; +-var str, len; + for (var i = 0; i < 10; i++) { +- _loop_1(); ++ var str = 'x', len = str.length; ++ let lambda1 = (y) => { }; ++ let lambda2 = () => lambda1(len); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js.diff new file mode 100644 index 0000000000..c23b2d6a0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js.diff @@ -0,0 +1,20 @@ +--- old.caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js ++++ new.caseInsensitiveFileSystemWithCapsImportTypeDeclarations.js +@@= skipped -35, +35 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Broken = void 0; +-var Broken = /** @class */ (function () { +- function Broken() { +- } +- Broken.prototype.method = function () { ++class Broken { ++ method() { + return {}; +- }; +- return Broken; +-}()); ++ } ++} + exports.Broken = Broken; + diff --git a/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.js.diff b/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.js.diff index 778d8657c0..6b6cad1ed3 100644 --- a/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.js.diff +++ b/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.js.diff @@ -17,13 +17,14 @@ -(typeof A).x; -(-A).x; -new (A()); +-(function () { })(); +-(function foo() { })(); +-(-A).x; +((new A)).foo; +((typeof A)).x; +((-A)).x; +new ((A())); - (() => { })(); --(function foo() { })(); --(-A).x; ++(() => { })(); +(function foo() { }()); +((-A)).x; // nested cast, should keep one pair of parenthese diff --git a/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.types.diff b/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.types.diff new file mode 100644 index 0000000000..2979d9da97 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/castExpressionParentheses.types.diff @@ -0,0 +1,10 @@ +--- old.castExpressionParentheses.types ++++ new.castExpressionParentheses.types +@@= skipped -182, +182 lines =@@ + >(typeof A).x : any + >(typeof A) : any + >typeof A : any +->typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof A : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >A : any + >x : any diff --git a/testdata/baselines/reference/submodule/compiler/castOfAwait.types.diff b/testdata/baselines/reference/submodule/compiler/castOfAwait.types.diff new file mode 100644 index 0000000000..aca8296b53 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/castOfAwait.types.diff @@ -0,0 +1,20 @@ +--- old.castOfAwait.types ++++ new.castOfAwait.types +@@= skipped -9, +9 lines =@@ + >0 : 0 + + typeof await 0; +->typeof await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof await 0 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >await 0 : 0 + >0 : 0 + +@@= skipped -13, +13 lines =@@ + >await void typeof void await 0 : undefined + >void typeof void await 0 : undefined + > typeof void await 0 : string +->typeof void await 0 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof void await 0 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + > void await 0 : number + >void await 0 : undefined + >await 0 : 0 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/castOfYield.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/castOfYield.errors.txt.diff new file mode 100644 index 0000000000..3879d09033 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/castOfYield.errors.txt.diff @@ -0,0 +1,11 @@ +--- old.castOfYield.errors.txt ++++ new.castOfYield.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS2318: Cannot find global type 'IterableIterator'. + castOfYield.ts(4,14): error TS1109: Expression expected. + + ++!!! error TS2318: Cannot find global type 'IterableIterator'. + ==== castOfYield.ts (1 errors) ==== + function* f() { + (yield 0); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/castOfYield.js.diff b/testdata/baselines/reference/submodule/compiler/castOfYield.js.diff new file mode 100644 index 0000000000..7a5889f235 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/castOfYield.js.diff @@ -0,0 +1,53 @@ +--- old.castOfYield.js ++++ new.castOfYield.js +@@= skipped -8, +8 lines =@@ + + + //// [castOfYield.js] +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-function f() { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, 0]; +- case 1: +- (_a.sent()); +- // Unlike await, yield is not allowed to appear in a simple unary expression. +- ; +- return [4 /*yield*/, 0]; +- case 2: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); ++function* f() { ++ (yield 0); ++ // Unlike await, yield is not allowed to appear in a simple unary expression. ++ ; ++ yield 0; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/castOfYield.types.diff b/testdata/baselines/reference/submodule/compiler/castOfYield.types.diff new file mode 100644 index 0000000000..5c32456378 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/castOfYield.types.diff @@ -0,0 +1,11 @@ +--- old.castOfYield.types ++++ new.castOfYield.types +@@= skipped -1, +1 lines =@@ + + === castOfYield.ts === + function* f() { +->f : () => Generator ++>f : () => {} + + (yield 0); + > (yield 0) : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/castParentheses.js.diff b/testdata/baselines/reference/submodule/compiler/castParentheses.js.diff index 541f0a6c2c..356ac22ba2 100644 --- a/testdata/baselines/reference/submodule/compiler/castParentheses.js.diff +++ b/testdata/baselines/reference/submodule/compiler/castParentheses.js.diff @@ -1,14 +1,20 @@ --- old.castParentheses.js +++ new.castParentheses.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + var b = (new a).b //// [castParentheses.js] - class a { +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { + static b; - } ++} var b = a; var b = a.b; -@@= skipped -7, +8 lines =@@ + var b = a.b.c; var b = a.b().c; var b = new a; var b = new a.b; diff --git a/testdata/baselines/reference/submodule/compiler/chainedAssignment1.js.diff b/testdata/baselines/reference/submodule/compiler/chainedAssignment1.js.diff index f76b677fba..5a361c2763 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedAssignment1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/chainedAssignment1.js.diff @@ -1,26 +1,45 @@ --- old.chainedAssignment1.js +++ new.chainedAssignment1.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + c2 = c3; // Error TS111: Cannot convert Z to Y //// [chainedAssignment1.js] - class X { +-var X = /** @class */ (function () { +- function X(z) { +- this.z = z; +- } +- return X; +-}()); +-var Y = /** @class */ (function () { +- function Y(z) { +- this.z = z; +- } +- return Y; +-}()); +-var Z = /** @class */ (function () { +- function Z() { +- } +- return Z; +-}()); ++class X { + z; - constructor(z) { - this.z = z; - } ++ constructor(z) { ++ this.z = z; ++ } + a; - } - class Y { ++} ++class Y { + z; - constructor(z) { - this.z = z; - } ++ constructor(z) { ++ this.z = z; ++ } + a; + b; - } - class Z { ++} ++class Z { + z; + c; - } ++} var c1 = new X(3); - var c2 = new Y(5); \ No newline at end of file + var c2 = new Y(5); + var c3 = new Z(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedAssignment2.symbols.diff b/testdata/baselines/reference/submodule/compiler/chainedAssignment2.symbols.diff new file mode 100644 index 0000000000..6226ec9357 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/chainedAssignment2.symbols.diff @@ -0,0 +1,16 @@ +--- old.chainedAssignment2.symbols ++++ new.chainedAssignment2.symbols +@@= skipped -11, +11 lines =@@ + + var d: Date; + >d : Symbol(d, Decl(chainedAssignment2.ts, 3, 3)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var e: RegExp; + >e : Symbol(e, Decl(chainedAssignment2.ts, 4, 3)) +->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + a = b = c = d = e = null; + >a : Symbol(a, Decl(chainedAssignment2.ts, 0, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedAssignment3.js.diff b/testdata/baselines/reference/submodule/compiler/chainedAssignment3.js.diff index 084cba94fd..d0095ec328 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedAssignment3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/chainedAssignment3.js.diff @@ -1,13 +1,42 @@ --- old.chainedAssignment3.js +++ new.chainedAssignment3.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + //// [chainedAssignment3.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + id; - } - class B extends A { ++} ++class B extends A { + value; - } ++} var a; - var b; \ No newline at end of file + var b; + a = b = null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedAssignmentChecking.js.diff b/testdata/baselines/reference/submodule/compiler/chainedAssignmentChecking.js.diff index 6928a19a27..eba6012db6 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedAssignmentChecking.js.diff +++ b/testdata/baselines/reference/submodule/compiler/chainedAssignmentChecking.js.diff @@ -1,26 +1,45 @@ --- old.chainedAssignmentChecking.js +++ new.chainedAssignmentChecking.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + //// [chainedAssignmentChecking.js] - class X { +-var X = /** @class */ (function () { +- function X(z) { +- this.z = z; +- } +- return X; +-}()); +-var Y = /** @class */ (function () { +- function Y(z) { +- this.z = z; +- } +- return Y; +-}()); +-var Z = /** @class */ (function () { +- function Z() { +- } +- return Z; +-}()); ++class X { + z; - constructor(z) { - this.z = z; - } ++ constructor(z) { ++ this.z = z; ++ } + a; - } - class Y { ++} ++class Y { + z; - constructor(z) { - this.z = z; - } ++ constructor(z) { ++ this.z = z; ++ } + a; + b; - } - class Z { ++} ++class Z { + z; + c; - } ++} var c1 = new X(3); - var c2 = new Y(5); \ No newline at end of file + var c2 = new Y(5); + var c3 = new Z(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff new file mode 100644 index 0000000000..a3afbb5bb8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff @@ -0,0 +1,16 @@ +--- old.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt ++++ new.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +@@= skipped -0, +0 lines =@@ + chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. +-chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y ++chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': y, z + + + ==== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== +@@= skipped -26, +26 lines =@@ + !!! related TS2728 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. + !!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. + ~~~~~ +-!!! error TS2739: Type 'A' is missing the following properties from type 'C': z, y ++!!! error TS2739: Type 'A' is missing the following properties from type 'C': y, z + !!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js.diff index 7259b18760..c4e7c63d1b 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js.diff @@ -1,24 +1,67 @@ --- old.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js +++ new.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js -@@= skipped -22, +22 lines =@@ +@@= skipped -21, +21 lines =@@ + (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.js] - class Chain { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Chain = /** @class */ (function () { +- function Chain(value) { ++class Chain { + value; - constructor(value) { ++ constructor(value) { this.value = value; } -@@= skipped -8, +9 lines =@@ - } - } - class A { +- Chain.prototype.then = function (cb) { ++ then(cb) { + return null; +- }; +- return Chain; +-}()); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(B)); ++ } ++} ++class A { + x; - } - class B extends A { ++} ++class B extends A { + y; - } - class C extends B { ++} ++class C extends B { + z; - } ++} // Ok to go down the chain, but error to try to climb back up - (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); \ No newline at end of file +-(new Chain(new A)).then(function (a) { return new B; }).then(function (b) { return new C; }).then(function (c) { return new B; }).then(function (b) { return new A; }); ++(new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js.diff b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js.diff index 16ebb97403..4f3bcb0679 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js.diff @@ -1,18 +1,62 @@ --- old.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js +++ new.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js -@@= skipped -44, +44 lines =@@ +@@= skipped -43, +43 lines =@@ + } //// [chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.js] - class Chain { +-var Chain = /** @class */ (function () { +- function Chain(value) { ++class Chain { + value; - constructor(value) { ++ constructor(value) { this.value = value; } -@@= skipped -17, +18 lines =@@ - } - } - class Chain2 { +- Chain.prototype.then = function (cb) { ++ then(cb) { + var t; + var s; + // Ok to go down the chain, but error to climb up the chain +- (new Chain(t)).then(function (tt) { return s; }).then(function (ss) { return t; }); ++ (new Chain(t)).then(tt => s).then(ss => t); + // But error to try to climb up the chain +- (new Chain(s)).then(function (ss) { return t; }); ++ (new Chain(s)).then(ss => t); + // Staying at T or S should be fine +- (new Chain(t)).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }); +- (new Chain(s)).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }); ++ (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); ++ (new Chain(s)).then(ss => s).then(ss => s).then(ss => s); + return null; +- }; +- return Chain; +-}()); +-var Chain2 = /** @class */ (function () { +- function Chain2(value) { ++ } ++} ++class Chain2 { + value; - constructor(value) { ++ constructor(value) { this.value = value; - } \ No newline at end of file + } +- Chain2.prototype.then = function (cb) { ++ then(cb) { + var i; + var t; + var s; + // Ok to go down the chain, check the constraint at the end. + // Should get an error that we are assigning a string to a number +- (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return s; }).value.x = ""; ++ (new Chain2(i)).then(ii => t).then(tt => s).value.x = ""; + // Staying at T or S should keep the constraint. + // Get an error when we assign a string to a number in both cases +- (new Chain2(i)).then(function (ii) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).then(function (tt) { return t; }).value.x = ""; +- (new Chain2(i)).then(function (ii) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).then(function (ss) { return s; }).value.x = ""; ++ (new Chain2(i)).then(ii => t).then(tt => t).then(tt => t).then(tt => t).value.x = ""; ++ (new Chain2(i)).then(ii => s).then(ss => s).then(ss => s).then(ss => s).value.x = ""; + return null; +- }; +- return Chain2; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js index 744385e018..8db5d8ec9a 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js +++ b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/chainedImportAlias.ts] //// //// [chainedImportAlias_file0.ts] -export module m { +export namespace m { export function foo() { } } diff --git a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.symbols b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.symbols index e0fb8fe612..665a15129b 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.symbols +++ b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.symbols @@ -9,17 +9,17 @@ import y = x; >x : Symbol(x, Decl(chainedImportAlias_file1.ts, 0, 0)) y.m.foo(); ->y.m.foo : Symbol(x.m.foo, Decl(chainedImportAlias_file0.ts, 0, 17)) +>y.m.foo : Symbol(x.m.foo, Decl(chainedImportAlias_file0.ts, 0, 20)) >y.m : Symbol(x.m, Decl(chainedImportAlias_file0.ts, 0, 0)) >y : Symbol(y, Decl(chainedImportAlias_file1.ts, 0, 49)) >m : Symbol(x.m, Decl(chainedImportAlias_file0.ts, 0, 0)) ->foo : Symbol(x.m.foo, Decl(chainedImportAlias_file0.ts, 0, 17)) +>foo : Symbol(x.m.foo, Decl(chainedImportAlias_file0.ts, 0, 20)) === chainedImportAlias_file0.ts === -export module m { +export namespace m { >m : Symbol(m, Decl(chainedImportAlias_file0.ts, 0, 0)) export function foo() { } ->foo : Symbol(foo, Decl(chainedImportAlias_file0.ts, 0, 17)) +>foo : Symbol(foo, Decl(chainedImportAlias_file0.ts, 0, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.types b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.types index c6e70e4691..633b46293e 100644 --- a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.types +++ b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.types @@ -17,7 +17,7 @@ y.m.foo(); >foo : () => void === chainedImportAlias_file0.ts === -export module m { +export namespace m { >m : typeof m export function foo() { } diff --git a/testdata/baselines/reference/submodule/compiler/chainedSpecializationToObjectTypeLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/chainedSpecializationToObjectTypeLiteral.js.diff new file mode 100644 index 0000000000..0534f9645b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/chainedSpecializationToObjectTypeLiteral.js.diff @@ -0,0 +1,10 @@ +--- old.chainedSpecializationToObjectTypeLiteral.js ++++ new.chainedSpecializationToObjectTypeLiteral.js +@@= skipped -14, +14 lines =@@ + + //// [chainedSpecializationToObjectTypeLiteral.js] + var s; +-var s2 = s.groupBy(function (s) { return s.length; }); +-var s3 = s2.each(function (x) { x.key; /* Type is K, should be number */ }); ++var s2 = s.groupBy(s => s.length); ++var s3 = s2.each(x => { x.key; /* Type is K, should be number */ }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.errors.txt.diff index 18ca898f83..a409c7745d 100644 --- a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.errors.txt.diff @@ -5,7 +5,7 @@ - - -==== checkForObjectTooStrict.ts (1 errors) ==== -- module Foo { +- namespace Foo { - - export class Object { - ~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js index 389d95fa0c..a06c49b4ed 100644 --- a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/checkForObjectTooStrict.ts] //// //// [checkForObjectTooStrict.ts] -module Foo { +namespace Foo { export class Object { diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js.diff b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js.diff new file mode 100644 index 0000000000..7cdc03a417 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.js.diff @@ -0,0 +1,56 @@ +--- old.checkForObjectTooStrict.js ++++ new.checkForObjectTooStrict.js +@@= skipped -33, +33 lines =@@ + + + //// [checkForObjectTooStrict.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var Foo; + (function (Foo) { +- var Object = /** @class */ (function () { +- function Object() { +- } +- return Object; +- }()); ++ class Object { ++ } + Foo.Object = Object; + })(Foo || (Foo = {})); +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super.call(this) || this; +- } +- return Bar; +-}(Foo.Object)); +-var Baz = /** @class */ (function (_super) { +- __extends(Baz, _super); +- function Baz() { +- return _super.call(this) || this; +- } +- return Baz; +-}(Object)); ++class Bar extends Foo.Object { ++ constructor() { ++ super(); ++ } ++} ++class Baz extends Object { ++ constructor() { ++ super(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols index 78bd373afe..48b0050ef9 100644 --- a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/checkForObjectTooStrict.ts] //// === checkForObjectTooStrict.ts === -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0)) export class Object { ->Object : Symbol(Object, Decl(checkForObjectTooStrict.ts, 0, 12)) +>Object : Symbol(Object, Decl(checkForObjectTooStrict.ts, 0, 15)) } @@ -15,14 +15,14 @@ module Foo { class Bar extends Foo.Object { // should work >Bar : Symbol(Bar, Decl(checkForObjectTooStrict.ts, 6, 1)) ->Foo.Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) +>Foo.Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 15)) >Foo : Symbol(Foo, Decl(checkForObjectTooStrict.ts, 0, 0)) ->Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) +>Object : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 15)) constructor () { super(); ->super : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 12)) +>super : Symbol(Foo.Object, Decl(checkForObjectTooStrict.ts, 0, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols.diff new file mode 100644 index 0000000000..9c9013575a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.symbols.diff @@ -0,0 +1,10 @@ +--- old.checkForObjectTooStrict.symbols ++++ new.checkForObjectTooStrict.symbols +@@= skipped -35, +35 lines =@@ + constructor () { // ERROR, as expected + + super(); +->super : Symbol(ObjectConstructor, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>super : Symbol(ObjectConstructor, Decl(lib.es5.d.ts, --, --)) + + } diff --git a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.types b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.types index 4cf7d4f17c..80ef27d47d 100644 --- a/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.types +++ b/testdata/baselines/reference/submodule/compiler/checkForObjectTooStrict.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/checkForObjectTooStrict.ts] //// === checkForObjectTooStrict.ts === -module Foo { +namespace Foo { >Foo : typeof Foo export class Object { diff --git a/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralHasCheckedKeyof.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralHasCheckedKeyof.js.diff new file mode 100644 index 0000000000..8f8cf1ac22 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralHasCheckedKeyof.js.diff @@ -0,0 +1,17 @@ +--- old.checkJsObjectLiteralHasCheckedKeyof.js ++++ new.checkJsObjectLiteralHasCheckedKeyof.js +@@= skipped -15, +15 lines =@@ + + //// [file.js] + // @ts-check +-var obj = { ++const obj = { + x: 1, + y: 2 + }; + /** + * @type {keyof typeof obj} + */ +-var selected = "x"; ++let selected = "x"; + selected = "z"; // should fail \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.js.diff new file mode 100644 index 0000000000..89ca9058a3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.js.diff @@ -0,0 +1,17 @@ +--- old.checkJsObjectLiteralIndexSignatures.js ++++ new.checkJsObjectLiteralIndexSignatures.js +@@= skipped -15, +15 lines =@@ + + //// [file.js] + // @ts-check +-var _a, _b; +-var n = Math.random(); +-var s = "".concat(n); +-var numericIndex = (_a = {}, _a[n] = 1, _a); ++let n = Math.random(); ++let s = `${n}`; ++const numericIndex = { [n]: 1 }; + numericIndex[n].toFixed(); +-var stringIndex = (_b = {}, _b[s] = 1, _b); ++const stringIndex = { [s]: 1 }; + stringIndex[s].toFixed(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.symbols.diff new file mode 100644 index 0000000000..6e2d1f4891 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkJsObjectLiteralIndexSignatures.symbols.diff @@ -0,0 +1,11 @@ +--- old.checkJsObjectLiteralIndexSignatures.symbols ++++ new.checkJsObjectLiteralIndexSignatures.symbols +@@= skipped -5, +5 lines =@@ + let n = Math.random(); + >n : Symbol(n, Decl(file.js, 2, 3)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + let s = `${n}`; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff index fc0499aae9..dbe327884e 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment3.js.diff @@ -11,7 +11,8 @@ * @property {boolean} b */ -Object.defineProperty(exports, "__esModule", { value: true }); - const bar = { c: 1 }; +-var bar = { c: 1 }; ++const bar = { c: 1 }; /** @type {Foo} */ exports.default = bar; //// [b.js] diff --git a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff index d61e82ff4d..700693690f 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsdocTypeTagOnExportAssignment7.js.diff @@ -11,7 +11,8 @@ * @property {number} b */ -Object.defineProperty(exports, "__esModule", { value: true }); - const abc = { a: 1, b: 1, c: 1 }; +-var abc = { a: 1, b: 1, c: 1 }; ++const abc = { a: 1, b: 1, c: 1 }; /** @type {Foo} */ exports.default = abc; //// [b.js] diff --git a/testdata/baselines/reference/submodule/compiler/checkJsxNotSetError.js.diff b/testdata/baselines/reference/submodule/compiler/checkJsxNotSetError.js.diff index 553d172c82..c9f81679b4 100644 --- a/testdata/baselines/reference/submodule/compiler/checkJsxNotSetError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkJsxNotSetError.js.diff @@ -1,9 +1,16 @@ --- old.checkJsxNotSetError.js +++ new.checkJsxNotSetError.js -@@= skipped -17, +17 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [foo.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Foo = function () { return (
foo
); }; ++const Foo = () => (
foo
); + exports.default = Foo; //// [bar.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var foo_1 = require("/foo"); +-var a = ; +const foo_1 = require("/foo"); - const a = ; \ No newline at end of file ++const a = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkMergedGlobalUMDSymbol.js.diff b/testdata/baselines/reference/submodule/compiler/checkMergedGlobalUMDSymbol.js.diff new file mode 100644 index 0000000000..7685f2a806 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkMergedGlobalUMDSymbol.js.diff @@ -0,0 +1,8 @@ +--- old.checkMergedGlobalUMDSymbol.js ++++ new.checkMergedGlobalUMDSymbol.js +@@= skipped -18, +18 lines =@@ + + + //// [test.js] +-var m = THREE; ++const m = THREE; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccess.types.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccess.types.diff new file mode 100644 index 0000000000..f216d9c475 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccess.types.diff @@ -0,0 +1,15 @@ +--- old.checkSuperCallBeforeThisAccess.types ++++ new.checkSuperCallBeforeThisAccess.types +@@= skipped -145, +145 lines =@@ + >true : true + + let e1 = { w: !!true ? super() : 0 }; +->e1 : { w: number | void; } +->{ w: !!true ? super() : 0 } : { w: number | void; } +->w : number | void ++>e1 : { w: void | number; } ++>{ w: !!true ? super() : 0 } : { w: void | number; } ++>w : void | number + >!!true ? super() : 0 : void | 0 + >!!true : true + >!true : false \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing1.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing1.js.diff index 5df18362df..7804ac1835 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing1.js.diff @@ -1,10 +1,48 @@ --- old.checkSuperCallBeforeThisAccessing1.js +++ new.checkSuperCallBeforeThisAccessing1.js -@@= skipped -15, +15 lines =@@ - class Based { +@@= skipped -12, +12 lines =@@ } - class Derived extends Based { + + //// [checkSuperCallBeforeThisAccessing1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Based = /** @class */ (function () { +- function Based() { +- } +- return Based; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = _super.call(this) || this; +- _this; +- _this.x = 10; +- var that = _this; +- return _this; +- } +- return Derived; +-}(Based)); ++class Based { ++} ++class Derived extends Based { + x; - constructor() { - super(); - this; \ No newline at end of file ++ constructor() { ++ super(); ++ this; ++ this.x = 10; ++ var that = this; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing2.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing2.js.diff index 02e96022c7..51d208bd77 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing2.js.diff @@ -1,10 +1,49 @@ --- old.checkSuperCallBeforeThisAccessing2.js +++ new.checkSuperCallBeforeThisAccessing2.js -@@= skipped -15, +15 lines =@@ - class Based { +@@= skipped -12, +12 lines =@@ } - class Derived extends Based { + + //// [checkSuperCallBeforeThisAccessing2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Based = /** @class */ (function () { +- function Based() { +- } +- return Based; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = this; +- _this.x = 100; +- _this = _super.call(this) || this; +- _this.x = 10; +- var that = _this; +- return _this; +- } +- return Derived; +-}(Based)); ++class Based { ++} ++class Derived extends Based { + x; - constructor() { - this.x = 100; - super(); \ No newline at end of file ++ constructor() { ++ this.x = 100; ++ super(); ++ this.x = 10; ++ var that = this; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing3.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing3.js.diff index 79b64fe8aa..326f89e448 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing3.js.diff @@ -1,13 +1,56 @@ --- old.checkSuperCallBeforeThisAccessing3.js +++ new.checkSuperCallBeforeThisAccessing3.js -@@= skipped -20, +20 lines =@@ - class Based { +@@= skipped -17, +17 lines =@@ } - class Derived extends Based { + + //// [checkSuperCallBeforeThisAccessing3.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Based = /** @class */ (function () { +- function Based() { +- } +- return Based; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = this; +- var innver = /** @class */ (function () { +- function innver() { ++class Based { ++} ++class Derived extends Based { + x; - constructor() { - class innver { ++ constructor() { ++ class innver { + y; - constructor() { ++ constructor() { this.y = true; - } \ No newline at end of file + } +- return innver; +- }()); +- _this = _super.call(this) || this; +- _this.x = 10; +- var that = _this; +- return _this; ++ } ++ super(); ++ this.x = 10; ++ var that = this; + } +- return Derived; +-}(Based)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing4.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing4.js.diff index e2f1416d5d..4aa8dd7ee6 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing4.js.diff @@ -1,10 +1,65 @@ --- old.checkSuperCallBeforeThisAccessing4.js +++ new.checkSuperCallBeforeThisAccessing4.js -@@= skipped -24, +24 lines =@@ - class Based { +@@= skipped -21, +21 lines =@@ } - class Derived extends Based { + + //// [checkSuperCallBeforeThisAccessing4.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Based = /** @class */ (function () { +- function Based() { +- } +- return Based; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = this; +- (function () { +- _this; // No error +- }); +- (function () { +- _this; // No error +- }); +- (function () { +- _this; // No error ++class Based { ++} ++class Derived extends Based { + x; - constructor() { - (() => { - this; // No error \ No newline at end of file ++ constructor() { ++ (() => { ++ this; // No error ++ }); ++ () => { ++ this; // No error ++ }; ++ (() => { ++ this; // No error + })(); +- _this = _super.call(this) || this; +- _this = _super.call(this) || this; +- _this.x = 10; +- var that = _this; +- return _this; ++ super(); ++ super(); ++ this.x = 10; ++ var that = this; + } +- return Derived; +-}(Based)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing5.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing5.js.diff index d9b81a2562..438f55c1b2 100644 --- a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing5.js.diff @@ -1,10 +1,47 @@ --- old.checkSuperCallBeforeThisAccessing5.js +++ new.checkSuperCallBeforeThisAccessing5.js -@@= skipped -13, +13 lines =@@ - constructor(...arg) { } +@@= skipped -9, +9 lines =@@ } - class Derived extends Based { + + //// [checkSuperCallBeforeThisAccessing5.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Based = /** @class */ (function () { +- function Based() { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- } +- return Based; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = _super.call(this, _this.x) || this; +- return _this; +- } +- return Derived; +-}(Based)); ++class Based { ++ constructor(...arg) { } ++} ++class Derived extends Based { + x; - constructor() { - super(this.x); - } \ No newline at end of file ++ constructor() { ++ super(this.x); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing6.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing6.js.diff new file mode 100644 index 0000000000..2e8bf404d4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing6.js.diff @@ -0,0 +1,49 @@ +--- old.checkSuperCallBeforeThisAccessing6.js ++++ new.checkSuperCallBeforeThisAccessing6.js +@@= skipped -12, +12 lines =@@ + } + + //// [checkSuperCallBeforeThisAccessing6.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- } +- return Base; +-}()); +-var Super = /** @class */ (function (_super) { +- __extends(Super, _super); +- function Super() { +- var _this = this; +- (function () { return _this; }); // No Error +- return _this = _super.call(this) || this; +- } +- return Super; +-}(Base)); ++class Base { ++ constructor(...arg) { ++ } ++} ++class Super extends Base { ++ constructor() { ++ (() => this); // No Error ++ super(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing7.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing7.js.diff new file mode 100644 index 0000000000..3a086eb322 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing7.js.diff @@ -0,0 +1,43 @@ +--- old.checkSuperCallBeforeThisAccessing7.js ++++ new.checkSuperCallBeforeThisAccessing7.js +@@= skipped -11, +11 lines =@@ + } + + //// [checkSuperCallBeforeThisAccessing7.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base(func) { +- } +- return Base; +-}()); +-var Super = /** @class */ (function (_super) { +- __extends(Super, _super); +- function Super() { +- var _this = _super.call(this, (function () { return _this; })) || this; // No error +- return _this; +- } +- return Super; +-}(Base)); ++class Base { ++ constructor(func) { ++ } ++} ++class Super extends Base { ++ constructor() { ++ super((() => this)); // No error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing8.js.diff b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing8.js.diff new file mode 100644 index 0000000000..213648b075 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSuperCallBeforeThisAccessing8.js.diff @@ -0,0 +1,49 @@ +--- old.checkSuperCallBeforeThisAccessing8.js ++++ new.checkSuperCallBeforeThisAccessing8.js +@@= skipped -12, +12 lines =@@ + } + + //// [checkSuperCallBeforeThisAccessing8.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- } +- return Base; +-}()); +-var Super = /** @class */ (function (_super) { +- __extends(Super, _super); +- function Super() { +- var _this = this; +- var that = _this; +- return _this = _super.call(this) || this; +- } +- return Super; +-}(Base)); ++class Base { ++ constructor(...arg) { ++ } ++} ++class Super extends Base { ++ constructor() { ++ var that = this; ++ super(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.js.diff b/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.js.diff new file mode 100644 index 0000000000..55670cebf4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.js.diff @@ -0,0 +1,25 @@ +--- old.checkSwitchStatementIfCaseTypeIsString.js ++++ new.checkSwitchStatementIfCaseTypeIsString.js +@@= skipped -13, +13 lines =@@ + } + + //// [checkSwitchStatementIfCaseTypeIsString.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.doIt = function (x) { +- var _this = this; +- x.forEach(function (v) { ++class A { ++ doIt(x) { ++ x.forEach((v) => { + switch (v) { +- case "test": use(_this); ++ case "test": use(this); + } + }); +- }; +- return A; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.symbols.diff b/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.symbols.diff new file mode 100644 index 0000000000..778e5f19c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/checkSwitchStatementIfCaseTypeIsString.symbols.diff @@ -0,0 +1,11 @@ +--- old.checkSwitchStatementIfCaseTypeIsString.symbols ++++ new.checkSwitchStatementIfCaseTypeIsString.symbols +@@= skipped -10, +10 lines =@@ + doIt(x: Array): void { + >doIt : Symbol(A.doIt, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 2, 9)) + >x : Symbol(x, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 3, 9)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + x.forEach((v) => { + >x.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js.diff b/testdata/baselines/reference/submodule/compiler/checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js.diff index 5f1ffa453b..a108cbc162 100644 --- a/testdata/baselines/reference/submodule/compiler/checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js.diff @@ -1,6 +1,20 @@ --- old.checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js +++ new.checkingObjectDefinePropertyOnFunctionNonexistentPropertyNoCrash1.js -@@= skipped -25, +25 lines =@@ +@@= skipped -16, +16 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.test = test; + function test(fn) { +- var composed = function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- }; ++ const composed = function (...args) { }; + Object.defineProperty(composed, 'name', { + value: composed.fn + '_test' + }); +@@= skipped -14, +9 lines =@@ //// [index.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/checkingObjectWithThisInNamePositionNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/checkingObjectWithThisInNamePositionNoCrash.js.diff index 58f14cd61d..3d14e47271 100644 --- a/testdata/baselines/reference/submodule/compiler/checkingObjectWithThisInNamePositionNoCrash.js.diff +++ b/testdata/baselines/reference/submodule/compiler/checkingObjectWithThisInNamePositionNoCrash.js.diff @@ -1,6 +1,21 @@ --- old.checkingObjectWithThisInNamePositionNoCrash.js +++ new.checkingObjectWithThisInNamePositionNoCrash.js -@@= skipped -23, +23 lines =@@ +@@= skipped -13, +13 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.thing = void 0; + exports.thing = { +- doit: function () { +- var _a; +- return _a = {}, +- _a[this.a] = "", +- _a; ++ doit() { ++ return { ++ [this.a]: "", // should refer to the outer object with the doit method, notably not present ++ }; + } + }; + //// [checkingObjectWithThisInNamePositionNoCrash.d.ts] export declare const thing: { diff --git a/testdata/baselines/reference/submodule/compiler/circularConstraintYieldsAppropriateError.js.diff b/testdata/baselines/reference/submodule/compiler/circularConstraintYieldsAppropriateError.js.diff index 6f103eaefc..02479444bd 100644 --- a/testdata/baselines/reference/submodule/compiler/circularConstraintYieldsAppropriateError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/circularConstraintYieldsAppropriateError.js.diff @@ -1,16 +1,53 @@ --- old.circularConstraintYieldsAppropriateError.js +++ new.circularConstraintYieldsAppropriateError.js -@@= skipped -21, +21 lines =@@ +@@= skipped -19, +19 lines =@@ + foo.bar.test + //// [circularConstraintYieldsAppropriateError.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); // https://github.com/Microsoft/TypeScript/issues/16861 - class BaseType { +-var BaseType = /** @class */ (function () { +- function BaseType() { +- } +- return BaseType; +-}()); +-var NextType = /** @class */ (function (_super) { +- __extends(NextType, _super); +- function NextType() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return NextType; +-}(BaseType)); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Foo; +-}(NextType)); +-var foo = new Foo(); ++class BaseType { + bar; - } - class NextType extends BaseType { ++} ++class NextType extends BaseType { + baz; - } - class Foo extends NextType { ++} ++class Foo extends NextType { + someProp; - } - const foo = new Foo(); ++} ++const foo = new Foo(); foo.bar.test; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularConstructorWithReturn.js.diff b/testdata/baselines/reference/submodule/compiler/circularConstructorWithReturn.js.diff index 382148d83b..fa27eed66d 100644 --- a/testdata/baselines/reference/submodule/compiler/circularConstructorWithReturn.js.diff +++ b/testdata/baselines/reference/submodule/compiler/circularConstructorWithReturn.js.diff @@ -1,10 +1,19 @@ --- old.circularConstructorWithReturn.js +++ new.circularConstructorWithReturn.js -@@= skipped -27, +27 lines =@@ +@@= skipped -26, +26 lines =@@ + exports.getPrismaClient = getPrismaClient; exports.applyModelsAndClientExtensions = applyModelsAndClientExtensions; function getPrismaClient(options) { - class PrismaClient { +- var PrismaClient = /** @class */ (function () { +- function PrismaClient(options) { ++ class PrismaClient { + self; - constructor(options) { ++ constructor(options) { return (this.self = applyModelsAndClientExtensions(this)); - } \ No newline at end of file + } +- return PrismaClient; +- }()); ++ } + return PrismaClient; + } + function applyModelsAndClientExtensions(client) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularContextualMappedType.js.diff b/testdata/baselines/reference/submodule/compiler/circularContextualMappedType.js.diff index 57a3aa4aed..81fdc96998 100644 --- a/testdata/baselines/reference/submodule/compiler/circularContextualMappedType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/circularContextualMappedType.js.diff @@ -6,5 +6,12 @@ //// [circularContextualMappedType.js] -"use strict"; reproduce({ - name: () => { return 123; } - }); \ No newline at end of file +- name: function () { return 123; } ++ name: () => { return 123; } + }); + reproduce({ +- name: function () { return 123; } ++ name() { return 123; } + }); + reproduce({ + name: function () { return 123; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularContextualReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/circularContextualReturnType.js.diff index 3408515fe9..5e722c1673 100644 --- a/testdata/baselines/reference/submodule/compiler/circularContextualReturnType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/circularContextualReturnType.js.diff @@ -7,4 +7,8 @@ -"use strict"; // Repro from #17711 Object.freeze({ - foo() { \ No newline at end of file +- foo: function () { ++ foo() { + return Object.freeze('a'); + }, + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularObjectLiteralAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/circularObjectLiteralAccessors.js.diff new file mode 100644 index 0000000000..7d31414ccf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularObjectLiteralAccessors.js.diff @@ -0,0 +1,11 @@ +--- old.circularObjectLiteralAccessors.js ++++ new.circularObjectLiteralAccessors.js +@@= skipped -16, +16 lines =@@ + + //// [circularObjectLiteralAccessors.js] + // Repro from #6000 +-var a = { ++const a = { + b: { + get foo() { + return a.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularOptionalityRemoval.js.diff b/testdata/baselines/reference/submodule/compiler/circularOptionalityRemoval.js.diff new file mode 100644 index 0000000000..b82166f69c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularOptionalityRemoval.js.diff @@ -0,0 +1,15 @@ +--- old.circularOptionalityRemoval.js ++++ new.circularOptionalityRemoval.js +@@= skipped -8, +8 lines =@@ + + //// [circularOptionalityRemoval.js] + // Constructed repro +-function fn1(x) { +- if (x === void 0) { x = x > 0 ? x : 0; } +-} ++function fn1(x = x > 0 ? x : 0) { } + // Report from user +-function fn2(x) { +- if (x === void 0) { x = someCondition ? 'value1' : x; } +-} ++function fn2(x = someCondition ? 'value1' : x) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularResolvedSignature.js.diff b/testdata/baselines/reference/submodule/compiler/circularResolvedSignature.js.diff new file mode 100644 index 0000000000..aeb6bc9367 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularResolvedSignature.js.diff @@ -0,0 +1,16 @@ +--- old.circularResolvedSignature.js ++++ new.circularResolvedSignature.js +@@= skipped -22, +22 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Component = Component; + function Component() { +- var _a = useState(function () { return ({ ++ const [state, setState] = useState(() => ({ + value: "string", // this should be a number +- foo: function (arg) { return setState(arg); }, +- bar: function (arg) { return setState(arg); }, +- }); }), state = _a[0], setState = _a[1]; ++ foo: (arg) => setState(arg), ++ bar: (arg) => setState(arg), ++ })); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularTypeArgumentsLocalAndOuterNoCrash1.symbols.diff b/testdata/baselines/reference/submodule/compiler/circularTypeArgumentsLocalAndOuterNoCrash1.symbols.diff new file mode 100644 index 0000000000..2c6636b790 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularTypeArgumentsLocalAndOuterNoCrash1.symbols.diff @@ -0,0 +1,11 @@ +--- old.circularTypeArgumentsLocalAndOuterNoCrash1.symbols ++++ new.circularTypeArgumentsLocalAndOuterNoCrash1.symbols +@@= skipped -10, +10 lines =@@ + interface NumArray extends Array {} + >NumArray : Symbol(NumArray, Decl(circularTypeArgumentsLocalAndOuterNoCrash1.ts, 2, 22)) + >T : Symbol(T, Decl(circularTypeArgumentsLocalAndOuterNoCrash1.ts, 3, 21)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(circularTypeArgumentsLocalAndOuterNoCrash1.ts, 3, 21)) + + type X = NumArray; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularTypeofWithFunctionModule.js.diff b/testdata/baselines/reference/submodule/compiler/circularTypeofWithFunctionModule.js.diff new file mode 100644 index 0000000000..14f892c497 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularTypeofWithFunctionModule.js.diff @@ -0,0 +1,43 @@ +--- old.circularTypeofWithFunctionModule.js ++++ new.circularTypeofWithFunctionModule.js +@@= skipped -15, +15 lines =@@ + + //// [circularTypeofWithFunctionModule.js] + // Repro from #6072 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + function maker(value) { + return maker.Bar; + } + (function (maker) { +- var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Bar; +- }(Foo)); ++ class Bar extends Foo { ++ } + maker.Bar = Bar; + })(maker || (maker = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt.diff new file mode 100644 index 0000000000..d2ad36d040 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt.diff @@ -0,0 +1,26 @@ +--- old.circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt ++++ new.circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.errors.txt +@@= skipped -5, +5 lines =@@ + Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +- Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +- Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +- Type 'GetProps[keyof TInjectedProps & string] | TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +- Type 'GetProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. ++ Type 'GetProps[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. ++ Type 'GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + + + ==== circularlyConstrainedMappedTypeContainingConditionalNoInfiniteInstantiationDepth.ts (1 errors) ==== +@@= skipped -79, +77 lines =@@ + !!! error TS2344: Type 'Extract> extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & Extract>] extends GetProps[keyof TInjectedProps & Extract>] ? GetProps[keyof TInjectedProps & Extract>] : TInjectedProps[keyof TInjectedProps & Extract>] : GetProps[Extract>]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + !!! error TS2344: Type 'keyof GetProps & string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & keyof GetProps & string] extends GetProps[keyof TInjectedProps & keyof GetProps & string] ? GetProps[keyof TInjectedProps & keyof GetProps & string] : TInjectedProps[keyof TInjectedProps & keyof GetProps & string] : GetProps[keyof GetProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + !!! error TS2344: Type 'string extends keyof TInjectedProps ? TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string] : GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +-!!! error TS2344: Type '(TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]) | GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +-!!! error TS2344: Type 'TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +-!!! error TS2344: Type 'GetProps[keyof TInjectedProps & string] | TInjectedProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. +-!!! error TS2344: Type 'GetProps[keyof TInjectedProps & string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. ++!!! error TS2344: Type 'GetProps[string] | (TInjectedProps[keyof TInjectedProps & string] extends GetProps[keyof TInjectedProps & string] ? GetProps[keyof TInjectedProps & string] : TInjectedProps[keyof TInjectedProps & string])' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. ++!!! error TS2344: Type 'GetProps[string]' is not assignable to type '(TInjectedProps[P] extends GetProps[P] ? GetProps[P] : never) | undefined'. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/circularlySimplifyingConditionalTypesNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/circularlySimplifyingConditionalTypesNoCrash.js.diff new file mode 100644 index 0000000000..d3eab4e603 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/circularlySimplifyingConditionalTypesNoCrash.js.diff @@ -0,0 +1,11 @@ +--- old.circularlySimplifyingConditionalTypesNoCrash.js ++++ new.circularlySimplifyingConditionalTypesNoCrash.js +@@= skipped -54, +54 lines =@@ + //// [circularlySimplifyingConditionalTypesNoCrash.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var myStoreConnect = function (mapStateToProps, mapDispatchToProps, mergeProps, options) { +- if (options === void 0) { options = {}; } ++const myStoreConnect = function (mapStateToProps, mapDispatchToProps, mergeProps, options = {}) { + return connect(mapStateToProps, mapDispatchToProps, mergeProps, options); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/class2.js.diff b/testdata/baselines/reference/submodule/compiler/class2.js.diff index 77299a1995..71353b1286 100644 --- a/testdata/baselines/reference/submodule/compiler/class2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/class2.js.diff @@ -4,13 +4,12 @@ class foo { constructor() { static f = 3; } } //// [class2.js] --let foo = (() => { -- class foo { -- constructor() { } +-var foo = /** @class */ (function () { +- function foo() { - } - foo.f = 3; - return foo; --})(); +-}()); +class foo { + constructor() { } + static f = 3; diff --git a/testdata/baselines/reference/submodule/compiler/classBlockScoping.js.diff b/testdata/baselines/reference/submodule/compiler/classBlockScoping.js.diff index 567f5e7605..9aa8413316 100644 --- a/testdata/baselines/reference/submodule/compiler/classBlockScoping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classBlockScoping.js.diff @@ -5,16 +5,20 @@ //// [classBlockScoping.js] function f(b) { - var _a; - let Foo; +- var Foo; ++ let Foo; if (b) { -- Foo = (_a = class Foo { -- static x() { -- new _a(); +- Foo = (_a = /** @class */ (function () { +- function Foo() { - } -- m() { +- Foo.x = function () { - new _a(); -- } -- }, +- }; +- Foo.prototype.m = function () { +- new _a(); +- }; +- return Foo; +- }()), - _a.y = new _a(), - _a); + Foo = class Foo { @@ -29,18 +33,19 @@ new Foo(); } else { -- let Foo = (() => { -- class Foo { -- static x() { -- new Foo(); -- } -- m() { -- new Foo(); -- } +- var Foo_1 = /** @class */ (function () { +- function Foo() { - } +- Foo.x = function () { +- new Foo(); +- }; +- Foo.prototype.m = function () { +- new Foo(); +- }; - Foo.y = new Foo(); - return Foo; -- })(); +- }()); +- new Foo_1(); + class Foo { + static y = new Foo(); + static x() { @@ -50,6 +55,6 @@ + new Foo(); + } + } - new Foo(); ++ new Foo(); } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classCannotExtendVar.js.diff b/testdata/baselines/reference/submodule/compiler/classCannotExtendVar.js.diff new file mode 100644 index 0000000000..e0824cbdcf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classCannotExtendVar.js.diff @@ -0,0 +1,14 @@ +--- old.classCannotExtendVar.js ++++ new.classCannotExtendVar.js +@@= skipped -10, +10 lines =@@ + + //// [classCannotExtendVar.js] + var Markup; +-var Markup = /** @class */ (function () { +- function Markup() { ++class Markup { ++ constructor() { + } +- return Markup; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping1.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping1.js.diff new file mode 100644 index 0000000000..16cefdf69c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping1.js.diff @@ -0,0 +1,22 @@ +--- old.classDeclarationBlockScoping1.js ++++ new.classDeclarationBlockScoping1.js +@@= skipped -9, +9 lines =@@ + } + + //// [classDeclarationBlockScoping1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + { +- var C_1 = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping2.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping2.js.diff new file mode 100644 index 0000000000..2f5496ec54 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationBlockScoping2.js.diff @@ -0,0 +1,27 @@ +--- old.classDeclarationBlockScoping2.js ++++ new.classDeclarationBlockScoping2.js +@@= skipped -12, +12 lines =@@ + + //// [classDeclarationBlockScoping2.js] + function f() { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + var c1 = C; + { +- var C_1 = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); +- var c2 = C_1; ++ class C { ++ } ++ var c2 = C; + } + return C === c1; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js.diff new file mode 100644 index 0000000000..c71a512cef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js.diff @@ -0,0 +1,13 @@ +--- old.classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js ++++ new.classDeclarationCheckUsedBeforeDefinitionInFunctionDeclaration.js +@@= skipped -9, +9 lines =@@ + function f() { + new C2(); // OK + } +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C2 { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js index 5c3db57441..06230aa986 100644 --- a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts] //// //// [classDeclarationMergedInModuleWithContinuation.ts] -module M { +namespace M { export class N { } - export module N { + export namespace N { export var v = 0; } } -module M { +namespace M { export class O extends M.N { } } diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js.diff new file mode 100644 index 0000000000..08a9510484 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.js.diff @@ -0,0 +1,47 @@ +--- old.classDeclarationMergedInModuleWithContinuation.js ++++ new.classDeclarationMergedInModuleWithContinuation.js +@@= skipped -13, +13 lines =@@ + } + + //// [classDeclarationMergedInModuleWithContinuation.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var M; + (function (M) { +- var N = /** @class */ (function () { +- function N() { +- } +- return N; +- }()); ++ class N { ++ } + M.N = N; + (function (N) { + N.v = 0; + })(N = M.N || (M.N = {})); + })(M || (M = {})); + (function (M) { +- var O = /** @class */ (function (_super) { +- __extends(O, _super); +- function O() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return O; +- }(M.N)); ++ class O extends M.N { ++ } + M.O = O; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.symbols b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.symbols index 4e879b54a2..2799dab72c 100644 --- a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.symbols +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.symbols @@ -1,27 +1,27 @@ //// [tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts] //// === classDeclarationMergedInModuleWithContinuation.ts === -module M { +namespace M { >M : Symbol(M, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 0), Decl(classDeclarationMergedInModuleWithContinuation.ts, 5, 1)) export class N { } ->N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 10), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) +>N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 13), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) - export module N { ->N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 10), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) + export namespace N { +>N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 13), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) export var v = 0; >v : Symbol(v, Decl(classDeclarationMergedInModuleWithContinuation.ts, 3, 18)) } } -module M { +namespace M { >M : Symbol(M, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 0), Decl(classDeclarationMergedInModuleWithContinuation.ts, 5, 1)) export class O extends M.N { ->O : Symbol(O, Decl(classDeclarationMergedInModuleWithContinuation.ts, 7, 10)) ->M.N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 10), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) +>O : Symbol(O, Decl(classDeclarationMergedInModuleWithContinuation.ts, 7, 13)) +>M.N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 13), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) >M : Symbol(M, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 0), Decl(classDeclarationMergedInModuleWithContinuation.ts, 5, 1)) ->N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 10), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) +>N : Symbol(N, Decl(classDeclarationMergedInModuleWithContinuation.ts, 0, 13), Decl(classDeclarationMergedInModuleWithContinuation.ts, 1, 22)) } } diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.types b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.types index ed1d6efcab..75e3422901 100644 --- a/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.types +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationMergedInModuleWithContinuation.types @@ -1,13 +1,13 @@ //// [tests/cases/compiler/classDeclarationMergedInModuleWithContinuation.ts] //// === classDeclarationMergedInModuleWithContinuation.ts === -module M { +namespace M { >M : typeof M export class N { } >N : N - export module N { + export namespace N { >N : typeof N export var v = 0; @@ -16,7 +16,7 @@ module M { } } -module M { +namespace M { >M : typeof M export class O extends M.N { diff --git a/testdata/baselines/reference/submodule/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.js.diff index 7801fd670c..69ab831633 100644 --- a/testdata/baselines/reference/submodule/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classDeclarationShouldBeOutOfScopeInComputedNames.js.diff @@ -4,16 +4,14 @@ //// [classDeclarationShouldBeOutOfScopeInComputedNames.js] --let A = (() => { -- var _a, _b; -- class A { -- constructor() { -- this[_b] = 0; -- } -- static [(_a = A.p1, A.p2)]() { return 0; } -- ; -- [A.p1]() { } +-var A = /** @class */ (function () { +- function A() { +- this[_b] = 0; - } +- A[(_a = A.p1, A.p2)] = function () { return 0; }; +- ; +- A.prototype[A.p1] = function () { }; +- var _a, _b; - _b = A.p2; - A.p1 = Symbol(); - A.p2 = Symbol(); @@ -23,7 +21,7 @@ // All of the below should be out of scope or TDZ - `A` has not finished being constructed as they are executed - A[_a] = 0; - return A; --})(); +-}()); + static [A.p1] = 0; + static [A.p2]() { return 0; } + ; diff --git a/testdata/baselines/reference/submodule/compiler/classDeclaredBeforeClassFactory.js.diff b/testdata/baselines/reference/submodule/compiler/classDeclaredBeforeClassFactory.js.diff new file mode 100644 index 0000000000..fbba984e1a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classDeclaredBeforeClassFactory.js.diff @@ -0,0 +1,40 @@ +--- old.classDeclaredBeforeClassFactory.js ++++ new.classDeclaredBeforeClassFactory.js +@@= skipped -9, +9 lines =@@ + + + //// [classDeclaredBeforeClassFactory.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + // Should be OK due to hoisting +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(makeBaseClass())); ++class Derived extends makeBaseClass() { ++} + function makeBaseClass() { +- return /** @class */ (function () { +- function Base() { +- } +- return Base; +- }()); ++ return class Base { ++ }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionAssignment.js.diff new file mode 100644 index 0000000000..9a5c8c1e6f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExpressionAssignment.js.diff @@ -0,0 +1,13 @@ +--- old.classExpressionAssignment.js ++++ new.classExpressionAssignment.js +@@= skipped -10, +10 lines =@@ + + //// [classExpressionAssignment.js] + // This is invalid +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++const A = class { ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.js.diff new file mode 100644 index 0000000000..af43cafe6b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExpressionExtendingAbstractClass.js.diff @@ -0,0 +1,37 @@ +--- old.classExpressionExtendingAbstractClass.js ++++ new.classExpressionExtendingAbstractClass.js +@@= skipped -10, +10 lines =@@ + + + //// [classExpressionExtendingAbstractClass.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(A)); ++class A { ++} ++var C = class extends A { ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionInClassStaticDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionInClassStaticDeclarations.js.diff index a9267943fe..062927f71d 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionInClassStaticDeclarations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionInClassStaticDeclarations.js.diff @@ -4,15 +4,36 @@ } //// [classExpressionInClassStaticDeclarations.js] --let C = (() => { -- class C { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { - } -- C.D = class extends C { +- C.D = /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return class_1; +- }(C)); +- return C; +-}()); +class C { + static D = class extends C { - }; -- return C; --})(); ++ }; +} diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionTest1.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionTest1.js.diff new file mode 100644 index 0000000000..5319557a70 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExpressionTest1.js.diff @@ -0,0 +1,24 @@ +--- old.classExpressionTest1.js ++++ new.classExpressionTest1.js +@@= skipped -15, +15 lines =@@ + + //// [classExpressionTest1.js] + function M() { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.f = function () { ++ class C { ++ f() { + var t; + var x; +- return { t: t, x: x }; +- }; +- return C; +- }()); ++ return { t, x }; ++ } ++ } + var v = new C(); + return v.f(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionTest2.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionTest2.js.diff new file mode 100644 index 0000000000..2c14a8f206 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExpressionTest2.js.diff @@ -0,0 +1,24 @@ +--- old.classExpressionTest2.js ++++ new.classExpressionTest2.js +@@= skipped -15, +15 lines =@@ + + //// [classExpressionTest2.js] + function M() { +- var m = /** @class */ (function () { +- function C() { +- } +- C.prototype.f = function () { ++ var m = class C { ++ f() { + var t; + var x; +- return { t: t, x: x }; +- }; +- return C; +- }()); ++ return { t, x }; ++ } ++ }; + var v = new m(); + return v.f(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionWithDecorator1.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionWithDecorator1.js.diff index 8e58ccdb88..aa61f1ade4 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionWithDecorator1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionWithDecorator1.js.diff @@ -5,8 +5,11 @@ //// [classExpressionWithDecorator1.js] -var _a; --var v = (_a = class C { -- }, +-var v = (_a = /** @class */ (function () { +- function C() { +- } +- return C; +- }()), - _a.p = 1, - _a); +var v = diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionWithResolutionOfNamespaceOfSameName01.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionWithResolutionOfNamespaceOfSameName01.js.diff index fc7054217a..5b1cc6e6a2 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionWithResolutionOfNamespaceOfSameName01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionWithResolutionOfNamespaceOfSameName01.js.diff @@ -1,8 +1,14 @@ --- old.classExpressionWithResolutionOfNamespaceOfSameName01.js +++ new.classExpressionWithResolutionOfNamespaceOfSameName01.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + } //// [classExpressionWithResolutionOfNamespaceOfSameName01.js] - var x = class C { +-var x = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++var x = class C { + prop; - }; \ No newline at end of file ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties1.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties1.js.diff index 4f7f894e4e..a425a06d76 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties1.js.diff @@ -5,8 +5,11 @@ //// [classExpressionWithStaticProperties1.js] -var _a; --var v = (_a = class C { -- }, +-var v = (_a = /** @class */ (function () { +- function C() { +- } +- return C; +- }()), - _a.a = 1, - _a.b = 2, - _a.c = _a.a + _a.b, diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties2.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties2.js.diff index 5329d8c20a..b1cbaa2bfa 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties2.js.diff @@ -5,8 +5,11 @@ //// [classExpressionWithStaticProperties2.js] -var _a; --var v = (_a = class C { -- }, +-var v = (_a = /** @class */ (function () { +- function C() { +- } +- return C; +- }()), - _a.a = 1, - _a.c = { +var v = class C { diff --git a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties3.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties3.js.diff index 923d045ae3..3cf4cfa32c 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressionWithStaticProperties3.js.diff @@ -1,18 +1,29 @@ --- old.classExpressionWithStaticProperties3.js +++ new.classExpressionWithStaticProperties3.js -@@= skipped -13, +13 lines =@@ +@@= skipped -11, +11 lines =@@ + arr.forEach(C => console.log(C.y())); + //// [classExpressionWithStaticProperties3.js] - const arr = []; - for (let i = 0; i < 3; i++) { -- let _a; -- arr.push((_a = class C { -- }, +-var arr = []; +-var _loop_1 = function (i) { +- var _a = void 0; +- arr.push((_a = /** @class */ (function () { +- function C() { +- } +- return C; +- }()), - _a.x = i, -- _a.y = () => _a.x * 2, +- _a.y = function () { return _a.x * 2; }, - _a)); +-}; +-for (var i = 0; i < 3; i++) { +- _loop_1(i); ++const arr = []; ++for (let i = 0; i < 3; i++) { + arr.push(class C { + static x = i; + static y = () => C.x * 2; + }); } - arr.forEach(C => console.log(C.y())); \ No newline at end of file +-arr.forEach(function (C) { return console.log(C.y()); }); ++arr.forEach(C => console.log(C.y())); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/classExpressions.js.diff index e13e13505d..8e160aead0 100644 --- a/testdata/baselines/reference/submodule/compiler/classExpressions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExpressions.js.diff @@ -1,16 +1,20 @@ --- old.classExpressions.js +++ new.classExpressions.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + }; //// [classExpressions.js] - let x = class B { -- constructor() { -- this.func = () => { +-var x = /** @class */ (function () { +- function B() { +- this.func = function () { - }; -- } ++let x = class B { + prop; - onStart() { ++ onStart() { } +- B.prototype.onStart = function () { + func = () => { -+ }; - }; \ No newline at end of file + }; +- return B; +-}()); ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.errors.txt b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.errors.txt index ab35af1762..8eff155a28 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.errors.txt @@ -2,7 +2,7 @@ classExtendingQualifiedName.ts(5,23): error TS2339: Property 'C' does not exist ==== classExtendingQualifiedName.ts (1 errors) ==== - module M { + namespace M { class C { } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js index e8ebde0d36..ea085b11a5 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classExtendingQualifiedName.ts] //// //// [classExtendingQualifiedName.ts] -module M { +namespace M { class C { } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js.diff new file mode 100644 index 0000000000..edaf21c7bb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.js.diff @@ -0,0 +1,40 @@ +--- old.classExtendingQualifiedName.js ++++ new.classExtendingQualifiedName.js +@@= skipped -9, +9 lines =@@ + } + + //// [classExtendingQualifiedName.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); +- var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D; +- }(M.C)); ++ class C { ++ } ++ class D extends M.C { ++ } + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.symbols b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.symbols index e244697d6e..b945442b3a 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/classExtendingQualifiedName.ts] //// === classExtendingQualifiedName.ts === -module M { +namespace M { >M : Symbol(M, Decl(classExtendingQualifiedName.ts, 0, 0)) class C { ->C : Symbol(C, Decl(classExtendingQualifiedName.ts, 0, 10)) +>C : Symbol(C, Decl(classExtendingQualifiedName.ts, 0, 13)) } class D extends M.C { diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.types b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.types index 0961da1288..23c5ed3e54 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classExtendingQualifiedName.ts] //// === classExtendingQualifiedName.ts === -module M { +namespace M { >M : typeof M class C { diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js index 9a0e692d35..5e9d1b37bc 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classExtendingQualifiedName2.ts] //// //// [classExtendingQualifiedName2.ts] -module M { +namespace M { export class C { } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js.diff new file mode 100644 index 0000000000..4f183114a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.js.diff @@ -0,0 +1,41 @@ +--- old.classExtendingQualifiedName2.js ++++ new.classExtendingQualifiedName2.js +@@= skipped -9, +9 lines =@@ + } + + //// [classExtendingQualifiedName2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + M.C = C; +- var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D; +- }(M.C)); ++ class D extends M.C { ++ } + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.symbols b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.symbols index f2bc769a60..123db9d670 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.symbols @@ -1,17 +1,17 @@ //// [tests/cases/compiler/classExtendingQualifiedName2.ts] //// === classExtendingQualifiedName2.ts === -module M { +namespace M { >M : Symbol(M, Decl(classExtendingQualifiedName2.ts, 0, 0)) export class C { ->C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 10)) +>C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 13)) } class D extends M.C { >D : Symbol(D, Decl(classExtendingQualifiedName2.ts, 2, 5)) ->M.C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 10)) +>M.C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 13)) >M : Symbol(M, Decl(classExtendingQualifiedName2.ts, 0, 0)) ->C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 10)) +>C : Symbol(C, Decl(classExtendingQualifiedName2.ts, 0, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.types b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.types index 53194dadf5..9aa708cce2 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendingQualifiedName2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classExtendingQualifiedName2.ts] //// === classExtendingQualifiedName2.ts === -module M { +namespace M { >M : typeof M export class C { diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsAcrossFiles.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsAcrossFiles.js.diff index d27eb5143d..338cd9afa9 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsAcrossFiles.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExtendsAcrossFiles.js.diff @@ -1,20 +1,90 @@ --- old.classExtendsAcrossFiles.js +++ new.classExtendsAcrossFiles.js -@@= skipped -22, +22 lines =@@ +@@= skipped -20, +20 lines =@@ + + //// [b.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.b = void 0; -var a_1 = require("./a"); +const a_1 = require("./a"); exports.b = { - f: () => { - class A { -@@= skipped -14, +14 lines =@@ +- f: function () { +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++ f: () => { ++ class A { ++ } ++ class B extends A { ++ } + a_1.a.f(); + } + }; + //// [a.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.a = void 0; -var b_1 = require("./b"); +const b_1 = require("./b"); exports.a = { - f: () => { - class A { \ No newline at end of file +- f: function () { +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++ f: () => { ++ class A { ++ } ++ class B extends A { ++ } + b_1.b.f(); + } + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt index bf070e1385..05e2d691c8 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.errors.txt @@ -5,11 +5,11 @@ classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts(10,21): error T class A { a: number; } - module A { + namespace A { export var v: string; } - module Foo { + namespace Foo { var A = 1; class B extends A { ~ diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js index 47d68ab6fc..be46b1b1c2 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js @@ -4,11 +4,11 @@ class A { a: number; } -module A { +namespace A { export var v: string; } -module Foo { +namespace Foo { var A = 1; class B extends A { b: string; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js.diff index f33d1dcd1d..ee4910fa3b 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.js.diff @@ -1,17 +1,45 @@ --- old.classExtendsClauseClassMergedWithModuleNotReferingConstructor.js +++ new.classExtendsClauseClassMergedWithModuleNotReferingConstructor.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + } //// [classExtendsClauseClassMergedWithModuleNotReferingConstructor.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + a; - } ++} (function (A) { })(A || (A = {})); -@@= skipped -7, +8 lines =@@ + var Foo; (function (Foo) { var A = 1; - class B extends A { +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++ class B extends A { + b; - } ++ } })(Foo || (Foo = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.symbols b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.symbols index 4adae999f7..8c5125f55f 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.symbols @@ -7,14 +7,14 @@ class A { a: number; >a : Symbol(A.a, Decl(classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts, 0, 9)) } -module A { +namespace A { >A : Symbol(A, Decl(classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts, 0, 0), Decl(classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts, 2, 1)) export var v: string; >v : Symbol(v, Decl(classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts, 4, 14)) } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(classExtendsClauseClassMergedWithModuleNotReferingConstructor.ts, 5, 1)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.types b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.types index 5d4f129d99..7671fde24c 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassMergedWithModuleNotReferingConstructor.types @@ -7,14 +7,14 @@ class A { a: number; >a : number } -module A { +namespace A { >A : typeof A export var v: string; >v : string } -module Foo { +namespace Foo { >Foo : typeof Foo var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.errors.txt b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.errors.txt index 1803ad2ae4..88be78ebff 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.errors.txt @@ -3,7 +3,7 @@ classExtendsClauseClassNotReferringConstructor.ts(4,21): error TS2507: Type 'num ==== classExtendsClauseClassNotReferringConstructor.ts (1 errors) ==== class A { a: number; } - module Foo { + namespace Foo { var A = 1; class B extends A { b: string; } ~ diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js index 4b14617d61..c83ad90c9d 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js @@ -2,7 +2,7 @@ //// [classExtendsClauseClassNotReferringConstructor.ts] class A { a: number; } -module Foo { +namespace Foo { var A = 1; class B extends A { b: string; } } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js.diff index d244b7dfc5..63e7080b54 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.js.diff @@ -1,15 +1,43 @@ --- old.classExtendsClauseClassNotReferringConstructor.js +++ new.classExtendsClauseClassNotReferringConstructor.js -@@= skipped -9, +9 lines =@@ +@@= skipped -8, +8 lines =@@ + //// [classExtendsClauseClassNotReferringConstructor.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + a; - } ++} var Foo; (function (Foo) { var A = 1; - class B extends A { +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); ++ class B extends A { + b; - } ++ } })(Foo || (Foo = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.symbols b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.symbols index 6734fbf528..a8a3a90fc2 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.symbols @@ -5,7 +5,7 @@ class A { a: number; } >A : Symbol(A, Decl(classExtendsClauseClassNotReferringConstructor.ts, 0, 0)) >a : Symbol(A.a, Decl(classExtendsClauseClassNotReferringConstructor.ts, 0, 9)) -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(classExtendsClauseClassNotReferringConstructor.ts, 0, 22)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.types b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.types index ac4cb99f72..e6c9df9725 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendsClauseClassNotReferringConstructor.types @@ -5,7 +5,7 @@ class A { a: number; } >A : A >a : number -module Foo { +namespace Foo { >Foo : typeof Foo var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterface.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsInterface.js.diff new file mode 100644 index 0000000000..a9f9931bce --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterface.js.diff @@ -0,0 +1,53 @@ +--- old.classExtendsInterface.js ++++ new.classExtendsInterface.js +@@= skipped -10, +10 lines =@@ + + + //// [classExtendsInterface.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A; +-}(Comparable)); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var A2 = /** @class */ (function (_super) { +- __extends(A2, _super); +- function A2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A2; +-}(Comparable2)); +-var B2 = /** @class */ (function () { +- function B2() { +- } +- return B2; +-}()); ++class A extends Comparable { ++} ++class B { ++} ++class A2 extends Comparable2 { ++} ++class B2 { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInExpression.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInExpression.js.diff new file mode 100644 index 0000000000..256b162fe9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInExpression.js.diff @@ -0,0 +1,33 @@ +--- old.classExtendsInterfaceInExpression.js ++++ new.classExtendsInterfaceInExpression.js +@@= skipped -10, +10 lines =@@ + + + //// [classExtendsInterfaceInExpression.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function factory(a) { + return null; + } +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(factory(A))); ++class C extends factory(A) { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.errors.txt b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.errors.txt index d3c88f9094..870985a25d 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.errors.txt @@ -4,7 +4,7 @@ classExtendsInterfaceInModule.ts(14,17): error TS2689: Cannot extend an interfac ==== classExtendsInterfaceInModule.ts (3 errors) ==== - module M { + namespace M { export interface I1 {} export interface I2 {} } @@ -15,7 +15,7 @@ classExtendsInterfaceInModule.ts(14,17): error TS2689: Cannot extend an interfac ~ !!! error TS2689: Cannot extend an interface 'M.I2'. Did you mean 'implements'? - module Mod { + namespace Mod { export namespace Nested { export interface I {} } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js index 69ab8b6ffc..1535f8ef06 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/classExtendsInterfaceInModule.ts] //// //// [classExtendsInterfaceInModule.ts] -module M { +namespace M { export interface I1 {} export interface I2 {} } class C1 extends M.I1 {} class C2 extends M.I2 {} -module Mod { +namespace Mod { export namespace Nested { export interface I {} } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js.diff new file mode 100644 index 0000000000..96a71eb366 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.js.diff @@ -0,0 +1,48 @@ +--- old.classExtendsInterfaceInModule.js ++++ new.classExtendsInterfaceInModule.js +@@= skipped -17, +17 lines =@@ + + + //// [classExtendsInterfaceInModule.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function (_super) { +- __extends(C1, _super); +- function C1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C1; +-}(M.I1)); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C2; +-}(M.I2)); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D; +-}(Mod.Nested.I)); ++class C1 extends M.I1 { ++} ++class C2 extends M.I2 { ++} ++class D extends Mod.Nested.I { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.symbols b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.symbols index ce11895ebf..897cffcadf 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/classExtendsInterfaceInModule.ts] //// === classExtendsInterfaceInModule.ts === -module M { +namespace M { >M : Symbol(M, Decl(classExtendsInterfaceInModule.ts, 0, 0)) export interface I1 {} ->I1 : Symbol(I1, Decl(classExtendsInterfaceInModule.ts, 0, 10)) +>I1 : Symbol(I1, Decl(classExtendsInterfaceInModule.ts, 0, 13)) export interface I2 {} >I2 : Symbol(I2, Decl(classExtendsInterfaceInModule.ts, 1, 24)) @@ -21,11 +21,11 @@ class C2 extends M.I2 {} >M : Symbol(M, Decl(classExtendsInterfaceInModule.ts, 0, 0)) >T : Symbol(T, Decl(classExtendsInterfaceInModule.ts, 5, 9)) -module Mod { +namespace Mod { >Mod : Symbol(Mod, Decl(classExtendsInterfaceInModule.ts, 5, 30)) export namespace Nested { ->Nested : Symbol(Nested, Decl(classExtendsInterfaceInModule.ts, 7, 12)) +>Nested : Symbol(Nested, Decl(classExtendsInterfaceInModule.ts, 7, 15)) export interface I {} >I : Symbol(I, Decl(classExtendsInterfaceInModule.ts, 8, 26)) @@ -34,7 +34,7 @@ module Mod { class D extends Mod.Nested.I {} >D : Symbol(D, Decl(classExtendsInterfaceInModule.ts, 11, 1)) ->Mod.Nested : Symbol(Mod.Nested, Decl(classExtendsInterfaceInModule.ts, 7, 12)) +>Mod.Nested : Symbol(Mod.Nested, Decl(classExtendsInterfaceInModule.ts, 7, 15)) >Mod : Symbol(Mod, Decl(classExtendsInterfaceInModule.ts, 5, 30)) ->Nested : Symbol(Mod.Nested, Decl(classExtendsInterfaceInModule.ts, 7, 12)) +>Nested : Symbol(Mod.Nested, Decl(classExtendsInterfaceInModule.ts, 7, 15)) diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.types b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.types index fb8d47fbc2..afeb3e1afe 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.types +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceInModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classExtendsInterfaceInModule.ts] //// === classExtendsInterfaceInModule.ts === -module M { +namespace M { export interface I1 {} export interface I2 {} } @@ -17,7 +17,7 @@ class C2 extends M.I2 {} >M : any >I2 : any -module Mod { +namespace Mod { export namespace Nested { export interface I {} } diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.js.diff index 14879510ab..2d6a53bd69 100644 --- a/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterfaceThatExtendsClassWithPrivates1.js.diff @@ -1,20 +1,30 @@ --- old.classExtendsInterfaceThatExtendsClassWithPrivates1.js +++ new.classExtendsInterfaceThatExtendsClassWithPrivates1.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + } //// [classExtendsInterfaceThatExtendsClassWithPrivates1.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.x = 1; - } - foo(x) { return x; } -+ x = 1; - } - class D2 { -- constructor() { +- C.prototype.foo = function (x) { return x; }; +- return C; +-}()); +-var D2 = /** @class */ (function () { +- function D2() { - this.x = 3; - } - foo(x) { return x; } +- D2.prototype.foo = function (x) { return x; }; +- D2.prototype.other = function (x) { return x; }; +- return D2; +-}()); ++class C { ++ foo(x) { return x; } ++ x = 1; ++} ++class D2 { ++ foo(x) { return x; } + x = 3; - other(x) { return x; } - } \ No newline at end of file ++ other(x) { return x; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsInterface_not.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsInterface_not.js.diff new file mode 100644 index 0000000000..d49f0d4a55 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsInterface_not.js.diff @@ -0,0 +1,30 @@ +--- old.classExtendsInterface_not.js ++++ new.classExtendsInterface_not.js +@@= skipped -4, +4 lines =@@ + + + //// [classExtendsInterface_not.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}("".bogus)); ++class C extends "".bogus { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsMultipleBaseClasses.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsMultipleBaseClasses.js.diff new file mode 100644 index 0000000000..96862691a8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsMultipleBaseClasses.js.diff @@ -0,0 +1,44 @@ +--- old.classExtendsMultipleBaseClasses.js ++++ new.classExtendsMultipleBaseClasses.js +@@= skipped -5, +5 lines =@@ + class C extends A,B { } + + //// [classExtendsMultipleBaseClasses.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(A)); ++class A { ++} ++class B { ++} ++class C extends A, B { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtendsNull.js.diff b/testdata/baselines/reference/submodule/compiler/classExtendsNull.js.diff new file mode 100644 index 0000000000..f70b12e860 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtendsNull.js.diff @@ -0,0 +1,47 @@ +--- old.classExtendsNull.js ++++ new.classExtendsNull.js +@@= skipped -14, +14 lines =@@ + } + + //// [classExtendsNull.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- var _this = _super.call(this) || this; +- return Object.create(null); +- } +- return C; +-}(null)); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return Object.create(null); +- } +- return D; +-}(null)); ++class C extends null { ++ constructor() { ++ super(); ++ return Object.create(null); ++ } ++} ++class D extends null { ++ constructor() { ++ return Object.create(null); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classExtensionNameOutput.js.diff b/testdata/baselines/reference/submodule/compiler/classExtensionNameOutput.js.diff new file mode 100644 index 0000000000..6396c42ea0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classExtensionNameOutput.js.diff @@ -0,0 +1,44 @@ +--- old.classExtensionNameOutput.js ++++ new.classExtensionNameOutput.js +@@= skipped -10, +10 lines =@@ + } + + //// [classExtensionNameOutput.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} + if (true) { +- var B_1 = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(A)); +- var foo = function () { +- new B_1(); ++ class B extends A { ++ } ++ const foo = function () { ++ new B(); + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classFunctionMerging.js.diff b/testdata/baselines/reference/submodule/compiler/classFunctionMerging.js.diff new file mode 100644 index 0000000000..aa1a694312 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classFunctionMerging.js.diff @@ -0,0 +1,10 @@ +--- old.classFunctionMerging.js ++++ new.classFunctionMerging.js +@@= skipped -14, +14 lines =@@ + const b = Foo(12); + + //// [classFunctionMerging.js] +-var a = new Foo(""); +-var b = Foo(12); ++const a = new Foo(""); ++const b = Foo(12); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classFunctionMerging2.js.diff b/testdata/baselines/reference/submodule/compiler/classFunctionMerging2.js.diff new file mode 100644 index 0000000000..d863c6ba28 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classFunctionMerging2.js.diff @@ -0,0 +1,9 @@ +--- old.classFunctionMerging2.js ++++ new.classFunctionMerging2.js +@@= skipped -15, +15 lines =@@ + console.log(b.a) + + //// [classFunctionMerging2.js] +-var b = new B("Hey"); ++let b = new B("Hey"); + console.log(b.a); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classHeritageWithTrailingSeparator.js.diff b/testdata/baselines/reference/submodule/compiler/classHeritageWithTrailingSeparator.js.diff index c370fe8cfd..b649c27267 100644 --- a/testdata/baselines/reference/submodule/compiler/classHeritageWithTrailingSeparator.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classHeritageWithTrailingSeparator.js.diff @@ -1,10 +1,38 @@ --- old.classHeritageWithTrailingSeparator.js +++ new.classHeritageWithTrailingSeparator.js -@@= skipped -6, +6 lines =@@ +@@= skipped -5, +5 lines =@@ + } //// [classHeritageWithTrailingSeparator.js] - class C { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D; +-}(C)); ++class C { + foo; - } - class D extends C { - } \ No newline at end of file ++} ++class D extends C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementingInterfaceIndexer.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementingInterfaceIndexer.js.diff new file mode 100644 index 0000000000..7e11b9eadc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementingInterfaceIndexer.js.diff @@ -0,0 +1,13 @@ +--- old.classImplementingInterfaceIndexer.js ++++ new.classImplementingInterfaceIndexer.js +@@= skipped -8, +8 lines =@@ + } + + //// [classImplementingInterfaceIndexer.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass1.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass1.js.diff new file mode 100644 index 0000000000..e9762ed659 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass1.js.diff @@ -0,0 +1,20 @@ +--- old.classImplementsClass1.js ++++ new.classImplementsClass1.js +@@= skipped -4, +4 lines =@@ + class C implements A { } + + //// [classImplementsClass1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class A { ++} ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass2.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass2.js.diff new file mode 100644 index 0000000000..0b1e7bbce4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass2.js.diff @@ -0,0 +1,54 @@ +--- old.classImplementsClass2.js ++++ new.classImplementsClass2.js +@@= skipped -15, +15 lines =@@ + c2 = c; + + //// [classImplementsClass2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); // error +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C2.prototype.foo = function () { ++class A { ++ foo() { return 1; } ++} ++class C { ++} // error ++class C2 extends A { ++ foo() { + return 1; +- }; +- return C2; +-}(A)); ++ } ++} + var c; + var c2; + c = c2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass3.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass3.js.diff new file mode 100644 index 0000000000..2d04fe51e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass3.js.diff @@ -0,0 +1,53 @@ +--- old.classImplementsClass3.js ++++ new.classImplementsClass3.js +@@= skipped -16, +16 lines =@@ + c2 = c; + + //// [classImplementsClass3.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class A { ++ foo() { return 1; } ++} ++class C { ++ foo() { + return 1; +- }; +- return C; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return C2; +-}(A)); ++} ++class C2 extends A { ++} + // no errors + var c; + var c2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass4.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass4.js.diff index a6ccd4ec53..a2f0aed153 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsClass4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass4.js.diff @@ -1,13 +1,55 @@ --- old.classImplementsClass4.js +++ new.classImplementsClass4.js -@@= skipped -19, +19 lines =@@ +@@= skipped -18, +18 lines =@@ + c2 = c; //// [classImplementsClass4.js] - class A { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { - this.x = 1; - } +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class A { + x = 1; - foo() { return 1; } - } - class C { \ No newline at end of file ++ foo() { return 1; } ++} ++class C { ++ foo() { + return 1; +- }; +- return C; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return C2; +-}(A)); ++} ++class C2 extends A { ++} + var c; + var c2; + c = c2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass5.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass5.js.diff index 485d2a0373..90629fa711 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsClass5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass5.js.diff @@ -1,20 +1,57 @@ --- old.classImplementsClass5.js +++ new.classImplementsClass5.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + c2 = c; //// [classImplementsClass5.js] - class A { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { - this.x = 1; - } -+ x = 1; - foo() { return 1; } - } - class C { -- constructor() { +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { - this.x = 1; - } +- C.prototype.foo = function () { ++class A { ++ x = 1; ++ foo() { return 1; } ++} ++class C { + x = 1; - foo() { ++ foo() { return 1; - } \ No newline at end of file +- }; +- return C; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return C2; +-}(A)); ++} ++class C2 extends A { ++} + var c; + var c2; + c = c2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass6.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass6.js.diff new file mode 100644 index 0000000000..f45f0aa450 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass6.js.diff @@ -0,0 +1,57 @@ +--- old.classImplementsClass6.js ++++ new.classImplementsClass6.js +@@= skipped -23, +23 lines =@@ + c2.bar(); // should error + + //// [classImplementsClass6.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.bar = function () { ++class A { ++ static bar() { + return ""; +- }; +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { + } +- C.prototype.foo = function () { ++ foo() { return 1; } ++} ++class C { ++ foo() { + return 1; +- }; +- return C; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return C2; +-}(A)); ++} ++class C2 extends A { ++} + var c; + var c2; + c = c2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsClass7.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsClass7.js.diff index 48b53599b2..634e511627 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsClass7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classImplementsClass7.js.diff @@ -1,10 +1,21 @@ --- old.classImplementsClass7.js +++ new.classImplementsClass7.js -@@= skipped -9, +9 lines =@@ +@@= skipped -8, +8 lines =@@ + //// [classImplementsClass7.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); ++class A { + x; - } - class B { - } \ No newline at end of file ++} ++class B { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js index a7fab51071..eda0f6a55e 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js +++ b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/classImplementsImportedInterface.ts] //// //// [classImplementsImportedInterface.ts] -module M1 { +namespace M1 { export interface I { foo(); } } -module M2 { +namespace M2 { import T = M1.I; class C implements T { foo() {} diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js.diff index b26c628717..a9aba75dac 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.js.diff @@ -4,7 +4,14 @@ //// [classImplementsImportedInterface.js] var M2; (function (M2) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); + var T = M1.I; - class C { - foo() { } - } \ No newline at end of file ++ class C { ++ foo() { } ++ } + })(M2 || (M2 = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.symbols b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.symbols index fdffc595db..435b40c125 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.symbols +++ b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.symbols @@ -1,28 +1,28 @@ //// [tests/cases/compiler/classImplementsImportedInterface.ts] //// === classImplementsImportedInterface.ts === -module M1 { +namespace M1 { >M1 : Symbol(M1, Decl(classImplementsImportedInterface.ts, 0, 0)) export interface I { ->I : Symbol(I, Decl(classImplementsImportedInterface.ts, 0, 11)) +>I : Symbol(I, Decl(classImplementsImportedInterface.ts, 0, 14)) foo(); >foo : Symbol(I.foo, Decl(classImplementsImportedInterface.ts, 1, 24)) } } -module M2 { +namespace M2 { >M2 : Symbol(M2, Decl(classImplementsImportedInterface.ts, 4, 1)) import T = M1.I; ->T : Symbol(T, Decl(classImplementsImportedInterface.ts, 6, 11)) +>T : Symbol(T, Decl(classImplementsImportedInterface.ts, 6, 14)) >M1 : Symbol(M1, Decl(classImplementsImportedInterface.ts, 0, 0)) ->I : Symbol(T, Decl(classImplementsImportedInterface.ts, 0, 11)) +>I : Symbol(T, Decl(classImplementsImportedInterface.ts, 0, 14)) class C implements T { >C : Symbol(C, Decl(classImplementsImportedInterface.ts, 7, 20)) ->T : Symbol(T, Decl(classImplementsImportedInterface.ts, 6, 11)) +>T : Symbol(T, Decl(classImplementsImportedInterface.ts, 6, 14)) foo() {} >foo : Symbol(C.foo, Decl(classImplementsImportedInterface.ts, 8, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.types b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.types index 561be040b6..e5b973cd7a 100644 --- a/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.types +++ b/testdata/baselines/reference/submodule/compiler/classImplementsImportedInterface.types @@ -1,14 +1,14 @@ //// [tests/cases/compiler/classImplementsImportedInterface.ts] //// === classImplementsImportedInterface.ts === -module M1 { +namespace M1 { export interface I { foo(); >foo : () => any } } -module M2 { +namespace M2 { >M2 : typeof M2 import T = M1.I; diff --git a/testdata/baselines/reference/submodule/compiler/classImplementsPrimitive.js.diff b/testdata/baselines/reference/submodule/compiler/classImplementsPrimitive.js.diff new file mode 100644 index 0000000000..6e48c3f93e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classImplementsPrimitive.js.diff @@ -0,0 +1,69 @@ +--- old.classImplementsPrimitive.js ++++ new.classImplementsPrimitive.js +@@= skipped -17, +17 lines =@@ + + //// [classImplementsPrimitive.js] + // classes cannot implement primitives +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); +-var C4 = /** @class */ (function () { +- function class_1() { +- } +- return class_1; +-}()); +-var C5 = /** @class */ (function () { +- function class_2() { +- } +- return class_2; +-}()); +-var C6 = /** @class */ (function () { +- function class_3() { +- } +- return class_3; +-}()); +-var C7 = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C8 = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C9 = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} ++class C2 { ++} ++class C3 { ++} ++const C4 = class { ++}; ++const C5 = class { ++}; ++const C6 = class { ++}; ++const C7 = class A { ++}; ++const C8 = class B { ++}; ++const C9 = class C { ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classInConvertedLoopES5.js.diff b/testdata/baselines/reference/submodule/compiler/classInConvertedLoopES5.js.diff index 3efec32be8..edfa1a6ecc 100644 --- a/testdata/baselines/reference/submodule/compiler/classInConvertedLoopES5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classInConvertedLoopES5.js.diff @@ -1,21 +1,27 @@ --- old.classInConvertedLoopES5.js +++ new.classInConvertedLoopES5.js -@@= skipped -13, +13 lines =@@ +@@= skipped -11, +11 lines =@@ + } + //// [classInConvertedLoopES5.js] - const classesByRow = {}; - for (const row of ['1', '2', '3', '4', '5']) { -- let RowClass = (() => { -- class RowClass { -- constructor() { -- this.row = row; -- } +-var classesByRow = {}; +-var _loop_1 = function (row) { +- var RowClass = /** @class */ (function () { +- function RowClass() { +- this.row = row; - } -- RowClass.factory = () => new RowClass(); +- RowClass.factory = function () { return new RowClass(); }; - return RowClass; -- })(); +- }()); ++const classesByRow = {}; ++for (const row of ['1', '2', '3', '4', '5']) { + class RowClass { + row = row; + static factory = () => new RowClass(); + } classesByRow[row] = RowClass; +-}; +-for (var _i = 0, _a = ['1', '2', '3', '4', '5']; _i < _a.length; _i++) { +- var row = _a[_i]; +- _loop_1(row); } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classIndexer.js.diff b/testdata/baselines/reference/submodule/compiler/classIndexer.js.diff new file mode 100644 index 0000000000..ce0f7808e4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classIndexer.js.diff @@ -0,0 +1,14 @@ +--- old.classIndexer.js ++++ new.classIndexer.js +@@= skipped -7, +7 lines =@@ + } + + //// [classIndexer.js] +-var C123 = /** @class */ (function () { +- function C123() { ++class C123 { ++ constructor() { + } +- return C123; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classIndexer2.js.diff b/testdata/baselines/reference/submodule/compiler/classIndexer2.js.diff index e0fb3a9d7d..cbeca78741 100644 --- a/testdata/baselines/reference/submodule/compiler/classIndexer2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classIndexer2.js.diff @@ -1,11 +1,16 @@ --- old.classIndexer2.js +++ new.classIndexer2.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [classIndexer2.js] - class C123 { +-var C123 = /** @class */ (function () { +- function C123() { ++class C123 { + x; + y; - constructor() { ++ constructor() { } - } \ No newline at end of file +- return C123; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classIndexer3.js.diff b/testdata/baselines/reference/submodule/compiler/classIndexer3.js.diff index 97a76b2577..4759b4c39d 100644 --- a/testdata/baselines/reference/submodule/compiler/classIndexer3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classIndexer3.js.diff @@ -1,9 +1,41 @@ --- old.classIndexer3.js +++ new.classIndexer3.js -@@= skipped -17, +17 lines =@@ - } +@@= skipped -12, +12 lines =@@ } - class D123 extends C123 { + + //// [classIndexer3.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C123 = /** @class */ (function () { +- function C123() { +- } +- return C123; +-}()); +-var D123 = /** @class */ (function (_super) { +- __extends(D123, _super); +- function D123() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D123; +-}(C123)); ++class C123 { ++ constructor() { ++ } ++} ++class D123 extends C123 { + x; + y; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classIndexer4.js.diff b/testdata/baselines/reference/submodule/compiler/classIndexer4.js.diff new file mode 100644 index 0000000000..29fb12f938 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classIndexer4.js.diff @@ -0,0 +1,14 @@ +--- old.classIndexer4.js ++++ new.classIndexer4.js +@@= skipped -12, +12 lines =@@ + } + + //// [classIndexer4.js] +-var C123 = /** @class */ (function () { +- function C123() { ++class C123 { ++ constructor() { + } +- return C123; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classInheritence.js.diff b/testdata/baselines/reference/submodule/compiler/classInheritence.js.diff new file mode 100644 index 0000000000..3a93de8cd0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classInheritence.js.diff @@ -0,0 +1,39 @@ +--- old.classInheritence.js ++++ new.classInheritence.js +@@= skipped -4, +4 lines =@@ + class A extends A { } + + //// [classInheritence.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A; +-}(A)); ++class B extends A { ++} ++class A extends A { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerScoping.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerScoping.js.diff index 8f41ee3304..0713123d62 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerScoping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerScoping.js.diff @@ -4,26 +4,29 @@ //// [classMemberInitializerScoping.js] var aaa = 1; --let CCC = (() => { -- class CCC { -- constructor(aaa) { -- this.y = aaa; -- this.y = ''; // was: error, cannot assign string to number -- } +-var CCC = /** @class */ (function () { +- function CCC(aaa) { +- this.y = aaa; +class CCC { + y = aaa; + static staticY = aaa; // This shouldnt be error + constructor(aaa) { -+ this.y = ''; // was: error, cannot assign string to number + this.y = ''; // was: error, cannot assign string to number } - CCC.staticY = aaa; // This shouldnt be error - return CCC; --})(); +-}()); +} // above is equivalent to this: var aaaa = 1; - class CCCC { +-var CCCC = /** @class */ (function () { +- function CCCC(aaaa) { ++class CCCC { + y; - constructor(aaaa) { ++ constructor(aaaa) { this.y = aaaa; - this.y = ''; \ No newline at end of file + this.y = ''; + } +- return CCCC; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping.js.diff index a8bac01050..c58f1770ac 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping.js.diff @@ -4,21 +4,19 @@ } //// [classMemberInitializerWithLamdaScoping.js] --let Test = (() => { -- class Test { -- constructor(field) { -- this.field = field; -- this.messageHandler = () => { -- var field = this.field; -- console.log(field); // Using field here shouldnt be error -- }; -- } +-var Test = /** @class */ (function () { +- function Test(field) { +- var _this = this; +class Test { + field; + constructor(field) { -+ this.field = field; + this.field = field; +- this.messageHandler = function () { +- var field = _this.field; +- console.log(field); // Using field here shouldnt be error +- }; } -- Test.staticMessageHandler = () => { +- Test.staticMessageHandler = function () { + messageHandler = () => { + var field = this.field; + console.log(field); // Using field here shouldnt be error @@ -29,25 +27,22 @@ console.log(field); // Using field here shouldnt be error }; - return Test; --})(); +-}()); +} var field1; --let Test1 = (() => { -- class Test1 { -- constructor(field1) { -- this.field1 = field1; -- this.messageHandler = () => { -- console.log(field1); // But this should be error as the field1 will resolve to var field1 -- // but since this code would be generated inside constructor, in generated js -- // it would resolve to private field1 and thats not what user intended here. -- }; -- } +-var Test1 = /** @class */ (function () { +- function Test1(field1) { +class Test1 { + field1; + constructor(field1) { -+ this.field1 = field1; + this.field1 = field1; +- this.messageHandler = function () { +- console.log(field1); // But this should be error as the field1 will resolve to var field1 +- // but since this code would be generated inside constructor, in generated js +- // it would resolve to private field1 and thats not what user intended here. +- }; } -- Test1.staticMessageHandler = () => { +- Test1.staticMessageHandler = function () { + messageHandler = () => { + console.log(field1); // But this should be error as the field1 will resolve to var field1 + // but since this code would be generated inside constructor, in generated js @@ -57,5 +52,5 @@ console.log(field1); // This shouldnt be error as its a static property }; - return Test1; --})(); +-}()); +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping2.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping2.js.diff index e2205f1948..663195c0d9 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping2.js.diff @@ -1,21 +1,26 @@ --- old.classMemberInitializerWithLamdaScoping2.js +++ new.classMemberInitializerWithLamdaScoping2.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + //// [classMemberInitializerWithLamdaScoping2_0.js] var field1; //// [classMemberInitializerWithLamdaScoping2_1.js] - class Test1 { +-var Test1 = /** @class */ (function () { +- function Test1(field1) { ++class Test1 { + field1; - constructor(field1) { ++ constructor(field1) { this.field1 = field1; -- this.messageHandler = () => { +- this.messageHandler = function () { - console.log(field1); // But this should be error as the field1 will resolve to var field1 - // but since this code would be generated inside constructor, in generated js - // it would resolve to private field1 and thats not what user intended here. - }; } +- return Test1; +-}()); + messageHandler = () => { + console.log(field1); // But this should be error as the field1 will resolve to var field1 + // but since this code would be generated inside constructor, in generated js + // it would resolve to private field1 and thats not what user intended here. + }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping3.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping3.js.diff index ea26268d8d..e48bc69e6b 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping3.js.diff @@ -1,22 +1,27 @@ --- old.classMemberInitializerWithLamdaScoping3.js +++ new.classMemberInitializerWithLamdaScoping3.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Test1 = void 0; - class Test1 { +-var Test1 = /** @class */ (function () { +- function Test1(field1) { ++class Test1 { + field1; - constructor(field1) { ++ constructor(field1) { this.field1 = field1; -- this.messageHandler = () => { +- this.messageHandler = function () { - console.log(field1); // But this should be error as the field1 will resolve to var field1 - // but since this code would be generated inside constructor, in generated js - // it would resolve to private field1 and thats not what user intended here. - }; } +- return Test1; +-}()); + messageHandler = () => { + console.log(field1); // But this should be error as the field1 will resolve to var field1 + // but since this code would be generated inside constructor, in generated js + // it would resolve to private field1 and thats not what user intended here. + }; - } ++} exports.Test1 = Test1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping4.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping4.js.diff index f4a315a51b..0412c728bc 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping4.js.diff @@ -1,18 +1,23 @@ --- old.classMemberInitializerWithLamdaScoping4.js +++ new.classMemberInitializerWithLamdaScoping4.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Test1 = void 0; - class Test1 { +-var Test1 = /** @class */ (function () { +- function Test1(field1) { ++class Test1 { + field1; - constructor(field1) { ++ constructor(field1) { this.field1 = field1; -- this.messageHandler = () => { +- this.messageHandler = function () { - console.log(field1); // Should be error that couldnt find symbol field1 - }; } +- return Test1; +-}()); + messageHandler = () => { + console.log(field1); // Should be error that couldnt find symbol field1 + }; - } ++} exports.Test1 = Test1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping5.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping5.js.diff index 6fae904b4f..9bb62b150f 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberInitializerWithLamdaScoping5.js.diff @@ -1,14 +1,20 @@ --- old.classMemberInitializerWithLamdaScoping5.js +++ new.classMemberInitializerWithLamdaScoping5.js -@@= skipped -15, +15 lines =@@ +@@= skipped -13, +13 lines =@@ + } + //// [classMemberInitializerWithLamdaScoping5.js] - class Greeter { - constructor(message) { -- this.messageHandler = (message) => { +-var Greeter = /** @class */ (function () { +- function Greeter(message) { +- this.messageHandler = function (message) { - console.log(message); // This shouldnt be error - }; ++class Greeter { ++ constructor(message) { } +- return Greeter; +-}()); + messageHandler = (message) => { + console.log(message); // This shouldnt be error + }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier.js.diff index b8be7e3356..55269ed2c1 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier.js.diff @@ -1,10 +1,16 @@ --- old.classMemberWithMissingIdentifier.js +++ new.classMemberWithMissingIdentifier.js -@@= skipped -6, +6 lines =@@ +@@= skipped -5, +5 lines =@@ + } //// [classMemberWithMissingIdentifier.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + ; - } ++} { } ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier2.js.diff b/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier2.js.diff index 58f193d89a..250dd2893f 100644 --- a/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMemberWithMissingIdentifier2.js.diff @@ -1,10 +1,17 @@ --- old.classMemberWithMissingIdentifier2.js +++ new.classMemberWithMissingIdentifier2.js -@@= skipped -6, +6 lines =@@ +@@= skipped -5, +5 lines =@@ + } //// [classMemberWithMissingIdentifier2.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + ; - } ++} { - [name, string]; \ No newline at end of file + [name, string]; + VariableDeclaration; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMergedWithInterfaceMultipleBasesNoError.js.diff b/testdata/baselines/reference/submodule/compiler/classMergedWithInterfaceMultipleBasesNoError.js.diff index 979e7500c7..16f49e4db4 100644 --- a/testdata/baselines/reference/submodule/compiler/classMergedWithInterfaceMultipleBasesNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classMergedWithInterfaceMultipleBasesNoError.js.diff @@ -1,15 +1,44 @@ --- old.classMergedWithInterfaceMultipleBasesNoError.js +++ new.classMergedWithInterfaceMultipleBasesNoError.js -@@= skipped -17, +17 lines =@@ - class Foo { - } - class default_1 extends Foo { -- constructor() { -- super(...arguments); -- this.observer = this.handleIntersection; -- this.handleIntersection = () => { }; +@@= skipped -13, +13 lines =@@ + + //// [classMergedWithInterfaceMultipleBasesNoError.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); +-var Foo = /** @class */ (function () { +- function Foo() { - } +- return Foo; +-}()); +-var default_1 = /** @class */ (function (_super) { +- __extends(default_1, _super); +- function default_1() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.observer = _this.handleIntersection; +- _this.handleIntersection = function () { }; +- return _this; +- } +- return default_1; +-}(Foo)); ++class Foo { ++} ++class default_1 extends Foo { + observer = this.handleIntersection; + handleIntersection = () => { }; - } ++} exports.default = default_1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classMethodWithKeywordName1.js.diff b/testdata/baselines/reference/submodule/compiler/classMethodWithKeywordName1.js.diff new file mode 100644 index 0000000000..4dd224a602 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classMethodWithKeywordName1.js.diff @@ -0,0 +1,15 @@ +--- old.classMethodWithKeywordName1.js ++++ new.classMethodWithKeywordName1.js +@@= skipped -5, +5 lines =@@ + } + + //// [classMethodWithKeywordName1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.try = function () { }; +- return C; +-}()); ++class C { ++ static try() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classOrder1.js.diff b/testdata/baselines/reference/submodule/compiler/classOrder1.js.diff new file mode 100644 index 0000000000..5d7d4d4e0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classOrder1.js.diff @@ -0,0 +1,20 @@ +--- old.classOrder1.js ++++ new.classOrder1.js +@@= skipped -13, +13 lines =@@ + + + //// [classOrder1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { ++class A { ++ foo() { + /*WScript.Echo("Here!");*/ +- }; +- return A; +-}()); ++ } ++} + var a = new A(); + a.foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classOrder2.js.diff b/testdata/baselines/reference/submodule/compiler/classOrder2.js.diff new file mode 100644 index 0000000000..0c6454ecc4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classOrder2.js.diff @@ -0,0 +1,43 @@ +--- old.classOrder2.js ++++ new.classOrder2.js +@@= skipped -20, +20 lines =@@ + + + //// [classOrder2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- A.prototype.foo = function () { this.bar(); }; +- return A; +-}(B)); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); ++class A extends B { ++ foo() { this.bar(); } ++} ++class B { ++ bar() { } ++} + var a = new A(); + a.foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classOrderBug.js.diff b/testdata/baselines/reference/submodule/compiler/classOrderBug.js.diff index b8bc95638d..f9c209a8e8 100644 --- a/testdata/baselines/reference/submodule/compiler/classOrderBug.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classOrderBug.js.diff @@ -1,10 +1,47 @@ --- old.classOrderBug.js +++ new.classOrderBug.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + //// [classOrderBug.js] - class bar { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var bar = /** @class */ (function () { +- function bar() { ++class bar { + baz; - constructor() { ++ constructor() { this.baz = new foo(); - } \ No newline at end of file + } +- return bar; +-}()); +-var baz = /** @class */ (function () { +- function baz() { +- } +- return baz; +-}()); +-var foo = /** @class */ (function (_super) { +- __extends(foo, _super); +- function foo() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return foo; +-}(baz)); ++} ++class baz { ++} ++class foo extends baz { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classOverloadForFunction.js.diff b/testdata/baselines/reference/submodule/compiler/classOverloadForFunction.js.diff new file mode 100644 index 0000000000..6df1073801 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classOverloadForFunction.js.diff @@ -0,0 +1,15 @@ +--- old.classOverloadForFunction.js ++++ new.classOverloadForFunction.js +@@= skipped -5, +5 lines =@@ + + + //// [classOverloadForFunction.js] +-var foo = /** @class */ (function () { +- function foo() { +- } +- return foo; +-}()); ++class foo { ++} + ; + function foo() { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classOverloadForFunction2.js.diff b/testdata/baselines/reference/submodule/compiler/classOverloadForFunction2.js.diff new file mode 100644 index 0000000000..db959b0cb3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classOverloadForFunction2.js.diff @@ -0,0 +1,13 @@ +--- old.classOverloadForFunction2.js ++++ new.classOverloadForFunction2.js +@@= skipped -4, +4 lines =@@ + class bar {} + + //// [classOverloadForFunction2.js] +-var bar = /** @class */ (function () { +- function bar() { +- } +- return bar; +-}()); ++class bar { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classPropertyErrorOnNameOnly.js.diff b/testdata/baselines/reference/submodule/compiler/classPropertyErrorOnNameOnly.js.diff index 6f0ea69d3a..d620b439d9 100644 --- a/testdata/baselines/reference/submodule/compiler/classPropertyErrorOnNameOnly.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classPropertyErrorOnNameOnly.js.diff @@ -6,8 +6,8 @@ //// [classPropertyErrorOnNameOnly.js] -"use strict"; // turn on strictNullChecks - class Example { -- constructor() { +-var Example = /** @class */ (function () { +- function Example() { - this.insideClass = function (val) { - switch (val) { - case 1: @@ -24,6 +24,10 @@ - } - }; // all the way to here - } +- return Example; +-}()); +-var outsideClass = function (val) { ++class Example { + insideClass = function (val) { + switch (val) { + case 1: @@ -39,6 +43,8 @@ + // forgot case 6 + } + }; // all the way to here - } - const outsideClass = function (val) { - switch (val) { \ No newline at end of file ++} ++const outsideClass = function (val) { + switch (val) { + case 1: + return "1"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols.diff b/testdata/baselines/reference/submodule/compiler/classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols.diff new file mode 100644 index 0000000000..e7a37c4241 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols.diff @@ -0,0 +1,10 @@ +--- old.classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols ++++ new.classReferencedInContextualParameterWithinItsOwnBaseExpression.symbols +@@= skipped -95, +95 lines =@@ + >pretty : Symbol(pretty, Decl(classReferencedInContextualParameterWithinItsOwnBaseExpression.ts, 33, 3)) + >a : Symbol(a, Decl(classReferencedInContextualParameterWithinItsOwnBaseExpression.ts, 34, 13)) + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >a : Symbol(a, Decl(classReferencedInContextualParameterWithinItsOwnBaseExpression.ts, 34, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/classSideInheritance1.js.diff b/testdata/baselines/reference/submodule/compiler/classSideInheritance1.js.diff new file mode 100644 index 0000000000..4c84fac90d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classSideInheritance1.js.diff @@ -0,0 +1,46 @@ +--- old.classSideInheritance1.js ++++ new.classSideInheritance1.js +@@= skipped -17, +17 lines =@@ + C2.bar(); // valid + + //// [classSideInheritance1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.bar = function () { ++class A { ++ static bar() { + return ""; +- }; +- A.prototype.foo = function () { return 1; }; +- return A; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return C2; +-}(A)); ++ foo() { return 1; } ++} ++class C2 extends A { ++} + var a; + var c; + a.bar(); // static off an instance - should be an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classSideInheritance2.js.diff b/testdata/baselines/reference/submodule/compiler/classSideInheritance2.js.diff index 3d3cf99554..384de9bcff 100644 --- a/testdata/baselines/reference/submodule/compiler/classSideInheritance2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classSideInheritance2.js.diff @@ -1,10 +1,46 @@ --- old.classSideInheritance2.js +++ new.classSideInheritance2.js -@@= skipped -28, +28 lines =@@ - } +@@= skipped -22, +22 lines =@@ } - class TextBase { + + //// [classSideInheritance2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var SubText = /** @class */ (function (_super) { +- __extends(SubText, _super); +- function SubText(text, span) { +- return _super.call(this) || this; +- } +- return SubText; +-}(TextBase)); +-var TextBase = /** @class */ (function () { +- function TextBase() { +- } +- TextBase.prototype.subText = function (span) { ++class SubText extends TextBase { ++ constructor(text, span) { ++ super(); ++ } ++} ++class TextBase { + foo; - subText(span) { ++ subText(span) { return new SubText(this, span); - } \ No newline at end of file +- }; +- return TextBase; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classSideInheritance3.js.diff b/testdata/baselines/reference/submodule/compiler/classSideInheritance3.js.diff index 1e1480e418..858291834a 100644 --- a/testdata/baselines/reference/submodule/compiler/classSideInheritance3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classSideInheritance3.js.diff @@ -1,16 +1,62 @@ --- old.classSideInheritance3.js +++ new.classSideInheritance3.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + var r3: typeof A = C; // ok //// [classSideInheritance3.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A(x) { ++class A { + x; - constructor(x) { ++ constructor(x) { this.x = x; } - } - class B extends A { +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B(x, data) { +- var _this = _super.call(this, x) || this; +- _this.data = data; +- return _this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C(x) { +- return _super.call(this, x) || this; +- } +- return C; +-}(A)); ++} ++class B extends A { + data; - constructor(x, data) { - super(x); - this.data = data; \ No newline at end of file ++ constructor(x, data) { ++ super(x); ++ this.data = data; ++ } ++} ++class C extends A { ++ constructor(x) { ++ super(x); ++ } ++} + var r1 = B; // error + var r2 = B; // error + var r3 = C; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.js.diff index 79bc13238b..85b09a2550 100644 --- a/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classStaticInitializersUsePropertiesBeforeDeclaration.js.diff @@ -4,14 +4,14 @@ //// [classStaticInitializersUsePropertiesBeforeDeclaration.js] --let Foo = (() => { -- class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { - } - Foo.enumMember = Enum.A; - Foo.objLiteralMember = ObjLiteral.A; - Foo.namespaceMember = Namespace.A; - return Foo; --})(); +-}()); +class Foo { + static enumMember = Enum.A; + static objLiteralMember = ObjLiteral.A; @@ -19,4 +19,10 @@ +} var Enum; (function (Enum) { - Enum[Enum["A"] = 0] = "A"; \ No newline at end of file + Enum[Enum["A"] = 0] = "A"; + })(Enum || (Enum = {})); +-var ObjLiteral = { ++const ObjLiteral = { + A: 0 + }; + var Namespace; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classStaticPropertyAccess.js.diff b/testdata/baselines/reference/submodule/compiler/classStaticPropertyAccess.js.diff index 6be9d96ae2..11c4a98538 100644 --- a/testdata/baselines/reference/submodule/compiler/classStaticPropertyAccess.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classStaticPropertyAccess.js.diff @@ -5,21 +5,23 @@ //// [classStaticPropertyAccess.js] -"use strict"; --let A = (() => { -- class A { -- static "\""() { } +-var A = /** @class */ (function () { +- function A() { - } +- A["\""] = function () { }; - A.x = 1; - A.y = 1; - A._b = 2; - return A; --})(); +-}()); +-var a = new A(); +class A { + static "\""() { } + static x = 1; + static y = 1; + static _b = 2; +} - const a = new A(); ++const a = new A(); a["\""]; // Error - a['y']; // Error \ No newline at end of file + a['y']; // Error + a.y; // Error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classStaticPropertyTypeGuard.js.diff b/testdata/baselines/reference/submodule/compiler/classStaticPropertyTypeGuard.js.diff index 8dc886311f..c777ac2003 100644 --- a/testdata/baselines/reference/submodule/compiler/classStaticPropertyTypeGuard.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classStaticPropertyTypeGuard.js.diff @@ -1,10 +1,29 @@ --- old.classStaticPropertyTypeGuard.js +++ new.classStaticPropertyTypeGuard.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [classStaticPropertyTypeGuard.js] // Repro from #8923 - class A { +-var A = /** @class */ (function () { +- function A() { ++class A { + static _a; - get a() { - if (A._a) { - return A._a; // is possibly null or undefined. \ No newline at end of file ++ get a() { ++ if (A._a) { ++ return A._a; // is possibly null or undefined. ++ } ++ return A._a = 'helloworld'; + } +- Object.defineProperty(A.prototype, "a", { +- get: function () { +- if (A._a) { +- return A._a; // is possibly null or undefined. +- } +- return A._a = 'helloworld'; +- }, +- enumerable: false, +- configurable: true +- }); +- return A; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.errors.txt b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.errors.txt index 1f86d11c6c..e8c3238fbc 100644 --- a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.errors.txt @@ -4,7 +4,7 @@ classTypeParametersInStatics.ts(13,43): error TS2302: Static members cannot refe ==== classTypeParametersInStatics.ts (3 errors) ==== - module Editor { + namespace Editor { export class List { diff --git a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js index 3d31abc900..3fadd02621 100644 --- a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js +++ b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classTypeParametersInStatics.ts] //// //// [classTypeParametersInStatics.ts] -module Editor { +namespace Editor { export class List { diff --git a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js.diff b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js.diff index 7aa0f15aad..b5b37470e9 100644 --- a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.js.diff @@ -1,13 +1,58 @@ --- old.classTypeParametersInStatics.js +++ new.classTypeParametersInStatics.js -@@= skipped -38, +38 lines =@@ +@@= skipped -37, +37 lines =@@ + //// [classTypeParametersInStatics.js] var Editor; (function (Editor) { - class List { +- var List = /** @class */ (function () { +- function List(isHead, data) { ++ class List { + isHead; + data; + next; + prev; - constructor(isHead, data) { ++ constructor(isHead, data) { this.isHead = isHead; - this.data = data; \ No newline at end of file + this.data = data; + } +- List.MakeHead = function () { +- var entry = new List(true, null); +- entry.prev = entry; +- entry.next = entry; +- return entry; +- }; +- List.MakeHead2 = function () { +- var entry = new List(true, null); +- entry.prev = entry; +- entry.next = entry; +- return entry; +- }; +- List.MakeHead3 = function () { +- var entry = new List(true, null); +- entry.prev = entry; +- entry.next = entry; +- return entry; +- }; +- return List; +- }()); ++ static MakeHead() { ++ var entry = new List(true, null); ++ entry.prev = entry; ++ entry.next = entry; ++ return entry; ++ } ++ static MakeHead2() { ++ var entry = new List(true, null); ++ entry.prev = entry; ++ entry.next = entry; ++ return entry; ++ } ++ static MakeHead3() { ++ var entry = new List(true, null); ++ entry.prev = entry; ++ entry.next = entry; ++ return entry; ++ } ++ } + Editor.List = List; + })(Editor || (Editor = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.symbols b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.symbols index 67595373ae..cb9af37b76 100644 --- a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.symbols +++ b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/classTypeParametersInStatics.ts] //// === classTypeParametersInStatics.ts === -module Editor { +namespace Editor { >Editor : Symbol(Editor, Decl(classTypeParametersInStatics.ts, 0, 0)) export class List { ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 3, 22)) public next: List; >next : Symbol(List.next, Decl(classTypeParametersInStatics.ts, 3, 26)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 3, 22)) public prev: List; >prev : Symbol(List.prev, Decl(classTypeParametersInStatics.ts, 4, 29)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 3, 22)) constructor(public isHead: boolean, public data: T) { @@ -28,14 +28,14 @@ module Editor { public static MakeHead(): List { // should error >MakeHead : Symbol(List.MakeHead, Decl(classTypeParametersInStatics.ts, 9, 9)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T) var entry: List = new List(true, null); >entry : Symbol(entry, Decl(classTypeParametersInStatics.ts, 12, 15)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T) entry.prev = entry; @@ -57,14 +57,14 @@ module Editor { public static MakeHead2(): List { // should not error >MakeHead2 : Symbol(List.MakeHead2, Decl(classTypeParametersInStatics.ts, 16, 9)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 18, 32)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 18, 32)) var entry: List = new List(true, null); >entry : Symbol(entry, Decl(classTypeParametersInStatics.ts, 19, 15)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 18, 32)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >T : Symbol(T, Decl(classTypeParametersInStatics.ts, 18, 32)) entry.prev = entry; @@ -86,14 +86,14 @@ module Editor { public static MakeHead3(): List { // should not error >MakeHead3 : Symbol(List.MakeHead3, Decl(classTypeParametersInStatics.ts, 23, 9)) >U : Symbol(U, Decl(classTypeParametersInStatics.ts, 25, 32)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >U : Symbol(U, Decl(classTypeParametersInStatics.ts, 25, 32)) var entry: List = new List(true, null); >entry : Symbol(entry, Decl(classTypeParametersInStatics.ts, 26, 15)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >U : Symbol(U, Decl(classTypeParametersInStatics.ts, 25, 32)) ->List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 15)) +>List : Symbol(List, Decl(classTypeParametersInStatics.ts, 0, 18)) >U : Symbol(U, Decl(classTypeParametersInStatics.ts, 25, 32)) entry.prev = entry; diff --git a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.types b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.types index 0dd0b8d07b..0b4d1c4ee2 100644 --- a/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.types +++ b/testdata/baselines/reference/submodule/compiler/classTypeParametersInStatics.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/classTypeParametersInStatics.ts] //// === classTypeParametersInStatics.ts === -module Editor { +namespace Editor { >Editor : typeof Editor diff --git a/testdata/baselines/reference/submodule/compiler/classUpdateTests.js.diff b/testdata/baselines/reference/submodule/compiler/classUpdateTests.js.diff index 32d96ea106..fb9ceff101 100644 --- a/testdata/baselines/reference/submodule/compiler/classUpdateTests.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classUpdateTests.js.diff @@ -1,123 +1,264 @@ --- old.classUpdateTests.js +++ new.classUpdateTests.js -@@= skipped -119, +119 lines =@@ +@@= skipped -115, +115 lines =@@ + } + + //// [classUpdateTests.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + // // test codegen for instance properties // - class A { -- constructor() { +-var A = /** @class */ (function () { +- function A() { - this.p1 = 0; - this.p2 = 0; - } -+ p1 = 0; -+ p2 = 0; -+ p3; - } - class B { -- constructor() { +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.p1 = 0; - this.p2 = 0; - } +- return B; +-}()); +-var C = /** @class */ (function () { +- function C(p1, p2, p3) { +- if (p1 === void 0) { p1 = 0; } +- if (p2 === void 0) { p2 = 0; } +- if (p3 === void 0) { p3 = 0; } ++class A { ++ p1 = 0; ++ p2 = 0; ++ p3; ++} ++class B { + p1 = 0; + p2 = 0; + p3; + constructor() { } - } - class C { ++} ++class C { + p1; + p2; - constructor(p1 = 0, p2 = 0, p3 = 0) { ++ constructor(p1 = 0, p2 = 0, p3 = 0) { this.p1 = p1; this.p2 = p2; -@@= skipped -23, +24 lines =@@ - class D { - } - class E extends D { -- constructor() { -- super(...arguments); -- this.p1 = 0; + } +- return C; +-}()); ++} + // + // test requirements for super calls + // +-var D = /** @class */ (function () { +- function D() { - } -+ p1 = 0; - } - class F extends E { - constructor() { } // ERROR - super call required - } - class G extends D { -- constructor() { -- super(); -- this.p1 = 0; +- return D; +-}()); +-var E = /** @class */ (function (_super) { +- __extends(E, _super); +- function E() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.p1 = 0; +- return _this; +- } +- return E; +-}(D)); +-var F = /** @class */ (function (_super) { +- __extends(F, _super); +- function F() { +- var _this = this; +- return _this; +- } // ERROR - super call required +- return F; +-}(E)); +-var G = /** @class */ (function (_super) { +- __extends(G, _super); +- function G() { +- var _this = _super.call(this) || this; +- _this.p1 = 0; +- return _this; - } // NO ERROR +- return G; +-}(D)); +-var H = /** @class */ (function () { +- function H() { +- return _super.call(this) || this; +- } // ERROR - no super call allowed +- return H; +-}()); +-var I = /** @class */ (function (_super) { +- __extends(I, _super); +- function I() { +- return _super.call(this) || this; +- } // ERROR - no super call allowed +- return I; +-}(Object)); +-var J = /** @class */ (function (_super) { +- __extends(J, _super); +- function J(p1) { +- var _this = _super.call(this) || this; // NO ERROR +- _this.p1 = p1; +- return _this; +- } +- return J; +-}(G)); +-var K = /** @class */ (function (_super) { +- __extends(K, _super); +- function K(p1) { +- var _this = this; +- var i = 0; +- _this = _super.call(this) || this; +- _this.p1 = p1; +- return _this; +- } +- return K; +-}(G)); +-var L = /** @class */ (function (_super) { +- __extends(L, _super); +- function L(p1) { +- var _this = _super.call(this) || this; // NO ERROR +- _this.p1 = p1; +- return _this; +- } +- return L; +-}(G)); +-var M = /** @class */ (function (_super) { +- __extends(M, _super); +- function M(p1) { +- var _this = this; +- var i = 0; +- _this = _super.call(this) || this; +- _this.p1 = p1; +- return _this; +- } +- return M; +-}(G)); ++class D { ++} ++class E extends D { ++ p1 = 0; ++} ++class F extends E { ++ constructor() { } // ERROR - super call required ++} ++class G extends D { + p1 = 0; + constructor() { super(); } // NO ERROR - } - class H { - constructor() { super(); } // ERROR - no super call allowed -@@= skipped -21, +16 lines =@@ - constructor() { super(); } // ERROR - no super call allowed - } - class J extends G { ++} ++class H { ++ constructor() { super(); } // ERROR - no super call allowed ++} ++class I extends Object { ++ constructor() { super(); } // ERROR - no super call allowed ++} ++class J extends G { + p1; - constructor(p1) { - super(); // NO ERROR - this.p1 = p1; - } - } - class K extends G { ++ constructor(p1) { ++ super(); // NO ERROR ++ this.p1 = p1; ++ } ++} ++class K extends G { + p1; - constructor(p1) { - var i = 0; - super(); -@@= skipped -13, +15 lines =@@ - } - } - class L extends G { ++ constructor(p1) { ++ var i = 0; ++ super(); ++ this.p1 = p1; ++ } ++} ++class L extends G { + p1; - constructor(p1) { - super(); // NO ERROR - this.p1 = p1; - } - } - class M extends G { ++ constructor(p1) { ++ super(); // NO ERROR ++ this.p1 = p1; ++ } ++} ++class M extends G { + p1; - constructor(p1) { - var i = 0; - super(); -@@= skipped -16, +18 lines =@@ ++ constructor(p1) { ++ var i = 0; ++ super(); ++ this.p1 = p1; ++ } ++} + // // test this reference in field initializers // - class N { -+ p1 = 0; -+ p2 = this.p1; - constructor() { +-var N = /** @class */ (function () { +- function N() { - this.p1 = 0; - this.p2 = this.p1; ++class N { ++ p1 = 0; ++ p2 = this.p1; ++ constructor() { this.p2 = 0; } - } -@@= skipped -11, +11 lines =@@ +- return N; +-}()); ++} + // + // test error on property declarations within class constructors // - class O { - constructor() { +-var O = /** @class */ (function () { +- function O() { - this.p1 = 0; // ERROR - } -+ p1 = 0; // ERROR - } - class P { - constructor() { +- } +- return O; +-}()); +-var P = /** @class */ (function () { +- function P() { - this.p1 = 0; // ERROR - } -+ p1 = 0; // ERROR - } - class Q { - constructor() { +- } +- return P; +-}()); +-var Q = /** @class */ (function () { +- function Q() { - this.p1 = 0; // ERROR - } +- } +- return Q; +-}()); +-var R = /** @class */ (function () { +- function R() { +- this.p1 = 0; // ERROR +- } +- return R; +-}()); ++class O { ++ constructor() { ++ } ++ p1 = 0; // ERROR ++} ++class P { ++ constructor() { ++ } ++ p1 = 0; // ERROR ++} ++class Q { ++ constructor() { ++ } + this; + p1 = 0; // ERROR - } - class R { - constructor() { -- this.p1 = 0; // ERROR - } ++} ++class R { ++ constructor() { ++ } + this; + p1 = 0; // ERROR - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classUpdateTests.symbols.diff b/testdata/baselines/reference/submodule/compiler/classUpdateTests.symbols.diff new file mode 100644 index 0000000000..0db7dd8126 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classUpdateTests.symbols.diff @@ -0,0 +1,11 @@ +--- old.classUpdateTests.symbols ++++ new.classUpdateTests.symbols +@@= skipped -85, +85 lines =@@ + >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + constructor() { super(); } // ERROR - no super call allowed +->super : Symbol(ObjectConstructor, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>super : Symbol(ObjectConstructor, Decl(lib.es5.d.ts, --, --)) + } + + class J extends G { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classUsedBeforeInitializedVariables.js.diff b/testdata/baselines/reference/submodule/compiler/classUsedBeforeInitializedVariables.js.diff index a4c40266ff..94c40809e8 100644 --- a/testdata/baselines/reference/submodule/compiler/classUsedBeforeInitializedVariables.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classUsedBeforeInitializedVariables.js.diff @@ -1,10 +1,28 @@ --- old.classUsedBeforeInitializedVariables.js +++ new.classUsedBeforeInitializedVariables.js -@@= skipped -50, +50 lines =@@ +@@= skipped -49, +49 lines =@@ + //// [classUsedBeforeInitializedVariables.js] - class Test { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Test = /** @class */ (function () { +- function Test() { +- var _a, _b, _c; +- var _this = this; - this.p1 = 0; - this.p2 = this.p1; - this.p3 = this.p4; @@ -13,30 +31,46 @@ - hello: (this.p6 = "string"), - }; - this.directlyAssigned = this.directlyAssigned; -- this.withinArrowFunction = () => this.withinArrowFunction; +- this.withinArrowFunction = function () { return _this.withinArrowFunction; }; - this.withinFunction = function () { - return this.withinFunction; - }; -- this.withinObjectLiteral = { -- [this.withinObjectLiteral]: true, -- }; -- this.withinObjectLiteralGetterName = { -- get [this.withinObjectLiteralGetterName]() { -- return true; +- this.withinObjectLiteral = (_a = {}, +- _a[this.withinObjectLiteral] = true, +- _a); +- this.withinObjectLiteralGetterName = (_b = {}, +- Object.defineProperty(_b, this.withinObjectLiteralGetterName, { +- get: function () { +- return true; +- }, +- enumerable: false, +- configurable: true +- }), +- _b); +- this.withinObjectLiteralSetterName = (_c = {}, +- Object.defineProperty(_c, this.withinObjectLiteralSetterName, { +- set: function (_) { }, +- enumerable: false, +- configurable: true +- }), +- _c); +- this.withinClassDeclarationExtension = (/** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; - } -- }; -- this.withinObjectLiteralSetterName = { -- set [this.withinObjectLiteralSetterName](_) { } -- }; -- this.withinClassDeclarationExtension = (class extends this.withinClassDeclarationExtension { -- }); +- return class_1; +- }(this.withinClassDeclarationExtension))); - this.fromOptional = this.p5; - // These error cases are ignored (not checked by control flow analysis) -- this.assignedByArrowFunction = (() => this.assignedByFunction)(); +- this.assignedByArrowFunction = (function () { return _this.assignedByFunction; })(); - this.assignedByFunction = (function () { - return this.assignedByFunction; - })(); - } +- return Test; +-}()); ++class Test { + p1 = 0; + p2 = this.p1; + p3 = this.p4; @@ -70,4 +104,4 @@ + assignedByFunction = (function () { + return this.assignedByFunction; + })(); - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classVarianceCircularity.js.diff b/testdata/baselines/reference/submodule/compiler/classVarianceCircularity.js.diff index 5b9f6fa6f1..ed15dc7e8e 100644 --- a/testdata/baselines/reference/submodule/compiler/classVarianceCircularity.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classVarianceCircularity.js.diff @@ -7,18 +7,22 @@ -"use strict"; // Issue #52813 function f() { - const b = new Bar(); -@@= skipped -8, +7 lines =@@ +- var b = new Bar(); ++ const b = new Bar(); + // Uncomment to create error console.log(b.Value); } - class Bar { -- constructor() { +-var Bar = /** @class */ (function () { +- function Bar() { - // Or swap these two lines - this.Field = this.num; - this.Value = this.num; - } +- return Bar; +-}()); ++class Bar { + num; + // Or swap these two lines + Field = this.num; + Value = this.num; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity1.js.diff b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity1.js.diff index 729c5221e5..81d077e106 100644 --- a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity1.js.diff @@ -6,12 +6,15 @@ //// [classVarianceResolveCircularity1.js] -"use strict"; // Issue #52813 - class Bar { -- constructor() { +-var Bar = /** @class */ (function () { +- function Bar() { - this.Value = callme(this).num; - this.Field = callme(this).num; - } +- return Bar; +-}()); ++class Bar { + num; + Value = callme(this).num; + Field = callme(this).num; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff index 46edd29106..6e5b3b26f3 100644 --- a/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classVarianceResolveCircularity2.js.diff @@ -6,17 +6,25 @@ "use strict"; -// Issue #52813 Object.defineProperty(exports, "__esModule", { value: true }); - class Bar { -- constructor() { +-var Bar = /** @class */ (function () { +- function Bar() { - this.Value = callme(new Foo(this)).bar.num; - this.Field = callme(new Foo(this)).bar.num; - } +- return Bar; +-}()); +-var Foo = /** @class */ (function () { +- function Foo(bar) { ++class Bar { + num; + Value = callme(new Foo(this)).bar.num; + Field = callme(new Foo(this)).bar.num; - } - class Foo { ++} ++class Foo { + bar; - constructor(bar) { ++ constructor(bar) { this.bar = bar; - } \ No newline at end of file + } +- return Foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classWithDuplicateIdentifier.js.diff b/testdata/baselines/reference/submodule/compiler/classWithDuplicateIdentifier.js.diff index f4756e5c89..b62199887c 100644 --- a/testdata/baselines/reference/submodule/compiler/classWithDuplicateIdentifier.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classWithDuplicateIdentifier.js.diff @@ -1,16 +1,35 @@ --- old.classWithDuplicateIdentifier.js +++ new.classWithDuplicateIdentifier.js -@@= skipped -17, +17 lines =@@ +@@= skipped -15, +15 lines =@@ + + //// [classWithDuplicateIdentifier.js] - class C { - a() { return 0; } // error: duplicate identifier +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.a = function () { return 0; }; // error: duplicate identifier +- return C; +-}()); +-var K = /** @class */ (function () { +- function K() { +- } +- K.prototype.b = function () { return 0; }; +- return K; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); ++class C { ++ a() { return 0; } // error: duplicate identifier + a; - } - class K { ++} ++class K { + b; // error: duplicate identifier - b() { return 0; } - } - class D { ++ b() { return 0; } ++} ++class D { + c; + c; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classWithEmptyTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/classWithEmptyTypeParameter.js.diff new file mode 100644 index 0000000000..2ff794f931 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classWithEmptyTypeParameter.js.diff @@ -0,0 +1,13 @@ +--- old.classWithEmptyTypeParameter.js ++++ new.classWithEmptyTypeParameter.js +@@= skipped -4, +4 lines =@@ + } + + //// [classWithEmptyTypeParameter.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classWithMultipleBaseClasses.js.diff b/testdata/baselines/reference/submodule/compiler/classWithMultipleBaseClasses.js.diff new file mode 100644 index 0000000000..0f4a116a6d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classWithMultipleBaseClasses.js.diff @@ -0,0 +1,35 @@ +--- old.classWithMultipleBaseClasses.js ++++ new.classWithMultipleBaseClasses.js +@@= skipped -26, +26 lines =@@ + } + + //// [classWithMultipleBaseClasses.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- D.prototype.baz = function () { }; +- D.prototype.bat = function () { }; +- return D; +-}()); ++class A { ++ foo() { } ++} ++class B { ++ bar() { } ++} ++class D { ++ baz() { } ++ bat() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName.js.diff b/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName.js.diff new file mode 100644 index 0000000000..817f70a3fe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName.js.diff @@ -0,0 +1,15 @@ +--- old.classWithOverloadImplementationOfWrongName.js ++++ new.classWithOverloadImplementationOfWrongName.js +@@= skipped -7, +7 lines =@@ + } + + //// [classWithOverloadImplementationOfWrongName.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function (x) { }; +- return C; +-}()); ++class C { ++ bar(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName2.js.diff b/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName2.js.diff new file mode 100644 index 0000000000..17cc2f241c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/classWithOverloadImplementationOfWrongName2.js.diff @@ -0,0 +1,15 @@ +--- old.classWithOverloadImplementationOfWrongName2.js ++++ new.classWithOverloadImplementationOfWrongName2.js +@@= skipped -7, +7 lines =@@ + } + + //// [classWithOverloadImplementationOfWrongName2.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function (x) { }; +- return C; +-}()); ++class C { ++ bar(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classdecl.js b/testdata/baselines/reference/submodule/compiler/classdecl.js index 46b09eb605..e7c71b4f3d 100644 --- a/testdata/baselines/reference/submodule/compiler/classdecl.js +++ b/testdata/baselines/reference/submodule/compiler/classdecl.js @@ -39,7 +39,7 @@ class a { class b extends a { } -module m1 { +namespace m1 { export class b { } class d { @@ -50,9 +50,9 @@ module m1 { } } -module m2 { +namespace m2 { - export module m3 { + export namespace m3 { export class c extends b { } export class ib2 implements m1.ib { diff --git a/testdata/baselines/reference/submodule/compiler/classdecl.js.diff b/testdata/baselines/reference/submodule/compiler/classdecl.js.diff index 17aac9dd52..07a2608e41 100644 --- a/testdata/baselines/reference/submodule/compiler/classdecl.js.diff +++ b/testdata/baselines/reference/submodule/compiler/classdecl.js.diff @@ -1,18 +1,173 @@ --- old.classdecl.js +++ new.classdecl.js -@@= skipped -99, +99 lines =@@ - constructor(ns) { - } - pgF() { } +@@= skipped -95, +95 lines =@@ + } + + //// [classdecl.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a(ns) { +- } +- a.prototype.pgF = function () { }; +- Object.defineProperty(a.prototype, "d", { +- get: function () { +- return 30; +- }, +- set: function (a) { +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(a, "p2", { +- get: function () { +- return { x: 30, y: 40 }; +- }, +- enumerable: false, +- configurable: true +- }); +- a.d2 = function () { +- }; +- Object.defineProperty(a, "p3", { +- get: function () { +- return "string"; +- }, +- enumerable: false, +- configurable: true +- }); +- a.prototype.foo = function (ns) { ++class a { ++ constructor(ns) { ++ } ++ pgF() { } + pv; - get d() { - return 30; - } -@@= skipped -13, +14 lines =@@ - static get p3() { - return "string"; - } ++ get d() { ++ return 30; ++ } ++ set d(a) { ++ } ++ static get p2() { ++ return { x: 30, y: 40 }; ++ } ++ static d2() { ++ } ++ static get p3() { ++ return "string"; ++ } + pv3; - foo(ns) { ++ foo(ns) { return ns.toString(); - } \ No newline at end of file +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return b; +-}(a)); ++} ++class b extends a { ++} + var m1; + (function (m1) { +- var b = /** @class */ (function () { +- function b() { +- } +- return b; +- }()); ++ class b { ++ } + m1.b = b; +- var d = /** @class */ (function () { +- function d() { +- } +- return d; +- }()); ++ class d { ++ } + })(m1 || (m1 = {})); + var m2; + (function (m2) { +- var m3; ++ let m3; + (function (m3) { +- var c = /** @class */ (function (_super) { +- __extends(c, _super); +- function c() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return c; +- }(b)); ++ class c extends b { ++ } + m3.c = c; +- var ib2 = /** @class */ (function () { +- function ib2() { +- } +- return ib2; +- }()); ++ class ib2 { ++ } + m3.ib2 = ib2; + })(m3 = m2.m3 || (m2.m3 = {})); + })(m2 || (m2 = {})); +-var c = /** @class */ (function (_super) { +- __extends(c, _super); +- function c() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return c; +-}(m1.b)); +-var ib2 = /** @class */ (function () { +- function ib2() { +- } +- return ib2; +-}()); +-var d = /** @class */ (function () { +- function d() { +- } +- d.prototype.foo = function (ns) { +- return ns.toString(); +- }; +- return d; +-}()); +-var e = /** @class */ (function () { +- function e() { +- } +- e.prototype.foo = function (ns) { +- return ns.toString(); +- }; +- return e; +-}()); ++class c extends m1.b { ++} ++class ib2 { ++} ++class d { ++ foo(ns) { ++ return ns.toString(); ++ } ++} ++class e { ++ foo(ns) { ++ return ns.toString(); ++ } ++} + + + //// [classdecl.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/classdecl.symbols b/testdata/baselines/reference/submodule/compiler/classdecl.symbols index 2414472188..3610cc51bd 100644 --- a/testdata/baselines/reference/submodule/compiler/classdecl.symbols +++ b/testdata/baselines/reference/submodule/compiler/classdecl.symbols @@ -73,11 +73,11 @@ class b extends a { >a : Symbol(a, Decl(classdecl.ts, 0, 0)) } -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) export class b { ->b : Symbol(b, Decl(classdecl.ts, 38, 11)) +>b : Symbol(b, Decl(classdecl.ts, 38, 14)) } class d { >d : Symbol(d, Decl(classdecl.ts, 40, 5)) @@ -89,14 +89,14 @@ module m1 { } } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(classdecl.ts, 47, 1)) - export module m3 { ->m3 : Symbol(m3, Decl(classdecl.ts, 49, 11)) + export namespace m3 { +>m3 : Symbol(m3, Decl(classdecl.ts, 49, 14)) export class c extends b { ->c : Symbol(c, Decl(classdecl.ts, 51, 22)) +>c : Symbol(c, Decl(classdecl.ts, 51, 25)) >b : Symbol(b, Decl(classdecl.ts, 33, 1)) } export class ib2 implements m1.ib { @@ -110,9 +110,9 @@ module m2 { class c extends m1.b { >c : Symbol(c, Decl(classdecl.ts, 57, 1)) ->m1.b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +>m1.b : Symbol(m1.b, Decl(classdecl.ts, 38, 14)) >m1 : Symbol(m1, Decl(classdecl.ts, 36, 1)) ->b : Symbol(m1.b, Decl(classdecl.ts, 38, 11)) +>b : Symbol(m1.b, Decl(classdecl.ts, 38, 14)) } class ib2 implements m1.ib { diff --git a/testdata/baselines/reference/submodule/compiler/classdecl.types b/testdata/baselines/reference/submodule/compiler/classdecl.types index d8f2e3ceb3..89c45bf543 100644 --- a/testdata/baselines/reference/submodule/compiler/classdecl.types +++ b/testdata/baselines/reference/submodule/compiler/classdecl.types @@ -81,7 +81,7 @@ class b extends a { >a : a } -module m1 { +namespace m1 { >m1 : typeof m1 export class b { @@ -96,10 +96,10 @@ module m1 { } } -module m2 { +namespace m2 { >m2 : typeof m2 - export module m3 { + export namespace m3 { >m3 : typeof m3 export class c extends b { diff --git a/testdata/baselines/reference/submodule/compiler/clinterfaces.js b/testdata/baselines/reference/submodule/compiler/clinterfaces.js index c590d9aa41..56798ea1d1 100644 --- a/testdata/baselines/reference/submodule/compiler/clinterfaces.js +++ b/testdata/baselines/reference/submodule/compiler/clinterfaces.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/clinterfaces.ts] //// //// [clinterfaces.ts] -module M { +namespace M { class C { } interface C { } interface D { } diff --git a/testdata/baselines/reference/submodule/compiler/clinterfaces.js.diff b/testdata/baselines/reference/submodule/compiler/clinterfaces.js.diff index 6add35e0f3..ef1022c062 100644 --- a/testdata/baselines/reference/submodule/compiler/clinterfaces.js.diff +++ b/testdata/baselines/reference/submodule/compiler/clinterfaces.js.diff @@ -1,12 +1,38 @@ --- old.clinterfaces.js +++ new.clinterfaces.js -@@= skipped -36, +36 lines =@@ - } +@@= skipped -30, +30 lines =@@ + "use strict"; + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); +- var D = /** @class */ (function () { +- function D() { +- } +- return D; +- }()); ++ class C { ++ } ++ class D { ++ } })(M || (M = {})); - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); ++class Foo { + b; - } - class Bar { ++} ++class Bar { + b; - } ++} module.exports = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/clinterfaces.symbols b/testdata/baselines/reference/submodule/compiler/clinterfaces.symbols index 78482f2a8b..e581bf6d40 100644 --- a/testdata/baselines/reference/submodule/compiler/clinterfaces.symbols +++ b/testdata/baselines/reference/submodule/compiler/clinterfaces.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/clinterfaces.ts] //// === clinterfaces.ts === -module M { +namespace M { >M : Symbol(M, Decl(clinterfaces.ts, 0, 0)) class C { } ->C : Symbol(C, Decl(clinterfaces.ts, 0, 10), Decl(clinterfaces.ts, 1, 15)) +>C : Symbol(C, Decl(clinterfaces.ts, 0, 13), Decl(clinterfaces.ts, 1, 15)) interface C { } ->C : Symbol(C, Decl(clinterfaces.ts, 0, 10), Decl(clinterfaces.ts, 1, 15)) +>C : Symbol(C, Decl(clinterfaces.ts, 0, 13), Decl(clinterfaces.ts, 1, 15)) interface D { } >D : Symbol(D, Decl(clinterfaces.ts, 2, 19), Decl(clinterfaces.ts, 3, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/clinterfaces.types b/testdata/baselines/reference/submodule/compiler/clinterfaces.types index 034bb44703..5ece7535ee 100644 --- a/testdata/baselines/reference/submodule/compiler/clinterfaces.types +++ b/testdata/baselines/reference/submodule/compiler/clinterfaces.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/clinterfaces.ts] //// === clinterfaces.ts === -module M { +namespace M { >M : typeof M class C { } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js index e458dd1038..f228641c43 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/cloduleAcrossModuleDefinitions.ts] //// //// [cloduleAcrossModuleDefinitions.ts] -module A { +namespace A { export class B { foo() { } static bar() { } } } -module A { - export module B { +namespace A { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js.diff new file mode 100644 index 0000000000..2cec7c43b4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.js.diff @@ -0,0 +1,25 @@ +--- old.cloduleAcrossModuleDefinitions.js ++++ new.cloduleAcrossModuleDefinitions.js +@@= skipped -19, +19 lines =@@ + //// [cloduleAcrossModuleDefinitions.js] + var A; + (function (A) { +- var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.foo = function () { }; +- B.bar = function () { }; +- return B; +- }()); ++ class B { ++ foo() { } ++ static bar() { } ++ } + A.B = B; + })(A || (A = {})); + (function (A) { +- var B; ++ let B; + (function (B) { + B.x = 1; + })(B = A.B || (A.B = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.symbols b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.symbols index 6ef39e5461..6bcbb501a6 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/cloduleAcrossModuleDefinitions.ts] //// === cloduleAcrossModuleDefinitions.ts === -module A { +namespace A { >A : Symbol(A, Decl(cloduleAcrossModuleDefinitions.ts, 0, 0), Decl(cloduleAcrossModuleDefinitions.ts, 5, 1)) export class B { ->B : Symbol(B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 10), Decl(cloduleAcrossModuleDefinitions.ts, 7, 10)) +>B : Symbol(B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 13), Decl(cloduleAcrossModuleDefinitions.ts, 7, 13)) foo() { } >foo : Symbol(B.foo, Decl(cloduleAcrossModuleDefinitions.ts, 1, 20)) @@ -15,11 +15,11 @@ module A { } } -module A { +namespace A { >A : Symbol(A, Decl(cloduleAcrossModuleDefinitions.ts, 0, 0), Decl(cloduleAcrossModuleDefinitions.ts, 5, 1)) - export module B { ->B : Symbol(B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 10), Decl(cloduleAcrossModuleDefinitions.ts, 7, 10)) + export namespace B { +>B : Symbol(B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 13), Decl(cloduleAcrossModuleDefinitions.ts, 7, 13)) export var x = 1; >x : Symbol(x, Decl(cloduleAcrossModuleDefinitions.ts, 9, 18)) @@ -29,5 +29,5 @@ module A { var b: A.B; // ok >b : Symbol(b, Decl(cloduleAcrossModuleDefinitions.ts, 13, 3)) >A : Symbol(A, Decl(cloduleAcrossModuleDefinitions.ts, 0, 0), Decl(cloduleAcrossModuleDefinitions.ts, 5, 1)) ->B : Symbol(A.B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 10), Decl(cloduleAcrossModuleDefinitions.ts, 7, 10)) +>B : Symbol(A.B, Decl(cloduleAcrossModuleDefinitions.ts, 0, 13), Decl(cloduleAcrossModuleDefinitions.ts, 7, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.types b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.types index f183c05f35..eb7e47d23e 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleAcrossModuleDefinitions.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/cloduleAcrossModuleDefinitions.ts] //// === cloduleAcrossModuleDefinitions.ts === -module A { +namespace A { >A : typeof A export class B { @@ -15,10 +15,10 @@ module A { } } -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js index c864350f09..8add560584 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js @@ -6,7 +6,7 @@ class Foo { } } -module Foo { +namespace Foo { export interface Bar { bar(): void; } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js.diff new file mode 100644 index 0000000000..3f282c4bc2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.js.diff @@ -0,0 +1,24 @@ +--- old.cloduleAndTypeParameters.js ++++ new.cloduleAndTypeParameters.js +@@= skipped -15, +15 lines =@@ + } + + //// [cloduleAndTypeParameters.js] +-var Foo = /** @class */ (function () { +- function Foo() { ++class Foo { ++ constructor() { + } +- return Foo; +-}()); ++} + (function (Foo) { +- var Baz = /** @class */ (function () { +- function Baz() { +- } +- return Baz; +- }()); ++ class Baz { ++ } + Foo.Baz = Baz; + })(Foo || (Foo = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.symbols b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.symbols index e71a69d6e3..547c7e164e 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.symbols @@ -5,17 +5,17 @@ class Foo { >Foo : Symbol(Foo, Decl(cloduleAndTypeParameters.ts, 0, 0), Decl(cloduleAndTypeParameters.ts, 3, 1)) >T : Symbol(T, Decl(cloduleAndTypeParameters.ts, 0, 10)) >Foo : Symbol(Foo, Decl(cloduleAndTypeParameters.ts, 0, 0), Decl(cloduleAndTypeParameters.ts, 3, 1)) ->Bar : Symbol(Foo.Bar, Decl(cloduleAndTypeParameters.ts, 5, 12)) +>Bar : Symbol(Foo.Bar, Decl(cloduleAndTypeParameters.ts, 5, 15)) constructor() { } } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(cloduleAndTypeParameters.ts, 0, 0), Decl(cloduleAndTypeParameters.ts, 3, 1)) export interface Bar { ->Bar : Symbol(Bar, Decl(cloduleAndTypeParameters.ts, 5, 12)) +>Bar : Symbol(Bar, Decl(cloduleAndTypeParameters.ts, 5, 15)) bar(): void; >bar : Symbol(Bar.bar, Decl(cloduleAndTypeParameters.ts, 6, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.types b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.types index cf44a55128..055093d9c4 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleAndTypeParameters.types @@ -9,7 +9,7 @@ class Foo { } } -module Foo { +namespace Foo { >Foo : typeof Foo export interface Bar { diff --git a/testdata/baselines/reference/submodule/compiler/cloduleGenericOnSelfMember.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleGenericOnSelfMember.js.diff index 2d89d18b25..75ee8cd254 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleGenericOnSelfMember.js.diff +++ b/testdata/baselines/reference/submodule/compiler/cloduleGenericOnSelfMember.js.diff @@ -1,10 +1,41 @@ --- old.cloduleGenericOnSelfMember.js +++ new.cloduleGenericOnSelfMember.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + } //// [cloduleGenericOnSelfMember.js] - class ServiceBase { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var ServiceBase = /** @class */ (function () { +- function ServiceBase() { +- } +- return ServiceBase; +-}()); +-var Service = /** @class */ (function (_super) { +- __extends(Service, _super); +- function Service() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Service; +-}(ServiceBase)); ++class ServiceBase { + field; - } - class Service extends ServiceBase { - } \ No newline at end of file ++} ++class Service extends ServiceBase { ++} + (function (Service) { + Service.Base = { + name: "1", \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.errors.txt index 0f8a911696..860c231e72 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.errors.txt @@ -1,12 +1,12 @@ -cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +cloduleSplitAcrossFiles_module.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== cloduleSplitAcrossFiles_class.ts (0 errors) ==== class D { } ==== cloduleSplitAcrossFiles_module.ts (1 errors) ==== - module D { - ~ + namespace D { + ~ !!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var y = "hi"; } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js index 37d1cc5e5b..1741ab19ff 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js @@ -4,7 +4,7 @@ class D { } //// [cloduleSplitAcrossFiles_module.ts] -module D { +namespace D { export var y = "hi"; } D.y; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js.diff new file mode 100644 index 0000000000..094727ad4a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.js.diff @@ -0,0 +1,16 @@ +--- old.cloduleSplitAcrossFiles.js ++++ new.cloduleSplitAcrossFiles.js +@@= skipped -9, +9 lines =@@ + D.y; + + //// [cloduleSplitAcrossFiles_class.js] +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); ++class D { ++} + //// [cloduleSplitAcrossFiles_module.js] + var D; + (function (D) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.symbols b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.symbols index 27bb4fcfad..9676220c86 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.symbols @@ -5,7 +5,7 @@ class D { } >D : Symbol(D, Decl(cloduleSplitAcrossFiles_class.ts, 0, 0), Decl(cloduleSplitAcrossFiles_module.ts, 0, 0)) === cloduleSplitAcrossFiles_module.ts === -module D { +namespace D { >D : Symbol(D, Decl(cloduleSplitAcrossFiles_class.ts, 0, 0), Decl(cloduleSplitAcrossFiles_module.ts, 0, 0)) export var y = "hi"; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.types b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.types index 6b8a43bcf1..2384dc769f 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleSplitAcrossFiles.types @@ -5,7 +5,7 @@ class D { } >D : D === cloduleSplitAcrossFiles_module.ts === -module D { +namespace D { >D : typeof D export var y = "hi"; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.errors.txt index 1be933c421..2b2df09ea2 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.errors.txt @@ -8,7 +8,7 @@ cloduleStaticMembers.ts(10,13): error TS2304: Cannot find name 'y'. private static x = 10; public static y = 10; } - module Clod { + namespace Clod { var p = Clod.x; ~ !!! error TS2341: Property 'x' is private and only accessible within class 'Clod'. diff --git a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js index 5b8189edc2..2b0593f958 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js @@ -5,7 +5,7 @@ class Clod { private static x = 10; public static y = 10; } -module Clod { +namespace Clod { var p = Clod.x; var q = x; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js.diff index 97ee21132c..d9247430bb 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.js.diff @@ -4,13 +4,13 @@ //// [cloduleStaticMembers.js] --let Clod = (() => { -- class Clod { +-var Clod = /** @class */ (function () { +- function Clod() { - } - Clod.x = 10; - Clod.y = 10; - return Clod; --})(); +-}()); +class Clod { + static x = 10; + static y = 10; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.symbols b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.symbols index 02e02cc957..5a67799010 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.symbols @@ -10,7 +10,7 @@ class Clod { public static y = 10; >y : Symbol(Clod.y, Decl(cloduleStaticMembers.ts, 1, 26)) } -module Clod { +namespace Clod { >Clod : Symbol(Clod, Decl(cloduleStaticMembers.ts, 0, 0), Decl(cloduleStaticMembers.ts, 3, 1)) var p = Clod.x; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.types b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.types index 0320662f2c..53246b51cc 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleStaticMembers.types @@ -12,7 +12,7 @@ class Clod { >y : number >10 : 10 } -module Clod { +namespace Clod { >Clod : typeof Clod var p = Clod.x; diff --git a/testdata/baselines/reference/submodule/compiler/cloduleTest2.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleTest2.errors.txt index 674f2c0ea6..b4ef3af55f 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleTest2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleTest2.errors.txt @@ -9,8 +9,8 @@ cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0. ==== cloduleTest2.ts (8 errors) ==== - module T1 { - module m3d { export var y = 2; } + namespace T1 { + namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void ; static bar(); } var r = new m3d(); // error ~~~~~~~~~ @@ -18,17 +18,17 @@ cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0. !!! related TS6210 cloduleTest2.ts:3:37: An argument for 'foo' was not provided. } - module T2 { + namespace T2 { declare class m3d { constructor(foo); foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); // error ~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. !!! related TS6210 cloduleTest2.ts:8:37: An argument for 'foo' was not provided. } - module T3 { - module m3d { export var y = 2; } + namespace T3 { + namespace m3d { export var y = 2; } declare class m3d { foo(): void; static bar(); } var r = new m3d(); r.foo(); @@ -40,9 +40,9 @@ cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0. !!! error TS2339: Property 'y' does not exist on type 'm3d'. } - module T4 { + namespace T4 { declare class m3d { foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); r.foo(); r.bar(); // error @@ -53,7 +53,7 @@ cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0. !!! error TS2339: Property 'y' does not exist on type 'm3d'. } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void; static bar(); } var r = new m3d(); // error ~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/cloduleTest2.js b/testdata/baselines/reference/submodule/compiler/cloduleTest2.js index 936a925bd7..5270b8176b 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleTest2.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleTest2.js @@ -1,20 +1,20 @@ //// [tests/cases/compiler/cloduleTest2.ts] //// //// [cloduleTest2.ts] -module T1 { - module m3d { export var y = 2; } +namespace T1 { + namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void ; static bar(); } var r = new m3d(); // error } -module T2 { +namespace T2 { declare class m3d { constructor(foo); foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); // error } -module T3 { - module m3d { export var y = 2; } +namespace T3 { + namespace m3d { export var y = 2; } declare class m3d { foo(): void; static bar(); } var r = new m3d(); r.foo(); @@ -22,16 +22,16 @@ module T3 { r.y; // error } -module T4 { +namespace T4 { declare class m3d { foo(): void; static bar(); } - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } var r = new m3d(); r.foo(); r.bar(); // error r.y; // error } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } declare class m3d { constructor(foo); foo(): void; static bar(); } var r = new m3d(); // error diff --git a/testdata/baselines/reference/submodule/compiler/cloduleTest2.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleTest2.js.diff new file mode 100644 index 0000000000..fec85ccd6a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleTest2.js.diff @@ -0,0 +1,38 @@ +--- old.cloduleTest2.js ++++ new.cloduleTest2.js +@@= skipped -40, +40 lines =@@ + //// [cloduleTest2.js] + var T1; + (function (T1) { +- var m3d; ++ let m3d; + (function (m3d) { + m3d.y = 2; + })(m3d || (m3d = {})); +@@= skipped -8, +8 lines =@@ + })(T1 || (T1 = {})); + var T2; + (function (T2) { +- var m3d; ++ let m3d; + (function (m3d) { + m3d.y = 2; + })(m3d || (m3d = {})); +@@= skipped -8, +8 lines =@@ + })(T2 || (T2 = {})); + var T3; + (function (T3) { +- var m3d; ++ let m3d; + (function (m3d) { + m3d.y = 2; + })(m3d || (m3d = {})); +@@= skipped -11, +11 lines =@@ + })(T3 || (T3 = {})); + var T4; + (function (T4) { +- var m3d; ++ let m3d; + (function (m3d) { + m3d.y = 2; + })(m3d || (m3d = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleTest2.symbols b/testdata/baselines/reference/submodule/compiler/cloduleTest2.symbols index 309044a19b..42051518f1 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleTest2.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleTest2.symbols @@ -1,57 +1,57 @@ //// [tests/cases/compiler/cloduleTest2.ts] //// === cloduleTest2.ts === -module T1 { +namespace T1 { >T1 : Symbol(T1, Decl(cloduleTest2.ts, 0, 0)) - module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 11), Decl(cloduleTest2.ts, 1, 36)) ->y : Symbol(y, Decl(cloduleTest2.ts, 1, 27)) + namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 14), Decl(cloduleTest2.ts, 1, 39)) +>y : Symbol(y, Decl(cloduleTest2.ts, 1, 30)) declare class m3d { constructor(foo); foo(): void ; static bar(); } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 11), Decl(cloduleTest2.ts, 1, 36)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 14), Decl(cloduleTest2.ts, 1, 39)) >foo : Symbol(foo, Decl(cloduleTest2.ts, 2, 36)) >foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 2, 41)) >bar : Symbol(m3d.bar, Decl(cloduleTest2.ts, 2, 55)) var r = new m3d(); // error >r : Symbol(r, Decl(cloduleTest2.ts, 3, 7)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 11), Decl(cloduleTest2.ts, 1, 36)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 0, 14), Decl(cloduleTest2.ts, 1, 39)) } -module T2 { +namespace T2 { >T2 : Symbol(T2, Decl(cloduleTest2.ts, 4, 1)) declare class m3d { constructor(foo); foo(): void; static bar(); } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 11), Decl(cloduleTest2.ts, 7, 70)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 14), Decl(cloduleTest2.ts, 7, 70)) >foo : Symbol(foo, Decl(cloduleTest2.ts, 7, 36)) >foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 7, 41)) >bar : Symbol(m3d.bar, Decl(cloduleTest2.ts, 7, 54)) - module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 11), Decl(cloduleTest2.ts, 7, 70)) ->y : Symbol(y, Decl(cloduleTest2.ts, 8, 27)) + namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 14), Decl(cloduleTest2.ts, 7, 70)) +>y : Symbol(y, Decl(cloduleTest2.ts, 8, 30)) var r = new m3d(); // error >r : Symbol(r, Decl(cloduleTest2.ts, 9, 7)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 11), Decl(cloduleTest2.ts, 7, 70)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 6, 14), Decl(cloduleTest2.ts, 7, 70)) } -module T3 { +namespace T3 { >T3 : Symbol(T3, Decl(cloduleTest2.ts, 10, 1)) - module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 11), Decl(cloduleTest2.ts, 13, 36)) ->y : Symbol(y, Decl(cloduleTest2.ts, 13, 27)) + namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 14), Decl(cloduleTest2.ts, 13, 39)) +>y : Symbol(y, Decl(cloduleTest2.ts, 13, 30)) declare class m3d { foo(): void; static bar(); } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 11), Decl(cloduleTest2.ts, 13, 36)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 14), Decl(cloduleTest2.ts, 13, 39)) >foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 14, 23)) >bar : Symbol(m3d.bar, Decl(cloduleTest2.ts, 14, 36)) var r = new m3d(); >r : Symbol(r, Decl(cloduleTest2.ts, 15, 7)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 11), Decl(cloduleTest2.ts, 13, 36)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 12, 14), Decl(cloduleTest2.ts, 13, 39)) r.foo(); >r.foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 14, 23)) @@ -65,21 +65,21 @@ module T3 { >r : Symbol(r, Decl(cloduleTest2.ts, 15, 7)) } -module T4 { +namespace T4 { >T4 : Symbol(T4, Decl(cloduleTest2.ts, 19, 1)) declare class m3d { foo(): void; static bar(); } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 11), Decl(cloduleTest2.ts, 22, 52)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 14), Decl(cloduleTest2.ts, 22, 52)) >foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 22, 23)) >bar : Symbol(m3d.bar, Decl(cloduleTest2.ts, 22, 36)) - module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 11), Decl(cloduleTest2.ts, 22, 52)) ->y : Symbol(y, Decl(cloduleTest2.ts, 23, 27)) + namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 14), Decl(cloduleTest2.ts, 22, 52)) +>y : Symbol(y, Decl(cloduleTest2.ts, 23, 30)) var r = new m3d(); >r : Symbol(r, Decl(cloduleTest2.ts, 24, 7)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 11), Decl(cloduleTest2.ts, 22, 52)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 21, 14), Decl(cloduleTest2.ts, 22, 52)) r.foo(); >r.foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 22, 23)) @@ -93,23 +93,23 @@ module T4 { >r : Symbol(r, Decl(cloduleTest2.ts, 24, 7)) } -module m3d { export var y = 2; } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 32)) ->y : Symbol(y, Decl(cloduleTest2.ts, 30, 23)) +namespace m3d { export var y = 2; } +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 35)) +>y : Symbol(y, Decl(cloduleTest2.ts, 30, 26)) declare class m3d { constructor(foo); foo(): void; static bar(); } ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 32)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 35)) >foo : Symbol(foo, Decl(cloduleTest2.ts, 31, 32)) >foo : Symbol(m3d.foo, Decl(cloduleTest2.ts, 31, 37)) >bar : Symbol(m3d.bar, Decl(cloduleTest2.ts, 31, 50)) var r = new m3d(); // error >r : Symbol(r, Decl(cloduleTest2.ts, 32, 3)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 32)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 35)) declare class m4d extends m3d { } >m4d : Symbol(m4d, Decl(cloduleTest2.ts, 32, 18)) ->m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 32)) +>m3d : Symbol(m3d, Decl(cloduleTest2.ts, 28, 1), Decl(cloduleTest2.ts, 30, 35)) var r2 = new m4d(); // error >r2 : Symbol(r2, Decl(cloduleTest2.ts, 35, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/cloduleTest2.types b/testdata/baselines/reference/submodule/compiler/cloduleTest2.types index f330420bae..b0c6bc271c 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleTest2.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleTest2.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/cloduleTest2.ts] //// === cloduleTest2.ts === -module T1 { +namespace T1 { >T1 : typeof T1 - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 @@ -21,7 +21,7 @@ module T1 { >m3d : typeof m3d } -module T2 { +namespace T2 { >T2 : typeof T2 declare class m3d { constructor(foo); foo(): void; static bar(); } @@ -30,7 +30,7 @@ module T2 { >foo : () => void >bar : () => any - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 @@ -41,10 +41,10 @@ module T2 { >m3d : typeof m3d } -module T3 { +namespace T3 { >T3 : typeof T3 - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 @@ -77,7 +77,7 @@ module T3 { >y : any } -module T4 { +namespace T4 { >T4 : typeof T4 declare class m3d { foo(): void; static bar(); } @@ -85,7 +85,7 @@ module T4 { >foo : () => void >bar : () => any - module m3d { export var y = 2; } + namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 @@ -113,7 +113,7 @@ module T4 { >y : any } -module m3d { export var y = 2; } +namespace m3d { export var y = 2; } >m3d : typeof m3d >y : number >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.errors.txt index acbf37b3e8..5f1565d62b 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.errors.txt @@ -18,12 +18,12 @@ cloduleWithDuplicateMember1.ts(14,21): error TS2300: Duplicate identifier 'x'. !!! error TS2300: Duplicate identifier 'foo'. } - module C { + namespace C { export var x = 1; ~ !!! error TS2300: Duplicate identifier 'x'. } - module C { + namespace C { export function foo() { } ~~~ !!! error TS2300: Duplicate identifier 'foo'. diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js index 72b5b81e13..131fc3ca53 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js @@ -9,10 +9,10 @@ class C { static foo() { } } -module C { +namespace C { export var x = 1; } -module C { +namespace C { export function foo() { } export function x() { } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js.diff new file mode 100644 index 0000000000..531ed54492 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.js.diff @@ -0,0 +1,33 @@ +--- old.cloduleWithDuplicateMember1.js ++++ new.cloduleWithDuplicateMember1.js +@@= skipped -17, +17 lines =@@ + } + + //// [cloduleWithDuplicateMember1.js] +-var C = /** @class */ (function () { +- function C() { ++class C { ++ get x() { return 1; } ++ static get x() { ++ return ''; + } +- Object.defineProperty(C.prototype, "x", { +- get: function () { return 1; }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C, "x", { +- get: function () { +- return ''; +- }, +- enumerable: false, +- configurable: true +- }); +- C.foo = function () { }; +- return C; +-}()); ++ static foo() { } ++} + (function (C) { + C.x = 1; + })(C || (C = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.symbols b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.symbols index eb65443f32..633d93c589 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.symbols @@ -16,17 +16,17 @@ class C { >foo : Symbol(C.foo, Decl(cloduleWithDuplicateMember1.ts, 4, 5)) } -module C { +namespace C { >C : Symbol(C, Decl(cloduleWithDuplicateMember1.ts, 0, 0), Decl(cloduleWithDuplicateMember1.ts, 6, 1), Decl(cloduleWithDuplicateMember1.ts, 10, 1)) export var x = 1; >x : Symbol(x, Decl(cloduleWithDuplicateMember1.ts, 9, 14)) } -module C { +namespace C { >C : Symbol(C, Decl(cloduleWithDuplicateMember1.ts, 0, 0), Decl(cloduleWithDuplicateMember1.ts, 6, 1), Decl(cloduleWithDuplicateMember1.ts, 10, 1)) export function foo() { } ->foo : Symbol(foo, Decl(cloduleWithDuplicateMember1.ts, 11, 10)) +>foo : Symbol(foo, Decl(cloduleWithDuplicateMember1.ts, 11, 13)) export function x() { } >x : Symbol(x, Decl(cloduleWithDuplicateMember1.ts, 12, 29)) diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.types b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.types index 61e3c70b00..6c03943d91 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember1.types @@ -18,14 +18,14 @@ class C { >foo : () => void } -module C { +namespace C { >C : typeof C export var x = 1; >x : number >1 : 1 } -module C { +namespace C { >C : typeof C export function foo() { } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.errors.txt index 1c14d0ce1f..94efc9765e 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.errors.txt @@ -8,12 +8,12 @@ cloduleWithDuplicateMember2.ts(10,21): error TS2300: Duplicate identifier 'x'. static set y(z) { } } - module C { + namespace C { export var x = 1; ~ !!! error TS2300: Duplicate identifier 'x'. } - module C { + namespace C { export function x() { } ~ !!! error TS2300: Duplicate identifier 'x'. diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js index bb209124aa..2e58784356 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js @@ -6,10 +6,10 @@ class C { static set y(z) { } } -module C { +namespace C { export var x = 1; } -module C { +namespace C { export function x() { } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js.diff new file mode 100644 index 0000000000..1310e93834 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.js.diff @@ -0,0 +1,28 @@ +--- old.cloduleWithDuplicateMember2.js ++++ new.cloduleWithDuplicateMember2.js +@@= skipped -13, +13 lines =@@ + } + + //// [cloduleWithDuplicateMember2.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- set: function (y) { }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C, "y", { +- set: function (z) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ set x(y) { } ++ static set y(z) { } ++} + (function (C) { + C.x = 1; + })(C || (C = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.symbols b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.symbols index f44defb820..b711a0ff41 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.symbols @@ -13,15 +13,15 @@ class C { >z : Symbol(z, Decl(cloduleWithDuplicateMember2.ts, 2, 17)) } -module C { +namespace C { >C : Symbol(C, Decl(cloduleWithDuplicateMember2.ts, 0, 0), Decl(cloduleWithDuplicateMember2.ts, 3, 1), Decl(cloduleWithDuplicateMember2.ts, 7, 1)) export var x = 1; >x : Symbol(x, Decl(cloduleWithDuplicateMember2.ts, 6, 14)) } -module C { +namespace C { >C : Symbol(C, Decl(cloduleWithDuplicateMember2.ts, 0, 0), Decl(cloduleWithDuplicateMember2.ts, 3, 1), Decl(cloduleWithDuplicateMember2.ts, 7, 1)) export function x() { } ->x : Symbol(x, Decl(cloduleWithDuplicateMember2.ts, 8, 10)) +>x : Symbol(x, Decl(cloduleWithDuplicateMember2.ts, 8, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.types b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.types index 8a2d722490..26c6812d0c 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithDuplicateMember2.types @@ -13,14 +13,14 @@ class C { >z : any } -module C { +namespace C { >C : typeof C export var x = 1; >x : number >1 : 1 } -module C { +namespace C { >C : typeof C export function x() { } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.errors.txt b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.errors.txt index 22851740d1..5214553694 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.errors.txt @@ -1,10 +1,10 @@ -cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +cloduleWithPriorInstantiatedModule.ts(2,11): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== cloduleWithPriorInstantiatedModule.ts (1 errors) ==== // Non-ambient & instantiated module. - module Moclodule { - ~~~~~~~~~ + namespace Moclodule { + ~~~~~~~~~ !!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export interface Someinterface { foo(): void; @@ -16,7 +16,7 @@ cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaratio } // Instantiated module. - module Moclodule { + namespace Moclodule { export class Manager { } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js index 2e9d421a17..befbee2303 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js @@ -2,7 +2,7 @@ //// [cloduleWithPriorInstantiatedModule.ts] // Non-ambient & instantiated module. -module Moclodule { +namespace Moclodule { export interface Someinterface { foo(): void; } @@ -13,7 +13,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { export class Manager { } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js.diff new file mode 100644 index 0000000000..0c62fca334 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.js.diff @@ -0,0 +1,24 @@ +--- old.cloduleWithPriorInstantiatedModule.js ++++ new.cloduleWithPriorInstantiatedModule.js +@@= skipped -23, +23 lines =@@ + (function (Moclodule) { + var x = 10; + })(Moclodule || (Moclodule = {})); +-var Moclodule = /** @class */ (function () { +- function Moclodule() { +- } +- return Moclodule; +-}()); ++class Moclodule { ++} + // Instantiated module. + (function (Moclodule) { +- var Manager = /** @class */ (function () { +- function Manager() { +- } +- return Manager; +- }()); ++ class Manager { ++ } + Moclodule.Manager = Manager; + })(Moclodule || (Moclodule = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.symbols b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.symbols index df057830e0..a6a487bd63 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.symbols @@ -2,11 +2,11 @@ === cloduleWithPriorInstantiatedModule.ts === // Non-ambient & instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : Symbol(Moclodule, Decl(cloduleWithPriorInstantiatedModule.ts, 0, 0), Decl(cloduleWithPriorInstantiatedModule.ts, 6, 1), Decl(cloduleWithPriorInstantiatedModule.ts, 9, 1)) export interface Someinterface { ->Someinterface : Symbol(Someinterface, Decl(cloduleWithPriorInstantiatedModule.ts, 1, 18)) +>Someinterface : Symbol(Someinterface, Decl(cloduleWithPriorInstantiatedModule.ts, 1, 21)) foo(): void; >foo : Symbol(Someinterface.foo, Decl(cloduleWithPriorInstantiatedModule.ts, 2, 36)) @@ -20,10 +20,10 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : Symbol(Moclodule, Decl(cloduleWithPriorInstantiatedModule.ts, 0, 0), Decl(cloduleWithPriorInstantiatedModule.ts, 6, 1), Decl(cloduleWithPriorInstantiatedModule.ts, 9, 1)) export class Manager { ->Manager : Symbol(Manager, Decl(cloduleWithPriorInstantiatedModule.ts, 12, 18)) +>Manager : Symbol(Manager, Decl(cloduleWithPriorInstantiatedModule.ts, 12, 21)) } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.types b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.types index 6ca680ab53..85b14f557d 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorInstantiatedModule.types @@ -2,7 +2,7 @@ === cloduleWithPriorInstantiatedModule.ts === // Non-ambient & instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : typeof Moclodule export interface Someinterface { @@ -19,7 +19,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : typeof Moclodule export class Manager { diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js index fc41664675..2ba1af6b7c 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js @@ -2,7 +2,7 @@ //// [cloduleWithPriorUninstantiatedModule.ts] // Non-ambient & uninstantiated module. -module Moclodule { +namespace Moclodule { export interface Someinterface { foo(): void; } @@ -12,7 +12,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { export class Manager { } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js.diff new file mode 100644 index 0000000000..138b420439 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.js.diff @@ -0,0 +1,24 @@ +--- old.cloduleWithPriorUninstantiatedModule.js ++++ new.cloduleWithPriorUninstantiatedModule.js +@@= skipped -17, +17 lines =@@ + } + + //// [cloduleWithPriorUninstantiatedModule.js] +-var Moclodule = /** @class */ (function () { +- function Moclodule() { +- } +- return Moclodule; +-}()); ++class Moclodule { ++} + // Instantiated module. + (function (Moclodule) { +- var Manager = /** @class */ (function () { +- function Manager() { +- } +- return Manager; +- }()); ++ class Manager { ++ } + Moclodule.Manager = Manager; + })(Moclodule || (Moclodule = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.symbols b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.symbols index c87b6b7ee2..fb7486917f 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.symbols @@ -2,11 +2,11 @@ === cloduleWithPriorUninstantiatedModule.ts === // Non-ambient & uninstantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : Symbol(Moclodule, Decl(cloduleWithPriorUninstantiatedModule.ts, 0, 0), Decl(cloduleWithPriorUninstantiatedModule.ts, 5, 1), Decl(cloduleWithPriorUninstantiatedModule.ts, 8, 1)) export interface Someinterface { ->Someinterface : Symbol(Someinterface, Decl(cloduleWithPriorUninstantiatedModule.ts, 1, 18)) +>Someinterface : Symbol(Someinterface, Decl(cloduleWithPriorUninstantiatedModule.ts, 1, 21)) foo(): void; >foo : Symbol(Someinterface.foo, Decl(cloduleWithPriorUninstantiatedModule.ts, 2, 36)) @@ -18,10 +18,10 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : Symbol(Moclodule, Decl(cloduleWithPriorUninstantiatedModule.ts, 0, 0), Decl(cloduleWithPriorUninstantiatedModule.ts, 5, 1), Decl(cloduleWithPriorUninstantiatedModule.ts, 8, 1)) export class Manager { ->Manager : Symbol(Manager, Decl(cloduleWithPriorUninstantiatedModule.ts, 11, 18)) +>Manager : Symbol(Manager, Decl(cloduleWithPriorUninstantiatedModule.ts, 11, 21)) } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.types b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.types index 6ad953627a..f28e95dcd6 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithPriorUninstantiatedModule.types @@ -2,7 +2,7 @@ === cloduleWithPriorUninstantiatedModule.ts === // Non-ambient & uninstantiated module. -module Moclodule { +namespace Moclodule { export interface Someinterface { foo(): void; >foo : () => void @@ -14,7 +14,7 @@ class Moclodule { } // Instantiated module. -module Moclodule { +namespace Moclodule { >Moclodule : typeof Moclodule export class Manager { diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js index e326d5cc1b..3e7a88e797 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js @@ -4,7 +4,7 @@ module M { export class C { } - export module C { + export namespace C { export var C = M.C } } diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js.diff b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js.diff new file mode 100644 index 0000000000..a129504c0f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.js.diff @@ -0,0 +1,16 @@ +--- old.cloduleWithRecursiveReference.js ++++ new.cloduleWithRecursiveReference.js +@@= skipped -11, +11 lines =@@ + //// [cloduleWithRecursiveReference.js] + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + M.C = C; + (function (C_1) { + C_1.C = M.C; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.symbols b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.symbols index ae19a034a1..ff0aae85cd 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.symbols +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.symbols @@ -7,7 +7,7 @@ module M export class C { } >C : Symbol(C, Decl(cloduleWithRecursiveReference.ts, 1, 1), Decl(cloduleWithRecursiveReference.ts, 2, 21)) - export module C { + export namespace C { >C : Symbol(C, Decl(cloduleWithRecursiveReference.ts, 1, 1), Decl(cloduleWithRecursiveReference.ts, 2, 21)) export var C = M.C diff --git a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.types b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.types index 5d6af1e9ed..e27bf625fe 100644 --- a/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.types +++ b/testdata/baselines/reference/submodule/compiler/cloduleWithRecursiveReference.types @@ -7,7 +7,7 @@ module M export class C { } >C : C - export module C { + export namespace C { >C : typeof M.C export var C = M.C diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt index 416a7bba14..7289377242 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.errors.txt @@ -8,7 +8,7 @@ clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' in id: number; } - module Shape.Utils { + namespace Shape.Utils { export function convert(): Shape { return null;} } @@ -22,7 +22,7 @@ clodulesDerivedClasses.ts(9,7): error TS2417: Class static side 'typeof Path' in } - module Path.Utils { + namespace Path.Utils { export function convert2(): Path { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js index 3282ddbdef..eed6b75a2b 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js @@ -5,7 +5,7 @@ class Shape { id: number; } -module Shape.Utils { +namespace Shape.Utils { export function convert(): Shape { return null;} } @@ -14,7 +14,7 @@ class Path extends Shape { } -module Path.Utils { +namespace Path.Utils { export function convert2(): Path { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js.diff b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js.diff index c03dd21bdb..c1e379abf7 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js.diff +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.js.diff @@ -1,11 +1,32 @@ --- old.clodulesDerivedClasses.js +++ new.clodulesDerivedClasses.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + //// [clodulesDerivedClasses.js] - class Shape { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Shape = /** @class */ (function () { +- function Shape() { +- } +- return Shape; +-}()); ++class Shape { + id; - } ++} (function (Shape) { - var Utils; + let Utils; @@ -14,9 +35,16 @@ Utils.convert = convert; })(Utils = Shape.Utils || (Shape.Utils = {})); })(Shape || (Shape = {})); - class Path extends Shape { +-var Path = /** @class */ (function (_super) { +- __extends(Path, _super); +- function Path() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Path; +-}(Shape)); ++class Path extends Shape { + name; - } ++} (function (Path) { - var Utils; + let Utils; diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.symbols b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.symbols index 33de2537ff..1953ac9435 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.symbols +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.symbols @@ -8,12 +8,12 @@ class Shape { >id : Symbol(Shape.id, Decl(clodulesDerivedClasses.ts, 0, 13)) } -module Shape.Utils { +namespace Shape.Utils { >Shape : Symbol(Shape, Decl(clodulesDerivedClasses.ts, 0, 0), Decl(clodulesDerivedClasses.ts, 2, 1)) ->Utils : Symbol(Utils, Decl(clodulesDerivedClasses.ts, 4, 13)) +>Utils : Symbol(Utils, Decl(clodulesDerivedClasses.ts, 4, 16)) export function convert(): Shape { return null;} ->convert : Symbol(convert, Decl(clodulesDerivedClasses.ts, 4, 20)) +>convert : Symbol(convert, Decl(clodulesDerivedClasses.ts, 4, 23)) >Shape : Symbol(Shape, Decl(clodulesDerivedClasses.ts, 0, 0), Decl(clodulesDerivedClasses.ts, 2, 1)) } @@ -26,12 +26,12 @@ class Path extends Shape { } -module Path.Utils { +namespace Path.Utils { >Path : Symbol(Path, Decl(clodulesDerivedClasses.ts, 6, 1), Decl(clodulesDerivedClasses.ts, 11, 1)) ->Utils : Symbol(Utils, Decl(clodulesDerivedClasses.ts, 13, 12)) +>Utils : Symbol(Utils, Decl(clodulesDerivedClasses.ts, 13, 15)) export function convert2(): Path { ->convert2 : Symbol(convert2, Decl(clodulesDerivedClasses.ts, 13, 19)) +>convert2 : Symbol(convert2, Decl(clodulesDerivedClasses.ts, 13, 22)) >Path : Symbol(Path, Decl(clodulesDerivedClasses.ts, 6, 1), Decl(clodulesDerivedClasses.ts, 11, 1)) return null; diff --git a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.types b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.types index 60630eefde..ca53791b04 100644 --- a/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.types +++ b/testdata/baselines/reference/submodule/compiler/clodulesDerivedClasses.types @@ -8,7 +8,7 @@ class Shape { >id : number } -module Shape.Utils { +namespace Shape.Utils { >Shape : typeof Shape >Utils : typeof Utils @@ -25,7 +25,7 @@ class Path extends Shape { } -module Path.Utils { +namespace Path.Utils { >Path : typeof Path >Utils : typeof Utils diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences.js.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences.js.diff index 1a8c6131e3..ba5f384457 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences.js.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences.js.diff @@ -7,7 +7,18 @@ -"use strict"; foo(a, fab); foo(b, fab); - const actionA = { payload: 'any-string' }; +-var actionA = { payload: 'any-string' }; +-var actionB = { payload: true }; ++const actionA = { payload: 'any-string' }; ++const actionB = { payload: true }; + function call(action, fn) { + fn(action); + } +-var printFn = function (action) { return console.log(action); }; ++const printFn = (action) => console.log(action); + call(actionA, printFn); + call(actionB, printFn); + @@= skipped -35, +34 lines =@@ declare const actionA: Action<"ACTION_A", string>; declare const actionB: Action<"ACTION_B", boolean>; diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.js.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.js.diff index a2f51d6248..1eefd2b517 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.js.diff @@ -6,5 +6,21 @@ //// [coAndContraVariantInferences2.js] -"use strict"; function f1(a, b) { - const x1 = cast(a, isC); // cast - const x2 = cast(b, isC); // cast \ No newline at end of file +- var x1 = cast(a, isC); // cast +- var x2 = cast(b, isC); // cast ++ const x1 = cast(a, isC); // cast ++ const x2 = cast(b, isC); // cast + } + function f2(b, c) { + consume(b, c, useA); // consume +@@= skipped -33, +32 lines =@@ + node; // FunctionDeclaration + } + function bar(node) { +- var a = tryCast(node, isExpression); // tryCast ++ const a = tryCast(node, isExpression); // tryCast + } +-var maybeClassStatement = tryCast(statement, isClassLike); // ClassLike1 +-var x = tryCast(types, isNodeArray); // NodeAray ++const maybeClassStatement = tryCast(statement, isClassLike); // ClassLike1 ++const x = tryCast(types, isNodeArray); // NodeAray \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.symbols.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.symbols.diff new file mode 100644 index 0000000000..d3f4696e77 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.symbols.diff @@ -0,0 +1,11 @@ +--- old.coAndContraVariantInferences2.symbols ++++ new.coAndContraVariantInferences2.symbols +@@= skipped -374, +374 lines =@@ + >NodeArray : Symbol(NodeArray, Decl(coAndContraVariantInferences2.ts, 107, 1)) + >T : Symbol(T, Decl(coAndContraVariantInferences2.ts, 109, 20)) + >Node : Symbol(Node, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(coAndContraVariantInferences2.ts, 43, 1)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(coAndContraVariantInferences2.ts, 109, 20)) + + someProp: string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.types.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.types.diff index 89d73090ba..0d0edc7aa8 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences2.types.diff @@ -14,7 +14,15 @@ function bar(node: Identifier | FunctionDeclaration) { ->bar : (node: Identifier | FunctionDeclaration) => void +->node : Identifier | FunctionDeclaration +>bar : (node: FunctionDeclaration | Identifier) => void - >node : FunctionDeclaration | Identifier ++>node : FunctionDeclaration | Identifier - const a = tryCast(node, isExpression); // tryCast \ No newline at end of file + const a = tryCast(node, isExpression); // tryCast + >a : Expression + >tryCast(node, isExpression) : Expression + >tryCast : (value: TIn | undefined, test: (value: TIn) => value is TOut) => TOut +->node : Identifier | FunctionDeclaration ++>node : FunctionDeclaration | Identifier + >isExpression : (node: Node) => node is Expression + } diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.js.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.js.diff index 3f9ba1f3a4..8d34373832 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.js.diff @@ -7,4 +7,43 @@ -"use strict"; ; buildOverload("updateImportDeclaration") - .overload({ \ No newline at end of file + .overload({ +- 0: function (node, modifiers, importClause, moduleSpecifier, assertClause) { ++ 0(node, modifiers, importClause, moduleSpecifier, assertClause) { + return updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause); + }, +- 1: function (node, _decorators, modifiers, importClause, moduleSpecifier, assertClause) { ++ 1(node, _decorators, modifiers, importClause, moduleSpecifier, assertClause) { + return updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause); + }, + }) + .bind({ +- 0: function (_a) { +- var modifiers = _a[1], importClause = _a[2], moduleSpecifier = _a[3], assertClause = _a[4], other = _a[5]; +- return (other === undefined) && +- (modifiers === undefined || every(modifiers, isModifier)) && +- (importClause === undefined || !isArray(importClause)) && +- (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && +- (assertClause === undefined || isAssertClause(assertClause)); +- }, +- 1: function (_a) { +- var decorators = _a[1], modifiers = _a[2], importClause = _a[3], moduleSpecifier = _a[4], assertClause = _a[5]; +- return (decorators === undefined || every(decorators, isDecorator)) && +- (modifiers === undefined || isArray(modifiers)) && +- (importClause === undefined || isImportClause(importClause)) && +- (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && +- (assertClause === undefined || isAssertClause(assertClause)); +- }, ++ 0: ([, modifiers, importClause, moduleSpecifier, assertClause, other]) => (other === undefined) && ++ (modifiers === undefined || every(modifiers, isModifier)) && ++ (importClause === undefined || !isArray(importClause)) && ++ (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && ++ (assertClause === undefined || isAssertClause(assertClause)), ++ 1: ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]) => (decorators === undefined || every(decorators, isDecorator)) && ++ (modifiers === undefined || isArray(modifiers)) && ++ (importClause === undefined || isImportClause(importClause)) && ++ (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && ++ (assertClause === undefined || isAssertClause(assertClause)), + }) + .deprecate({ + 1: DISALLOW_DECORATORS \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.types.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.types.diff index 9f548d7987..6970a1d139 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences3.types.diff @@ -42,4 +42,109 @@ +>every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; } >array : readonly T[] | undefined >callback : (element: T, index: number) => boolean - >element : T \ No newline at end of file + >element : T +@@= skipped -90, +90 lines =@@ + 0: ([, modifiers, importClause, moduleSpecifier, assertClause, other]) => + >0 : ([, modifiers, importClause, moduleSpecifier, assertClause, other]: [node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined] | [node: ImportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined]) => boolean + >([, modifiers, importClause, moduleSpecifier, assertClause, other]) => (other === undefined) && (modifiers === undefined || every(modifiers, isModifier)) && (importClause === undefined || !isArray(importClause)) && (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && (assertClause === undefined || isAssertClause(assertClause)) : ([, modifiers, importClause, moduleSpecifier, assertClause, other]: [node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined] | [node: ImportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined]) => boolean +-> : undefined +->modifiers : readonly Modifier[] | readonly Decorator[] | undefined ++>modifiers : readonly Decorator[] | readonly Modifier[] | undefined + >importClause : ImportClause | readonly Modifier[] | undefined + >moduleSpecifier : Expression | ImportClause | undefined +->assertClause : Expression | AssertClause | undefined ++>assertClause : AssertClause | Expression | undefined + >other : AssertClause | undefined + + (other === undefined) && +@@= skipped -21, +20 lines =@@ + >(modifiers === undefined || every(modifiers, isModifier)) : boolean + >modifiers === undefined || every(modifiers, isModifier) : boolean + >modifiers === undefined : boolean +->modifiers : readonly Modifier[] | readonly Decorator[] | undefined ++>modifiers : readonly Decorator[] | readonly Modifier[] | undefined + >undefined : undefined + >every(modifiers, isModifier) : boolean + >every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; } +->modifiers : readonly Modifier[] | readonly Decorator[] ++>modifiers : readonly Decorator[] | readonly Modifier[] + >isModifier : (node: Node) => node is Modifier + + (importClause === undefined || !isArray(importClause)) && +@@= skipped -32, +32 lines =@@ + >(assertClause === undefined || isAssertClause(assertClause)) : boolean + >assertClause === undefined || isAssertClause(assertClause) : boolean + >assertClause === undefined : boolean +->assertClause : Expression | AssertClause | undefined ++>assertClause : AssertClause | Expression | undefined + >undefined : undefined + >isAssertClause(assertClause) : boolean + >isAssertClause : (node: Node) => node is AssertClause +->assertClause : Expression | AssertClause ++>assertClause : AssertClause | Expression + + 1: ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]) => + >1 : ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]: [node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined] | [node: ImportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined]) => boolean + >([, decorators, modifiers, importClause, moduleSpecifier, assertClause]) => (decorators === undefined || every(decorators, isDecorator)) && (modifiers === undefined || isArray(modifiers)) && (importClause === undefined || isImportClause(importClause)) && (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && (assertClause === undefined || isAssertClause(assertClause)) : ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]: [node: ImportDeclaration, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined] | [node: ImportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined]) => boolean +-> : undefined +->decorators : readonly Modifier[] | readonly Decorator[] | undefined ++>decorators : readonly Decorator[] | readonly Modifier[] | undefined + >modifiers : ImportClause | readonly Modifier[] | undefined + >importClause : Expression | ImportClause | undefined +->moduleSpecifier : Expression | AssertClause | undefined ++>moduleSpecifier : AssertClause | Expression | undefined + >assertClause : AssertClause | undefined + + (decorators === undefined || every(decorators, isDecorator)) && +@@= skipped -24, +23 lines =@@ + >(decorators === undefined || every(decorators, isDecorator)) : boolean + >decorators === undefined || every(decorators, isDecorator) : boolean + >decorators === undefined : boolean +->decorators : readonly Modifier[] | readonly Decorator[] | undefined ++>decorators : readonly Decorator[] | readonly Modifier[] | undefined + >undefined : undefined + >every(decorators, isDecorator) : boolean + >every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; } +->decorators : readonly Modifier[] | readonly Decorator[] ++>decorators : readonly Decorator[] | readonly Modifier[] + >isDecorator : (node: Node) => node is Decorator + + (modifiers === undefined || isArray(modifiers)) && +@@= skipped -31, +31 lines =@@ + >(moduleSpecifier !== undefined && isExpression(moduleSpecifier)) : boolean + >moduleSpecifier !== undefined && isExpression(moduleSpecifier) : boolean + >moduleSpecifier !== undefined : boolean +->moduleSpecifier : Expression | AssertClause | undefined ++>moduleSpecifier : AssertClause | Expression | undefined + >undefined : undefined + >isExpression(moduleSpecifier) : boolean + >isExpression : (node: Node) => node is Expression +->moduleSpecifier : Expression | AssertClause ++>moduleSpecifier : AssertClause | Expression + + (assertClause === undefined || isAssertClause(assertClause)), + >(assertClause === undefined || isAssertClause(assertClause)) : boolean +@@= skipped -31, +31 lines =@@ + + + declare const modifiers: readonly Modifier[] | readonly Decorator[]; +->modifiers : readonly Modifier[] | readonly Decorator[] ++>modifiers : readonly Decorator[] | readonly Modifier[] + + function foo() { + >foo : () => void +@@= skipped -8, +8 lines =@@ + every(modifiers, isModifier); + >every(modifiers, isModifier) : boolean + >every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; } +->modifiers : readonly Modifier[] | readonly Decorator[] ++>modifiers : readonly Decorator[] | readonly Modifier[] + >isModifier : (node: Node) => node is Modifier + + every(modifiers, isDecorator); + >every(modifiers, isDecorator) : boolean + >every : { (array: readonly T[], callback: (element: T, index: number) => element is U): array is readonly U[]; (array: readonly T[] | undefined, callback: (element: T, index: number) => element is U): array is readonly U[] | undefined; (array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean; } +->modifiers : readonly Modifier[] | readonly Decorator[] ++>modifiers : readonly Decorator[] | readonly Modifier[] + >isDecorator : (node: Node) => node is Decorator + } diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.errors.txt.diff new file mode 100644 index 0000000000..038ac3871d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.errors.txt.diff @@ -0,0 +1,38 @@ +--- old.coAndContraVariantInferences5.errors.txt ++++ new.coAndContraVariantInferences5.errors.txt +@@= skipped -0, +0 lines =@@ +- ++coAndContraVariantInferences5.ts(9,9): error TS2322: Type '(status: Thing | null) => void' is not assignable to type '(key: string) => void'. ++ Types of parameters 'status' and 'key' are incompatible. ++ Type 'string' is not assignable to type 'Thing | null'. ++ ++ ++==== coAndContraVariantInferences5.ts (1 errors) ==== ++ type Thing = 'a' | 'b'; ++ ++ function f( ++ options: SelectOptions, ++ onChange: (status: Thing | null) => void, ++ ): void { ++ select({ ++ options, ++ onChange, ++ ~~~~~~~~ ++!!! error TS2322: Type '(status: Thing | null) => void' is not assignable to type '(key: string) => void'. ++!!! error TS2322: Types of parameters 'status' and 'key' are incompatible. ++!!! error TS2322: Type 'string' is not assignable to type 'Thing | null'. ++!!! related TS6500 coAndContraVariantInferences5.ts:17:5: The expected type comes from property 'onChange' which is declared here on type 'SelectProps' ++ }); ++ } ++ ++ declare function select(props: SelectProps): void; ++ ++ type SelectProps = { ++ options?: SelectOptions; ++ onChange: (key: KeyT) => void; ++ }; ++ ++ type SelectOptions = ++ | Array<{key: KeyT}> ++ | Array; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.symbols.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.symbols.diff new file mode 100644 index 0000000000..d270e57983 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences5.symbols.diff @@ -0,0 +1,15 @@ +--- old.coAndContraVariantInferences5.symbols ++++ new.coAndContraVariantInferences5.symbols +@@= skipped -57, +57 lines =@@ + >KeyT : Symbol(KeyT, Decl(coAndContraVariantInferences5.ts, 19, 19)) + + | Array<{key: KeyT}> +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >key : Symbol(key, Decl(coAndContraVariantInferences5.ts, 20, 13)) + >KeyT : Symbol(KeyT, Decl(coAndContraVariantInferences5.ts, 19, 19)) + + | Array; +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >KeyT : Symbol(KeyT, Decl(coAndContraVariantInferences5.ts, 19, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences6.types.diff b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences6.types.diff index 1172b98d28..16aae7c646 100644 --- a/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences6.types.diff +++ b/testdata/baselines/reference/submodule/compiler/coAndContraVariantInferences6.types.diff @@ -8,7 +8,11 @@ +>createElementIsolated :

(type: string | ComponentClass

| FunctionComponent

, props?: P | null | undefined) => void type: FunctionComponent

| ComponentClass

| string, - >type : string | ComponentClass

| FunctionComponent

+->type : string | FunctionComponent

| ComponentClass

++>type : string | ComponentClass

| FunctionComponent

+ + props?: P | null, + >props : P | null | undefined @@= skipped -15, +15 lines =@@ createElementIsolated(WrapperIsolated, { value: "C" }); diff --git a/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.js.diff b/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.js.diff index 21ea59311a..b1b3cc9c14 100644 --- a/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.js.diff @@ -1,11 +1,43 @@ --- old.collectionPatternNoError.js +++ new.collectionPatternNoError.js -@@= skipped -48, +48 lines =@@ +@@= skipped -39, +39 lines =@@ + + + //// [collectionPatternNoError.js] +-var Message = /** @class */ (function () { +- function Message() { +- } +- Message.prototype.clone = function () { ++class Message { ++ clone() { + return this; +- }; +- return Message; +-}()); ++ } ++} + function fetchMsg(protoCtor) { return null; } - class DataProvider { +-var DataProvider = /** @class */ (function () { +- function DataProvider(message, messageList) { ++class DataProvider { + message; + messageList; - constructor(message, messageList) { ++ constructor(message, messageList) { this.message = message; - this.messageList = messageList; \ No newline at end of file + this.messageList = messageList; + } +- DataProvider.prototype.fetch = function () { +- var messageList = fetchMsg(this.messageList); ++ fetch() { ++ const messageList = fetchMsg(this.messageList); + messageList.methodOnMessageList(); +- }; +- return DataProvider; +-}()); ++ } ++} + // The same bug as the above but using indexed accesses + // (won't surface directly unless unsound indexed access assignments are forbidden) + function f(message, messageList) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.symbols.diff b/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.symbols.diff new file mode 100644 index 0000000000..ebd426d1aa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collectionPatternNoError.symbols.diff @@ -0,0 +1,11 @@ +--- old.collectionPatternNoError.symbols ++++ new.collectionPatternNoError.symbols +@@= skipped -7, +7 lines =@@ + + new(data: Array<{}>): T; + >data : Symbol(data, Decl(collectionPatternNoError.ts, 1, 6)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(collectionPatternNoError.ts, 0, 25)) + } + class Message { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionArgumentsArrowFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/collisionArgumentsArrowFunctions.js.diff new file mode 100644 index 0000000000..b49d7640ad --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionArgumentsArrowFunctions.js.diff @@ -0,0 +1,42 @@ +--- old.collisionArgumentsArrowFunctions.js ++++ new.collisionArgumentsArrowFunctions.js +@@= skipped -18, +18 lines =@@ + } + + //// [collisionArgumentsArrowFunctions.js] +-var f1 = function (i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } ++var f1 = (i, ...arguments) => { + var arguments; // no error + }; +-var f12 = function (arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } +- var arguments = 10; // no error +-}; +-var f1NoError = function (arguments) { +- var arguments = 10; // no error +-}; +-var f2 = function () { +- var restParameters = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- restParameters[_i] = arguments[_i]; +- } ++var f12 = (arguments, ...rest) => { ++ var arguments = 10; // no error ++}; ++var f1NoError = (arguments) => { ++ var arguments = 10; // no error ++}; ++var f2 = (...restParameters) => { + var arguments = 10; // No Error + }; +-var f2NoError = function () { ++var f2NoError = () => { + var arguments = 10; // no error + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassConstructor.js.diff index 8f63e05dd4..e1950e4feb 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassConstructor.js.diff @@ -1,17 +1,146 @@ --- old.collisionArgumentsClassConstructor.js +++ new.collisionArgumentsClassConstructor.js -@@= skipped -115, +115 lines =@@ - } - } - class c3 { +@@= skipped -89, +89 lines =@@ + + //// [collisionArgumentsClassConstructor.js] + // Constructors +-var c1 = /** @class */ (function () { +- function c1(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- } +- return c1; +-}()); +-var c12 = /** @class */ (function () { +- function c12(arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } +- var arguments = 10; // no error +- } +- return c12; +-}()); +-var c1NoError = /** @class */ (function () { +- function c1NoError(arguments) { +- var arguments = 10; // no error +- } +- return c1NoError; +-}()); +-var c2 = /** @class */ (function () { +- function c2() { +- var restParameters = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- restParameters[_i] = arguments[_i]; +- } +- var arguments = 10; // no error +- } +- return c2; +-}()); +-var c2NoError = /** @class */ (function () { +- function c2NoError() { +- var arguments = 10; // no error +- } +- return c2NoError; +-}()); +-var c3 = /** @class */ (function () { +- function c3(arguments) { +- var restParameters = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- restParameters[_i - 1] = arguments[_i]; +- } +- this.arguments = arguments; +- var arguments = 10; // no error +- } +- return c3; +-}()); +-var c3NoError = /** @class */ (function () { +- function c3NoError(arguments) { +- this.arguments = arguments; +- var arguments = 10; // no error +- } +- return c3NoError; +-}()); +-var c5 = /** @class */ (function () { +- function c5(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- } +- return c5; +-}()); +-var c52 = /** @class */ (function () { +- function c52(arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- } +- return c52; +-}()); +-var c5NoError = /** @class */ (function () { +- function c5NoError(arguments) { +- var arguments; // no error +- } +- return c5NoError; +-}()); ++class c1 { ++ constructor(i, ...arguments) { ++ var arguments; // no error ++ } ++} ++class c12 { ++ constructor(arguments, ...rest) { ++ var arguments = 10; // no error ++ } ++} ++class c1NoError { ++ constructor(arguments) { ++ var arguments = 10; // no error ++ } ++} ++class c2 { ++ constructor(...restParameters) { ++ var arguments = 10; // no error ++ } ++} ++class c2NoError { ++ constructor() { ++ var arguments = 10; // no error ++ } ++} ++class c3 { + arguments; - constructor(arguments, ...restParameters) { - this.arguments = arguments; - var arguments = 10; // no error - } - } - class c3NoError { ++ constructor(arguments, ...restParameters) { ++ this.arguments = arguments; ++ var arguments = 10; // no error ++ } ++} ++class c3NoError { + arguments; - constructor(arguments) { - this.arguments = arguments; - var arguments = 10; // no error \ No newline at end of file ++ constructor(arguments) { ++ this.arguments = arguments; ++ var arguments = 10; // no error ++ } ++} ++class c5 { ++ constructor(i, ...arguments) { ++ var arguments; // no error ++ } ++} ++class c52 { ++ constructor(arguments, ...rest) { ++ var arguments; // no error ++ } ++} ++class c5NoError { ++ constructor(arguments) { ++ var arguments; // no error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassMethod.js.diff b/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassMethod.js.diff new file mode 100644 index 0000000000..fcee87c6a2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionArgumentsClassMethod.js.diff @@ -0,0 +1,88 @@ +--- old.collisionArgumentsClassMethod.js ++++ new.collisionArgumentsClassMethod.js +@@= skipped -50, +50 lines =@@ + } + + //// [collisionArgumentsClassMethod.js] +-var c1 = /** @class */ (function () { +- function c1() { +- } +- c1.prototype.foo = function (i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- }; +- c1.prototype.foo1 = function (arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } +- var arguments = 10; // no error +- }; +- c1.prototype.fooNoError = function (arguments) { +- var arguments = 10; // no error +- }; +- c1.prototype.f4 = function (i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- }; +- c1.prototype.f41 = function (arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } +- var arguments; // no error +- }; +- c1.prototype.f4NoError = function (arguments) { +- var arguments; // no error +- }; +- return c1; +-}()); +-var c3 = /** @class */ (function () { +- function c3() { +- } +- c3.prototype.foo = function () { +- var restParameters = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- restParameters[_i] = arguments[_i]; +- } +- var arguments = 10; // no error +- }; +- c3.prototype.fooNoError = function () { +- var arguments = 10; // no error +- }; +- return c3; +-}()); ++class c1 { ++ foo(i, ...arguments) { ++ var arguments; // no error ++ } ++ foo1(arguments, ...rest) { ++ var arguments = 10; // no error ++ } ++ fooNoError(arguments) { ++ var arguments = 10; // no error ++ } ++ f4(i, ...arguments) { ++ var arguments; // no error ++ } ++ f41(arguments, ...rest) { ++ var arguments; // no error ++ } ++ f4NoError(arguments) { ++ var arguments; // no error ++ } ++} ++class c3 { ++ foo(...restParameters) { ++ var arguments = 10; // no error ++ } ++ fooNoError() { ++ var arguments = 10; // no error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunction.js.diff b/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunction.js.diff new file mode 100644 index 0000000000..cbd9355726 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunction.js.diff @@ -0,0 +1,53 @@ +--- old.collisionArgumentsFunction.js ++++ new.collisionArgumentsFunction.js +@@= skipped -47, +47 lines =@@ + + //// [collisionArgumentsFunction.js] + // Functions +-function f1(arguments) { +- var restParameters = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- restParameters[_i - 1] = arguments[_i]; +- } ++function f1(arguments, ...restParameters) { + var arguments = 10; // no error + } +-function f12(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } ++function f12(i, ...arguments) { + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } +-function f3() { +- var restParameters = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- restParameters[_i] = arguments[_i]; +- } ++function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } +-function f4(arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } ++function f4(arguments, ...rest) { + var arguments; // No error + } +-function f42(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } ++function f42(i, ...arguments) { + var arguments; // No error + } + function f4NoError(arguments) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunctionExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunctionExpressions.js.diff new file mode 100644 index 0000000000..176ea8253c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionArgumentsFunctionExpressions.js.diff @@ -0,0 +1,53 @@ +--- old.collisionArgumentsFunctionExpressions.js ++++ new.collisionArgumentsFunctionExpressions.js +@@= skipped -37, +37 lines =@@ + + //// [collisionArgumentsFunctionExpressions.js] + function foo() { +- function f1(arguments) { +- var restParameters = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- restParameters[_i - 1] = arguments[_i]; +- } ++ function f1(arguments, ...restParameters) { + var arguments = 10; // no error + } +- function f12(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } ++ function f12(i, ...arguments) { + var arguments; // no error + } + function f1NoError(arguments) { + var arguments = 10; // no error + } +- function f3() { +- var restParameters = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- restParameters[_i] = arguments[_i]; +- } ++ function f3(...restParameters) { + var arguments = 10; // no error + } + function f3NoError() { + var arguments = 10; // no error + } +- function f4(arguments) { +- var rest = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- rest[_i - 1] = arguments[_i]; +- } ++ function f4(arguments, ...rest) { + var arguments; // No error + } +- function f42(i) { +- var arguments = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arguments[_i - 1] = arguments[_i]; +- } ++ function f42(i, ...arguments) { + var arguments; // No error + } + function f4NoError(arguments) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js index c9fc2885e4..ce61c067ad 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts] //// //// [collisionCodeGenModuleWithAccessorChildren.ts] -module M { +namespace M { export var x = 3; class c { private y; @@ -11,7 +11,7 @@ module M { } } -module M { +namespace M { class d { private y; set Z(p) { @@ -21,7 +21,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M class e { private y; set M(p) { @@ -30,7 +30,7 @@ module M { // Shouldnt be _M } } -module M { +namespace M { class f { get Z() { var M = 10; @@ -39,7 +39,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M class e { get M() { return x; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js.diff index 57306859b3..d17fdaa339 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.js.diff @@ -1,48 +1,102 @@ --- old.collisionCodeGenModuleWithAccessorChildren.js +++ new.collisionCodeGenModuleWithAccessorChildren.js -@@= skipped -51, +51 lines =@@ +@@= skipped -50, +50 lines =@@ + var M; (function (M_1) { M_1.x = 3; - class c { +- var c = /** @class */ (function () { +- function c() { ++ class c { + y; - set Z(M) { - this.y = M_1.x; ++ set Z(M) { ++ this.y = M_1.x; } -@@= skipped -7, +8 lines =@@ +- Object.defineProperty(c.prototype, "Z", { +- set: function (M) { +- this.y = M_1.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return c; +- }()); ++ } })(M || (M = {})); (function (M_2) { - class d { +- var d = /** @class */ (function () { +- function d() { ++ class d { + y; - set Z(p) { - var M = 10; -- this.y = M_2.x; ++ set Z(p) { ++ var M = 10; + this.y = x; } - } +- Object.defineProperty(d.prototype, "Z", { +- set: function (p) { +- var M = 10; +- this.y = M_2.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return d; +- }()); ++ } })(M || (M = {})); (function (M) { - class e { +- var e = /** @class */ (function () { +- function e() { ++ class e { + y; - set M(p) { -- this.y = M.x; ++ set M(p) { + this.y = x; } - } +- Object.defineProperty(e.prototype, "M", { +- set: function (p) { +- this.y = M.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return e; +- }()); ++ } })(M || (M = {})); -@@= skipped -17, +19 lines =@@ - class f { - get Z() { - var M = 10; -- return M_3.x; + (function (M_3) { +- var f = /** @class */ (function () { +- function f() { ++ class f { ++ get Z() { ++ var M = 10; + return x; } - } +- Object.defineProperty(f.prototype, "Z", { +- get: function () { +- var M = 10; +- return M_3.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return f; +- }()); ++ } })(M || (M = {})); (function (M) { - class e { - get M() { -- return M.x; +- var e = /** @class */ (function () { +- function e() { ++ class e { ++ get M() { + return x; } - } +- Object.defineProperty(e.prototype, "M", { +- get: function () { +- return M.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return e; +- }()); ++ } })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.symbols index 2e72d1fc22..73d8960703 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts] //// === collisionCodeGenModuleWithAccessorChildren.ts === -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) export var x = 3; @@ -26,11 +26,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) class d { ->d : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 10)) +>d : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 13)) private y; >y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) @@ -44,18 +44,18 @@ module M { this.y = x; >this.y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) ->this : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 10)) +>this : Symbol(d, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 10, 13)) >y : Symbol(d.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 11, 13)) >x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) } } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M >M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) class e { ->e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 10)) +>e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 13)) private y; >y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) @@ -66,18 +66,18 @@ module M { // Shouldnt be _M this.y = x; >this.y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) ->this : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 10)) +>this : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 20, 13)) >y : Symbol(e.y, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 21, 13)) >x : Symbol(x, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 1, 14)) } } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) class f { ->f : Symbol(f, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 29, 10)) +>f : Symbol(f, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 29, 13)) get Z() { >Z : Symbol(f.Z, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 30, 13)) @@ -91,11 +91,11 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M >M : Symbol(M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 8, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 18, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 27, 1), Decl(collisionCodeGenModuleWithAccessorChildren.ts, 36, 1)) class e { ->e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 38, 10)) +>e : Symbol(e, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 38, 13)) get M() { >M : Symbol(e.M, Decl(collisionCodeGenModuleWithAccessorChildren.ts, 39, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.types index 8709bc0554..3568fa7da3 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithAccessorChildren.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithAccessorChildren.ts] //// === collisionCodeGenModuleWithAccessorChildren.ts === -module M { +namespace M { >M : typeof M export var x = 3; @@ -28,7 +28,7 @@ module M { } } -module M { +namespace M { >M : typeof M class d { @@ -55,7 +55,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M >M : typeof M class e { @@ -78,7 +78,7 @@ module M { // Shouldnt be _M } } -module M { +namespace M { >M : typeof M class f { @@ -97,7 +97,7 @@ module M { } } -module M { // Shouldnt be _M +namespace M { // Shouldnt be _M >M : typeof M class e { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js index 5bb560562e..9f37b9e528 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts] //// //// [collisionCodeGenModuleWithConstructorChildren.ts] -module M { +namespace M { export var x = 3; class c { constructor(M, p = x) { @@ -9,14 +9,14 @@ module M { } } -module M { +namespace M { class d { constructor(private M, p = x) { } } } -module M { +namespace M { class d2 { constructor() { var M = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js.diff index 157a5feaba..f56feba9e5 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.js.diff @@ -1,21 +1,42 @@ --- old.collisionCodeGenModuleWithConstructorChildren.js +++ new.collisionCodeGenModuleWithConstructorChildren.js -@@= skipped -35, +35 lines =@@ +@@= skipped -28, +28 lines =@@ + var M; + (function (M_1) { + M_1.x = 3; +- var c = /** @class */ (function () { +- function c(M, p) { +- if (p === void 0) { p = M_1.x; } ++ class c { ++ constructor(M, p = M_1.x) { + } +- return c; +- }()); ++ } })(M || (M = {})); (function (M_2) { - class d { -- constructor(M, p = M_2.x) { +- var d = /** @class */ (function () { +- function d(M, p) { +- if (p === void 0) { p = M_2.x; } ++ class d { + M; + constructor(M, p = x) { this.M = M; } - } -@@= skipped -9, +10 lines =@@ - class d2 { - constructor() { +- return d; +- }()); ++ } + })(M || (M = {})); + (function (M_3) { +- var d2 = /** @class */ (function () { +- function d2() { ++ class d2 { ++ constructor() { var M = 10; - var p = M_3.x; + var p = x; } - } +- return d2; +- }()); ++ } })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.symbols index e50bf89e81..b1e0eaef95 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts] //// === collisionCodeGenModuleWithConstructorChildren.ts === -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 13, 1)) export var x = 3; @@ -18,11 +18,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 13, 1)) class d { ->d : Symbol(d, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 8, 10)) +>d : Symbol(d, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 8, 13)) constructor(private M, p = x) { >M : Symbol(d.M, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 10, 20)) @@ -32,11 +32,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithConstructorChildren.ts, 13, 1)) class d2 { ->d2 : Symbol(d2, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 15, 10)) +>d2 : Symbol(d2, Decl(collisionCodeGenModuleWithConstructorChildren.ts, 15, 13)) constructor() { var M = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.types index 29e10a02a7..1b6f0df674 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithConstructorChildren.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithConstructorChildren.ts] //// === collisionCodeGenModuleWithConstructorChildren.ts === -module M { +namespace M { >M : typeof M export var x = 3; @@ -19,7 +19,7 @@ module M { } } -module M { +namespace M { >M : typeof M class d { @@ -33,7 +33,7 @@ module M { } } -module M { +namespace M { >M : typeof M class d2 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js index 7e29113d9a..87c2693787 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts] //// //// [collisionCodeGenModuleWithEnumMemberConflict.ts] -module m1 { +namespace m1 { enum e { m1, m2 = m1 diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js.diff new file mode 100644 index 0000000000..3501e2b4d0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.js.diff @@ -0,0 +1,11 @@ +--- old.collisionCodeGenModuleWithEnumMemberConflict.js ++++ new.collisionCodeGenModuleWithEnumMemberConflict.js +@@= skipped -10, +10 lines =@@ + //// [collisionCodeGenModuleWithEnumMemberConflict.js] + var m1; + (function (m1) { +- var e; ++ let e; + (function (e) { + e[e["m1"] = 0] = "m1"; + e[e["m2"] = 0] = "m2"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.symbols index 6fb96e1a14..c47cac82aa 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts] //// === collisionCodeGenModuleWithEnumMemberConflict.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithEnumMemberConflict.ts, 0, 0)) enum e { ->e : Symbol(e, Decl(collisionCodeGenModuleWithEnumMemberConflict.ts, 0, 11)) +>e : Symbol(e, Decl(collisionCodeGenModuleWithEnumMemberConflict.ts, 0, 14)) m1, >m1 : Symbol(e.m1, Decl(collisionCodeGenModuleWithEnumMemberConflict.ts, 1, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types index bce5bdd85f..9f9b4d233a 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithEnumMemberConflict.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithEnumMemberConflict.ts] //// === collisionCodeGenModuleWithEnumMemberConflict.ts === -module m1 { +namespace m1 { >m1 : typeof m1 enum e { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js index 70fecbcc37..7cb0daa900 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js @@ -1,19 +1,19 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts] //// //// [collisionCodeGenModuleWithFunctionChildren.ts] -module M { +namespace M { export var x = 3; function fn(M, p = x) { } } -module M { +namespace M { function fn2() { var M; var p = x; } } -module M { +namespace M { function fn3() { function M() { var p = x; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js.diff index 4214ce8f04..8be71994ac 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.js.diff @@ -1,6 +1,14 @@ --- old.collisionCodeGenModuleWithFunctionChildren.js +++ new.collisionCodeGenModuleWithFunctionChildren.js -@@= skipped -29, +29 lines =@@ +@@= skipped -24, +24 lines =@@ + var M; + (function (M_1) { + M_1.x = 3; +- function fn(M, p) { +- if (p === void 0) { p = M_1.x; } +- } ++ function fn(M, p = M_1.x) { } + })(M || (M = {})); (function (M_2) { function fn2() { var M; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.symbols index 899f1e8f0f..a3f435f6bb 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts] //// === collisionCodeGenModuleWithFunctionChildren.ts === -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 3, 1), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 10, 1)) export var x = 3; @@ -14,11 +14,11 @@ module M { >x : Symbol(x, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 1, 14)) } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 3, 1), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 10, 1)) function fn2() { ->fn2 : Symbol(fn2, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 5, 10)) +>fn2 : Symbol(fn2, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 5, 13)) var M; >M : Symbol(M, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 7, 11)) @@ -29,11 +29,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 3, 1), Decl(collisionCodeGenModuleWithFunctionChildren.ts, 10, 1)) function fn3() { ->fn3 : Symbol(fn3, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 12, 10)) +>fn3 : Symbol(fn3, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 12, 13)) function M() { >M : Symbol(M, Decl(collisionCodeGenModuleWithFunctionChildren.ts, 13, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.types index 2560aecf26..fc52e0c71f 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithFunctionChildren.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithFunctionChildren.ts] //// === collisionCodeGenModuleWithFunctionChildren.ts === -module M { +namespace M { >M : typeof M export var x = 3; @@ -15,7 +15,7 @@ module M { >x : number } -module M { +namespace M { >M : typeof M function fn2() { @@ -30,7 +30,7 @@ module M { } } -module M { +namespace M { >M : typeof M function fn3() { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js index 031347ed9a..dddc0610af 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts] //// //// [collisionCodeGenModuleWithMemberClassConflict.ts] -module m1 { +namespace m1 { export class m1 { } } var foo = new m1.m1(); -module m2 { +namespace m2 { export class m2 { } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js.diff new file mode 100644 index 0000000000..27865292fc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.js.diff @@ -0,0 +1,36 @@ +--- old.collisionCodeGenModuleWithMemberClassConflict.js ++++ new.collisionCodeGenModuleWithMemberClassConflict.js +@@= skipped -19, +19 lines =@@ + //// [collisionCodeGenModuleWithMemberClassConflict.js] + var m1; + (function (m1_1) { +- var m1 = /** @class */ (function () { +- function m1() { +- } +- return m1; +- }()); ++ class m1 { ++ } + m1_1.m1 = m1; + })(m1 || (m1 = {})); + var foo = new m1.m1(); + var m2; + (function (m2_1) { +- var m2 = /** @class */ (function () { +- function m2() { +- } +- return m2; +- }()); ++ class m2 { ++ } + m2_1.m2 = m2; +- var _m2 = /** @class */ (function () { +- function _m2() { +- } +- return _m2; +- }()); ++ class _m2 { ++ } + m2_1._m2 = _m2; + })(m2 || (m2 = {})); + var foo = new m2.m2(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.symbols index 6fecd43c48..96adf89827 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts] //// === collisionCodeGenModuleWithMemberClassConflict.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 0)) export class m1 { ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 14)) } } var foo = new m1.m1(); >foo : Symbol(foo, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 4, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 13, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 14, 3)) ->m1.m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 11)) +>m1.m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 14)) >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 0)) ->m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 11)) +>m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 0, 14)) -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 4, 22)) export class m2 { ->m2 : Symbol(m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 11)) +>m2 : Symbol(m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 14)) } export class _m2 { @@ -27,9 +27,9 @@ module m2 { } var foo = new m2.m2(); >foo : Symbol(foo, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 4, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 13, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 14, 3)) ->m2.m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 11)) +>m2.m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 14)) >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 4, 22)) ->m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 11)) +>m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 6, 14)) var foo = new m2._m2(); >foo : Symbol(foo, Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 4, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 13, 3), Decl(collisionCodeGenModuleWithMemberClassConflict.ts, 14, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.types index 62ff9b3856..922c14ffa0 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberClassConflict.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberClassConflict.ts] //// === collisionCodeGenModuleWithMemberClassConflict.ts === -module m1 { +namespace m1 { >m1 : typeof globalThis.m1 export class m1 { @@ -15,7 +15,7 @@ var foo = new m1.m1(); >m1 : typeof m1 >m1 : typeof m1.m1 -module m2 { +namespace m2 { >m2 : typeof globalThis.m2 export class m2 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js index 92e14ea5e7..16ae9f7f87 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts] //// //// [collisionCodeGenModuleWithMemberInterfaceConflict.ts] -module m1 { +namespace m1 { export interface m1 { } export class m2 implements m1 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js.diff new file mode 100644 index 0000000000..756c7ab0ef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.js.diff @@ -0,0 +1,16 @@ +--- old.collisionCodeGenModuleWithMemberInterfaceConflict.js ++++ new.collisionCodeGenModuleWithMemberInterfaceConflict.js +@@= skipped -11, +11 lines =@@ + //// [collisionCodeGenModuleWithMemberInterfaceConflict.js] + var m1; + (function (m1) { +- var m2 = /** @class */ (function () { +- function m2() { +- } +- return m2; +- }()); ++ class m2 { ++ } + m1.m2 = m2; + })(m1 || (m1 = {})); + var foo = new m1.m2(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.symbols index 1c759378a6..86eae7a913 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts] //// === collisionCodeGenModuleWithMemberInterfaceConflict.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 0, 0)) export interface m1 { ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 0, 14)) } export class m2 implements m1 { >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 2, 5)) ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberInterfaceConflict.ts, 0, 14)) } } var foo = new m1.m2(); diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.types index 8a360d7df8..833943f6a9 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberInterfaceConflict.ts] //// === collisionCodeGenModuleWithMemberInterfaceConflict.ts === -module m1 { +namespace m1 { >m1 : typeof m1 export interface m1 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.js index 8ded88caf9..023bf3a8d2 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts] //// //// [collisionCodeGenModuleWithMemberVariable.ts] -module m1 { +namespace m1 { export var m1 = 10; var b = m1; } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.symbols index 8fa936d906..0f6fceb597 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts] //// === collisionCodeGenModuleWithMemberVariable.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithMemberVariable.ts, 0, 0)) export var m1 = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.types index 25a51978e3..63cb0c1d22 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMemberVariable.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMemberVariable.ts] //// === collisionCodeGenModuleWithMemberVariable.ts === -module m1 { +namespace m1 { >m1 : typeof globalThis.m1 export var m1 = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js index 84d4d2f89e..bf2b032a61 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts] //// //// [collisionCodeGenModuleWithMethodChildren.ts] -module M { +namespace M { export var x = 3; class c { fn(M, p = x) { } } } -module M { +namespace M { class d { fn2() { var M; @@ -17,7 +17,7 @@ module M { } } -module M { +namespace M { class e { fn3() { function M() { @@ -27,7 +27,7 @@ module M { } } -module M { // Shouldnt bn _M +namespace M { // Shouldnt bn _M class f { M() { } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js.diff index 672ad02d76..bd5a253653 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.js.diff @@ -1,20 +1,63 @@ --- old.collisionCodeGenModuleWithMethodChildren.js +++ new.collisionCodeGenModuleWithMethodChildren.js -@@= skipped -45, +45 lines =@@ - class d { - fn2() { +@@= skipped -37, +37 lines =@@ + var M; + (function (M_1) { + M_1.x = 3; +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.fn = function (M, p) { +- if (p === void 0) { p = M_1.x; } +- }; +- return c; +- }()); ++ class c { ++ fn(M, p = M_1.x) { } ++ } + })(M || (M = {})); + (function (M_2) { +- var d = /** @class */ (function () { +- function d() { +- } +- d.prototype.fn2 = function () { ++ class d { ++ fn2() { var M; - var p = M_2.x; +- }; +- return d; +- }()); + var p = x; - } - } ++ } ++ } })(M || (M = {})); -@@= skipped -8, +8 lines =@@ - class e { - fn3() { + (function (M_3) { +- var e = /** @class */ (function () { +- function e() { +- } +- e.prototype.fn3 = function () { ++ class e { ++ fn3() { function M() { - var p = M_3.x; + var p = x; } +- }; +- return e; +- }()); ++ } ++ } + })(M || (M = {})); + (function (M) { +- var f = /** @class */ (function () { +- function f() { ++ class f { ++ M() { } - } \ No newline at end of file +- f.prototype.M = function () { +- }; +- return f; +- }()); ++ } + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.symbols index 8535a62da2..68104b86f3 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts] //// === collisionCodeGenModuleWithMethodChildren.ts === -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithMethodChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithMethodChildren.ts, 5, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 14, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 24, 1)) export var x = 3; @@ -18,11 +18,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithMethodChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithMethodChildren.ts, 5, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 14, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 24, 1)) class d { ->d : Symbol(d, Decl(collisionCodeGenModuleWithMethodChildren.ts, 7, 10)) +>d : Symbol(d, Decl(collisionCodeGenModuleWithMethodChildren.ts, 7, 13)) fn2() { >fn2 : Symbol(d.fn2, Decl(collisionCodeGenModuleWithMethodChildren.ts, 8, 13)) @@ -37,11 +37,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithMethodChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithMethodChildren.ts, 5, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 14, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 24, 1)) class e { ->e : Symbol(e, Decl(collisionCodeGenModuleWithMethodChildren.ts, 16, 10)) +>e : Symbol(e, Decl(collisionCodeGenModuleWithMethodChildren.ts, 16, 13)) fn3() { >fn3 : Symbol(e.fn3, Decl(collisionCodeGenModuleWithMethodChildren.ts, 17, 13)) @@ -57,11 +57,11 @@ module M { } } -module M { // Shouldnt bn _M +namespace M { // Shouldnt bn _M >M : Symbol(M, Decl(collisionCodeGenModuleWithMethodChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithMethodChildren.ts, 5, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 14, 1), Decl(collisionCodeGenModuleWithMethodChildren.ts, 24, 1)) class f { ->f : Symbol(f, Decl(collisionCodeGenModuleWithMethodChildren.ts, 26, 10)) +>f : Symbol(f, Decl(collisionCodeGenModuleWithMethodChildren.ts, 26, 13)) M() { >M : Symbol(f.M, Decl(collisionCodeGenModuleWithMethodChildren.ts, 27, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.types index 2a649c1dc0..fa99ffe585 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithMethodChildren.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithMethodChildren.ts] //// === collisionCodeGenModuleWithMethodChildren.ts === -module M { +namespace M { >M : typeof M export var x = 3; @@ -19,7 +19,7 @@ module M { } } -module M { +namespace M { >M : typeof M class d { @@ -38,7 +38,7 @@ module M { } } -module M { +namespace M { >M : typeof M class e { @@ -58,7 +58,7 @@ module M { } } -module M { // Shouldnt bn _M +namespace M { // Shouldnt bn _M >M : typeof M class f { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js index 4ba0344cfd..ddfea4a4b5 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js @@ -1,16 +1,16 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts] //// //// [collisionCodeGenModuleWithModuleChildren.ts] -module M { +namespace M { export var x = 3; - module m1 { + namespace m1 { var M = 10; var p = x; } } -module M { - module m2 { +namespace M { + namespace m2 { class M { } var p = x; @@ -18,8 +18,8 @@ module M { } } -module M { - module m3 { +namespace M { + namespace m3 { function M() { } var p = x; @@ -27,8 +27,8 @@ module M { } } -module M { // shouldnt be _M - module m3 { +namespace M { // shouldnt be _M + namespace m3 { interface M { } var p = x; @@ -36,9 +36,9 @@ module M { // shouldnt be _M } } -module M { - module m4 { - module M { +namespace M { + namespace m4 { + namespace M { var p = x; } } diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js.diff index c2cd467e21..ef74b00b3a 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.js.diff @@ -1,15 +1,35 @@ --- old.collisionCodeGenModuleWithModuleChildren.js +++ new.collisionCodeGenModuleWithModuleChildren.js -@@= skipped -58, +58 lines =@@ +@@= skipped -47, +47 lines =@@ + var M; + (function (M_1) { + M_1.x = 3; +- var m1; ++ let m1; + (function (m1) { + var M = 10; + var p = M_1.x; + })(m1 || (m1 = {})); + })(M || (M = {})); + (function (M_2) { +- var m2; ++ let m2; (function (m2) { - class M { - } +- var M = /** @class */ (function () { +- function M() { +- } +- return M; +- }()); - var p = M_2.x; ++ class M { ++ } + var p = x; var p2 = new M(); })(m2 || (m2 = {})); })(M || (M = {})); -@@= skipped -9, +9 lines =@@ + (function (M_3) { +- var m3; ++ let m3; (function (m3) { function M() { } @@ -19,16 +39,20 @@ })(m3 || (m3 = {})); })(M || (M = {})); (function (M) { - let m3; +- var m3; ++ let m3; (function (m3) { - var p = M.x; + var p = x; var p2; })(m3 || (m3 = {})); })(M || (M = {})); -@@= skipped -16, +16 lines =@@ + (function (M_4) { +- var m4; ++ let m4; (function (m4) { - let M; +- var M; ++ let M; (function (M) { - var p = M_4.x; + var p = x; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.symbols index 17e68931af..541fd8bc76 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts] //// === collisionCodeGenModuleWithModuleChildren.ts === -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 15, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 24, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 33, 1)) export var x = 3; >x : Symbol(x, Decl(collisionCodeGenModuleWithModuleChildren.ts, 1, 14)) - module m1 { + namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleChildren.ts, 1, 21)) var M = 10; @@ -19,14 +19,14 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 15, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 24, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 33, 1)) - module m2 { ->m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleChildren.ts, 8, 10)) + namespace m2 { +>m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleChildren.ts, 8, 13)) class M { ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 9, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 9, 18)) } var p = x; >p : Symbol(p, Decl(collisionCodeGenModuleWithModuleChildren.ts, 12, 11)) @@ -34,18 +34,18 @@ module M { var p2 = new M(); >p2 : Symbol(p2, Decl(collisionCodeGenModuleWithModuleChildren.ts, 13, 11)) ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 9, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 9, 18)) } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 15, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 24, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 33, 1)) - module m3 { ->m3 : Symbol(m3, Decl(collisionCodeGenModuleWithModuleChildren.ts, 17, 10)) + namespace m3 { +>m3 : Symbol(m3, Decl(collisionCodeGenModuleWithModuleChildren.ts, 17, 13)) function M() { ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 18, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 18, 18)) } var p = x; >p : Symbol(p, Decl(collisionCodeGenModuleWithModuleChildren.ts, 21, 11)) @@ -53,18 +53,18 @@ module M { var p2 = M(); >p2 : Symbol(p2, Decl(collisionCodeGenModuleWithModuleChildren.ts, 22, 11)) ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 18, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 18, 18)) } } -module M { // shouldnt be _M +namespace M { // shouldnt be _M >M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 15, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 24, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 33, 1)) - module m3 { ->m3 : Symbol(m3, Decl(collisionCodeGenModuleWithModuleChildren.ts, 26, 10)) + namespace m3 { +>m3 : Symbol(m3, Decl(collisionCodeGenModuleWithModuleChildren.ts, 26, 13)) interface M { ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 27, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 27, 18)) } var p = x; >p : Symbol(p, Decl(collisionCodeGenModuleWithModuleChildren.ts, 30, 11)) @@ -72,18 +72,18 @@ module M { // shouldnt be _M var p2: M; >p2 : Symbol(p2, Decl(collisionCodeGenModuleWithModuleChildren.ts, 31, 11)) ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 27, 15)) +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 27, 18)) } } -module M { +namespace M { >M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleChildren.ts, 6, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 15, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 24, 1), Decl(collisionCodeGenModuleWithModuleChildren.ts, 33, 1)) - module m4 { ->m4 : Symbol(m4, Decl(collisionCodeGenModuleWithModuleChildren.ts, 35, 10)) + namespace m4 { +>m4 : Symbol(m4, Decl(collisionCodeGenModuleWithModuleChildren.ts, 35, 13)) - module M { ->M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 36, 15)) + namespace M { +>M : Symbol(M, Decl(collisionCodeGenModuleWithModuleChildren.ts, 36, 18)) var p = x; >p : Symbol(p, Decl(collisionCodeGenModuleWithModuleChildren.ts, 38, 15)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.types index 01419530a9..9d23972859 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleChildren.types @@ -1,14 +1,14 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleChildren.ts] //// === collisionCodeGenModuleWithModuleChildren.ts === -module M { +namespace M { >M : typeof M export var x = 3; >x : number >3 : 3 - module m1 { + namespace m1 { >m1 : typeof m1 var M = 10; @@ -21,10 +21,10 @@ module M { } } -module M { +namespace M { >M : typeof M - module m2 { + namespace m2 { >m2 : typeof m2 class M { @@ -41,10 +41,10 @@ module M { } } -module M { +namespace M { >M : typeof M - module m3 { + namespace m3 { >m3 : typeof m3 function M() { @@ -61,10 +61,10 @@ module M { } } -module M { // shouldnt be _M +namespace M { // shouldnt be _M >M : typeof M - module m3 { + namespace m3 { >m3 : typeof m3 interface M { @@ -78,13 +78,13 @@ module M { // shouldnt be _M } } -module M { +namespace M { >M : typeof M - module m4 { + namespace m4 { >m4 : typeof m4 - module M { + namespace M { >M : typeof M var p = x; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js index 46659b9e01..d86288834b 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts] //// //// [collisionCodeGenModuleWithModuleReopening.ts] -module m1 { +namespace m1 { export class m1 { } } var foo = new m1.m1(); -module m1 { +namespace m1 { export class c1 { } var b = new c1(); @@ -14,14 +14,14 @@ module m1 { } var foo2 = new m1.c1(); -module m2 { +namespace m2 { export class c1 { } export var b10 = 10; var x = new c1(); } var foo3 = new m2.c1(); -module m2 { +namespace m2 { export class m2 { } var b = new m2(); diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js.diff index 76edc83086..f2e985584d 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.js.diff @@ -1,7 +1,27 @@ --- old.collisionCodeGenModuleWithModuleReopening.js +++ new.collisionCodeGenModuleWithModuleReopening.js -@@= skipped -43, +43 lines =@@ - } +@@= skipped -33, +33 lines =@@ + //// [collisionCodeGenModuleWithModuleReopening.js] + var m1; + (function (m1_1) { +- var m1 = /** @class */ (function () { +- function m1() { +- } +- return m1; +- }()); ++ class m1 { ++ } + m1_1.m1 = m1; + })(m1 || (m1 = {})); + var foo = new m1.m1(); + (function (m1) { +- var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +- }()); ++ class c1 { ++ } m1.c1 = c1; var b = new c1(); - var c = new m1.m1(); @@ -9,8 +29,27 @@ })(m1 || (m1 = {})); var foo2 = new m1.c1(); var m2; -@@= skipped -17, +17 lines =@@ - } + (function (m2) { +- var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +- }()); ++ class c1 { ++ } + m2.c1 = c1; + m2.b10 = 10; + var x = new c1(); + })(m2 || (m2 = {})); + var foo3 = new m2.c1(); + (function (m2_1) { +- var m2 = /** @class */ (function () { +- function m2() { +- } +- return m2; +- }()); ++ class m2 { ++ } m2_1.m2 = m2; var b = new m2(); - var d = m2_1.b10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.symbols index c899a0ad84..9858390f89 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.symbols @@ -1,67 +1,67 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts] //// === collisionCodeGenModuleWithModuleReopening.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleReopening.ts, 4, 22)) export class m1 { ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 14)) } } var foo = new m1.m1(); >foo : Symbol(foo, Decl(collisionCodeGenModuleWithModuleReopening.ts, 4, 3)) ->m1.m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 11)) +>m1.m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 14)) >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleReopening.ts, 4, 22)) ->m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 11)) +>m1 : Symbol(m1.m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 14)) -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleReopening.ts, 4, 22)) export class c1 { ->c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 11)) +>c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 14)) } var b = new c1(); >b : Symbol(b, Decl(collisionCodeGenModuleWithModuleReopening.ts, 8, 7)) ->c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 11)) +>c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 14)) var c = new m1(); >c : Symbol(c, Decl(collisionCodeGenModuleWithModuleReopening.ts, 9, 7)) ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 14)) } var foo2 = new m1.c1(); >foo2 : Symbol(foo2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 3), Decl(collisionCodeGenModuleWithModuleReopening.ts, 28, 3)) ->m1.c1 : Symbol(m1.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 11)) +>m1.c1 : Symbol(m1.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 14)) >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 0, 0), Decl(collisionCodeGenModuleWithModuleReopening.ts, 4, 22)) ->c1 : Symbol(m1.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 11)) +>c1 : Symbol(m1.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 5, 14)) -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 23), Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 23)) export class c1 { ->c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) } export var b10 = 10; >b10 : Symbol(b10, Decl(collisionCodeGenModuleWithModuleReopening.ts, 16, 14)) var x = new c1(); >x : Symbol(x, Decl(collisionCodeGenModuleWithModuleReopening.ts, 17, 7)) ->c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) } var foo3 = new m2.c1(); >foo3 : Symbol(foo3, Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 3), Decl(collisionCodeGenModuleWithModuleReopening.ts, 27, 3)) ->m2.c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>m2.c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 23), Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 23)) ->c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 23), Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 23)) export class m2 { ->m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 11)) +>m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 14)) } var b = new m2(); >b : Symbol(b, Decl(collisionCodeGenModuleWithModuleReopening.ts, 23, 7)) ->m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 11)) +>m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 14)) var d = b10; >d : Symbol(d, Decl(collisionCodeGenModuleWithModuleReopening.ts, 24, 7)) @@ -69,17 +69,17 @@ module m2 { var c = new c1(); >c : Symbol(c, Decl(collisionCodeGenModuleWithModuleReopening.ts, 25, 7)) ->c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>c1 : Symbol(c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) } var foo3 = new m2.c1(); >foo3 : Symbol(foo3, Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 3), Decl(collisionCodeGenModuleWithModuleReopening.ts, 27, 3)) ->m2.c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>m2.c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 23), Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 23)) ->c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 11)) +>c1 : Symbol(m2.c1, Decl(collisionCodeGenModuleWithModuleReopening.ts, 13, 14)) var foo2 = new m2.m2(); >foo2 : Symbol(foo2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 3), Decl(collisionCodeGenModuleWithModuleReopening.ts, 28, 3)) ->m2.m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 11)) +>m2.m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 14)) >m2 : Symbol(m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 11, 23), Decl(collisionCodeGenModuleWithModuleReopening.ts, 19, 23)) ->m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 11)) +>m2 : Symbol(m2.m2, Decl(collisionCodeGenModuleWithModuleReopening.ts, 20, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.types index 44883bbce6..1a691cb423 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithModuleReopening.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithModuleReopening.ts] //// === collisionCodeGenModuleWithModuleReopening.ts === -module m1 { +namespace m1 { >m1 : typeof globalThis.m1 export class m1 { @@ -15,7 +15,7 @@ var foo = new m1.m1(); >m1 : typeof m1 >m1 : typeof m1.m1 -module m1 { +namespace m1 { >m1 : typeof globalThis.m1 export class c1 { @@ -38,7 +38,7 @@ var foo2 = new m1.c1(); >m1 : typeof m1 >c1 : typeof m1.c1 -module m2 { +namespace m2 { >m2 : typeof globalThis.m2 export class c1 { @@ -60,7 +60,7 @@ var foo3 = new m2.c1(); >m2 : typeof m2 >c1 : typeof m2.c1 -module m2 { +namespace m2 { >m2 : typeof globalThis.m2 export class m2 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js index a7c6f92657..26d1cea4f7 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts] //// //// [collisionCodeGenModuleWithPrivateMember.ts] -module m1 { +namespace m1 { class m1 { } var x = new m1(); diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js.diff new file mode 100644 index 0000000000..450279df65 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.js.diff @@ -0,0 +1,24 @@ +--- old.collisionCodeGenModuleWithPrivateMember.js ++++ new.collisionCodeGenModuleWithPrivateMember.js +@@= skipped -12, +12 lines =@@ + //// [collisionCodeGenModuleWithPrivateMember.js] + var m1; + (function (m1_1) { +- var m1 = /** @class */ (function () { +- function m1() { +- } +- return m1; +- }()); ++ class m1 { ++ } + var x = new m1(); +- var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +- }()); ++ class c1 { ++ } + m1_1.c1 = c1; + })(m1 || (m1 = {})); + var foo = new m1.c1(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.symbols index 683fc3f65f..d35b58dc19 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts] //// === collisionCodeGenModuleWithPrivateMember.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 0, 0)) class m1 { ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 0, 14)) } var x = new m1(); >x : Symbol(x, Decl(collisionCodeGenModuleWithPrivateMember.ts, 3, 7)) ->m1 : Symbol(m1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 0, 11)) +>m1 : Symbol(m1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 0, 14)) export class c1 { >c1 : Symbol(c1, Decl(collisionCodeGenModuleWithPrivateMember.ts, 3, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.types index b94d5e6ba1..db518e9c1e 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithPrivateMember.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithPrivateMember.ts] //// === collisionCodeGenModuleWithPrivateMember.ts === -module m1 { +namespace m1 { >m1 : typeof globalThis.m1 class m1 { diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.errors.txt b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.errors.txt new file mode 100644 index 0000000000..b0d2957621 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.errors.txt @@ -0,0 +1,15 @@ +collisionCodeGenModuleWithUnicodeNames.ts(6,13): error TS2304: Cannot find name 'æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123'. + + +==== collisionCodeGenModuleWithUnicodeNames.ts (1 errors) ==== + namespace $1 { + export class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { + } + } + + var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123'. + + + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js index 6a30c6aa41..3990064d08 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts] //// //// [collisionCodeGenModuleWithUnicodeNames.ts] -module æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { +namespace $1 { export class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { } } @@ -12,10 +12,10 @@ var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكو //// [collisionCodeGenModuleWithUnicodeNames.js] -var æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123; -(function (æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123_1) { +var $1; +(function ($1) { class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { } - æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123_1.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 = æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123; -})(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 || (æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 = {})); + $1.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 = æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123; +})($1 || ($1 = {})); var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123(); diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js.diff b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js.diff new file mode 100644 index 0000000000..34254dd364 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.js.diff @@ -0,0 +1,16 @@ +--- old.collisionCodeGenModuleWithUnicodeNames.js ++++ new.collisionCodeGenModuleWithUnicodeNames.js +@@= skipped -13, +13 lines =@@ + //// [collisionCodeGenModuleWithUnicodeNames.js] + var $1; + (function ($1) { +- var æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 = /** @class */ (function () { +- function æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123() { +- } +- return æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123; +- }()); ++ class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { ++ } + $1.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 = æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123; + })($1 || ($1 = {})); + var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.symbols b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.symbols index c43978f71c..b3ac63b2e8 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.symbols @@ -1,19 +1,16 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts] //// === collisionCodeGenModuleWithUnicodeNames.ts === -module æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 0)) +namespace $1 { +>$1 : Symbol($1, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 0)) export class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 82)) +>æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 14)) } } var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123(); >x : Symbol(x, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 5, 3)) ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 82)) ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 0)) ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : Symbol(æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123, Decl(collisionCodeGenModuleWithUnicodeNames.ts, 0, 82)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.types b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.types index d7be45af2e..67313408f9 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.types +++ b/testdata/baselines/reference/submodule/compiler/collisionCodeGenModuleWithUnicodeNames.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/collisionCodeGenModuleWithUnicodeNames.ts] //// === collisionCodeGenModuleWithUnicodeNames.ts === -module æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : typeof globalThis.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 +namespace $1 { +>$1 : typeof $1 export class æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 { >æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 @@ -10,11 +10,11 @@ module æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودö } var x = new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123(); ->x : æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 ->new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123() : æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : typeof æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : typeof æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 ->æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : typeof æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 +>x : any +>new æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123() : any +>æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123.æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : any +>æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : any +>æ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßæ‰èƒ½ã‚½Ð«â…¨è’¤éƒ³à¤°à¥à¤•à¥à¤¡à¥à¤°à¤¾Ã¼Ä±ÅŸÄŸÄ°liيونيكودöÄüßAbcd123 : any diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.js b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.js index ba0e341896..4cc03dfa7b 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.js +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.js @@ -3,11 +3,11 @@ //// [collisionExportsRequireAndAmbientFunctionInGlobalFile.ts] declare function exports(): number; declare function require(): string; -declare module m3 { +declare namespace m3 { function exports(): string[]; function require(): number[]; } -module m4 { +namespace m4 { export declare function exports(): string; export declare function require(): string; var a = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.symbols b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.symbols index 5b636ae787..401c07e7ce 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.symbols @@ -7,20 +7,20 @@ declare function exports(): number; declare function require(): string; >require : Symbol(require, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 0, 35)) -declare module m3 { +declare namespace m3 { >m3 : Symbol(m3, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 1, 35)) function exports(): string[]; ->exports : Symbol(exports, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 2, 19)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 2, 22)) function require(): number[]; >require : Symbol(require, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 3, 33)) } -module m4 { +namespace m4 { >m4 : Symbol(m4, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 5, 1)) export declare function exports(): string; ->exports : Symbol(exports, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 6, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 6, 14)) export declare function require(): string; >require : Symbol(require, Decl(collisionExportsRequireAndAmbientFunctionInGlobalFile.ts, 7, 46)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.types b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.types index 1a10d8de33..f97e6460be 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.types +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndAmbientFunctionInGlobalFile.types @@ -7,7 +7,7 @@ declare function exports(): number; declare function require(): string; >require : () => string -declare module m3 { +declare namespace m3 { >m3 : typeof m3 function exports(): string[]; @@ -16,7 +16,7 @@ declare module m3 { function require(): number[]; >require : () => number[] } -module m4 { +namespace m4 { >m4 : typeof m4 export declare function exports(): string; diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.js b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.js index e6c2e25029..b0b37f66d4 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.js +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.js @@ -7,7 +7,7 @@ function exports() { function require() { return "require"; } -module m3 { +namespace m3 { function exports() { return 1; } @@ -15,7 +15,7 @@ module m3 { return "require"; } } -module m4 { +namespace m4 { export function exports() { return 1; } diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.symbols b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.symbols index 3ec9ac573c..b4bb2001c6 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.symbols @@ -11,11 +11,11 @@ function require() { return "require"; } -module m3 { +namespace m3 { >m3 : Symbol(m3, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 5, 1)) function exports() { ->exports : Symbol(exports, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 6, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 6, 14)) return 1; } @@ -25,11 +25,11 @@ module m3 { return "require"; } } -module m4 { +namespace m4 { >m4 : Symbol(m4, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 13, 1)) export function exports() { ->exports : Symbol(exports, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 14, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndFunctionInGlobalFile.ts, 14, 14)) return 1; } diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.types b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.types index 16039b32fb..d2975ee594 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.types +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndFunctionInGlobalFile.types @@ -13,7 +13,7 @@ function require() { return "require"; >"require" : "require" } -module m3 { +namespace m3 { >m3 : typeof m3 function exports() { @@ -29,7 +29,7 @@ module m3 { >"require" : "require" } } -module m4 { +namespace m4 { >m4 : typeof m4 export function exports() { diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js index f3c31830a6..eab73e88fc 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts] //// //// [collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts] -module mOfGloalFile { +namespace mOfGloalFile { export class c { } } @@ -10,14 +10,14 @@ import require = mOfGloalFile.c; new exports(); new require(); -module m1 { +namespace m1 { import exports = mOfGloalFile.c; import require = mOfGloalFile.c; new exports(); new require(); } -module m2 { +namespace m2 { export import exports = mOfGloalFile.c; export import require = mOfGloalFile.c; new exports(); diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff index 20192ebec8..bfcd741330 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff @@ -1,7 +1,16 @@ --- old.collisionExportsRequireAndInternalModuleAliasInGlobalFile.js +++ new.collisionExportsRequireAndInternalModuleAliasInGlobalFile.js -@@= skipped -30, +30 lines =@@ - } +@@= skipped -26, +26 lines =@@ + //// [collisionExportsRequireAndInternalModuleAliasInGlobalFile.js] + var mOfGloalFile; + (function (mOfGloalFile) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } mOfGloalFile.c = c; })(mOfGloalFile || (mOfGloalFile = {})); -var exports = mOfGloalFile.c; diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.symbols b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.symbols index ae9c5b9722..c6b77cd7e6 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts] //// === collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts === -module mOfGloalFile { +namespace mOfGloalFile { >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(c, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) } } import exports = mOfGloalFile.c; >exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 3, 1)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) import require = mOfGloalFile.c; >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 4, 32)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) new exports(); >exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 3, 1)) @@ -24,41 +24,41 @@ new exports(); new require(); >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 4, 32)) -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 7, 14)) import exports = mOfGloalFile.c; ->exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 9, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 9, 14)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) import require = mOfGloalFile.c; >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 10, 36)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) new exports(); ->exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 9, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 9, 14)) new require(); >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 10, 36)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 14, 1)) export import exports = mOfGloalFile.c; ->exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 16, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 16, 14)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) export import require = mOfGloalFile.c; >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 17, 43)) >mOfGloalFile : Symbol(mOfGloalFile, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 0)) ->c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 21)) +>c : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 0, 24)) new exports(); ->exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 16, 11)) +>exports : Symbol(exports, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 16, 14)) new require(); >require : Symbol(require, Decl(collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts, 17, 43)) diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.types b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.types index aebbbc4d45..e1323e3ae9 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.types +++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts] //// === collisionExportsRequireAndInternalModuleAliasInGlobalFile.ts === -module mOfGloalFile { +namespace mOfGloalFile { >mOfGloalFile : typeof mOfGloalFile export class c { @@ -26,7 +26,7 @@ new require(); >new require() : exports >require : typeof exports -module m1 { +namespace m1 { >m1 : typeof m1 import exports = mOfGloalFile.c; @@ -48,7 +48,7 @@ module m1 { >require : typeof exports } -module m2 { +namespace m2 { >m2 : typeof m2 export import exports = mOfGloalFile.c; diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterArrowFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterArrowFunctions.js.diff new file mode 100644 index 0000000000..71711c4550 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterArrowFunctions.js.diff @@ -0,0 +1,34 @@ +--- old.collisionRestParameterArrowFunctions.js ++++ new.collisionRestParameterArrowFunctions.js +@@= skipped -15, +15 lines =@@ + } + + //// [collisionRestParameterArrowFunctions.js] +-var f1 = function (_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } +- var _i = 10; // no error +-}; +-var f1NoError = function (_i) { +- var _i = 10; // no error +-}; +-var f2 = function () { +- var restParameters = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- restParameters[_a] = arguments[_a]; +- } ++var f1 = (_i, ...restParameters) => { ++ var _i = 10; // no error ++}; ++var f1NoError = (_i) => { ++ var _i = 10; // no error ++}; ++var f2 = (...restParameters) => { + var _i = 10; // No Error + }; +-var f2NoError = function () { ++var f2NoError = () => { + var _i = 10; // no error + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassConstructor.js.diff index bcca9db07e..d480e600f3 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassConstructor.js.diff @@ -1,17 +1,116 @@ --- old.collisionRestParameterClassConstructor.js +++ new.collisionRestParameterClassConstructor.js -@@= skipped -90, +90 lines =@@ - } - } - class c3 { +@@= skipped -69, +69 lines =@@ + + //// [collisionRestParameterClassConstructor.js] + // Constructors +-var c1 = /** @class */ (function () { +- function c1(_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } +- var _i = 10; // no error +- } +- return c1; +-}()); +-var c1NoError = /** @class */ (function () { +- function c1NoError(_i) { +- var _i = 10; // no error +- } +- return c1NoError; +-}()); +-var c2 = /** @class */ (function () { +- function c2() { +- var restParameters = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- restParameters[_a] = arguments[_a]; +- } +- var _i = 10; // no error +- } +- return c2; +-}()); +-var c2NoError = /** @class */ (function () { +- function c2NoError() { +- var _i = 10; // no error +- } +- return c2NoError; +-}()); +-var c3 = /** @class */ (function () { +- function c3(_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } +- this._i = _i; +- var _i = 10; // no error +- } +- return c3; +-}()); +-var c3NoError = /** @class */ (function () { +- function c3NoError(_i) { +- this._i = _i; +- var _i = 10; // no error +- } +- return c3NoError; +-}()); +-var c5 = /** @class */ (function () { +- function c5(_i) { +- var rest = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- rest[_a - 1] = arguments[_a]; +- } +- var _i; // no error +- } +- return c5; +-}()); +-var c5NoError = /** @class */ (function () { +- function c5NoError(_i) { +- var _i; // no error +- } +- return c5NoError; +-}()); ++class c1 { ++ constructor(_i, ...restParameters) { ++ var _i = 10; // no error ++ } ++} ++class c1NoError { ++ constructor(_i) { ++ var _i = 10; // no error ++ } ++} ++class c2 { ++ constructor(...restParameters) { ++ var _i = 10; // no error ++ } ++} ++class c2NoError { ++ constructor() { ++ var _i = 10; // no error ++ } ++} ++class c3 { + _i; - constructor(_i, ...restParameters) { - this._i = _i; - var _i = 10; // no error - } - } - class c3NoError { ++ constructor(_i, ...restParameters) { ++ this._i = _i; ++ var _i = 10; // no error ++ } ++} ++class c3NoError { + _i; - constructor(_i) { - this._i = _i; - var _i = 10; // no error \ No newline at end of file ++ constructor(_i) { ++ this._i = _i; ++ var _i = 10; // no error ++ } ++} ++class c5 { ++ constructor(_i, ...rest) { ++ var _i; // no error ++ } ++} ++class c5NoError { ++ constructor(_i) { ++ var _i; // no error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassMethod.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassMethod.js.diff new file mode 100644 index 0000000000..b37e47ac45 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterClassMethod.js.diff @@ -0,0 +1,68 @@ +--- old.collisionRestParameterClassMethod.js ++++ new.collisionRestParameterClassMethod.js +@@= skipped -40, +40 lines =@@ + } + + //// [collisionRestParameterClassMethod.js] +-var c1 = /** @class */ (function () { +- function c1() { +- } +- c1.prototype.foo = function (_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } +- var _i = 10; // no error +- }; +- c1.prototype.fooNoError = function (_i) { +- var _i = 10; // no error +- }; +- c1.prototype.f4 = function (_i) { +- var rest = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- rest[_a - 1] = arguments[_a]; +- } +- var _i; // no error +- }; +- c1.prototype.f4NoError = function (_i) { +- var _i; // no error +- }; +- return c1; +-}()); +-var c3 = /** @class */ (function () { +- function c3() { +- } +- c3.prototype.foo = function () { +- var restParameters = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- restParameters[_a] = arguments[_a]; +- } +- var _i = 10; // no error +- }; +- c3.prototype.fooNoError = function () { +- var _i = 10; // no error +- }; +- return c3; +-}()); ++class c1 { ++ foo(_i, ...restParameters) { ++ var _i = 10; // no error ++ } ++ fooNoError(_i) { ++ var _i = 10; // no error ++ } ++ f4(_i, ...rest) { ++ var _i; // no error ++ } ++ f4NoError(_i) { ++ var _i; // no error ++ } ++} ++class c3 { ++ foo(...restParameters) { ++ var _i = 10; // no error ++ } ++ fooNoError() { ++ var _i = 10; // no error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunction.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunction.js.diff new file mode 100644 index 0000000000..480016c607 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunction.js.diff @@ -0,0 +1,37 @@ +--- old.collisionRestParameterFunction.js ++++ new.collisionRestParameterFunction.js +@@= skipped -36, +36 lines =@@ + + //// [collisionRestParameterFunction.js] + // Functions +-function f1(_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } ++function f1(_i, ...restParameters) { + var _i = 10; // no error + } + function f1NoError(_i) { + var _i = 10; // no error + } +-function f3() { +- var restParameters = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- restParameters[_a] = arguments[_a]; +- } ++function f3(...restParameters) { + var _i = 10; // no error + } + function f3NoError() { + var _i = 10; // no error + } +-function f4(_i) { +- var rest = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- rest[_a - 1] = arguments[_a]; +- } ++function f4(_i, ...rest) { + } + function f4NoError(_i) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunctionExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunctionExpressions.js.diff new file mode 100644 index 0000000000..d180ad83b4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterFunctionExpressions.js.diff @@ -0,0 +1,37 @@ +--- old.collisionRestParameterFunctionExpressions.js ++++ new.collisionRestParameterFunctionExpressions.js +@@= skipped -27, +27 lines =@@ + + //// [collisionRestParameterFunctionExpressions.js] + function foo() { +- function f1(_i) { +- var restParameters = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- restParameters[_a - 1] = arguments[_a]; +- } ++ function f1(_i, ...restParameters) { + var _i = 10; // no error + } + function f1NoError(_i) { + var _i = 10; // no error + } +- function f3() { +- var restParameters = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- restParameters[_a] = arguments[_a]; +- } ++ function f3(...restParameters) { + var _i = 10; // no error + } + function f3NoError() { + var _i = 10; // no error + } +- function f4(_i) { +- var rest = []; +- for (var _a = 1; _a < arguments.length; _a++) { +- rest[_a - 1] = arguments[_a]; +- } ++ function f4(_i, ...rest) { + } + function f4NoError(_i) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionRestParameterUnderscoreIUsage.js.diff b/testdata/baselines/reference/submodule/compiler/collisionRestParameterUnderscoreIUsage.js.diff new file mode 100644 index 0000000000..df8376aea4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionRestParameterUnderscoreIUsage.js.diff @@ -0,0 +1,20 @@ +--- old.collisionRestParameterUnderscoreIUsage.js ++++ new.collisionRestParameterUnderscoreIUsage.js +@@= skipped -11, +11 lines =@@ + + //// [collisionRestParameterUnderscoreIUsage.js] + var _i = "This is what I'd expect to see"; +-var Foo = /** @class */ (function () { +- function Foo() { +- var args = []; +- for (var _a = 0; _a < arguments.length; _a++) { +- args[_a] = arguments[_a]; +- } ++class Foo { ++ constructor(...args) { + console.log(_i); // This should result in error + } +- return Foo; +-}()); ++} + new Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInAccessors.js.diff new file mode 100644 index 0000000000..00a4621fe2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInAccessors.js.diff @@ -0,0 +1,122 @@ +--- old.collisionSuperAndLocalFunctionInAccessors.js ++++ new.collisionSuperAndLocalFunctionInAccessors.js +@@= skipped -41, +41 lines =@@ + } + + //// [collisionSuperAndLocalFunctionInAccessors.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function _super() { + } +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Object.defineProperty(Foo.prototype, "prop1", { +- get: function () { +- function _super() { +- } +- return 10; +- }, +- set: function (val) { +- function _super() { +- } +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Object.defineProperty(b.prototype, "prop2", { +- get: function () { +- function _super() { +- } +- return 10; +- }, +- set: function (val) { +- function _super() { +- } +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Object.defineProperty(c.prototype, "prop2", { +- get: function () { +- var x = function () { +- function _super() { +- } +- }; +- return 10; +- }, +- set: function (val) { +- var x = function () { +- function _super() { +- } +- }; +- }, +- enumerable: false, +- configurable: true +- }); +- return c; +-}(Foo)); ++class Foo { ++ get prop1() { ++ function _super() { ++ } ++ return 10; ++ } ++ set prop1(val) { ++ function _super() { ++ } ++ } ++} ++class b extends Foo { ++ get prop2() { ++ function _super() { ++ } ++ return 10; ++ } ++ set prop2(val) { ++ function _super() { ++ } ++ } ++} ++class c extends Foo { ++ get prop2() { ++ var x = () => { ++ function _super() { ++ } ++ }; ++ return 10; ++ } ++ set prop2(val) { ++ var x = () => { ++ function _super() { ++ } ++ }; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInConstructor.js.diff new file mode 100644 index 0000000000..c1d2e3d42b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInConstructor.js.diff @@ -0,0 +1,70 @@ +--- old.collisionSuperAndLocalFunctionInConstructor.js ++++ new.collisionSuperAndLocalFunctionInConstructor.js +@@= skipped -26, +26 lines =@@ + } + + //// [collisionSuperAndLocalFunctionInConstructor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function _super() { + } +-var Foo = /** @class */ (function () { +- function Foo() { +- function _super() { +- } +- } +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- var _this = _super_1.call(this) || this; +- function _super() { +- } +- return _this; +- } +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- var _this = _super_1.call(this) || this; +- var x = function () { ++class Foo { ++ constructor() { ++ function _super() { ++ } ++ } ++} ++class b extends Foo { ++ constructor() { ++ super(); ++ function _super() { ++ } ++ } ++} ++class c extends Foo { ++ constructor() { ++ super(); ++ var x = () => { + function _super() { + } + }; +- return _this; + } +- return c; +-}(Foo)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInMethod.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInMethod.js.diff new file mode 100644 index 0000000000..f9f1c33151 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInMethod.js.diff @@ -0,0 +1,85 @@ +--- old.collisionSuperAndLocalFunctionInMethod.js ++++ new.collisionSuperAndLocalFunctionInMethod.js +@@= skipped -30, +30 lines =@@ + } + + //// [collisionSuperAndLocalFunctionInMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function _super() { + } +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.x = function () { +- function _super() { +- } +- }; +- Foo.prototype._super = function () { +- }; +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- b.prototype.foo = function () { +- function _super() { +- } +- }; +- b.prototype._super = function () { +- }; +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- c.prototype.foo = function () { +- var x = function () { ++class Foo { ++ x() { ++ function _super() { ++ } ++ } ++ _super() { ++ } ++} ++class b extends Foo { ++ foo() { ++ function _super() { ++ } ++ } ++ _super() { ++ } ++} ++class c extends Foo { ++ foo() { ++ var x = () => { + function _super() { + } + }; +- }; +- c.prototype._super = function () { +- }; +- return c; +-}(Foo)); ++ } ++ _super() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInProperty.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInProperty.js.diff index 35d6af7043..284f055cb2 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalFunctionInProperty.js.diff @@ -1,36 +1,64 @@ --- old.collisionSuperAndLocalFunctionInProperty.js +++ new.collisionSuperAndLocalFunctionInProperty.js -@@= skipped -23, +23 lines =@@ +@@= skipped -20, +20 lines =@@ + } + + //// [collisionSuperAndLocalFunctionInProperty.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); function _super() { } - class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.prop1 = { -- doStuff: () => { +- doStuff: function () { - function _super() { - } +- } +- }; +- } +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- var _this = _super_1 !== null && _super_1.apply(this, arguments) || this; +- _this.prop2 = { +- doStuff: function () { +- function _super() { +- } +- } +- }; +- return _this; +- } +- return b; +-}(Foo)); ++class Foo { + prop1 = { + doStuff: () => { + function _super() { - } -- }; -- } ++ } + } + }; - } - class b extends Foo { -- constructor() { -- super(...arguments); -- this.prop2 = { -- doStuff: () => { -- function _super() { -- } ++} ++class b extends Foo { + prop2 = { + doStuff: () => { + function _super() { - } -- }; -- } ++ } + } + }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInAccessors.js.diff new file mode 100644 index 0000000000..64a79130a7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInAccessors.js.diff @@ -0,0 +1,109 @@ +--- old.collisionSuperAndLocalVarInAccessors.js ++++ new.collisionSuperAndLocalVarInAccessors.js +@@= skipped -34, +34 lines =@@ + } + + //// [collisionSuperAndLocalVarInAccessors.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var _super = 10; // No Error +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Object.defineProperty(Foo.prototype, "prop1", { +- get: function () { +- var _super = 10; // No error +- return 10; +- }, +- set: function (val) { +- var _super = 10; // No error +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Object.defineProperty(b.prototype, "prop2", { +- get: function () { +- var _super = 10; // Should be error +- return 10; +- }, +- set: function (val) { +- var _super = 10; // Should be error +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Object.defineProperty(c.prototype, "prop2", { +- get: function () { +- var x = function () { +- var _super = 10; // Should be error +- }; +- return 10; +- }, +- set: function (val) { +- var x = function () { +- var _super = 10; // Should be error +- }; +- }, +- enumerable: false, +- configurable: true +- }); +- return c; +-}(Foo)); ++class Foo { ++ get prop1() { ++ var _super = 10; // No error ++ return 10; ++ } ++ set prop1(val) { ++ var _super = 10; // No error ++ } ++} ++class b extends Foo { ++ get prop2() { ++ var _super = 10; // Should be error ++ return 10; ++ } ++ set prop2(val) { ++ var _super = 10; // Should be error ++ } ++} ++class c extends Foo { ++ get prop2() { ++ var x = () => { ++ var _super = 10; // Should be error ++ }; ++ return 10; ++ } ++ set prop2(val) { ++ var x = () => { ++ var _super = 10; // Should be error ++ }; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInConstructor.js.diff new file mode 100644 index 0000000000..1ed2efb162 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInConstructor.js.diff @@ -0,0 +1,60 @@ +--- old.collisionSuperAndLocalVarInConstructor.js ++++ new.collisionSuperAndLocalVarInConstructor.js +@@= skipped -22, +22 lines =@@ + } + + //// [collisionSuperAndLocalVarInConstructor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var _super = 10; // No Error +-var Foo = /** @class */ (function () { +- function Foo() { ++class Foo { ++ constructor() { + var _super = 10; // No error + } +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- var _this = _super_1.call(this) || this; ++} ++class b extends Foo { ++ constructor() { ++ super(); + var _super = 10; // Should be error +- return _this; + } +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- var _this = _super_1.call(this) || this; +- var x = function () { ++} ++class c extends Foo { ++ constructor() { ++ super(); ++ var x = () => { + var _super = 10; // Should be error + }; +- return _this; + } +- return c; +-}(Foo)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInMethod.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInMethod.js.diff new file mode 100644 index 0000000000..04acad70e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInMethod.js.diff @@ -0,0 +1,63 @@ +--- old.collisionSuperAndLocalVarInMethod.js ++++ new.collisionSuperAndLocalVarInMethod.js +@@= skipped -20, +20 lines =@@ + } + + //// [collisionSuperAndLocalVarInMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var _super = 10; // No Error +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.x = function () { ++class Foo { ++ x() { + var _super = 10; // No error +- }; +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; + } +- b.prototype.foo = function () { ++} ++class b extends Foo { ++ foo() { + var _super = 10; // Should be error +- }; +- return b; +-}(Foo)); +-var c = /** @class */ (function (_super_1) { +- __extends(c, _super_1); +- function c() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; + } +- c.prototype.foo = function () { +- var x = function () { ++} ++class c extends Foo { ++ foo() { ++ var x = () => { + var _super = 10; // Should be error + }; +- }; +- return c; +-}(Foo)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInProperty.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInProperty.js.diff index d61cee1ea0..d03651dab3 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndLocalVarInProperty.js.diff @@ -1,38 +1,63 @@ --- old.collisionSuperAndLocalVarInProperty.js +++ new.collisionSuperAndLocalVarInProperty.js -@@= skipped -21, +21 lines =@@ +@@= skipped -19, +19 lines =@@ + } + //// [collisionSuperAndLocalVarInProperty.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var _super = 10; // No Error - class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.prop1 = { -- doStuff: () => { +- doStuff: function () { - var _super = 10; // No error - } - }; - this._super = 10; // No error - } +- return Foo; +-}()); +-var b = /** @class */ (function (_super_1) { +- __extends(b, _super_1); +- function b() { +- var _this = _super_1 !== null && _super_1.apply(this, arguments) || this; +- _this.prop2 = { +- doStuff: function () { +- var _super = 10; // Should be error +- } +- }; +- _this._super = 10; // No error +- return _this; +- } +- return b; +-}(Foo)); ++class Foo { + prop1 = { + doStuff: () => { + var _super = 10; // No error + } + }; + _super = 10; // No error - } - class b extends Foo { -- constructor() { -- super(...arguments); -- this.prop2 = { -- doStuff: () => { -- var _super = 10; // Should be error -- } -- }; -- this._super = 10; // No error -- } ++} ++class b extends Foo { + prop2 = { + doStuff: () => { + var _super = 10; // Should be error + } + }; + _super = 10; // No error - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndNameResolution.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndNameResolution.js.diff new file mode 100644 index 0000000000..940724e83c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndNameResolution.js.diff @@ -0,0 +1,44 @@ +--- old.collisionSuperAndNameResolution.js ++++ new.collisionSuperAndNameResolution.js +@@= skipped -13, +13 lines =@@ + } + + //// [collisionSuperAndNameResolution.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var console; + var _super = 10; // No error +-var base = /** @class */ (function () { +- function base() { +- } +- return base; +-}()); +-var Foo = /** @class */ (function (_super_1) { +- __extends(Foo, _super_1); +- function Foo() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Foo.prototype.x = function () { ++class base { ++} ++class Foo extends base { ++ x() { + console.log(_super); // Error as this doesnt not resolve to user defined _super +- }; +- return Foo; +-}(base)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter.js.diff index d45d50db20..9985c7df7e 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter.js.diff @@ -1,20 +1,133 @@ --- old.collisionSuperAndParameter.js +++ new.collisionSuperAndParameter.js -@@= skipped -91, +91 lines =@@ - } - set z(_super) { - } +@@= skipped -64, +64 lines =@@ + } + + //// [collisionSuperAndParameter.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.a = function () { +- var _this = this; +- var lamda = function (_super) { +- return function (x) { return _this; }; // New scope. So should inject new _this capture +- }; +- }; +- Foo.prototype.b = function (_super) { +- var _this = this; +- var lambda = function () { +- return function (x) { return _this; }; // New scope. So should inject new _this capture +- }; +- }; +- Object.defineProperty(Foo.prototype, "c", { +- set: function (_super) { +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo; +-}()); +-var Foo2 = /** @class */ (function (_super_1) { +- __extends(Foo2, _super_1); +- function Foo2(_super) { +- var _this = _super_1.call(this) || this; +- _this.prop4 = { +- doStuff: function (_super) { +- } +- }; +- return _this; +- } +- Foo2.prototype.x = function () { +- var _this = this; +- var lamda = function (_super) { +- return function (x) { return _this; }; // New scope. So should inject new _this capture +- }; +- }; +- Foo2.prototype.y = function (_super) { +- var _this = this; +- var lambda = function () { +- return function (x) { return _this; }; // New scope. So should inject new _this capture +- }; +- }; +- Object.defineProperty(Foo2.prototype, "z", { +- set: function (_super) { +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo2; +-}(Foo)); +-var Foo4 = /** @class */ (function (_super_1) { +- __extends(Foo4, _super_1); +- function Foo4(_super) { +- return _super_1.call(this) || this; +- } +- Foo4.prototype.y = function (_super) { +- var _this = this; +- var lambda = function () { +- return function (x) { return _this; }; // New scope. So should inject new _this capture +- }; +- }; +- return Foo4; +-}(Foo)); ++class Foo { ++ a() { ++ var lamda = (_super) => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ b(_super) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ set c(_super) { ++ } ++} ++class Foo2 extends Foo { ++ x() { ++ var lamda = (_super) => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ y(_super) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ set z(_super) { ++ } + prop3; + prop4 = { + doStuff: (_super) => { + } + }; - constructor(_super) { - super(); -- this.prop4 = { -- doStuff: (_super) => { -- } -- }; - } - } - class Foo4 extends Foo { \ No newline at end of file ++ constructor(_super) { ++ super(); ++ } ++} ++class Foo4 extends Foo { ++ constructor(_super) { ++ super(); ++ } ++ y(_super) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter1.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter1.js.diff new file mode 100644 index 0000000000..a55e2f1309 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndParameter1.js.diff @@ -0,0 +1,44 @@ +--- old.collisionSuperAndParameter1.js ++++ new.collisionSuperAndParameter1.js +@@= skipped -11, +11 lines =@@ + } + + //// [collisionSuperAndParameter1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Foo2 = /** @class */ (function (_super_1) { +- __extends(Foo2, _super_1); +- function Foo2() { +- return _super_1 !== null && _super_1.apply(this, arguments) || this; +- } +- Foo2.prototype.x = function () { +- var lambda = function (_super) { ++class Foo { ++} ++class Foo2 extends Foo { ++ x() { ++ var lambda = (_super) => { + }; +- }; +- return Foo2; +-}(Foo)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.js.diff b/testdata/baselines/reference/submodule/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.js.diff index fb34842edd..617d4c8933 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionSuperAndPropertyNameAsConstuctorParameter.js.diff @@ -1,18 +1,84 @@ --- old.collisionSuperAndPropertyNameAsConstuctorParameter.js +++ new.collisionSuperAndPropertyNameAsConstuctorParameter.js -@@= skipped -40, +40 lines =@@ - } +@@= skipped -32, +32 lines =@@ } - class b2 extends a { + + //// [collisionSuperAndPropertyNameAsConstuctorParameter.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b1 = /** @class */ (function (_super_1) { +- __extends(b1, _super_1); +- function b1(_super) { +- return _super_1.call(this) || this; +- } +- return b1; +-}(a)); +-var b2 = /** @class */ (function (_super_1) { +- __extends(b2, _super_1); +- function b2(_super) { +- var _this = _super_1.call(this) || this; +- _this._super = _super; +- return _this; +- } +- return b2; +-}(a)); +-var b3 = /** @class */ (function (_super_1) { +- __extends(b3, _super_1); +- function b3(_super) { +- return _super_1.call(this) || this; +- } +- return b3; +-}(a)); +-var b4 = /** @class */ (function (_super_1) { +- __extends(b4, _super_1); +- function b4(_super) { +- var _this = _super_1.call(this) || this; +- _this._super = _super; +- return _this; +- } +- return b4; +-}(a)); ++class a { ++} ++class b1 extends a { ++ constructor(_super) { ++ super(); ++ } ++} ++class b2 extends a { + _super; - constructor(_super) { - super(); - this._super = _super; -@@= skipped -11, +12 lines =@@ - } - } - class b4 extends a { ++ constructor(_super) { ++ super(); ++ this._super = _super; ++ } ++} ++class b3 extends a { ++ constructor(_super) { ++ super(); ++ } ++} ++class b4 extends a { + _super; - constructor(_super) { - super(); - this._super = _super; \ No newline at end of file ++ constructor(_super) { ++ super(); ++ this._super = _super; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js index 59d4def4b8..08645abbb6 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts] //// //// [collisionThisExpressionAndAliasInGlobal.ts] -module a { +namespace a { export var b = 10; } var f = () => this; diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff index 484d9e87ec..62a0d38f81 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff @@ -1,7 +1,14 @@ --- old.collisionThisExpressionAndAliasInGlobal.js +++ new.collisionThisExpressionAndAliasInGlobal.js -@@= skipped -12, +12 lines =@@ +@@= skipped -7, +7 lines =@@ + import _this = a; // Error + + //// [collisionThisExpressionAndAliasInGlobal.js] +-var _this_1 = this; + var a; + (function (a) { a.b = 10; })(a || (a = {})); - var f = () => this; --var _this = a; // Error \ No newline at end of file +-var f = function () { return _this_1; }; +-var _this = a; // Error ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.symbols b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.symbols index 1bfe7f1fcd..37c5c4e092 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts] //// === collisionThisExpressionAndAliasInGlobal.ts === -module a { +namespace a { >a : Symbol(a, Decl(collisionThisExpressionAndAliasInGlobal.ts, 0, 0)) export var b = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.types b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.types index aa268413f1..1f07787f40 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.types +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionThisExpressionAndAliasInGlobal.ts] //// === collisionThisExpressionAndAliasInGlobal.ts === -module a { +namespace a { >a : typeof a export var b = 10; diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientClassInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientClassInGlobal.js.diff new file mode 100644 index 0000000000..4ee84fd59e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientClassInGlobal.js.diff @@ -0,0 +1,10 @@ +--- old.collisionThisExpressionAndAmbientClassInGlobal.js ++++ new.collisionThisExpressionAndAmbientClassInGlobal.js +@@= skipped -6, +6 lines =@@ + var a = new _this(); // Error + + //// [collisionThisExpressionAndAmbientClassInGlobal.js] +-var _this_1 = this; +-var f = function () { return _this_1; }; ++var f = () => this; + var a = new _this(); // Error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientVarInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientVarInGlobal.js.diff new file mode 100644 index 0000000000..41521fae79 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAmbientVarInGlobal.js.diff @@ -0,0 +1,10 @@ +--- old.collisionThisExpressionAndAmbientVarInGlobal.js ++++ new.collisionThisExpressionAndAmbientVarInGlobal.js +@@= skipped -5, +5 lines =@@ + _this = 10; // Error + + //// [collisionThisExpressionAndAmbientVarInGlobal.js] +-var _this_1 = this; +-var f = function () { return _this_1; }; ++var f = () => this; + _this = 10; // Error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndClassInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndClassInGlobal.js.diff new file mode 100644 index 0000000000..7824889ea1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndClassInGlobal.js.diff @@ -0,0 +1,16 @@ +--- old.collisionThisExpressionAndClassInGlobal.js ++++ new.collisionThisExpressionAndClassInGlobal.js +@@= skipped -5, +5 lines =@@ + var f = () => this; + + //// [collisionThisExpressionAndClassInGlobal.js] +-var _this_1 = this; +-var _this = /** @class */ (function () { +- function _this() { +- } +- return _this; +-}()); +-var f = function () { return _this_1; }; ++class _this { ++} ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndEnumInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndEnumInGlobal.js.diff new file mode 100644 index 0000000000..5d62e2c41c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndEnumInGlobal.js.diff @@ -0,0 +1,14 @@ +--- old.collisionThisExpressionAndEnumInGlobal.js ++++ new.collisionThisExpressionAndEnumInGlobal.js +@@= skipped -7, +7 lines =@@ + var f = () => this; + + //// [collisionThisExpressionAndEnumInGlobal.js] +-var _this_1 = this; + var _this; + (function (_this) { + _this[_this["_thisVal1"] = 0] = "_thisVal1"; + _this[_this["_thisVal2"] = 1] = "_thisVal2"; + })(_this || (_this = {})); +-var f = function () { return _this_1; }; ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndFunctionInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndFunctionInGlobal.js.diff new file mode 100644 index 0000000000..36ce8e79e8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndFunctionInGlobal.js.diff @@ -0,0 +1,12 @@ +--- old.collisionThisExpressionAndFunctionInGlobal.js ++++ new.collisionThisExpressionAndFunctionInGlobal.js +@@= skipped -6, +6 lines =@@ + var f = () => this; + + //// [collisionThisExpressionAndFunctionInGlobal.js] +-var _this_1 = this; + function _this() { + return 10; + } +-var f = function () { return _this_1; }; ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInAccessors.js.diff new file mode 100644 index 0000000000..a16f0881c0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInAccessors.js.diff @@ -0,0 +1,100 @@ +--- old.collisionThisExpressionAndLocalVarInAccessors.js ++++ new.collisionThisExpressionAndLocalVarInAccessors.js +@@= skipped -45, +45 lines =@@ + } + + //// [collisionThisExpressionAndLocalVarInAccessors.js] +-var class1 = /** @class */ (function () { +- function class1() { +- } +- Object.defineProperty(class1.prototype, "a", { +- get: function () { +- var _this_1 = this; +- var x2 = { +- doStuff: function (callback) { return function () { +- var _this = 2; +- return callback(_this_1); +- }; } +- }; +- return 10; +- }, +- set: function (val) { +- var _this_1 = this; +- var x2 = { +- doStuff: function (callback) { return function () { +- var _this = 2; +- return callback(_this_1); +- }; } +- }; +- }, +- enumerable: false, +- configurable: true +- }); +- return class1; +-}()); +-var class2 = /** @class */ (function () { +- function class2() { +- } +- Object.defineProperty(class2.prototype, "a", { +- get: function () { +- var _this_1 = this; +- var _this = 2; +- var x2 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } +- }; +- return 10; +- }, +- set: function (val) { +- var _this_1 = this; +- var _this = 2; +- var x2 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } +- }; +- }, +- enumerable: false, +- configurable: true +- }); +- return class2; +-}()); ++class class1 { ++ get a() { ++ var x2 = { ++ doStuff: (callback) => () => { ++ var _this = 2; ++ return callback(this); ++ } ++ }; ++ return 10; ++ } ++ set a(val) { ++ var x2 = { ++ doStuff: (callback) => () => { ++ var _this = 2; ++ return callback(this); ++ } ++ }; ++ } ++} ++class class2 { ++ get a() { ++ var _this = 2; ++ var x2 = { ++ doStuff: (callback) => () => { ++ return callback(this); ++ } ++ }; ++ return 10; ++ } ++ set a(val) { ++ var _this = 2; ++ var x2 = { ++ doStuff: (callback) => () => { ++ return callback(this); ++ } ++ }; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInConstructor.js.diff new file mode 100644 index 0000000000..b6a085d18f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInConstructor.js.diff @@ -0,0 +1,42 @@ +--- old.collisionThisExpressionAndLocalVarInConstructor.js ++++ new.collisionThisExpressionAndLocalVarInConstructor.js +@@= skipped -23, +23 lines =@@ + } + + //// [collisionThisExpressionAndLocalVarInConstructor.js] +-var class1 = /** @class */ (function () { +- function class1() { +- var _this_1 = this; ++class class1 { ++ constructor() { + var x2 = { +- doStuff: function (callback) { return function () { ++ doStuff: (callback) => () => { + var _this = 2; +- return callback(_this_1); +- }; } ++ return callback(this); ++ } + }; + } +- return class1; +-}()); +-var class2 = /** @class */ (function () { +- function class2() { +- var _this_1 = this; ++} ++class class2 { ++ constructor() { + var _this = 2; + var x2 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } ++ doStuff: (callback) => () => { ++ return callback(this); ++ } + }; + } +- return class2; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInFunction.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInFunction.js.diff new file mode 100644 index 0000000000..896b19bce4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInFunction.js.diff @@ -0,0 +1,11 @@ +--- old.collisionThisExpressionAndLocalVarInFunction.js ++++ new.collisionThisExpressionAndLocalVarInFunction.js +@@= skipped -11, +11 lines =@@ + //// [collisionThisExpressionAndLocalVarInFunction.js] + var console; + function x() { +- var _this_1 = this; + var _this = 5; +- (function (x) { console.log(_this_1.x); }); ++ x => { console.log(this.x); }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInLambda.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInLambda.js.diff new file mode 100644 index 0000000000..909428ce31 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInLambda.js.diff @@ -0,0 +1,18 @@ +--- old.collisionThisExpressionAndLocalVarInLambda.js ++++ new.collisionThisExpressionAndLocalVarInLambda.js +@@= skipped -11, +11 lines =@@ + alert(x.doStuff(x => alert(x))); + + //// [collisionThisExpressionAndLocalVarInLambda.js] +-var _this_1 = this; + var x = { +- doStuff: function (callback) { return function () { ++ doStuff: (callback) => () => { + var _this = 2; +- return callback(_this_1); +- }; } ++ return callback(this); ++ } + }; +-alert(x.doStuff(function (x) { return alert(x); })); ++alert(x.doStuff(x => alert(x))); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInMethod.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInMethod.js.diff new file mode 100644 index 0000000000..f13b04ee11 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInMethod.js.diff @@ -0,0 +1,41 @@ +--- old.collisionThisExpressionAndLocalVarInMethod.js ++++ new.collisionThisExpressionAndLocalVarInMethod.js +@@= skipped -20, +20 lines =@@ + } + + //// [collisionThisExpressionAndLocalVarInMethod.js] +-var a = /** @class */ (function () { +- function a() { +- } +- a.prototype.method1 = function () { +- var _this_1 = this; ++class a { ++ method1() { + return { +- doStuff: function (callback) { return function () { ++ doStuff: (callback) => () => { + var _this = 2; +- return callback(_this_1); +- }; } ++ return callback(this); ++ } + }; +- }; +- a.prototype.method2 = function () { +- var _this_1 = this; ++ } ++ method2() { + var _this = 2; + return { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } ++ doStuff: (callback) => () => { ++ return callback(this); ++ } + }; +- }; +- return a; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInProperty.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInProperty.js.diff index 47fb3cf255..0d30dea833 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarInProperty.js.diff @@ -1,36 +1,46 @@ --- old.collisionThisExpressionAndLocalVarInProperty.js +++ new.collisionThisExpressionAndLocalVarInProperty.js -@@= skipped -22, +22 lines =@@ +@@= skipped -21, +21 lines =@@ + } //// [collisionThisExpressionAndLocalVarInProperty.js] - class class1 { -- constructor() { +-var class1 = /** @class */ (function () { +- function class1() { +- var _this_1 = this; - this.prop1 = { -- doStuff: (callback) => () => { +- doStuff: function (callback) { return function () { - var _this = 2; -- return callback(this); -- } +- return callback(_this_1); +- }; } - }; - } +- return class1; +-}()); +-var class2 = /** @class */ (function () { +- function class2() { +- var _this_1 = this; +- this.prop1 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } +- }; ++class class1 { + prop1 = { + doStuff: (callback) => () => { + var _this = 2; + return callback(this); + } + }; - } - class class2 { - constructor() { -- this.prop1 = { -- doStuff: (callback) => () => { -- return callback(this); -- } -- }; ++} ++class class2 { ++ constructor() { var _this = 2; } +- return class2; +-}()); + prop1 = { + doStuff: (callback) => () => { + return callback(this); + } + }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.js.diff new file mode 100644 index 0000000000..e190e6867c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndLocalVarWithSuperExperssion.js.diff @@ -0,0 +1,68 @@ +--- old.collisionThisExpressionAndLocalVarWithSuperExperssion.js ++++ new.collisionThisExpressionAndLocalVarWithSuperExperssion.js +@@= skipped -20, +20 lines =@@ + } + + //// [collisionThisExpressionAndLocalVarWithSuperExperssion.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.prototype.foo = function () { +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.prototype.foo = function () { +- var _this_1 = this; ++class a { ++ foo() { ++ } ++} ++class b extends a { ++ foo() { + var _this = 10; +- var f = function () { return _super.prototype.foo.call(_this_1); }; +- }; +- return b; +-}(a)); +-var b2 = /** @class */ (function (_super) { +- __extends(b2, _super); +- function b2() { +- return _super !== null && _super.apply(this, arguments) || this; ++ var f = () => super.foo(); + } +- b2.prototype.foo = function () { +- var _this_1 = this; +- var f = function () { ++} ++class b2 extends a { ++ foo() { ++ var f = () => { + var _this = 10; +- return _super.prototype.foo.call(_this_1); ++ return super.foo(); + }; +- }; +- return b2; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js index a2dea21be2..e3041a647c 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts] //// //// [collisionThisExpressionAndModuleInGlobal.ts] -module _this { //Error +namespace _this { //Error class c { } } diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js.diff new file mode 100644 index 0000000000..5c9e653830 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.js.diff @@ -0,0 +1,19 @@ +--- old.collisionThisExpressionAndModuleInGlobal.js ++++ new.collisionThisExpressionAndModuleInGlobal.js +@@= skipped -7, +7 lines =@@ + var f = () => this; + + //// [collisionThisExpressionAndModuleInGlobal.js] +-var _this_1 = this; + var _this; + (function (_this) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + })(_this || (_this = {})); +-var f = function () { return _this_1; }; ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.symbols b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.symbols index 0a4f327178..5c7eacb274 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.symbols +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts] //// === collisionThisExpressionAndModuleInGlobal.ts === -module _this { //Error +namespace _this { //Error >_this : Symbol(_this, Decl(collisionThisExpressionAndModuleInGlobal.ts, 0, 0)) class c { ->c : Symbol(c, Decl(collisionThisExpressionAndModuleInGlobal.ts, 0, 14)) +>c : Symbol(c, Decl(collisionThisExpressionAndModuleInGlobal.ts, 0, 17)) } } var f = () => this; diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.types b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.types index 025034320c..9f605cdf0d 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.types +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndModuleInGlobal.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/collisionThisExpressionAndModuleInGlobal.ts] //// === collisionThisExpressionAndModuleInGlobal.ts === -module _this { //Error +namespace _this { //Error >_this : typeof _this class c { diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndNameResolution.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndNameResolution.js.diff new file mode 100644 index 0000000000..e7d45d0825 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndNameResolution.js.diff @@ -0,0 +1,24 @@ +--- old.collisionThisExpressionAndNameResolution.js ++++ new.collisionThisExpressionAndNameResolution.js +@@= skipped -15, +15 lines =@@ + + //// [collisionThisExpressionAndNameResolution.js] + var console; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.x = function () { ++class Foo { ++ x() { + var _this = 10; // Local var. No this capture in x(), so no conflict. + function inner() { +- var _this_1 = this; + console.log(_this); // Error as this doesnt not resolve to user defined _this +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture into function inner ++ return x => this; // New scope. So should inject new _this capture into function inner + } +- }; +- return Foo; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndParameter.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndParameter.js.diff new file mode 100644 index 0000000000..85af480d70 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndParameter.js.diff @@ -0,0 +1,131 @@ +--- old.collisionThisExpressionAndParameter.js ++++ new.collisionThisExpressionAndParameter.js +@@= skipped -95, +95 lines =@@ + declare function f4(_this: string); // no code gen - no error + + //// [collisionThisExpressionAndParameter.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.x = function () { +- var _this = 10; // Local var. No this capture in x(), so no conflict. +- function inner(_this) { +- var _this_1 = this; +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture into function inner +- } +- }; +- Foo.prototype.y = function () { +- var _this_1 = this; +- var lamda = function (_this) { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- }; +- Foo.prototype.z = function (_this) { +- var _this_1 = this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- }; +- Foo.prototype.x1 = function () { +- var _this = 10; // Local var. No this capture in x(), so no conflict. +- function inner(_this) { +- } +- }; +- Foo.prototype.y1 = function () { +- var lamda = function (_this) { +- }; +- }; +- Foo.prototype.z1 = function (_this) { +- var lambda = function () { +- }; +- }; +- return Foo; +-}()); +-var Foo1 = /** @class */ (function () { +- function Foo1(_this) { +- var _this_1 = this; ++class Foo { ++ x() { ++ var _this = 10; // Local var. No this capture in x(), so no conflict. ++ function inner(_this) { ++ return x => this; // New scope. So should inject new _this capture into function inner ++ } ++ } ++ y() { ++ var lamda = (_this) => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ z(_this) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++ x1() { ++ var _this = 10; // Local var. No this capture in x(), so no conflict. ++ function inner(_this) { ++ } ++ } ++ y1() { ++ var lamda = (_this) => { ++ }; ++ } ++ z1(_this) { ++ var lambda = () => { ++ }; ++ } ++} ++class Foo1 { ++ constructor(_this) { + var x2 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } ++ doStuff: (callback) => () => { ++ return callback(this); ++ } + }; + } +- return Foo1; +-}()); ++} + function f1(_this) { +- var _this_1 = this; +- (function (x) { console.log(_this_1.x); }); ++ x => { console.log(this.x); }; + } +-var Foo3 = /** @class */ (function () { +- function Foo3(_this) { +- var _this_1 = this; ++class Foo3 { ++ constructor(_this) { + var x2 = { +- doStuff: function (callback) { return function () { +- return callback(_this_1); +- }; } +- }; +- } +- Foo3.prototype.z = function (_this) { +- var _this_1 = this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- }; +- return Foo3; +-}()); ++ doStuff: (callback) => () => { ++ return callback(this); ++ } ++ }; ++ } ++ z(_this) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} + function f3(_this) { +- var _this_1 = this; +- (function (x) { console.log(_this_1.x); }); ++ x => { console.log(this.x); }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js.diff index 6f851c8a60..6963bbc735 100644 --- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndPropertyNameAsConstuctorParameter.js.diff @@ -1,18 +1,76 @@ --- old.collisionThisExpressionAndPropertyNameAsConstuctorParameter.js +++ new.collisionThisExpressionAndPropertyNameAsConstuctorParameter.js -@@= skipped -45, +45 lines =@@ - } - } - class Foo3 { +@@= skipped -37, +37 lines =@@ + } + + //// [collisionThisExpressionAndPropertyNameAsConstuctorParameter.js] +-var Foo2 = /** @class */ (function () { +- function Foo2(_this) { +- var _this_1 = this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- } +- return Foo2; +-}()); +-var Foo3 = /** @class */ (function () { +- function Foo3(_this) { +- var _this_1 = this; +- this._this = _this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- } +- return Foo3; +-}()); +-var Foo4 = /** @class */ (function () { +- function Foo4(_this) { +- var _this_1 = this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- } +- return Foo4; +-}()); +-var Foo5 = /** @class */ (function () { +- function Foo5(_this) { +- var _this_1 = this; +- this._this = _this; +- var lambda = function () { +- return function (x) { return _this_1; }; // New scope. So should inject new _this capture +- }; +- } +- return Foo5; +-}()); ++class Foo2 { ++ constructor(_this) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} ++class Foo3 { + _this; - constructor(_this) { - this._this = _this; - var lambda = () => { -@@= skipped -15, +16 lines =@@ - } - } - class Foo5 { ++ constructor(_this) { ++ this._this = _this; ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} ++class Foo4 { ++ constructor(_this) { ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} ++class Foo5 { + _this; - constructor(_this) { - this._this = _this; - var lambda = () => { \ No newline at end of file ++ constructor(_this) { ++ this._this = _this; ++ var lambda = () => { ++ return x => this; // New scope. So should inject new _this capture ++ }; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndVarInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndVarInGlobal.js.diff new file mode 100644 index 0000000000..5339f05f68 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndVarInGlobal.js.diff @@ -0,0 +1,10 @@ +--- old.collisionThisExpressionAndVarInGlobal.js ++++ new.collisionThisExpressionAndVarInGlobal.js +@@= skipped -4, +4 lines =@@ + var f = () => this; + + //// [collisionThisExpressionAndVarInGlobal.js] +-var _this_1 = this; + var _this = 1; +-var f = function () { return _this_1; }; ++var f = () => this; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commaOperatorInConditionalExpression.js.diff b/testdata/baselines/reference/submodule/compiler/commaOperatorInConditionalExpression.js.diff new file mode 100644 index 0000000000..1bfd2b5461 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commaOperatorInConditionalExpression.js.diff @@ -0,0 +1,13 @@ +--- old.commaOperatorInConditionalExpression.js ++++ new.commaOperatorInConditionalExpression.js +@@= skipped -8, +8 lines =@@ + + //// [commaOperatorInConditionalExpression.js] + function f(m) { +- [1, 2, 3].map(function (i) { +- var _a, _b; +- return true ? (_a = {}, _a[m] = i, _a) : (_b = {}, _b[m] = i + 1, _b); ++ [1, 2, 3].map(i => { ++ return true ? { [m]: i } : { [m]: i + 1 }; + }); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.js.diff b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.js.diff new file mode 100644 index 0000000000..745a253ea0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.js.diff @@ -0,0 +1,48 @@ +--- old.commaOperatorLeftSideUnused.js ++++ new.commaOperatorLeftSideUnused.js +@@= skipped -58, +58 lines =@@ + xx = (0, xx.fn)``; + + //// [commaOperatorLeftSideUnused.js] +-var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { +- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } +- return cooked; +-}; + var xx; + var yy; + function fn() { +- var arr = []; ++ let arr = []; + switch (arr.length) { + // Should error + case 0, 1: +@@= skipped -17, +13 lines =@@ + } + } + // Should error +-var x = Math.pow((3, 5), 2); ++let x = Math.pow((3, 5), 2); + // Should error +-var a = [(3 + 4), ((1 + 1, 8) * 4)]; ++let a = [(3 + 4), ((1 + 1, 8) * 4)]; + // Error cases + xx = (1, 2); + xx = ('', xx); + xx = (/323/, 5); +-xx = ("wat", 'ok'), ++xx = (`wat`, 'ok'), + xx = (true, false); + xx = (false, true); + xx = (null, xx); + xx = (undefined, 10); +-xx = (function () { }, 'no'); ++xx = (() => { }, 'no'); + xx = (function () { }, 100); + xx = ({}, {}); + xx = (typeof xx, 'unused'); +@@= skipped -37, +37 lines =@@ + xx = (xx, 100); + xx = (0, xx.fn)(); + xx = (0, xx['fn'])(); +-xx = (0, xx.fn)(__makeTemplateObject([""], [""])); ++xx = (0, xx.fn) ``; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.symbols.diff b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.symbols.diff new file mode 100644 index 0000000000..0c030d54bd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.symbols.diff @@ -0,0 +1,20 @@ +--- old.commaOperatorLeftSideUnused.symbols ++++ new.commaOperatorLeftSideUnused.symbols +@@= skipped -29, +29 lines =@@ + let x = Math.pow((3, 5), 2); + >x : Symbol(x, Decl(commaOperatorLeftSideUnused.ts, 15, 3)) + >Math.pow : Symbol(Math.pow, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >pow : Symbol(Math.pow, Decl(lib.es5.d.ts, --, --)) + + // Should error +@@= skipped -116, +116 lines =@@ + xx = (Math.pow(3, 2), 4); + >xx : Symbol(xx, Decl(commaOperatorLeftSideUnused.ts, 0, 3)) + >Math.pow : Symbol(Math.pow, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >pow : Symbol(Math.pow, Decl(lib.es5.d.ts, --, --)) + + xx = (void xx, 10); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.types.diff b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.types.diff new file mode 100644 index 0000000000..dc3a0eb9f5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commaOperatorLeftSideUnused.types.diff @@ -0,0 +1,19 @@ +--- old.commaOperatorLeftSideUnused.types ++++ new.commaOperatorLeftSideUnused.types +@@= skipped -7, +7 lines =@@ + >yy : any + + function fn() { +->fn : () => "zero or one" | "more than one" ++>fn : () => "more than one" | "zero or one" + + let arr: any[] = []; + >arr : any[] +@@= skipped -151, +151 lines =@@ + >xx : any + >(typeof xx, 'unused') : "unused" + >typeof xx, 'unused' : "unused" +->typeof xx : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof xx : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >xx : any + >'unused' : "unused" diff --git a/testdata/baselines/reference/submodule/compiler/commentBeforeStaticMethod1.js.diff b/testdata/baselines/reference/submodule/compiler/commentBeforeStaticMethod1.js.diff new file mode 100644 index 0000000000..427be44109 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentBeforeStaticMethod1.js.diff @@ -0,0 +1,21 @@ +--- old.commentBeforeStaticMethod1.js ++++ new.commentBeforeStaticMethod1.js +@@= skipped -10, +10 lines =@@ + } + + //// [commentBeforeStaticMethod1.js] +-var C = /** @class */ (function () { +- function C() { +- } ++class C { + /** + * Returns bar + */ +- C.foo = function () { ++ static foo() { + return "bar"; +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.js b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.js index 4dc51aac2b..b5886883da 100644 --- a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.js +++ b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.js @@ -4,11 +4,11 @@ // test var f = '' // test #2 -module foo { +namespace foo { function bar() { } } // test #3 -module empty { +namespace empty { } // test #4 diff --git a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.symbols b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.symbols index 39f497c42f..e5e7cb3370 100644 --- a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.symbols @@ -6,14 +6,14 @@ var f = '' >f : Symbol(f, Decl(commentEmitAtEndOfFile1.ts, 1, 3)) // test #2 -module foo { +namespace foo { >foo : Symbol(foo, Decl(commentEmitAtEndOfFile1.ts, 1, 10)) function bar() { } ->bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 12)) +>bar : Symbol(bar, Decl(commentEmitAtEndOfFile1.ts, 3, 15)) } // test #3 -module empty { +namespace empty { >empty : Symbol(empty, Decl(commentEmitAtEndOfFile1.ts, 5, 1)) } // test #4 diff --git a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.types b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.types index 217474a82d..eb2e82189c 100644 --- a/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.types +++ b/testdata/baselines/reference/submodule/compiler/commentEmitAtEndOfFile1.types @@ -7,13 +7,13 @@ var f = '' >'' : "" // test #2 -module foo { +namespace foo { >foo : typeof foo function bar() { } >bar : () => void } // test #3 -module empty { +namespace empty { } // test #4 diff --git a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.js b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.js index 921318e96a..877275a126 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.js +++ b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.js @@ -7,18 +7,18 @@ */ /*! Don't keep this pinned comment */ -declare module C { +declare namespace C { function foo(); } // Don't keep this comment. -declare module D { +declare namespace D { class bar { } } //// [b.ts] /// -declare module E { +declare namespace E { class foobar extends D.bar { foo(); } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.symbols b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.symbols index acfb8d43bc..ede5f6cb08 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.symbols @@ -2,14 +2,14 @@ === b.ts === /// -declare module E { +declare namespace E { >E : Symbol(E, Decl(b.ts, 0, 0)) class foobar extends D.bar { ->foobar : Symbol(foobar, Decl(b.ts, 1, 18)) ->D.bar : Symbol(D.bar, Decl(a.ts, 11, 18)) +>foobar : Symbol(foobar, Decl(b.ts, 1, 21)) +>D.bar : Symbol(D.bar, Decl(a.ts, 11, 21)) >D : Symbol(D, Decl(a.ts, 8, 1)) ->bar : Symbol(D.bar, Decl(a.ts, 11, 18)) +>bar : Symbol(D.bar, Decl(a.ts, 11, 21)) foo(); >foo : Symbol(foobar.foo, Decl(b.ts, 2, 32)) @@ -22,18 +22,18 @@ declare module E { */ /*! Don't keep this pinned comment */ -declare module C { +declare namespace C { >C : Symbol(C, Decl(a.ts, 0, 0)) function foo(); ->foo : Symbol(foo, Decl(a.ts, 6, 18)) +>foo : Symbol(foo, Decl(a.ts, 6, 21)) } // Don't keep this comment. -declare module D { +declare namespace D { >D : Symbol(D, Decl(a.ts, 8, 1)) class bar { } ->bar : Symbol(bar, Decl(a.ts, 11, 18)) +>bar : Symbol(bar, Decl(a.ts, 11, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.types b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.types index 32086487d3..048d18fdcf 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.types +++ b/testdata/baselines/reference/submodule/compiler/commentOnAmbientModule.types @@ -2,7 +2,7 @@ === b.ts === /// -declare module E { +declare namespace E { >E : typeof E class foobar extends D.bar { @@ -22,7 +22,7 @@ declare module E { */ /*! Don't keep this pinned comment */ -declare module C { +declare namespace C { >C : typeof C function foo(); @@ -30,7 +30,7 @@ declare module C { } // Don't keep this comment. -declare module D { +declare namespace D { >D : typeof D class bar { } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement1.js.diff new file mode 100644 index 0000000000..114c15fc38 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement1.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement1.js ++++ new.commentOnArrayElement1.js +@@= skipped -9, +9 lines =@@ + ]; + + //// [commentOnArrayElement1.js] +-var array = [ ++const array = [ + /* element 1*/ + 1 + /* end of element 1 */ , \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.js.diff new file mode 100644 index 0000000000..b49f04da91 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.js.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement10.js ++++ new.commentOnArrayElement10.js +@@= skipped -4, +4 lines =@@ + + + //// [commentOnArrayElement10.js] +-var array = [, , /* comment */]; ++const array = [, , /* comment */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.types.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.types.diff new file mode 100644 index 0000000000..5a59daf989 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement10.types.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement10.types ++++ new.commentOnArrayElement10.types +@@= skipped -3, +3 lines =@@ + const array = [,, /* comment */]; + >array : any[] + >[,, /* comment */] : undefined[] +-> : undefined +-> : undefined diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.js.diff new file mode 100644 index 0000000000..02b5f85ede --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.js.diff @@ -0,0 +1,10 @@ +--- old.commentOnArrayElement11.js ++++ new.commentOnArrayElement11.js +@@= skipped -6, +6 lines =@@ + + + //// [commentOnArrayElement11.js] +-var array = [ ++const array = [ + , /* comment */ + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.types.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.types.diff new file mode 100644 index 0000000000..4b213e1725 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement11.types.diff @@ -0,0 +1,9 @@ +--- old.commentOnArrayElement11.types ++++ new.commentOnArrayElement11.types +@@= skipped -5, +5 lines =@@ + >[ , /* comment */] : undefined[] + + , /* comment */ +-> : undefined +- + ]; diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.js.diff new file mode 100644 index 0000000000..f41655e5e2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement12.js ++++ new.commentOnArrayElement12.js +@@= skipped -6, +6 lines =@@ + + + //// [commentOnArrayElement12.js] +-var array = [ ++const array = [ + , + , /* comment */ + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.types.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.types.diff new file mode 100644 index 0000000000..67da752491 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement12.types.diff @@ -0,0 +1,10 @@ +--- old.commentOnArrayElement12.types ++++ new.commentOnArrayElement12.types +@@= skipped -5, +5 lines =@@ + >[ ,, /* comment */] : undefined[] + + ,, /* comment */ +-> : undefined +-> : undefined +- + ]; diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement13.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement13.js.diff index b536a0f505..c753594352 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement13.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement13.js.diff @@ -4,5 +4,5 @@ //// [commentOnArrayElement13.js] --const array = [ /* comment */]; +-var array = [ /* comment */]; +const array = [ /* comment */ /* comment */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement14.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement14.js.diff new file mode 100644 index 0000000000..ac2f81f1ee --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement14.js.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement14.js ++++ new.commentOnArrayElement14.js +@@= skipped -4, +4 lines =@@ + + + //// [commentOnArrayElement14.js] +-var array = [1 /* comment */]; ++const array = [1 /* comment */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement15.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement15.js.diff new file mode 100644 index 0000000000..c75d9c3e65 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement15.js.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement15.js ++++ new.commentOnArrayElement15.js +@@= skipped -4, +4 lines =@@ + + + //// [commentOnArrayElement15.js] +-var array = [/* comment */ 1 /* comment */]; ++const array = [/* comment */ 1 /* comment */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement16.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement16.js.diff new file mode 100644 index 0000000000..41504f5431 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement16.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement16.js ++++ new.commentOnArrayElement16.js +@@= skipped -9, +9 lines =@@ + + + //// [commentOnArrayElement16.js] +-var array = [ ++const array = [ + // comment start + 1, + 2, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement2.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement2.js.diff new file mode 100644 index 0000000000..4f7ae154db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement2.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement2.js ++++ new.commentOnArrayElement2.js +@@= skipped -8, +8 lines =@@ + ]; + + //// [commentOnArrayElement2.js] +-var array = [ ++const array = [ + /* element 1*/ + 1 /* end of element 1 */, + 2 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.js.diff new file mode 100644 index 0000000000..d93385facb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement3.js ++++ new.commentOnArrayElement3.js +@@= skipped -10, +10 lines =@@ + ]; + + //// [commentOnArrayElement3.js] +-var array = [ ++const array = [ + /* element 1*/ + 1 + /* end of element 1 */ , \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.types.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.types.diff new file mode 100644 index 0000000000..34710d9c81 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement3.types.diff @@ -0,0 +1,10 @@ +--- old.commentOnArrayElement3.types ++++ new.commentOnArrayElement3.types +@@= skipped -13, +13 lines =@@ + >2 : 2 + + /* end of element 2 */, , +-> : undefined +- + /* extra comment */ + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement4.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement4.js.diff new file mode 100644 index 0000000000..2fdc4cec96 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement4.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement4.js ++++ new.commentOnArrayElement4.js +@@= skipped -8, +8 lines =@@ + + + //// [commentOnArrayElement4.js] +-var array = [ ++const array = [ + /* element 1 */ + 1, + /* end of element 1 */ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement5.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement5.js.diff new file mode 100644 index 0000000000..15cce3ff03 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement5.js.diff @@ -0,0 +1,11 @@ +--- old.commentOnArrayElement5.js ++++ new.commentOnArrayElement5.js +@@= skipped -9, +9 lines =@@ + + + //// [commentOnArrayElement5.js] +-var array = [ ++const array = [ + /* element 1 */ + 1, + /* end of element 1 */ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement6.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement6.js.diff new file mode 100644 index 0000000000..418135569c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement6.js.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement6.js ++++ new.commentOnArrayElement6.js +@@= skipped -4, +4 lines =@@ + + + //// [commentOnArrayElement6.js] +-var array = [1, /* comment */]; ++const array = [1, /* comment */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement7.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement7.js.diff new file mode 100644 index 0000000000..8e3d83142e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement7.js.diff @@ -0,0 +1,8 @@ +--- old.commentOnArrayElement7.js ++++ new.commentOnArrayElement7.js +@@= skipped -4, +4 lines =@@ + + + //// [commentOnArrayElement7.js] +-var array = [/* element 1 */ 1, /* end of element 1 */]; ++const array = [/* element 1 */ 1, /* end of element 1 */]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement8.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement8.js.diff new file mode 100644 index 0000000000..48a492c6b2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement8.js.diff @@ -0,0 +1,10 @@ +--- old.commentOnArrayElement8.js ++++ new.commentOnArrayElement8.js +@@= skipped -6, +6 lines =@@ + + + //// [commentOnArrayElement8.js] +-var array = [ ++const array = [ + 1, /* comment */ + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnArrayElement9.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement9.js.diff new file mode 100644 index 0000000000..a58d3db575 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnArrayElement9.js.diff @@ -0,0 +1,10 @@ +--- old.commentOnArrayElement9.js ++++ new.commentOnArrayElement9.js +@@= skipped -6, +6 lines =@@ + + + //// [commentOnArrayElement9.js] +-var array = [ ++const array = [ + /* element 1 */ 1, /* end of element 1 */ + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor1.js.diff new file mode 100644 index 0000000000..2cfaf31f83 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor1.js.diff @@ -0,0 +1,25 @@ +--- old.commentOnClassAccessor1.js ++++ new.commentOnClassAccessor1.js +@@= skipped -8, +8 lines =@@ + } + + //// [commentOnClassAccessor1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "bar", { +- /** +- * @type {number} +- */ +- get: function () { return 1; }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ /** ++ * @type {number} ++ */ ++ get bar() { return 1; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor2.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor2.js.diff new file mode 100644 index 0000000000..fb10eb5d7b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnClassAccessor2.js.diff @@ -0,0 +1,33 @@ +--- old.commentOnClassAccessor2.js ++++ new.commentOnClassAccessor2.js +@@= skipped -13, +13 lines =@@ + } + + //// [commentOnClassAccessor2.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "bar", { +- /** +- * Getter. +- */ +- get: function () { return 1; }, +- /** +- * Setter. +- */ +- set: function (v) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ /** ++ * Getter. ++ */ ++ get bar() { return 1; } ++ /** ++ * Setter. ++ */ ++ set bar(v) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnClassMethod1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnClassMethod1.js.diff new file mode 100644 index 0000000000..635ba5a7db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnClassMethod1.js.diff @@ -0,0 +1,20 @@ +--- old.commentOnClassMethod1.js ++++ new.commentOnClassMethod1.js +@@= skipped -9, +9 lines =@@ + } + + //// [commentOnClassMethod1.js] +-var WebControls = /** @class */ (function () { +- function WebControls() { +- } ++class WebControls { + /** + * Render a control + */ +- WebControls.prototype.createControl = function () { +- }; +- return WebControls; +-}()); ++ createControl() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnDecoratedClassDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnDecoratedClassDeclaration.js.diff index 59009c5314..0948bd6df5 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnDecoratedClassDeclaration.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentOnDecoratedClassDeclaration.js.diff @@ -13,29 +13,28 @@ /** * Leading trivia */ --let Remote = (() => { -- let Remote = class Remote { -- }; +-var Remote = /** @class */ (function () { +- function Remote() { +- } - Remote = __decorate([ - decorator("hello") - ], Remote); - return Remote; --})(); +-}()); +@decorator("hello") +class Remote { +} /** * Floating Comment */ --let AnotherRomote = (() => { -- let AnotherRomote = class AnotherRomote { -- constructor() { } -- }; +-var AnotherRomote = /** @class */ (function () { +- function AnotherRomote() { +- } - AnotherRomote = __decorate([ - decorator("hi") - ], AnotherRomote); - return AnotherRomote; --})(); +-}()); +@decorator("hi") +class AnotherRomote { + constructor() { } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.js b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.js index 3b7d9b4daf..a467eaf433 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.js +++ b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.js @@ -7,16 +7,16 @@ */ /*! Don't keep this pinned comment */ -module ElidedModule { +namespace ElidedModule { } // Don't keep this comment. -module ElidedModule2 { +namespace ElidedModule2 { } //// [b.ts] /// -module ElidedModule3 { +namespace ElidedModule3 { } //// [a.js] diff --git a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.symbols b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.symbols index 0328efa37c..70cb05f4f4 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.symbols @@ -2,7 +2,7 @@ === b.ts === /// -module ElidedModule3 { +namespace ElidedModule3 { >ElidedModule3 : Symbol(ElidedModule3, Decl(b.ts, 0, 0)) } === a.ts === @@ -12,12 +12,12 @@ module ElidedModule3 { */ /*! Don't keep this pinned comment */ -module ElidedModule { +namespace ElidedModule { >ElidedModule : Symbol(ElidedModule, Decl(a.ts, 0, 0)) } // Don't keep this comment. -module ElidedModule2 { +namespace ElidedModule2 { >ElidedModule2 : Symbol(ElidedModule2, Decl(a.ts, 7, 1)) } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.types b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.types index 302fe43eca..9af4fcafa2 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.types +++ b/testdata/baselines/reference/submodule/compiler/commentOnElidedModule1.types @@ -3,7 +3,7 @@ === b.ts === /// -module ElidedModule3 { +namespace ElidedModule3 { } === a.ts === @@ -13,10 +13,10 @@ module ElidedModule3 { */ /*! Don't keep this pinned comment */ -module ElidedModule { +namespace ElidedModule { } // Don't keep this comment. -module ElidedModule2 { +namespace ElidedModule2 { } diff --git a/testdata/baselines/reference/submodule/compiler/commentOnSignature1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnSignature1.js.diff index bb4c48fea0..9705c330dd 100644 --- a/testdata/baselines/reference/submodule/compiler/commentOnSignature1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentOnSignature1.js.diff @@ -10,4 +10,19 @@ -*/ function foo(a) { } - class c { \ No newline at end of file +-var c = /** @class */ (function () { +- function c(a) { +- } +- c.prototype.foo = function (a) { +- }; +- return c; +-}()); ++class c { ++ constructor(a) { ++ } ++ foo(a) { ++ } ++} + //// [b.js] + /// + function foo2(a) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnSimpleArrowFunctionBody1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnSimpleArrowFunctionBody1.js.diff new file mode 100644 index 0000000000..400bcd36db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnSimpleArrowFunctionBody1.js.diff @@ -0,0 +1,13 @@ +--- old.commentOnSimpleArrowFunctionBody1.js ++++ new.commentOnSimpleArrowFunctionBody1.js +@@= skipped -12, +12 lines =@@ + //// [commentOnSimpleArrowFunctionBody1.js] + function Foo(x) { + } +-Foo(function () { +- // do something +- return 127; +-}); ++Foo(() => ++// do something ++127); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentOnStaticMember1.js.diff b/testdata/baselines/reference/submodule/compiler/commentOnStaticMember1.js.diff new file mode 100644 index 0000000000..5dea4525ca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentOnStaticMember1.js.diff @@ -0,0 +1,18 @@ +--- old.commentOnStaticMember1.js ++++ new.commentOnStaticMember1.js +@@= skipped -7, +7 lines =@@ + } + + //// [commentOnStaticMember1.js] +-var Greeter = /** @class */ (function () { +- function Greeter() { +- } ++class Greeter { + //Hello World +- Greeter.foo = function () { +- }; +- return Greeter; +-}()); ++ static foo() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff b/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff index 0392624fbc..e66d0daec4 100644 --- a/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentWithUnreasonableIndentationLevel01.js.diff @@ -10,4 +10,12 @@ +// Repro from #41223 /** * This is a comment with dumb indentation for some auto-generated thing. - */ \ No newline at end of file + */ +-var SomeAutoGeneratedThing = /** @class */ (function () { +- function SomeAutoGeneratedThing() { +- } +- return SomeAutoGeneratedThing; +-}()); ++class SomeAutoGeneratedThing { ++} + exports.SomeAutoGeneratedThing = SomeAutoGeneratedThing; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsAfterFunctionExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/commentsAfterFunctionExpression1.js.diff new file mode 100644 index 0000000000..cf5ff8cf3e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsAfterFunctionExpression1.js.diff @@ -0,0 +1,13 @@ +--- old.commentsAfterFunctionExpression1.js ++++ new.commentsAfterFunctionExpression1.js +@@= skipped -9, +9 lines =@@ + + //// [commentsAfterFunctionExpression1.js] + var v = { +- f: function (a) { return 0; } /*t1*/, +- g: (function (a) { return 0; }) /*t2*/, +- h: (function (a) { return 0; } /*t3*/) ++ f: a => 0 /*t1*/, ++ g: (a => 0) /*t2*/, ++ h: (a => 0 /*t3*/) + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression1.js.diff new file mode 100644 index 0000000000..b44762c18d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression1.js.diff @@ -0,0 +1,19 @@ +--- old.commentsArgumentsOfCallExpression1.js ++++ new.commentsArgumentsOfCallExpression1.js +@@= skipped -22, +22 lines =@@ + foo(/*c3*/ function () { }); + foo( + /*c4*/ +-function () { }); ++() => { }); + foo( + /*c5*/ + /*c6*/ +-function () { }); +-foo(/*c7*/ function () { }); ++() => { }); ++foo(/*c7*/ () => { }); + foo( + /*c7*/ +-/*c8*/ function () { }); ++/*c8*/ () => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression2.js.diff b/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression2.js.diff new file mode 100644 index 0000000000..b8311ce0d9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsArgumentsOfCallExpression2.js.diff @@ -0,0 +1,16 @@ +--- old.commentsArgumentsOfCallExpression2.js ++++ new.commentsArgumentsOfCallExpression2.js +@@= skipped -15, +15 lines =@@ + function foo(/*c1*/ x, /*d1*/ y, /*e1*/ w) { } + var a, b; + foo(/*c2*/ 1, /*d2*/ 1 + 2, /*e1*/ a + b); +-foo(/*c3*/ function () { }, /*d2*/ function () { }, /*e2*/ a + /*e3*/ b); +-foo(/*c3*/ function () { }, /*d3*/ function () { }, /*e3*/ (a + b)); ++foo(/*c3*/ function () { }, /*d2*/ () => { }, /*e2*/ a + /*e3*/ b); ++foo(/*c3*/ function () { }, /*d3*/ () => { }, /*e3*/ (a + b)); + foo( + /*c4*/ function () { }, +-/*d4*/ function () { }, ++/*d4*/ () => { }, + /*e4*/ + /*e5*/ "hello"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsBeforeFunctionExpression1.js.diff b/testdata/baselines/reference/submodule/compiler/commentsBeforeFunctionExpression1.js.diff index c8222c9e6c..c28ad5fd74 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsBeforeFunctionExpression1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsBeforeFunctionExpression1.js.diff @@ -4,6 +4,6 @@ //// [commentsBeforeFunctionExpression1.js] var v = { -- f: /**own f*/ (a) => 0 +- f: /**own f*/ function (a) { return 0; } + f: (a) => 0 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsClass.js.diff b/testdata/baselines/reference/submodule/compiler/commentsClass.js.diff index b0401362c6..a214176dbf 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsClass.js.diff @@ -1,35 +1,108 @@ --- old.commentsClass.js +++ new.commentsClass.js -@@= skipped -96, +96 lines =@@ +@@= skipped -75, +75 lines =@@ + + //// [commentsClass.js] + /** This is class c2 without constuctor*/ +-var c2 = /** @class */ (function () { +- function c2() { +- } +- return c2; +-}()); // trailing comment1 ++class c2 { ++} // trailing comment1 + var i2 = new c2(); + var i2_c = c2; +-var c3 = /** @class */ (function () { ++class c3 { + /** Constructor comment*/ +- function c3() { ++ constructor() { + } // trailing comment of constructor +- return c3; +-}()); /* trailing comment 2 */ ++} /* trailing comment 2 */ + var i3 = new c3(); + var i3_c = c3; + /** Class comment*/ +-var c4 = /** @class */ (function () { ++class c4 { + /** Constructor comment*/ +- function c4() { ++ constructor() { + } /* trailing comment of constructor 2*/ +- return c4; +-}()); ++} + var i4 = new c4(); var i4_c = c4; /** Class with statics*/ - class c5 { +-var c5 = /** @class */ (function () { +- function c5() { +- } +- return c5; +-}()); ++class c5 { + static s1; - } ++} var i5 = new c5(); var i5_c = c5; /// class with statics and constructor - class c6 { +-var c6 = /** @class */ (function () { ++class c6 { + /// s1 comment + static s1; /// s1 comment2 /// constructor comment - constructor() { +- function c6() { ++ constructor() { } -@@= skipped -13, +16 lines =@@ +- return c6; +-}()); ++} + var i6 = new c6(); var i6_c = c6; // class with statics and constructor - class c7 { +-var c7 = /** @class */ (function () { ++class c7 { + // s1 comment + static s1; // constructor comment - constructor() { +- function c7() { ++ constructor() { } -@@= skipped -9, +11 lines =@@ +- return c7; +-}()); ++} + var i7 = new c7(); + var i7_c = c7; /** class with statics and constructor */ - class c8 { +-var c8 = /** @class */ (function () { ++class c8 { + /** s1 comment */ + static s1; /** s1 comment2 */ /** constructor comment */ - constructor() { \ No newline at end of file +- function c8() { ++ constructor() { + /** constructor comment2 + */ + } +- return c8; +-}()); ++} + var i8 = new c8(); + var i8_c = c8; +-var c9 = /** @class */ (function () { +- function c9() { ++class c9 { ++ constructor() { + /// This is some detached comment + // should emit this leading comment of } too + } +- return c9; +-}()); ++} + + + //// [commentsClass.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsClassMembers.js.diff b/testdata/baselines/reference/submodule/compiler/commentsClassMembers.js.diff index 81c4b5b65d..b6aaabc257 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsClassMembers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsClassMembers.js.diff @@ -1,128 +1,420 @@ --- old.commentsClassMembers.js +++ new.commentsClassMembers.js -@@= skipped -221, +221 lines =@@ +@@= skipped -220, +220 lines =@@ + //// [commentsClassMembers.js] /** This is comment for c1*/ - class c1 { +-var c1 = /** @class */ (function () { ++class c1 { + /** p1 is property of c1*/ + p1; - /** sum with property*/ - p2(/** number to add*/ b) { - return this.p1 + b; -@@= skipped -12, +14 lines =@@ - set p3(/** this is value*/ value) { - this.p1 = this.p2(value); - } // trailing comment Setter ++ /** sum with property*/ ++ p2(/** number to add*/ b) { ++ return this.p1 + b; ++ } /* trailing comment of method*/ ++ /** getter property*/ ++ get p3() { ++ return this.p2(this.p1); ++ } // trailing comment Getter ++ /** setter property*/ ++ set p3(/** this is value*/ value) { ++ this.p1 = this.p2(value); ++ } // trailing comment Setter + /** pp1 is property of c1*/ + pp1; - /** sum with property*/ - pp2(/** number to add*/ b) { - return this.p1 + b; -@@= skipped -15, +17 lines =@@ ++ /** sum with property*/ ++ pp2(/** number to add*/ b) { ++ return this.p1 + b; ++ } // trailing comment of method ++ /** getter property*/ ++ get pp3() { ++ return this.pp2(this.pp1); ++ } ++ /** setter property*/ ++ set pp3(/** this is value*/ value) { ++ this.pp1 = this.pp2(value); ++ } /** Constructor method*/ - constructor() { +- function c1() { ++ constructor() { } +- /** sum with property*/ +- c1.prototype.p2 = function (/** number to add*/ b) { +- return this.p1 + b; +- }; /* trailing comment of method*/ +- Object.defineProperty(c1.prototype, "p3", { +- /** getter property*/ +- get: function () { +- return this.p2(this.p1); +- } // trailing comment Getter +- , +- /** setter property*/ +- set: function (/** this is value*/ value) { +- this.p1 = this.p2(value); +- } // trailing comment Setter +- , +- enumerable: false, +- configurable: true +- }); +- /** sum with property*/ +- c1.prototype.pp2 = function (/** number to add*/ b) { +- return this.p1 + b; +- }; // trailing comment of method +- Object.defineProperty(c1.prototype, "pp3", { +- /** getter property*/ +- get: function () { +- return this.pp2(this.pp1); +- }, +- /** setter property*/ +- set: function (/** this is value*/ value) { +- this.pp1 = this.pp2(value); +- }, +- enumerable: false, +- configurable: true +- }); + /** s1 is static property of c1*/ + static s1; /** static sum with property*/ - static s2(/** number to add*/ b) { +- c1.s2 = function (/** number to add*/ b) { ++ static s2(/** number to add*/ b) { return c1.s1 + b; -@@= skipped -12, +14 lines =@@ - static set s3(/** this is value*/ value) { - c1.s1 = c1.s2(value); - } /*trailing comment 2 */ /*setter*/ +- }; +- Object.defineProperty(c1, "s3", { +- /** static getter property*/ +- get: function () { +- return c1.s2(c1.s1); +- } /*trailing comment 1 getter*/, +- /** setter property*/ +- set: function (/** this is value*/ value) { +- c1.s1 = c1.s2(value); +- } /*trailing comment 2 */ /*setter*/, +- enumerable: false, +- configurable: true +- }); +- c1.prototype.nc_p2 = function (b) { ++ } ++ /** static getter property*/ ++ static get s3() { ++ return c1.s2(c1.s1); ++ } /*trailing comment 1 getter*/ ++ /** setter property*/ ++ static set s3(/** this is value*/ value) { ++ c1.s1 = c1.s2(value); ++ } /*trailing comment 2 */ /*setter*/ + nc_p1; - nc_p2(b) { ++ nc_p2(b) { return this.nc_p1 + b; - } -@@= skipped -9, +10 lines =@@ - set nc_p3(value) { - this.nc_p1 = this.nc_p2(value); - } +- }; +- Object.defineProperty(c1.prototype, "nc_p3", { +- get: function () { +- return this.nc_p2(this.nc_p1); +- }, +- set: function (value) { +- this.nc_p1 = this.nc_p2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- c1.prototype.nc_pp2 = function (b) { ++ } ++ get nc_p3() { ++ return this.nc_p2(this.nc_p1); ++ } ++ set nc_p3(value) { ++ this.nc_p1 = this.nc_p2(value); ++ } + nc_pp1; - nc_pp2(b) { ++ nc_pp2(b) { return this.nc_pp1 + b; - } -@@= skipped -9, +10 lines =@@ - set nc_pp3(value) { - this.nc_pp1 = this.nc_pp2(value); - } +- }; +- Object.defineProperty(c1.prototype, "nc_pp3", { +- get: function () { +- return this.nc_pp2(this.nc_pp1); +- }, +- set: function (value) { +- this.nc_pp1 = this.nc_pp2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- c1.nc_s2 = function (b) { ++ } ++ get nc_pp3() { ++ return this.nc_pp2(this.nc_pp1); ++ } ++ set nc_pp3(value) { ++ this.nc_pp1 = this.nc_pp2(value); ++ } + static nc_s1; - static nc_s2(b) { ++ static nc_s2(b) { return c1.nc_s1 + b; - } -@@= skipped -9, +10 lines =@@ - static set nc_s3(value) { - c1.nc_s1 = c1.nc_s2(value); - } +- }; +- Object.defineProperty(c1, "nc_s3", { +- get: function () { +- return c1.nc_s2(c1.nc_s1); +- }, +- set: function (value) { +- c1.nc_s1 = c1.nc_s2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- // sum with property +- c1.prototype.a_p2 = function (b) { +- return this.a_p1 + b; +- }; +- Object.defineProperty(c1.prototype, "a_p3", { +- // getter property +- get: function () { +- return this.a_p2(this.a_p1); +- }, +- // setter property +- set: function (value) { +- this.a_p1 = this.a_p2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- // sum with property +- c1.prototype.a_pp2 = function (b) { +- return this.a_p1 + b; +- }; +- Object.defineProperty(c1.prototype, "a_pp3", { +- // getter property +- get: function () { +- return this.a_pp2(this.a_pp1); +- }, +- // setter property +- set: function (value) { +- this.a_pp1 = this.a_pp2(value); +- }, +- enumerable: false, +- configurable: true +- }); ++ } ++ static get nc_s3() { ++ return c1.nc_s2(c1.nc_s1); ++ } ++ static set nc_s3(value) { ++ c1.nc_s1 = c1.nc_s2(value); ++ } + // p1 is property of c1 + a_p1; - // sum with property - a_p2(b) { - return this.a_p1 + b; -@@= skipped -12, +14 lines =@@ - set a_p3(value) { - this.a_p1 = this.a_p2(value); - } ++ // sum with property ++ a_p2(b) { ++ return this.a_p1 + b; ++ } ++ // getter property ++ get a_p3() { ++ return this.a_p2(this.a_p1); ++ } ++ // setter property ++ set a_p3(value) { ++ this.a_p1 = this.a_p2(value); ++ } + // pp1 is property of c1 + a_pp1; - // sum with property - a_pp2(b) { - return this.a_p1 + b; -@@= skipped -12, +14 lines =@@ - set a_pp3(value) { - this.a_pp1 = this.a_pp2(value); - } ++ // sum with property ++ a_pp2(b) { ++ return this.a_p1 + b; ++ } ++ // getter property ++ get a_pp3() { ++ return this.a_pp2(this.a_pp1); ++ } ++ // setter property ++ set a_pp3(value) { ++ this.a_pp1 = this.a_pp2(value); ++ } + // s1 is static property of c1 + static a_s1; // static sum with property - static a_s2(b) { +- c1.a_s2 = function (b) { ++ static a_s2(b) { return c1.a_s1 + b; -@@= skipped -12, +14 lines =@@ - static set a_s3(value) { - c1.a_s1 = c1.a_s2(value); - } +- }; +- Object.defineProperty(c1, "a_s3", { +- // static getter property +- get: function () { +- return c1.s2(c1.s1); +- }, +- // setter property +- set: function (value) { +- c1.a_s1 = c1.a_s2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- /** sum with property */ +- c1.prototype.b_p2 = function (b) { +- return this.b_p1 + b; +- }; +- Object.defineProperty(c1.prototype, "b_p3", { +- /** getter property */ +- get: function () { +- return this.b_p2(this.b_p1); +- }, +- /** setter property */ +- set: function (value) { +- this.b_p1 = this.b_p2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- /** sum with property */ +- c1.prototype.b_pp2 = function (b) { +- return this.b_p1 + b; +- }; +- Object.defineProperty(c1.prototype, "b_pp3", { +- /** getter property */ +- get: function () { +- return this.b_pp2(this.b_pp1); +- }, +- /** setter property */ +- set: function (value) { +- this.b_pp1 = this.b_pp2(value); +- }, +- enumerable: false, +- configurable: true +- }); ++ } ++ // static getter property ++ static get a_s3() { ++ return c1.s2(c1.s1); ++ } ++ // setter property ++ static set a_s3(value) { ++ c1.a_s1 = c1.a_s2(value); ++ } + /** p1 is property of c1 */ + b_p1; - /** sum with property */ - b_p2(b) { - return this.b_p1 + b; -@@= skipped -12, +14 lines =@@ - set b_p3(value) { - this.b_p1 = this.b_p2(value); - } ++ /** sum with property */ ++ b_p2(b) { ++ return this.b_p1 + b; ++ } ++ /** getter property */ ++ get b_p3() { ++ return this.b_p2(this.b_p1); ++ } ++ /** setter property */ ++ set b_p3(value) { ++ this.b_p1 = this.b_p2(value); ++ } + /** pp1 is property of c1 */ + b_pp1; - /** sum with property */ - b_pp2(b) { - return this.b_p1 + b; -@@= skipped -12, +14 lines =@@ - set b_pp3(value) { - this.b_pp1 = this.b_pp2(value); - } ++ /** sum with property */ ++ b_pp2(b) { ++ return this.b_p1 + b; ++ } ++ /** getter property */ ++ get b_pp3() { ++ return this.b_pp2(this.b_pp1); ++ } ++ /** setter property */ ++ set b_pp3(value) { ++ this.b_pp1 = this.b_pp2(value); ++ } + /** s1 is static property of c1 */ + static b_s1; /** static sum with property */ - static b_s2(b) { +- c1.b_s2 = function (b) { ++ static b_s2(b) { return c1.b_s1 + b; -@@= skipped -39, +41 lines =@@ +- }; +- Object.defineProperty(c1, "b_s3", { +- /** static getter property +- */ +- get: function () { +- return c1.s2(c1.s1); +- }, +- /** setter property +- */ +- set: function (value) { +- /** setter */ +- c1.b_s1 = c1.b_s2(value); +- }, +- enumerable: false, +- configurable: true +- }); +- return c1; +-}()); ++ } ++ /** static getter property ++ */ ++ static get b_s3() { ++ return c1.s2(c1.s1); ++ } ++ /** setter property ++ */ ++ static set b_s3(value) { ++ /** setter */ ++ c1.b_s1 = c1.b_s2(value); ++ } ++} + var i1 = new c1(); + var i1_p = i1.p1; + var i1_f = i1.p2; +@@= skipped -216, +186 lines =@@ + var i1_s_ncprop = c1.nc_s3; c1.nc_s3 = i1_s_ncprop; var i1_c = c1; - class cProperties { -- constructor() { +-var cProperties = /** @class */ (function () { +- function cProperties() { - this.x = 10; /*trailing comment for property*/ - this.y = 10; // trailing comment of // style - } +- Object.defineProperty(cProperties.prototype, "p1", { +- /** getter only property*/ +- get: function () { +- return this.val; +- } // trailing comment of only getter +- , +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(cProperties.prototype, "nc_p1", { +- get: function () { +- return this.val; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(cProperties.prototype, "p2", { +- /**setter only property*/ +- set: function (value) { +- this.val = value; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(cProperties.prototype, "nc_p2", { +- set: function (value) { +- this.val = value; +- } /* trailing comment of setter only*/, +- enumerable: false, +- configurable: true +- }); +- return cProperties; +-}()); ++class cProperties { + val; - /** getter only property*/ - get p1() { - return this.val; -@@= skipped -18, +15 lines =@@ - set nc_p2(value) { - this.val = value; - } /* trailing comment of setter only*/ ++ /** getter only property*/ ++ get p1() { ++ return this.val; ++ } // trailing comment of only getter ++ get nc_p1() { ++ return this.val; ++ } ++ /**setter only property*/ ++ set p2(value) { ++ this.val = value; ++ } ++ set nc_p2(value) { ++ this.val = value; ++ } /* trailing comment of setter only*/ + x = 10; /*trailing comment for property*/ + y = 10; // trailing comment of // style - } ++} var cProperties_i = new cProperties(); - cProperties_i.p2 = cProperties_i.p1; \ No newline at end of file + cProperties_i.p2 = cProperties_i.p1; + cProperties_i.nc_p2 = cProperties_i.nc_p1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsCommentParsing.js.diff b/testdata/baselines/reference/submodule/compiler/commentsCommentParsing.js.diff new file mode 100644 index 0000000000..9a6124712a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsCommentParsing.js.diff @@ -0,0 +1,16 @@ +--- old.commentsCommentParsing.js ++++ new.commentsCommentParsing.js +@@= skipped -284, +284 lines =@@ + return a + b + c + d; + } + /**/ +-var NoQuickInfoClass = /** @class */ (function () { +- function NoQuickInfoClass() { +- } +- return NoQuickInfoClass; +-}()); ++class NoQuickInfoClass { ++} + + + //// [commentsCommentParsing.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js index 116ea6aac8..ccb74c10a9 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js +++ b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js @@ -2,7 +2,7 @@ //// [commentsExternalModules2_0.ts] /** Module comment*/ -export module m1 { +export namespace m1 { /** b's comment*/ export var b: number; /** foo's comment*/ @@ -10,7 +10,7 @@ export module m1 { return b; } /** m2 comments*/ - export module m2 { + export namespace m2 { /** class comment;*/ export class c { }; @@ -26,7 +26,7 @@ m1.fooExport(); var myvar = new m1.m2.c(); /** Module comment */ -export module m4 { +export namespace m4 { /** b's comment */ export var b: number; /** foo's comment @@ -36,7 +36,7 @@ export module m4 { } /** m2 comments */ - export module m2 { + export namespace m2 { /** class comment; */ export class c { }; diff --git a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js.diff b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js.diff index 3f34288af9..cb55e6ea29 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.js.diff @@ -1,6 +1,42 @@ --- old.commentsExternalModules3.js +++ new.commentsExternalModules3.js -@@= skipped -122, +122 lines =@@ +@@= skipped -71, +71 lines =@@ + return m1.b; + } + /** m2 comments*/ +- var m2; ++ let m2; + (function (m2) { + /** class comment;*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m2.c = c; + ; + /** i*/ +@@= skipped -31, +28 lines =@@ + } + /** m2 comments + */ +- var m2; ++ let m2; + (function (m2) { + /** class comment; */ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m2.c = c; + ; + /** i */ +@@= skipped -26, +23 lines =@@ Object.defineProperty(exports, "__esModule", { value: true }); exports.newVar2 = exports.newVar = void 0; /**This is on import declaration*/ diff --git a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.symbols b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.symbols index 9f44a52b66..61eecfffdc 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.symbols @@ -14,13 +14,13 @@ extMod.m1.fooExport(); export var newVar = new extMod.m1.m2.c(); >newVar : Symbol(newVar, Decl(commentsExternalModules_1.ts, 3, 10)) ->extMod.m1.m2.c : Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>extMod.m1.m2.c : Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 25)) >extMod.m1.m2 : Symbol(extMod.m1.m2, Decl(commentsExternalModules2_0.ts, 7, 5)) >extMod.m1 : Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0)) >extMod : Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0)) >m1 : Symbol(extMod.m1, Decl(commentsExternalModules2_0.ts, 0, 0)) >m2 : Symbol(extMod.m1.m2, Decl(commentsExternalModules2_0.ts, 7, 5)) ->c : Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>c : Symbol(extMod.m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 25)) extMod.m4.fooExport(); >extMod.m4.fooExport : Symbol(extMod.m4.fooExport, Decl(commentsExternalModules2_0.ts, 41, 5)) @@ -31,17 +31,17 @@ extMod.m4.fooExport(); export var newVar2 = new extMod.m4.m2.c(); >newVar2 : Symbol(newVar2, Decl(commentsExternalModules_1.ts, 5, 10)) ->extMod.m4.m2.c : Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>extMod.m4.m2.c : Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 25)) >extMod.m4.m2 : Symbol(extMod.m4.m2, Decl(commentsExternalModules2_0.ts, 32, 5)) >extMod.m4 : Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 22, 26)) >extMod : Symbol(extMod, Decl(commentsExternalModules_1.ts, 0, 0)) >m4 : Symbol(extMod.m4, Decl(commentsExternalModules2_0.ts, 22, 26)) >m2 : Symbol(extMod.m4.m2, Decl(commentsExternalModules2_0.ts, 32, 5)) ->c : Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>c : Symbol(extMod.m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 25)) === commentsExternalModules2_0.ts === /** Module comment*/ -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(commentsExternalModules2_0.ts, 0, 0)) /** b's comment*/ @@ -56,18 +56,18 @@ export module m1 { >b : Symbol(b, Decl(commentsExternalModules2_0.ts, 3, 14)) } /** m2 comments*/ - export module m2 { + export namespace m2 { >m2 : Symbol(m2, Decl(commentsExternalModules2_0.ts, 7, 5)) /** class comment;*/ export class c { ->c : Symbol(c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>c : Symbol(c, Decl(commentsExternalModules2_0.ts, 9, 25)) }; /** i*/ export var i = new c(); >i : Symbol(i, Decl(commentsExternalModules2_0.ts, 14, 18)) ->c : Symbol(c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>c : Symbol(c, Decl(commentsExternalModules2_0.ts, 9, 25)) } /** exported function*/ export function fooExport() { @@ -84,14 +84,14 @@ m1.fooExport(); var myvar = new m1.m2.c(); >myvar : Symbol(myvar, Decl(commentsExternalModules2_0.ts, 22, 3)) ->m1.m2.c : Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>m1.m2.c : Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 25)) >m1.m2 : Symbol(m1.m2, Decl(commentsExternalModules2_0.ts, 7, 5)) >m1 : Symbol(m1, Decl(commentsExternalModules2_0.ts, 0, 0)) >m2 : Symbol(m1.m2, Decl(commentsExternalModules2_0.ts, 7, 5)) ->c : Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 22)) +>c : Symbol(m1.m2.c, Decl(commentsExternalModules2_0.ts, 9, 25)) /** Module comment */ -export module m4 { +export namespace m4 { >m4 : Symbol(m4, Decl(commentsExternalModules2_0.ts, 22, 26)) /** b's comment */ @@ -108,18 +108,18 @@ export module m4 { } /** m2 comments */ - export module m2 { + export namespace m2 { >m2 : Symbol(m2, Decl(commentsExternalModules2_0.ts, 32, 5)) /** class comment; */ export class c { ->c : Symbol(c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>c : Symbol(c, Decl(commentsExternalModules2_0.ts, 35, 25)) }; /** i */ export var i = new c(); >i : Symbol(i, Decl(commentsExternalModules2_0.ts, 40, 18)) ->c : Symbol(c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>c : Symbol(c, Decl(commentsExternalModules2_0.ts, 35, 25)) } /** exported function */ export function fooExport() { @@ -136,9 +136,9 @@ m4.fooExport(); var myvar2 = new m4.m2.c(); >myvar2 : Symbol(myvar2, Decl(commentsExternalModules2_0.ts, 48, 3)) ->m4.m2.c : Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>m4.m2.c : Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 25)) >m4.m2 : Symbol(m4.m2, Decl(commentsExternalModules2_0.ts, 32, 5)) >m4 : Symbol(m4, Decl(commentsExternalModules2_0.ts, 22, 26)) >m2 : Symbol(m4.m2, Decl(commentsExternalModules2_0.ts, 32, 5)) ->c : Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 22)) +>c : Symbol(m4.m2.c, Decl(commentsExternalModules2_0.ts, 35, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.types b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.types index 7e2000fe3f..5bf09b9e42 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.types +++ b/testdata/baselines/reference/submodule/compiler/commentsExternalModules3.types @@ -45,7 +45,7 @@ export var newVar2 = new extMod.m4.m2.c(); === commentsExternalModules2_0.ts === /** Module comment*/ -export module m1 { +export namespace m1 { >m1 : typeof m1 /** b's comment*/ @@ -60,7 +60,7 @@ export module m1 { >b : number } /** m2 comments*/ - export module m2 { + export namespace m2 { >m2 : typeof m2 /** class comment;*/ @@ -99,7 +99,7 @@ var myvar = new m1.m2.c(); >c : typeof m1.m2.c /** Module comment */ -export module m4 { +export namespace m4 { >m4 : typeof m4 /** b's comment */ @@ -116,7 +116,7 @@ export module m4 { } /** m2 comments */ - export module m2 { + export namespace m2 { >m2 : typeof m2 /** class comment; */ diff --git a/testdata/baselines/reference/submodule/compiler/commentsFormatting.js b/testdata/baselines/reference/submodule/compiler/commentsFormatting.js index 63e8b964b0..519b977f29 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsFormatting.js +++ b/testdata/baselines/reference/submodule/compiler/commentsFormatting.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/commentsFormatting.ts] //// //// [commentsFormatting.ts] -module m { +namespace m { /** this is first line - aligned to class declaration * this is 4 spaces left aligned * this is 3 spaces left aligned diff --git a/testdata/baselines/reference/submodule/compiler/commentsFormatting.js.diff b/testdata/baselines/reference/submodule/compiler/commentsFormatting.js.diff index ce6fdd6ae9..23fca7200a 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsFormatting.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsFormatting.js.diff @@ -9,8 +9,17 @@ * this is 3 spaces left aligned * this is 2 spaces left aligned * this is 1 spaces left aligned -@@= skipped -17, +17 lines =@@ - } +@@= skipped -13, +13 lines =@@ + * this is 6 spaces right aligned + * this is 7 spaces right aligned + * this is 8 spaces right aligned */ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } m.c = c; /** this is first line - 4 spaces right aligned to class but in js file should be aligned to class declaration -* this is 8 spaces left aligned @@ -26,7 +35,17 @@ * this is 3 spaces left aligned * this is 2 spaces left aligned * this is 1 spaces left aligned -@@= skipped -22, +22 lines =@@ +@@= skipped -24, +21 lines =@@ + * this is 6 spaces right aligned + * this is 7 spaces right aligned + * this is 8 spaces right aligned */ +- var c2 = /** @class */ (function () { +- function c2() { +- } +- return c2; +- }()); ++ class c2 { ++ } m.c2 = c2; /** this is comment with new lines in between @@ -35,7 +54,35 @@ this is 3 spaces left aligned but above line is empty -@@= skipped -50, +50 lines =@@ +@@= skipped -32, +29 lines =@@ + + + above 3 lines are empty*/ +- var c3 = /** @class */ (function () { +- function c3() { +- } +- return c3; +- }()); ++ class c3 { ++ } + m.c3 = c3; + /** this is first line - aligned to class declaration + * this is 0 space + tab +@@= skipped -20, +17 lines =@@ + * this is 10 spaces + tab + * this is 11 spaces + tab + * this is 12 spaces + tab */ +- var c4 = /** @class */ (function () { +- function c4() { +- } +- return c4; +- }()); ++ class c4 { ++ } + m.c4 = c4; + })(m || (m = {})); + +@@= skipped -12, +9 lines =@@ //// [commentsFormatting.d.ts] declare namespace m { /** this is first line - aligned to class declaration diff --git a/testdata/baselines/reference/submodule/compiler/commentsFormatting.symbols b/testdata/baselines/reference/submodule/compiler/commentsFormatting.symbols index 787e3bfb67..adde19a1cb 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsFormatting.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsFormatting.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/commentsFormatting.ts] //// === commentsFormatting.ts === -module m { +namespace m { >m : Symbol(m, Decl(commentsFormatting.ts, 0, 0)) /** this is first line - aligned to class declaration @@ -19,7 +19,7 @@ module m { * this is 7 spaces right aligned * this is 8 spaces right aligned */ export class c { ->c : Symbol(c, Decl(commentsFormatting.ts, 0, 10)) +>c : Symbol(c, Decl(commentsFormatting.ts, 0, 13)) } /** this is first line - 4 spaces right aligned to class but in js file should be aligned to class declaration diff --git a/testdata/baselines/reference/submodule/compiler/commentsFormatting.types b/testdata/baselines/reference/submodule/compiler/commentsFormatting.types index 8fd8c75abd..e812e331ab 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsFormatting.types +++ b/testdata/baselines/reference/submodule/compiler/commentsFormatting.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/commentsFormatting.ts] //// === commentsFormatting.ts === -module m { +namespace m { >m : typeof m /** this is first line - aligned to class declaration diff --git a/testdata/baselines/reference/submodule/compiler/commentsFunction.js.diff b/testdata/baselines/reference/submodule/compiler/commentsFunction.js.diff index b3785b6487..77f15a2700 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsFunction.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsFunction.js.diff @@ -1,6 +1,30 @@ --- old.commentsFunction.js +++ new.commentsFunction.js -@@= skipped -110, +110 lines =@@ +@@= skipped -74, +74 lines =@@ + return b; + }; + /// lamdaFoo var comment +-var lambdaFoo = /** this is lambda comment*/ function (/**param a*/ a, /**param b*/ b) { return a + b; }; +-var lambddaNoVarComment = /** this is lambda multiplication*/ function (/**param a*/ a, /**param b*/ b) { return a * b; }; ++var lambdaFoo = /** this is lambda comment*/ (/**param a*/ a, /**param b*/ b) => a + b; ++var lambddaNoVarComment = /** this is lambda multiplication*/ (/**param a*/ a, /**param b*/ b) => a * b; + lambdaFoo(10, 20); + lambddaNoVarComment(10, 20); + function blah(a /* multiline trailing comment +@@= skipped -12, +12 lines =@@ + function blah3(a // trailing commen single line + ) { + } +-lambdaFoo = function (a, b) { return a * b; }; // This is trailing comment +-/*leading comment*/ (function () { return 0; }); // Needs to be wrapped in parens to be a valid expression (not declaration) +-/*leading comment*/ (function () { return 0; }); //trailing comment ++lambdaFoo = (a, b) => a * b; // This is trailing comment ++/*leading comment*/ () => 0; // Needs to be wrapped in parens to be a valid expression (not declaration) ++/*leading comment*/ (() => 0); //trailing comment + function blah4(/*1*/ a /*2*/, /*3*/ b /*4*/) { + } + function foo1() { +@@= skipped -24, +24 lines =@@ /** fooFunc * comment */ diff --git a/testdata/baselines/reference/submodule/compiler/commentsInheritance.js.diff b/testdata/baselines/reference/submodule/compiler/commentsInheritance.js.diff index db52af6aee..98e29f21d2 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsInheritance.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsInheritance.js.diff @@ -1,80 +1,206 @@ --- old.commentsInheritance.js +++ new.commentsInheritance.js -@@= skipped -153, +153 lines =@@ +@@= skipped -152, +152 lines =@@ + //// [commentsInheritance.js] - class c1 { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var c1 = /** @class */ (function () { +- function c1() { +- } ++class c1 { + i1_p1; // i1_f1 - i1_f1() { - } +- c1.prototype.i1_f1 = function () { +- }; +- c1.prototype.i1_nc_f1 = function () { +- }; ++ i1_f1() { ++ } + i1_l1; + i1_nc_p1; - i1_nc_f1() { - } ++ i1_nc_f1() { ++ } + i1_nc_l1; + /** c1_p1*/ + p1; /** c1_f1*/ - f1() { - } +- c1.prototype.f1 = function () { +- }; ++ f1() { ++ } + /** c1_l1*/ + l1; + /** c1_nc_p1*/ + nc_p1; /** c1_nc_f1*/ - nc_f1() { - } +- c1.prototype.nc_f1 = function () { +- }; +- return c1; +-}()); ++ nc_f1() { ++ } + /** c1_nc_l1*/ + nc_l1; - } ++} var i1_i; var c1_i = new c1(); // assign to interface i1_i = c1_i; - class c2 { +-var c2 = /** @class */ (function () { +- /** c2 constructor*/ +- function c2(a) { +- this.c2_p1 = a; +- } ++class c2 { + /** c2 c2_p1*/ + c2_p1; /** c2 c2_f1*/ - c2_f1() { - } -@@= skipped -24, +38 lines =@@ - get c2_prop() { - return 10; - } +- c2.prototype.c2_f1 = function () { +- }; +- Object.defineProperty(c2.prototype, "c2_prop", { +- /** c2 c2_prop*/ +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); +- c2.prototype.c2_nc_f1 = function () { +- }; +- Object.defineProperty(c2.prototype, "c2_nc_prop", { +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); ++ c2_f1() { ++ } ++ /** c2 c2_prop*/ ++ get c2_prop() { ++ return 10; ++ } + c2_nc_p1; - c2_nc_f1() { - } - get c2_nc_prop() { - return 10; - } ++ c2_nc_f1() { ++ } ++ get c2_nc_prop() { ++ return 10; ++ } + /** c2 p1*/ + p1; /** c2 f1*/ - f1() { - } -@@= skipped -12, +15 lines =@@ - get prop() { - return 10; - } +- c2.prototype.f1 = function () { +- }; +- Object.defineProperty(c2.prototype, "prop", { +- /** c2 prop*/ +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); +- c2.prototype.nc_f1 = function () { +- }; +- Object.defineProperty(c2.prototype, "nc_prop", { +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); +- return c2; +-}()); +-var c3 = /** @class */ (function (_super) { +- __extends(c3, _super); +- function c3() { +- return _super.call(this, 10) || this; +- } ++ f1() { ++ } ++ /** c2 prop*/ ++ get prop() { ++ return 10; ++ } + nc_p1; - nc_f1() { - } - get nc_prop() { -@@= skipped -14, +15 lines =@@ - constructor() { - super(10); - } ++ nc_f1() { ++ } ++ get nc_prop() { ++ return 10; ++ } ++ /** c2 constructor*/ ++ constructor(a) { ++ this.c2_p1 = a; ++ } ++} ++class c3 extends c2 { ++ constructor() { ++ super(10); ++ } + /** c3 p1*/ + p1; /** c3 f1*/ - f1() { - } -@@= skipped -7, +9 lines =@@ - get prop() { - return 10; - } +- c3.prototype.f1 = function () { +- }; +- Object.defineProperty(c3.prototype, "prop", { +- /** c3 prop*/ +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); +- c3.prototype.nc_f1 = function () { +- }; +- Object.defineProperty(c3.prototype, "nc_prop", { +- get: function () { +- return 10; +- }, +- enumerable: false, +- configurable: true +- }); +- return c3; +-}(c2)); ++ f1() { ++ } ++ /** c3 prop*/ ++ get prop() { ++ return 10; ++ } + nc_p1; - nc_f1() { - } - get nc_prop() { \ No newline at end of file ++ nc_f1() { ++ } ++ get nc_prop() { ++ return 10; ++ } ++} + var c2_i = new c2(10); + var c3_i = new c3(); + // assign + c2_i = c3_i; +-var c4 = /** @class */ (function (_super) { +- __extends(c4, _super); +- function c4() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return c4; +-}(c2)); ++class c4 extends c2 { ++} + var c4_i = new c4(10); + var i2_i; + var i3_i; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsInterface.js.diff b/testdata/baselines/reference/submodule/compiler/commentsInterface.js.diff index 0b90da5261..403958f934 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsInterface.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsInterface.js.diff @@ -4,7 +4,7 @@ var i2_i_nc_fnfoo_r = i2_i.nc_fnfoo(10); var i3_i; i3_i = { -- f: /**own f*/ (/**i3_i a*/ a) => "Hello" + a, +- f: /**own f*/ function (/**i3_i a*/ a) { return "Hello" + a; }, + f: (/**i3_i a*/ a) => "Hello" + a, l: this.f, /** own x*/ diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.js b/testdata/baselines/reference/submodule/compiler/commentsModules.js index 90ad9d5eb1..9aab60f881 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.js +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.js @@ -2,7 +2,7 @@ //// [commentsModules.ts] /** Module comment*/ -module m1 { +namespace m1 { /** b's comment*/ export var b: number; /** foo's comment*/ @@ -10,7 +10,7 @@ module m1 { return b; } /** m2 comments*/ - export module m2 { + export namespace m2 { /** class comment;*/ export class c { }; @@ -41,22 +41,22 @@ module m1 { m1.fooExport(); var myvar = new m1.m2.c(); /** module comment of m2.m3*/ -module m2.m3 { +namespace m2.m3 { /** Exported class comment*/ export class c { } } /* trailing dotted module comment*/ new m2.m3.c(); /** module comment of m3.m4.m5*/ -module m3.m4.m5 { +namespace m3.m4.m5 { /** Exported class comment*/ export class c { } } // trailing dotted module 2 new m3.m4.m5.c(); /** module comment of m4.m5.m6*/ -module m4.m5.m6 { - export module m7 { +namespace m4.m5.m6 { + export namespace m7 { /** Exported class comment*/ export class c { } @@ -64,26 +64,26 @@ module m4.m5.m6 { } new m4.m5.m6.m7.c(); /** module comment of m5.m6.m7*/ -module m5.m6.m7 { +namespace m5.m6.m7 { /** module m8 comment*/ - export module m8 { + export namespace m8 { /** Exported class comment*/ export class c { } } } new m5.m6.m7.m8.c(); -module m6.m7 { - export module m8 { +namespace m6.m7 { + export namespace m8 { /** Exported class comment*/ export class c { } } } new m6.m7.m8.c(); -module m7.m8 { +namespace m7.m8 { /** module m9 comment*/ - export module m9 { + export namespace m9 { /** Exported class comment*/ export class c { } diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.js.diff b/testdata/baselines/reference/submodule/compiler/commentsModules.js.diff index cde872d831..f236998d8e 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.js.diff @@ -1,6 +1,24 @@ --- old.commentsModules.js +++ new.commentsModules.js -@@= skipped -143, +143 lines =@@ +@@= skipped -107, +107 lines =@@ + return m1.b; + } + /** m2 comments*/ +- var m2; ++ let m2; + (function (m2) { + /** class comment;*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m2.c = c; + ; + /** i*/ +@@= skipped -39, +36 lines =@@ /** module comment of m2.m3*/ var m2; (function (m2) { @@ -8,8 +26,17 @@ + let m3; (function (m3) { /** Exported class comment*/ - class c { -@@= skipped -12, +12 lines =@@ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m3.c = c; + })(m3 = m2.m3 || (m2.m3 = {})); + })(m2 || (m2 = {})); /* trailing dotted module comment*/ +@@= skipped -15, +12 lines =@@ /** module comment of m3.m4.m5*/ var m3; (function (m3) { @@ -20,8 +47,17 @@ + let m5; (function (m5) { /** Exported class comment*/ - class c { -@@= skipped -15, +15 lines =@@ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m5.c = c; + })(m5 = m4.m5 || (m4.m5 = {})); + })(m4 = m3.m4 || (m3.m4 = {})); +@@= skipped -18, +15 lines =@@ /** module comment of m4.m5.m6*/ var m4; (function (m4) { @@ -31,9 +67,21 @@ - var m6; + let m6; (function (m6) { - let m7; +- var m7; ++ let m7; (function (m7) { -@@= skipped -18, +18 lines =@@ + /** Exported class comment*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m7.c = c; + })(m7 = m6.m7 || (m6.m7 = {})); /* trailing inner module */ /* multiple comments*/ + })(m6 = m5.m6 || (m5.m6 = {})); +@@= skipped -21, +18 lines =@@ /** module comment of m5.m6.m7*/ var m5; (function (m5) { @@ -44,17 +92,42 @@ + let m7; (function (m7) { /** module m8 comment*/ - let m8; -@@= skipped -18, +18 lines =@@ +- var m8; ++ let m8; + (function (m8) { + /** Exported class comment*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m8.c = c; + })(m8 = m7.m8 || (m7.m8 = {})); + })(m7 = m6.m7 || (m6.m7 = {})); +@@= skipped -21, +18 lines =@@ new m5.m6.m7.m8.c(); var m6; (function (m6) { - var m7; + let m7; (function (m7) { - let m8; +- var m8; ++ let m8; (function (m8) { -@@= skipped -14, +14 lines =@@ + /** Exported class comment*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m8.c = c; + })(m8 = m7.m8 || (m7.m8 = {})); + })(m7 = m6.m7 || (m6.m7 = {})); +@@= skipped -17, +14 lines =@@ new m6.m7.m8.c(); var m7; (function (m7) { @@ -62,4 +135,34 @@ + let m8; (function (m8) { /** module m9 comment*/ - let m9; \ No newline at end of file +- var m9; ++ let m9; + (function (m9) { + /** Exported class comment*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + m9.c = c; + /** class d */ +- var d = /** @class */ (function () { +- function d() { +- } +- return d; +- }()); ++ class d { ++ } + // class e +- var e = /** @class */ (function () { +- function e() { +- } +- return e; +- }()); ++ class e { ++ } + m9.e = e; + })(m9 = m8.m9 || (m8.m9 = {})); + })(m8 = m7.m8 || (m7.m8 = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols index ef00aa1746..1fd0523c7a 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.symbols @@ -2,7 +2,7 @@ === commentsModules.ts === /** Module comment*/ -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(commentsModules.ts, 0, 0)) /** b's comment*/ @@ -17,18 +17,18 @@ module m1 { >b : Symbol(b, Decl(commentsModules.ts, 3, 14)) } /** m2 comments*/ - export module m2 { + export namespace m2 { >m2 : Symbol(m2, Decl(commentsModules.ts, 7, 5)) /** class comment;*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 9, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 9, 25)) }; /** i*/ export var i = new c(); >i : Symbol(i, Decl(commentsModules.ts, 14, 18)) ->c : Symbol(c, Decl(commentsModules.ts, 9, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 9, 25)) } /** exported function*/ export function fooExport() { @@ -65,135 +65,135 @@ m1.fooExport(); var myvar = new m1.m2.c(); >myvar : Symbol(myvar, Decl(commentsModules.ts, 38, 3)) ->m1.m2.c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22)) +>m1.m2.c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 25)) >m1.m2 : Symbol(m1.m2, Decl(commentsModules.ts, 7, 5)) >m1 : Symbol(m1, Decl(commentsModules.ts, 0, 0)) >m2 : Symbol(m1.m2, Decl(commentsModules.ts, 7, 5)) ->c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 22)) +>c : Symbol(m1.m2.c, Decl(commentsModules.ts, 9, 25)) /** module comment of m2.m3*/ -module m2.m3 { +namespace m2.m3 { >m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26)) ->m3 : Symbol(m3, Decl(commentsModules.ts, 40, 10)) +>m3 : Symbol(m3, Decl(commentsModules.ts, 40, 13)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 40, 14)) +>c : Symbol(c, Decl(commentsModules.ts, 40, 17)) } } /* trailing dotted module comment*/ new m2.m3.c(); ->m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14)) ->m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10)) +>m2.m3.c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 17)) +>m2.m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 13)) >m2 : Symbol(m2, Decl(commentsModules.ts, 38, 26)) ->m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 10)) ->c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 14)) +>m3 : Symbol(m2.m3, Decl(commentsModules.ts, 40, 13)) +>c : Symbol(m2.m3.c, Decl(commentsModules.ts, 40, 17)) /** module comment of m3.m4.m5*/ -module m3.m4.m5 { +namespace m3.m4.m5 { >m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14)) ->m4 : Symbol(m4, Decl(commentsModules.ts, 47, 10)) ->m5 : Symbol(m5, Decl(commentsModules.ts, 47, 13)) +>m4 : Symbol(m4, Decl(commentsModules.ts, 47, 13)) +>m5 : Symbol(m5, Decl(commentsModules.ts, 47, 16)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 47, 17)) +>c : Symbol(c, Decl(commentsModules.ts, 47, 20)) } } // trailing dotted module 2 new m3.m4.m5.c(); ->m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17)) ->m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13)) ->m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10)) +>m3.m4.m5.c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 20)) +>m3.m4.m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 16)) +>m3.m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 13)) >m3 : Symbol(m3, Decl(commentsModules.ts, 45, 14)) ->m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 10)) ->m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 13)) ->c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 17)) +>m4 : Symbol(m3.m4, Decl(commentsModules.ts, 47, 13)) +>m5 : Symbol(m3.m4.m5, Decl(commentsModules.ts, 47, 16)) +>c : Symbol(m3.m4.m5.c, Decl(commentsModules.ts, 47, 20)) /** module comment of m4.m5.m6*/ -module m4.m5.m6 { +namespace m4.m5.m6 { >m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17)) ->m5 : Symbol(m5, Decl(commentsModules.ts, 54, 10)) ->m6 : Symbol(m6, Decl(commentsModules.ts, 54, 13)) +>m5 : Symbol(m5, Decl(commentsModules.ts, 54, 13)) +>m6 : Symbol(m6, Decl(commentsModules.ts, 54, 16)) - export module m7 { ->m7 : Symbol(m7, Decl(commentsModules.ts, 54, 17)) + export namespace m7 { +>m7 : Symbol(m7, Decl(commentsModules.ts, 54, 20)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 55, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 55, 25)) } } /* trailing inner module */ /* multiple comments*/ } new m4.m5.m6.m7.c(); ->m4.m5.m6.m7.c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22)) ->m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17)) ->m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13)) ->m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10)) +>m4.m5.m6.m7.c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 25)) +>m4.m5.m6.m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 20)) +>m4.m5.m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 16)) +>m4.m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 13)) >m4 : Symbol(m4, Decl(commentsModules.ts, 52, 17)) ->m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 10)) ->m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 13)) ->m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 17)) ->c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 22)) +>m5 : Symbol(m4.m5, Decl(commentsModules.ts, 54, 13)) +>m6 : Symbol(m4.m5.m6, Decl(commentsModules.ts, 54, 16)) +>m7 : Symbol(m4.m5.m6.m7, Decl(commentsModules.ts, 54, 20)) +>c : Symbol(m4.m5.m6.m7.c, Decl(commentsModules.ts, 55, 25)) /** module comment of m5.m6.m7*/ -module m5.m6.m7 { +namespace m5.m6.m7 { >m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20)) ->m6 : Symbol(m6, Decl(commentsModules.ts, 63, 10)) ->m7 : Symbol(m7, Decl(commentsModules.ts, 63, 13)) +>m6 : Symbol(m6, Decl(commentsModules.ts, 63, 13)) +>m7 : Symbol(m7, Decl(commentsModules.ts, 63, 16)) /** module m8 comment*/ - export module m8 { ->m8 : Symbol(m8, Decl(commentsModules.ts, 63, 17)) + export namespace m8 { +>m8 : Symbol(m8, Decl(commentsModules.ts, 63, 20)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 65, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 65, 25)) } } } new m5.m6.m7.m8.c(); ->m5.m6.m7.m8.c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22)) ->m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17)) ->m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13)) ->m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10)) +>m5.m6.m7.m8.c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 25)) +>m5.m6.m7.m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 20)) +>m5.m6.m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 16)) +>m5.m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 13)) >m5 : Symbol(m5, Decl(commentsModules.ts, 61, 20)) ->m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 10)) ->m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 13)) ->m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 17)) ->c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 22)) +>m6 : Symbol(m5.m6, Decl(commentsModules.ts, 63, 13)) +>m7 : Symbol(m5.m6.m7, Decl(commentsModules.ts, 63, 16)) +>m8 : Symbol(m5.m6.m7.m8, Decl(commentsModules.ts, 63, 20)) +>c : Symbol(m5.m6.m7.m8.c, Decl(commentsModules.ts, 65, 25)) -module m6.m7 { +namespace m6.m7 { >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) ->m7 : Symbol(m7, Decl(commentsModules.ts, 72, 10)) +>m7 : Symbol(m7, Decl(commentsModules.ts, 72, 13)) - export module m8 { ->m8 : Symbol(m8, Decl(commentsModules.ts, 72, 14)) + export namespace m8 { +>m8 : Symbol(m8, Decl(commentsModules.ts, 72, 17)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 73, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 73, 25)) } } } new m6.m7.m8.c(); ->m6.m7.m8.c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22)) ->m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14)) ->m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10)) +>m6.m7.m8.c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 25)) +>m6.m7.m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 17)) +>m6.m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 13)) >m6 : Symbol(m6, Decl(commentsModules.ts, 71, 20)) ->m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 10)) ->m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 14)) ->c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 22)) +>m7 : Symbol(m6.m7, Decl(commentsModules.ts, 72, 13)) +>m8 : Symbol(m6.m7.m8, Decl(commentsModules.ts, 72, 17)) +>c : Symbol(m6.m7.m8.c, Decl(commentsModules.ts, 73, 25)) -module m7.m8 { +namespace m7.m8 { >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) ->m8 : Symbol(m8, Decl(commentsModules.ts, 80, 10)) +>m8 : Symbol(m8, Decl(commentsModules.ts, 80, 13)) /** module m9 comment*/ - export module m9 { ->m9 : Symbol(m9, Decl(commentsModules.ts, 80, 14)) + export namespace m9 { +>m9 : Symbol(m9, Decl(commentsModules.ts, 80, 17)) /** Exported class comment*/ export class c { ->c : Symbol(c, Decl(commentsModules.ts, 82, 22)) +>c : Symbol(c, Decl(commentsModules.ts, 82, 25)) } /** class d */ @@ -208,11 +208,11 @@ module m7.m8 { } } new m7.m8.m9.c(); ->m7.m8.m9.c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22)) ->m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14)) ->m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10)) +>m7.m8.m9.c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 25)) +>m7.m8.m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 17)) +>m7.m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 13)) >m7 : Symbol(m7, Decl(commentsModules.ts, 79, 17)) ->m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 10)) ->m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 14)) ->c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 22)) +>m8 : Symbol(m7.m8, Decl(commentsModules.ts, 80, 13)) +>m9 : Symbol(m7.m8.m9, Decl(commentsModules.ts, 80, 17)) +>c : Symbol(m7.m8.m9.c, Decl(commentsModules.ts, 82, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/commentsModules.types b/testdata/baselines/reference/submodule/compiler/commentsModules.types index 04a27551db..1a687d574e 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsModules.types +++ b/testdata/baselines/reference/submodule/compiler/commentsModules.types @@ -2,7 +2,7 @@ === commentsModules.ts === /** Module comment*/ -module m1 { +namespace m1 { >m1 : typeof m1 /** b's comment*/ @@ -17,7 +17,7 @@ module m1 { >b : number } /** m2 comments*/ - export module m2 { + export namespace m2 { >m2 : typeof m2 /** class comment;*/ @@ -76,7 +76,7 @@ var myvar = new m1.m2.c(); >c : typeof m1.m2.c /** module comment of m2.m3*/ -module m2.m3 { +namespace m2.m3 { >m2 : typeof m2 >m3 : typeof m3 @@ -94,7 +94,7 @@ new m2.m3.c(); >c : typeof m2.m3.c /** module comment of m3.m4.m5*/ -module m3.m4.m5 { +namespace m3.m4.m5 { >m3 : typeof m3 >m4 : typeof m4 >m5 : typeof m5 @@ -115,12 +115,12 @@ new m3.m4.m5.c(); >c : typeof m3.m4.m5.c /** module comment of m4.m5.m6*/ -module m4.m5.m6 { +namespace m4.m5.m6 { >m4 : typeof m4 >m5 : typeof m5 >m6 : typeof m6 - export module m7 { + export namespace m7 { >m7 : typeof m7 /** Exported class comment*/ @@ -142,13 +142,13 @@ new m4.m5.m6.m7.c(); >c : typeof m4.m5.m6.m7.c /** module comment of m5.m6.m7*/ -module m5.m6.m7 { +namespace m5.m6.m7 { >m5 : typeof m5 >m6 : typeof m6 >m7 : typeof m7 /** module m8 comment*/ - export module m8 { + export namespace m8 { >m8 : typeof m8 /** Exported class comment*/ @@ -169,11 +169,11 @@ new m5.m6.m7.m8.c(); >m8 : typeof m5.m6.m7.m8 >c : typeof m5.m6.m7.m8.c -module m6.m7 { +namespace m6.m7 { >m6 : typeof m6 >m7 : typeof m7 - export module m8 { + export namespace m8 { >m8 : typeof m8 /** Exported class comment*/ @@ -192,12 +192,12 @@ new m6.m7.m8.c(); >m8 : typeof m6.m7.m8 >c : typeof m6.m7.m8.c -module m7.m8 { +namespace m7.m8 { >m7 : typeof m7 >m8 : typeof m8 /** module m9 comment*/ - export module m9 { + export namespace m9 { >m9 : typeof m9 /** Exported class comment*/ diff --git a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js index a7cdd960d1..7a99c4fd60 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js +++ b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js @@ -2,7 +2,7 @@ //// [commentsMultiModuleSingleFile.ts] /** this is multi declare module*/ -module multiM { +namespace multiM { /** class b*/ export class b { } @@ -13,7 +13,7 @@ module multiM { } /// this is multi module 2 -module multiM { +namespace multiM { /** class c comment*/ export class c { } diff --git a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js.diff b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js.diff new file mode 100644 index 0000000000..158662ad53 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.js.diff @@ -0,0 +1,46 @@ +--- old.commentsMultiModuleSingleFile.js ++++ new.commentsMultiModuleSingleFile.js +@@= skipped -29, +29 lines =@@ + var multiM; + (function (multiM) { + /** class b*/ +- var b = /** @class */ (function () { +- function b() { +- } +- return b; +- }()); ++ class b { ++ } + multiM.b = b; + // class d +- var d = /** @class */ (function () { +- function d() { +- } +- return d; +- }()); ++ class d { ++ } + multiM.d = d; + })(multiM || (multiM = {})); + /// this is multi module 2 + (function (multiM) { + /** class c comment*/ +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + multiM.c = c; + /// class e +- var e = /** @class */ (function () { +- function e() { +- } +- return e; +- }()); ++ class e { ++ } + multiM.e = e; + })(multiM || (multiM = {})); + new multiM.b(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.symbols b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.symbols index 166faf37d3..d0e9685815 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.symbols @@ -2,12 +2,12 @@ === commentsMultiModuleSingleFile.ts === /** this is multi declare module*/ -module multiM { +namespace multiM { >multiM : Symbol(multiM, Decl(commentsMultiModuleSingleFile.ts, 0, 0), Decl(commentsMultiModuleSingleFile.ts, 9, 1)) /** class b*/ export class b { ->b : Symbol(b, Decl(commentsMultiModuleSingleFile.ts, 1, 15)) +>b : Symbol(b, Decl(commentsMultiModuleSingleFile.ts, 1, 18)) } // class d @@ -17,12 +17,12 @@ module multiM { } /// this is multi module 2 -module multiM { +namespace multiM { >multiM : Symbol(multiM, Decl(commentsMultiModuleSingleFile.ts, 0, 0), Decl(commentsMultiModuleSingleFile.ts, 9, 1)) /** class c comment*/ export class c { ->c : Symbol(c, Decl(commentsMultiModuleSingleFile.ts, 12, 15)) +>c : Symbol(c, Decl(commentsMultiModuleSingleFile.ts, 12, 18)) } /// class e @@ -31,12 +31,12 @@ module multiM { } } new multiM.b(); ->multiM.b : Symbol(multiM.b, Decl(commentsMultiModuleSingleFile.ts, 1, 15)) +>multiM.b : Symbol(multiM.b, Decl(commentsMultiModuleSingleFile.ts, 1, 18)) >multiM : Symbol(multiM, Decl(commentsMultiModuleSingleFile.ts, 0, 0), Decl(commentsMultiModuleSingleFile.ts, 9, 1)) ->b : Symbol(multiM.b, Decl(commentsMultiModuleSingleFile.ts, 1, 15)) +>b : Symbol(multiM.b, Decl(commentsMultiModuleSingleFile.ts, 1, 18)) new multiM.c(); ->multiM.c : Symbol(multiM.c, Decl(commentsMultiModuleSingleFile.ts, 12, 15)) +>multiM.c : Symbol(multiM.c, Decl(commentsMultiModuleSingleFile.ts, 12, 18)) >multiM : Symbol(multiM, Decl(commentsMultiModuleSingleFile.ts, 0, 0), Decl(commentsMultiModuleSingleFile.ts, 9, 1)) ->c : Symbol(multiM.c, Decl(commentsMultiModuleSingleFile.ts, 12, 15)) +>c : Symbol(multiM.c, Decl(commentsMultiModuleSingleFile.ts, 12, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.types b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.types index 15ac0c21ca..6cd0f69e06 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.types +++ b/testdata/baselines/reference/submodule/compiler/commentsMultiModuleSingleFile.types @@ -2,7 +2,7 @@ === commentsMultiModuleSingleFile.ts === /** this is multi declare module*/ -module multiM { +namespace multiM { >multiM : typeof multiM /** class b*/ @@ -17,7 +17,7 @@ module multiM { } /// this is multi module 2 -module multiM { +namespace multiM { >multiM : typeof multiM /** class c comment*/ diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js.diff index 3412a076f7..08e57cbda8 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js.diff @@ -1,8 +1,15 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=auto).js -@@= skipped -25, +25 lines =@@ - class Component { - render() { +@@= skipped -22, +22 lines =@@ + } + + //// [commentsOnJSXExpressionsArePreserved.jsx] +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { return

- {/* missing */} + @@ -22,5 +29,8 @@ + +
; - } - } \ No newline at end of file +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff index 007a5daddd..393e0b6c34 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js.diff @@ -1,8 +1,15 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=force).js -@@= skipped -27, +27 lines =@@ - class Component { - render() { +@@= skipped -24, +24 lines =@@ + //// [commentsOnJSXExpressionsArePreserved.jsx] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { return
- {/* missing */} + @@ -22,5 +29,8 @@ + +
; - } - } \ No newline at end of file +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js.diff index ab82309f7f..4a07ffee5f 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js.diff @@ -1,8 +1,15 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=preserve,module=commonjs,moduledetection=legacy).js -@@= skipped -25, +25 lines =@@ - class Component { - render() { +@@= skipped -22, +22 lines =@@ + } + + //// [commentsOnJSXExpressionsArePreserved.jsx] +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { return
- {/* missing */} + @@ -22,5 +29,8 @@ + +
; - } - } \ No newline at end of file +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js.diff new file mode 100644 index 0000000000..46473a897c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js.diff @@ -0,0 +1,18 @@ +--- old.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js ++++ new.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=auto).js +@@= skipped -22, +22 lines =@@ + } + + //// [commentsOnJSXExpressionsArePreserved.js] +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { + return React.createElement("div", null, null /* preserved */); +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff new file mode 100644 index 0000000000..5f9cb645d3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js.diff @@ -0,0 +1,18 @@ +--- old.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js ++++ new.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=force).js +@@= skipped -24, +24 lines =@@ + //// [commentsOnJSXExpressionsArePreserved.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { + return React.createElement("div", null, null /* preserved */); +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js.diff new file mode 100644 index 0000000000..dd1d68c55a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js.diff @@ -0,0 +1,18 @@ +--- old.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js ++++ new.commentsOnJSXExpressionsArePreserved(jsx=react,module=commonjs,moduledetection=legacy).js +@@= skipped -22, +22 lines =@@ + } + + //// [commentsOnJSXExpressionsArePreserved.js] +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.render = function () { ++class Component { ++ render() { + return React.createElement("div", null, null /* preserved */); +- }; +- return Component; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=auto).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=auto).js.diff index 1eb2d90098..9fc95fbd66 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=auto).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=auto).js.diff @@ -5,10 +5,16 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); +-var Component = /** @class */ (function () { +- function Component() { +const jsx_runtime_1 = require("react/jsx-runtime"); - class Component { - render() { -- return (0, jsx_runtime_1.jsx)("div", { children: null /* preserved */ }); ++class Component { ++ render() { + return jsx_runtime_1.jsx("div", { children: null /* preserved */ }); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, jsx_runtime_1.jsx)("div", { children: null /* preserved */ }); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff index 8b8005dbda..a78b744b3c 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=force).js.diff @@ -5,10 +5,16 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); +-var Component = /** @class */ (function () { +- function Component() { +const jsx_runtime_1 = require("react/jsx-runtime"); - class Component { - render() { -- return (0, jsx_runtime_1.jsx)("div", { children: null /* preserved */ }); ++class Component { ++ render() { + return jsx_runtime_1.jsx("div", { children: null /* preserved */ }); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, jsx_runtime_1.jsx)("div", { children: null /* preserved */ }); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js.diff index 43e67119ff..9e6d4c0db0 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js.diff @@ -1,10 +1,18 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsx,module=commonjs,moduledetection=legacy).js -@@= skipped -24, +24 lines =@@ +@@= skipped -22, +22 lines =@@ + } + //// [commentsOnJSXExpressionsArePreserved.js] - class Component { - render() { -- return (0, _a.jsx)("div", { children: null /* preserved */ }); +-var Component = /** @class */ (function () { +- function Component() { ++class Component { ++ render() { + return _jsx("div", { children: null /* preserved */ }); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, _a.jsx)("div", { children: null /* preserved */ }); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=auto).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=auto).js.diff index 7560c57ff2..c350c8d816 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=auto).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=auto).js.diff @@ -5,11 +5,18 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); +-var _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; +-var Component = /** @class */ (function () { +- function Component() { +const jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); - const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; - class Component { - render() { -- return (0, jsx_dev_runtime_1.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); ++const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; ++class Component { ++ render() { + return jsx_dev_runtime_1.jsxDEV("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, jsx_dev_runtime_1.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff index b1974f086e..a845746665 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=force).js.diff @@ -5,11 +5,18 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); +-var _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; +-var Component = /** @class */ (function () { +- function Component() { +const jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); - const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; - class Component { - render() { -- return (0, jsx_dev_runtime_1.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); ++const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; ++class Component { ++ render() { + return jsx_dev_runtime_1.jsxDEV("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, jsx_dev_runtime_1.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js.diff index 030ea2bb53..2ecd951c71 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js.diff @@ -1,10 +1,20 @@ --- old.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js +++ new.commentsOnJSXExpressionsArePreserved(jsx=react-jsxdev,module=commonjs,moduledetection=legacy).js -@@= skipped -25, +25 lines =@@ - const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; - class Component { - render() { -- return (0, _a.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); +@@= skipped -22, +22 lines =@@ + } + + //// [commentsOnJSXExpressionsArePreserved.js] +-var _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; +-var Component = /** @class */ (function () { +- function Component() { ++const _jsxFileName = "commentsOnJSXExpressionsArePreserved.tsx"; ++class Component { ++ render() { + return _jsxDEV("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); } - } \ No newline at end of file +- Component.prototype.render = function () { +- return (0, _a.jsxDEV)("div", { children: null /* preserved */ }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 15 }, this); +- }; +- return Component; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral3.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral3.js.diff new file mode 100644 index 0000000000..2592eeb3d1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral3.js.diff @@ -0,0 +1,11 @@ +--- old.commentsOnObjectLiteral3.js ++++ new.commentsOnObjectLiteral3.js +@@= skipped -27, +27 lines =@@ + func: function () { + }, + //PropertyName + CallSignature +- func1: function () { }, ++ func1() { }, + //getter + get a() { + return this.prop; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral5.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral5.js.diff new file mode 100644 index 0000000000..55dc9f0470 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnObjectLiteral5.js.diff @@ -0,0 +1,11 @@ +--- old.commentsOnObjectLiteral5.js ++++ new.commentsOnObjectLiteral5.js +@@= skipped -9, +9 lines =@@ + + + //// [commentsOnObjectLiteral5.js] +-var a = { ++const a = { + p0: 0, // Comment 0 + p1: 0, /* Comment 1 + A multiline comment. */ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnPropertyOfObjectLiteral1.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnPropertyOfObjectLiteral1.js.diff index 90ad646a10..44912db6ba 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnPropertyOfObjectLiteral1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnPropertyOfObjectLiteral1.js.diff @@ -4,10 +4,20 @@ //// [commentsOnPropertyOfObjectLiteral1.js] var resolve = { -- id: /*! @ngInject */ (details) => details.id, +- id: /*! @ngInject */ function (details) { return details.id; }, - id1: /* c1 */ "hello", + id: (details) => details.id, + id1: "hello", id2: - /*! @ngInject */ (details) => details.id, - id3: \ No newline at end of file +- /*! @ngInject */ function (details) { return details.id; }, ++ /*! @ngInject */ (details) => details.id, + id3: + /*! @ngInject */ +- function (details) { return details.id; }, ++ (details) => details.id, + id4: + /*! @ngInject */ + /* C2 */ +- function (details) { return details.id; }, ++ (details) => details.id, + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnReturnStatement1.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnReturnStatement1.js.diff new file mode 100644 index 0000000000..a7d5b06eab --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOnReturnStatement1.js.diff @@ -0,0 +1,21 @@ +--- old.commentsOnReturnStatement1.js ++++ new.commentsOnReturnStatement1.js +@@= skipped -11, +11 lines =@@ + } + + //// [commentsOnReturnStatement1.js] +-var DebugClass = /** @class */ (function () { +- function DebugClass() { +- } +- DebugClass.debugFunc = function () { ++class DebugClass { ++ static debugFunc() { + // Start Debugger Test Code + var i = 0; + // End Debugger Test Code + return true; +- }; +- return DebugClass; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsOnStaticMembers.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOnStaticMembers.js.diff index 582a4f9338..da9ffdb984 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsOnStaticMembers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsOnStaticMembers.js.diff @@ -4,8 +4,8 @@ } //// [commentsOnStaticMembers.js] --let test = (() => { -- class test { +-var test = /** @class */ (function () { +- function test() { - } +class test { /** @@ -22,7 +22,7 @@ */ - test.p3 = ""; - return test; --})(); +-}()); + static p3 = ""; + /** + * p4 comment does not appear in output diff --git a/testdata/baselines/reference/submodule/compiler/commentsOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/commentsOverloads.js.diff new file mode 100644 index 0000000000..a0c6c16663 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsOverloads.js.diff @@ -0,0 +1,91 @@ +--- old.commentsOverloads.js ++++ new.commentsOverloads.js +@@= skipped -200, +200 lines =@@ + var i1_i; + var i2_i; + var i3_i; +-var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.prop1 = function (aorb) { +- return 10; +- }; +- c.prototype.prop2 = function (aorb) { +- return 10; +- }; +- c.prototype.prop3 = function (aorb) { +- return 10; +- }; +- c.prototype.prop4 = function (aorb) { +- return 10; +- }; ++class c { ++ prop1(aorb) { ++ return 10; ++ } ++ prop2(aorb) { ++ return 10; ++ } ++ prop3(aorb) { ++ return 10; ++ } ++ prop4(aorb) { ++ return 10; ++ } + /** Prop5 implementaion*/ +- c.prototype.prop5 = function (aorb) { ++ prop5(aorb) { + return 10; +- }; +- return c; +-}()); +-var c1 = /** @class */ (function () { +- function c1(aorb) { +- } +- return c1; +-}()); +-var c2 = /** @class */ (function () { +- function c2(aorb) { +- } +- return c2; +-}()); +-var c3 = /** @class */ (function () { +- function c3(aorb) { +- } +- return c3; +-}()); +-var c4 = /** @class */ (function () { ++ } ++} ++class c1 { ++ constructor(aorb) { ++ } ++} ++class c2 { ++ constructor(aorb) { ++ } ++} ++class c3 { ++ constructor(aorb) { ++ } ++} ++class c4 { + /** c4 3 */ +- function c4(aorb) { ++ constructor(aorb) { + } +- return c4; +-}()); +-var c5 = /** @class */ (function () { ++} ++class c5 { + /** c5 implementation*/ +- function c5(aorb) { ++ constructor(aorb) { + } +- return c5; +-}()); ++} + var c_i = new c(); + var c1_i_1 = new c1(10); + var c1_i_2 = new c1("hello"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/commentsTypeParameters.js.diff new file mode 100644 index 0000000000..20632135eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsTypeParameters.js.diff @@ -0,0 +1,32 @@ +--- old.commentsTypeParameters.js ++++ new.commentsTypeParameters.js +@@= skipped -17, +17 lines =@@ + } + + //// [commentsTypeParameters.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function (a) { +- }; +- C.staticmethod = function (a) { +- }; +- C.prototype.privatemethod = function (a) { +- }; +- C.privatestaticmethod = function (a) { +- }; +- return C; +-}()); ++class C { ++ method(a) { ++ } ++ static staticmethod(a) { ++ } ++ privatemethod(a) { ++ } ++ static privatestaticmethod(a) { ++ } ++} + function compare(a, b) { + return a === b; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsVarDecl.js.diff b/testdata/baselines/reference/submodule/compiler/commentsVarDecl.js.diff new file mode 100644 index 0000000000..dc599d17ad --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/commentsVarDecl.js.diff @@ -0,0 +1,11 @@ +--- old.commentsVarDecl.js ++++ new.commentsVarDecl.js +@@= skipped -70, +70 lines =@@ + /// value comment + 20; + /** comment2 */ +-var z = /** lambda comment */ function (x, y) { return x + y; }; ++var z = /** lambda comment */ (x, y) => x + y; + var z2; + var x2 = z2; + var n4; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js index 93ade3dc8d..ab912534e1 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js +++ b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js @@ -72,7 +72,7 @@ interface i1 { var i1_i: i1; /** this is module comment*/ -module m1 { +namespace m1 { /** class b */ export class b { constructor(public x: number) { @@ -81,7 +81,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { } } diff --git a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js.diff b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js.diff index 55a0b6df03..d1e70c4438 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.js.diff @@ -10,23 +10,62 @@ var fooVar; foo(50); fooVar(); - class c { - constructor() { +-var c = (function () { +- function c() { - this.b = 10; - } +- } +- c.prototype.myFoo = function () { +- return this.b; +- }; +- Object.defineProperty(c.prototype, "prop1", { +- get: function () { +- return this.b; +- }, +- set: function (val) { +- this.b = val; +- }, +- enumerable: false, +- configurable: true +- }); +- c.prototype.foo1 = function (aOrb) { ++class c { ++ constructor() { ++ } + b = 10; - myFoo() { - return this.b; - } -@@= skipped -27, +27 lines =@@ ++ myFoo() { ++ return this.b; ++ } ++ get prop1() { ++ return this.b; ++ } ++ set prop1(val) { ++ this.b = val; ++ } ++ foo1(aOrb) { + return aOrb.toString(); +- }; +- return c; +-}()); ++ } ++} + var i = new c(); + var i1_i; var m1; (function (m1) { - class b { +- var b = (function () { +- function b(x) { ++ class b { + x; - constructor(x) { ++ constructor(x) { this.x = x; } -@@= skipped -11, +12 lines =@@ +- return b; +- }()); ++ } + m1.b = b; + })(m1 || (m1 = {})); + var shade = 1; +@@= skipped -44, +39 lines =@@ //// [commentsdoNotEmitComments.d.ts] declare var myVariable: number; diff --git a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.symbols b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.symbols index c480061915..5e9e2def2c 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.symbols @@ -122,12 +122,12 @@ var i1_i: i1; >i1 : Symbol(i1, Decl(commentsdoNotEmitComments.ts, 47, 16)) /** this is module comment*/ -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(commentsdoNotEmitComments.ts, 68, 13)) /** class b */ export class b { ->b : Symbol(b, Decl(commentsdoNotEmitComments.ts, 71, 11)) +>b : Symbol(b, Decl(commentsdoNotEmitComments.ts, 71, 14)) constructor(public x: number) { >x : Symbol(b.x, Decl(commentsdoNotEmitComments.ts, 74, 20)) @@ -136,7 +136,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { >m2 : Symbol(m2, Decl(commentsdoNotEmitComments.ts, 77, 5)) } } diff --git a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.types b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.types index 88484cf872..81d99228bc 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.types +++ b/testdata/baselines/reference/submodule/compiler/commentsdoNotEmitComments.types @@ -129,7 +129,7 @@ var i1_i: i1; >i1_i : i1 /** this is module comment*/ -module m1 { +namespace m1 { >m1 : typeof m1 /** class b */ @@ -143,7 +143,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { } } diff --git a/testdata/baselines/reference/submodule/compiler/commentsemitComments.js b/testdata/baselines/reference/submodule/compiler/commentsemitComments.js index 35cc34e86e..7d6c0516ec 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsemitComments.js +++ b/testdata/baselines/reference/submodule/compiler/commentsemitComments.js @@ -72,7 +72,7 @@ interface i1 { var i1_i: i1; /** this is module comment*/ -module m1 { +namespace m1 { /** class b */ export class b { constructor(public x: number) { @@ -81,7 +81,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { } } diff --git a/testdata/baselines/reference/submodule/compiler/commentsemitComments.js.diff b/testdata/baselines/reference/submodule/compiler/commentsemitComments.js.diff index b366c1c4fc..dfe48fa317 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsemitComments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commentsemitComments.js.diff @@ -1,26 +1,76 @@ --- old.commentsemitComments.js +++ new.commentsemitComments.js -@@= skipped -102, +102 lines =@@ - class c { +@@= skipped -99, +99 lines =@@ + foo(50); + fooVar(); + /**class comment*/ +-var c = /** @class */ (function () { ++class c { /** constructor comment*/ - constructor() { +- function c() { - /** property comment */ - this.b = 10; ++ constructor() { } + /** property comment */ + b = 10; /** function comment */ - myFoo() { - return this.b; -@@= skipped -29, +29 lines =@@ +- c.prototype.myFoo = function () { +- return this.b; +- }; +- Object.defineProperty(c.prototype, "prop1", { +- /** getter comment*/ +- get: function () { +- return this.b; +- }, +- /** setter comment*/ +- set: function (val) { +- this.b = val; +- }, +- enumerable: false, +- configurable: true +- }); ++ myFoo() { ++ return this.b; ++ } ++ /** getter comment*/ ++ get prop1() { ++ return this.b; ++ } ++ /** setter comment*/ ++ set prop1(val) { ++ this.b = val; ++ } + /** overload implementation signature*/ +- c.prototype.foo1 = function (aOrb) { ++ foo1(aOrb) { + return aOrb.toString(); +- }; +- return c; +-}()); ++ } ++} + /**instance comment*/ + var i = new c(); + /**interface instance comments*/ +@@= skipped -36, +31 lines =@@ + var m1; (function (m1) { /** class b */ - class b { +- var b = /** @class */ (function () { +- function b(x) { ++ class b { + x; - constructor(x) { ++ constructor(x) { this.x = x; } -@@= skipped -43, +44 lines =@@ +- return b; +- }()); ++ } + m1.b = b; + })(m1 || (m1 = {})); + +@@= skipped -45, +45 lines =@@ /**indexer property*/ [a: number]: string; /** function property;*/ diff --git a/testdata/baselines/reference/submodule/compiler/commentsemitComments.symbols b/testdata/baselines/reference/submodule/compiler/commentsemitComments.symbols index f30841e558..a3f0dddce5 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsemitComments.symbols +++ b/testdata/baselines/reference/submodule/compiler/commentsemitComments.symbols @@ -122,12 +122,12 @@ var i1_i: i1; >i1 : Symbol(i1, Decl(commentsemitComments.ts, 47, 16)) /** this is module comment*/ -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(commentsemitComments.ts, 68, 13)) /** class b */ export class b { ->b : Symbol(b, Decl(commentsemitComments.ts, 71, 11)) +>b : Symbol(b, Decl(commentsemitComments.ts, 71, 14)) constructor(public x: number) { >x : Symbol(b.x, Decl(commentsemitComments.ts, 74, 20)) @@ -136,7 +136,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { >m2 : Symbol(m2, Decl(commentsemitComments.ts, 77, 5)) } } diff --git a/testdata/baselines/reference/submodule/compiler/commentsemitComments.types b/testdata/baselines/reference/submodule/compiler/commentsemitComments.types index df0f90421f..73acba7cad 100644 --- a/testdata/baselines/reference/submodule/compiler/commentsemitComments.types +++ b/testdata/baselines/reference/submodule/compiler/commentsemitComments.types @@ -129,7 +129,7 @@ var i1_i: i1; >i1_i : i1 /** this is module comment*/ -module m1 { +namespace m1 { >m1 : typeof m1 /** class b */ @@ -143,7 +143,7 @@ module m1 { } /// module m2 - export module m2 { + export namespace m2 { } } diff --git a/testdata/baselines/reference/submodule/compiler/commonJsImportClassExpression.js.diff b/testdata/baselines/reference/submodule/compiler/commonJsImportClassExpression.js.diff index c3515fdf56..6186e22538 100644 --- a/testdata/baselines/reference/submodule/compiler/commonJsImportClassExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/commonJsImportClassExpression.js.diff @@ -1,13 +1,18 @@ --- old.commonJsImportClassExpression.js +++ new.commonJsImportClassExpression.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [mod1.js] "use strict"; - module.exports = class { -- constructor() { +-module.exports = /** @class */ (function () { +- function class_1() { - this.chunk = 1; - } +- return class_1; +-}()); ++module.exports = class { + chunk = 1; - }; ++}; //// [use.js] - "use strict"; \ No newline at end of file + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/comparabilityTypeParametersRelatedByUnion.js.diff b/testdata/baselines/reference/submodule/compiler/comparabilityTypeParametersRelatedByUnion.js.diff index 3f502d87cc..646661d762 100644 --- a/testdata/baselines/reference/submodule/compiler/comparabilityTypeParametersRelatedByUnion.js.diff +++ b/testdata/baselines/reference/submodule/compiler/comparabilityTypeParametersRelatedByUnion.js.diff @@ -1,10 +1,28 @@ --- old.comparabilityTypeParametersRelatedByUnion.js +++ new.comparabilityTypeParametersRelatedByUnion.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [comparabilityTypeParametersRelatedByUnion.js] - class C { +-var C = /** @class */ (function () { +- function C(x) { ++class C { + x; - constructor(x) { ++ constructor(x) { this.x = x; - } \ No newline at end of file + } +- C.prototype.good = function (y) { +- if (y === this.x) { } +- }; +- C.prototype.bad = function (y) { +- if (y === this.x) { } +- }; +- return C; +-}()); ++ good(y) { ++ if (y === this.x) { } ++ } ++ bad(y) { ++ if (y === this.x) { } ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js.diff b/testdata/baselines/reference/submodule/compiler/comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js.diff new file mode 100644 index 0000000000..bfaa88be9a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js.diff @@ -0,0 +1,8 @@ +--- old.comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js ++++ new.comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js +@@= skipped -15, +15 lines =@@ + //// [comparisonOfPartialDeepAndIndexedAccessTerminatesWithoutError.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var x = null; ++const x = null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complexClassRelationships.js.diff b/testdata/baselines/reference/submodule/compiler/complexClassRelationships.js.diff index 84d3dcd0f1..29353e3d84 100644 --- a/testdata/baselines/reference/submodule/compiler/complexClassRelationships.js.diff +++ b/testdata/baselines/reference/submodule/compiler/complexClassRelationships.js.diff @@ -1,10 +1,132 @@ --- old.complexClassRelationships.js +++ new.complexClassRelationships.js -@@= skipped -62, +62 lines =@@ - } +@@= skipped -49, +49 lines =@@ } - class Base { + + //// [complexClassRelationships.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + // There should be no errors in this file +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived.createEmpty = function () { ++class Derived extends Base { ++ static createEmpty() { + var item = new Derived(); + return item; +- }; +- return Derived; +-}(Base)); +-var BaseCollection = /** @class */ (function () { +- function BaseCollection(f) { +- (function (item) { return [item.Components]; }); +- } +- return BaseCollection; +-}()); +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var Thing = /** @class */ (function () { +- function Thing() { +- } +- Object.defineProperty(Thing.prototype, "Components", { +- get: function () { return null; }, +- enumerable: false, +- configurable: true +- }); +- return Thing; +-}()); +-var ComponentCollection = /** @class */ (function () { +- function ComponentCollection() { +- } +- ComponentCollection.sortComponents = function (p) { ++ } ++} ++class BaseCollection { ++ constructor(f) { ++ (item) => { return [item.Components]; }; ++ } ++} ++class Base { + ownerCollection; - } - class Thing { - get Components() { return null; } \ No newline at end of file ++} ++class Thing { ++ get Components() { return null; } ++} ++class ComponentCollection { ++ static sortComponents(p) { + return p.prop1; +- }; +- return ComponentCollection; +-}()); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Object.defineProperty(Foo.prototype, "prop1", { +- get: function () { +- return new GenericType(this); +- }, +- enumerable: false, +- configurable: true +- }); +- Foo.prototype.populate = function () { ++ } ++} ++class Foo { ++ get prop1() { ++ return new GenericType(this); ++ } ++ populate() { + this.prop2; +- }; +- Object.defineProperty(Foo.prototype, "prop2", { +- get: function () { +- return new BaseCollection(Derived.createEmpty); +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo; +-}()); +-var GenericType = /** @class */ (function () { +- function GenericType(parent) { +- } +- return GenericType; +-}()); +-var FooBase = /** @class */ (function () { +- function FooBase() { +- } +- FooBase.prototype.populate = function () { +- }; +- return FooBase; +-}()); ++ } ++ get prop2() { ++ return new BaseCollection(Derived.createEmpty); ++ } ++} ++class GenericType { ++ constructor(parent) { } ++} ++class FooBase { ++ populate() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff index 07df85e517..136d8f2590 100644 --- a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff +++ b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.js.diff @@ -11,10 +11,107 @@ /** * This file is generated by the Angular 2 template compiler. * Do not edit. -@@= skipped -130, +130 lines =@@ +@@= skipped -63, +63 lines =@@ + //stubbed out imports + var import44; + (function (import44) { +- var FormGroupDirective = /** @class */ (function () { +- function FormGroupDirective(any) { +- } +- return FormGroupDirective; +- }()); ++ class FormGroupDirective { ++ constructor(any) { } ++ } + import44.FormGroupDirective = FormGroupDirective; + })(import44 || (import44 = {})); + var import45; + (function (import45) { +- var NgControlStatus = /** @class */ (function () { +- function NgControlStatus(any) { +- } +- return NgControlStatus; +- }()); ++ class NgControlStatus { ++ constructor(any) { } ++ } + import45.NgControlStatus = NgControlStatus; +- var NgControlStatusGroup = /** @class */ (function () { +- function NgControlStatusGroup(any) { +- } +- return NgControlStatusGroup; +- }()); ++ class NgControlStatusGroup { ++ constructor(any) { } ++ } + import45.NgControlStatusGroup = NgControlStatusGroup; + })(import45 || (import45 = {})); + var import46; + (function (import46) { +- var DefaultValueAccessor = /** @class */ (function () { +- function DefaultValueAccessor(any) { +- } +- return DefaultValueAccessor; +- }()); ++ class DefaultValueAccessor { ++ constructor(any) { } ++ } + import46.DefaultValueAccessor = DefaultValueAccessor; + })(import46 || (import46 = {})); + var import47; + (function (import47) { +- var FormControlName = /** @class */ (function () { +- function FormControlName(any) { +- } +- return FormControlName; +- }()); ++ class FormControlName { ++ constructor(any) { } ++ } + import47.FormControlName = FormControlName; + })(import47 || (import47 = {})); + var import48; + (function (import48) { +- var FormControlName = /** @class */ (function () { +- function FormControlName(any) { +- } +- return FormControlName; +- }()); ++ class FormControlName { ++ constructor(any) { } ++ } + import48.FormControlName = FormControlName; + })(import48 || (import48 = {})); + //HERE BE DRAGONS +@@= skipped -66, +54 lines =@@ + //END DRAGONS + var import50; + (function (import50) { +- var NgControl = /** @class */ (function () { +- function NgControl(any) { +- } +- return NgControl; +- }()); ++ class NgControl { ++ constructor(any) { } ++ } + import50.NgControl = NgControl; + })(import50 || (import50 = {})); + var import51; + (function (import51) { +- var ControlContainer = /** @class */ (function () { +- function ControlContainer(any) { +- } +- return ControlContainer; +- }()); ++ class ControlContainer { ++ constructor(any) { } ++ } import51.ControlContainer = ControlContainer; })(import51 || (import51 = {})); - class _View_AppComponent0 { +-var _View_AppComponent0 = /** @class */ (function () { +- function _View_AppComponent0(viewUtils, parentInjector, declarationEl) { ++class _View_AppComponent0 { + _text_0; + _el_1; + _FormGroupDirective_1_3; @@ -329,6 +426,22 @@ + /*private*/ _expr_186; + /*private*/ _expr_187; + /*private*/ _expr_188; - constructor(viewUtils, parentInjector, declarationEl) { ++ constructor(viewUtils, parentInjector, declarationEl) { } - injectorGetInternal(token, requestNodeIndex, notFoundResult) { \ No newline at end of file +- _View_AppComponent0.prototype.injectorGetInternal = function (token, requestNodeIndex, notFoundResult) { ++ injectorGetInternal(token, requestNodeIndex, notFoundResult) { + if (((token === import46.DefaultValueAccessor) && (3 === requestNodeIndex))) { + return this._DefaultValueAccessor_3_3; + } +@@= skipped -330, +640 lines =@@ + return this._NgControlStatusGroup_1_5; + } + return notFoundResult; +- }; +- return _View_AppComponent0; +-}()); ++ } ++} + function viewFactory_AppComponent0(viewUtils, parentInjector, declarationEl) { + return new _View_AppComponent0(viewUtils, parentInjector, declarationEl); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.symbols.diff b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.symbols.diff new file mode 100644 index 0000000000..cc32a27132 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/complexNarrowingWithAny.symbols.diff @@ -0,0 +1,11 @@ +--- old.complexNarrowingWithAny.symbols ++++ new.complexNarrowingWithAny.symbols +@@= skipped -135, +135 lines =@@ + //export var NG_VALUE_ACCESSOR = new OpaqueToken('ngValueAccessor') + export var NG_VALUE_ACCESSOR = new String('foo') + >NG_VALUE_ACCESSOR : Symbol(NG_VALUE_ACCESSOR, Decl(complexNarrowingWithAny.ts, 103, 11)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + //using a class - < 1 sec typecheck \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.errors.txt b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.errors.txt index 3f51359243..e99afc9dae 100644 --- a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.errors.txt @@ -37,7 +37,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. - declare module Immutable { + declare namespace Immutable { export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; export function is(first: any, second: any): boolean; export function hash(value: any): number; @@ -52,7 +52,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter equals(other: any): boolean; hashCode(): number; } - export module List { + export namespace List { function isList(maybeList: any): maybeList is List; function of(...values: Array): List; } @@ -97,7 +97,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } - export module Map { + export namespace Map { function isMap(maybeMap: any): maybeMap is Map; function of(...keyValues: Array): Map; } @@ -143,7 +143,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module OrderedMap { + export namespace OrderedMap { function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; } export function OrderedMap(collection: Iterable<[K, V]>): OrderedMap; @@ -162,7 +162,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module Set { + export namespace Set { function isSet(maybeSet: any): maybeSet is Set; function of(...values: Array): Set; function fromKeys(iter: Collection): Set; @@ -194,7 +194,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; } - export module OrderedSet { + export namespace OrderedSet { function isOrderedSet(maybeOrderedSet: any): boolean; function of(...values: Array): OrderedSet; function fromKeys(iter: Collection): OrderedSet; @@ -215,7 +215,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): OrderedSet; zipWith(zipper: (...any: Array) => Z, ...collections: Array>): OrderedSet; } - export module Stack { + export namespace Stack { function isStack(maybeStack: any): maybeStack is Stack; function of(...values: Array): Stack; } @@ -246,7 +246,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter } export function Range(start?: number, end?: number, step?: number): Seq.Indexed; export function Repeat(value: T, times?: number): Seq.Indexed; - export module Record { + export namespace Record { export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; export function getDescriptiveName(record: Instance): string; export interface Class { @@ -295,10 +295,10 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter } } export function Record(defaultValues: T, name?: string): Record.Class; - export module Seq { + export namespace Seq { function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; function of(...values: Array): Seq.Indexed; - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; export function Keyed(obj: {[key: string]: V}): Seq.Keyed; export function Keyed(): Seq.Keyed; @@ -316,7 +316,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - module Indexed { + namespace Indexed { function of(...values: Array): Seq.Indexed; } export function Indexed(): Seq.Indexed; @@ -332,7 +332,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } - export module Set { + export namespace Set { function of(...values: Array): Seq.Set; } export function Set(): Seq.Set; @@ -366,12 +366,12 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module Collection { + export namespace Collection { function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; function isOrdered(maybeOrdered: any): boolean; - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; export function Keyed(obj: {[key: string]: V}): Collection.Keyed; export interface Keyed extends Collection { @@ -395,7 +395,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator<[K, V]>; } - export module Indexed {} + export namespace Indexed {} export function Indexed(collection: Iterable): Collection.Indexed; export interface Indexed extends Collection { ~~~~~~~ @@ -432,7 +432,7 @@ immutable.ts(391,22): error TS2430: Interface 'Set' incorrectly extends inter filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator; } - export module Set {} + export namespace Set {} export function Set(collection: Iterable): Collection.Set; export interface Set extends Collection { ~~~ diff --git a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.js b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.js index 21b371b7d3..267212e6b9 100644 --- a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.js +++ b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.js @@ -25,7 +25,7 @@ interface N2 extends N1 { // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. -declare module Immutable { +declare namespace Immutable { export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; export function is(first: any, second: any): boolean; export function hash(value: any): number; @@ -40,7 +40,7 @@ declare module Immutable { equals(other: any): boolean; hashCode(): number; } - export module List { + export namespace List { function isList(maybeList: any): maybeList is List; function of(...values: Array): List; } @@ -85,7 +85,7 @@ declare module Immutable { filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): List; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } - export module Map { + export namespace Map { function isMap(maybeMap: any): maybeMap is Map; function of(...keyValues: Array): Map; } @@ -131,7 +131,7 @@ declare module Immutable { filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Map; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module OrderedMap { + export namespace OrderedMap { function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; } export function OrderedMap(collection: Iterable<[K, V]>): OrderedMap; @@ -150,7 +150,7 @@ declare module Immutable { filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): OrderedMap; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module Set { + export namespace Set { function isSet(maybeSet: any): maybeSet is Set; function of(...values: Array): Set; function fromKeys(iter: Collection): Set; @@ -182,7 +182,7 @@ declare module Immutable { filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Set; filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; } - export module OrderedSet { + export namespace OrderedSet { function isOrderedSet(maybeOrderedSet: any): boolean; function of(...values: Array): OrderedSet; function fromKeys(iter: Collection): OrderedSet; @@ -203,7 +203,7 @@ declare module Immutable { zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): OrderedSet; zipWith(zipper: (...any: Array) => Z, ...collections: Array>): OrderedSet; } - export module Stack { + export namespace Stack { function isStack(maybeStack: any): maybeStack is Stack; function of(...values: Array): Stack; } @@ -234,7 +234,7 @@ declare module Immutable { } export function Range(start?: number, end?: number, step?: number): Seq.Indexed; export function Repeat(value: T, times?: number): Seq.Indexed; - export module Record { + export namespace Record { export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; export function getDescriptiveName(record: Instance): string; export interface Class { @@ -283,10 +283,10 @@ declare module Immutable { } } export function Record(defaultValues: T, name?: string): Record.Class; - export module Seq { + export namespace Seq { function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; function of(...values: Array): Seq.Indexed; - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; export function Keyed(obj: {[key: string]: V}): Seq.Keyed; export function Keyed(): Seq.Keyed; @@ -304,7 +304,7 @@ declare module Immutable { filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - module Indexed { + namespace Indexed { function of(...values: Array): Seq.Indexed; } export function Indexed(): Seq.Indexed; @@ -320,7 +320,7 @@ declare module Immutable { filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Seq.Indexed; filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; } - export module Set { + export namespace Set { function of(...values: Array): Seq.Set; } export function Set(): Seq.Set; @@ -354,12 +354,12 @@ declare module Immutable { filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq; filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; } - export module Collection { + export namespace Collection { function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; function isOrdered(maybeOrdered: any): boolean; - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; export function Keyed(obj: {[key: string]: V}): Collection.Keyed; export interface Keyed extends Collection { @@ -378,7 +378,7 @@ declare module Immutable { filter(predicate: (value: V, key: K, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator<[K, V]>; } - export module Indexed {} + export namespace Indexed {} export function Indexed(collection: Iterable): Collection.Indexed; export interface Indexed extends Collection { toJS(): Array; @@ -410,7 +410,7 @@ declare module Immutable { filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; [Symbol.iterator](): IterableIterator; } - export module Set {} + export namespace Set {} export function Set(collection: Iterable): Collection.Set; export interface Set extends Collection { toJS(): Array; diff --git a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.symbols b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.symbols index a3d9d68d94..fbd2034de7 100644 --- a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.symbols +++ b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.symbols @@ -162,19 +162,19 @@ interface N2 extends N1 { // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. -declare module Immutable { +declare namespace Immutable { >Immutable : Symbol(Immutable, Decl(immutable.ts, 0, 0)) export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; ->fromJS : Symbol(fromJS, Decl(immutable.ts, 3, 26)) +>fromJS : Symbol(fromJS, Decl(immutable.ts, 3, 29)) >jsValue : Symbol(jsValue, Decl(immutable.ts, 4, 25)) >reviver : Symbol(reviver, Decl(immutable.ts, 4, 38)) >key : Symbol(key, Decl(immutable.ts, 4, 50)) >sequence : Symbol(sequence, Decl(immutable.ts, 4, 71)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >path : Symbol(path, Decl(immutable.ts, 4, 138)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) @@ -204,23 +204,23 @@ declare module Immutable { >maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 9, 26)) >maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 9, 26)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) export function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; >isIndexed : Symbol(isIndexed, Decl(immutable.ts, 9, 85)) >maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 10, 28)) >maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 10, 28)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) export function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; >isAssociative : Symbol(isAssociative, Decl(immutable.ts, 10, 88)) >maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 11, 32)) >maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 11, 32)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) export function isOrdered(maybeOrdered: any): boolean; >isOrdered : Symbol(isOrdered, Decl(immutable.ts, 11, 129)) @@ -242,11 +242,11 @@ declare module Immutable { hashCode(): number; >hashCode : Symbol(ValueObject.hashCode, Decl(immutable.ts, 15, 32)) } - export module List { + export namespace List { >List : Symbol(List, Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 17, 3), Decl(immutable.ts, 24, 60)) function isList(maybeList: any): maybeList is List; ->isList : Symbol(isList, Decl(immutable.ts, 18, 22)) +>isList : Symbol(isList, Decl(immutable.ts, 18, 25)) >maybeList : Symbol(maybeList, Decl(immutable.ts, 19, 20)) >maybeList : Symbol(maybeList, Decl(immutable.ts, 19, 20)) >List : Symbol(List, Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 17, 3), Decl(immutable.ts, 24, 60)) @@ -282,9 +282,9 @@ declare module Immutable { export interface List extends Collection.Indexed { >List : Symbol(List, Decl(immutable.ts, 21, 3), Decl(immutable.ts, 22, 36), Decl(immutable.ts, 23, 37), Decl(immutable.ts, 17, 3), Decl(immutable.ts, 24, 60)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) // Persistent changes @@ -378,7 +378,7 @@ declare module Immutable { >collections : Symbol(collections, Decl(immutable.ts, 39, 10)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) @@ -395,7 +395,7 @@ declare module Immutable { >collections : Symbol(collections, Decl(immutable.ts, 40, 63)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) @@ -405,7 +405,7 @@ declare module Immutable { >collections : Symbol(collections, Decl(immutable.ts, 41, 14)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) @@ -422,7 +422,7 @@ declare module Immutable { >collections : Symbol(collections, Decl(immutable.ts, 42, 67)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 25, 24)) @@ -555,11 +555,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 61, 47)) >context : Symbol(context, Decl(immutable.ts, 61, 67)) } - export module Map { + export namespace Map { >Map : Symbol(Map, Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66), Decl(immutable.ts, 70, 41) ... and 2 more) function isMap(maybeMap: any): maybeMap is Map; ->isMap : Symbol(isMap, Decl(immutable.ts, 63, 21)) +>isMap : Symbol(isMap, Decl(immutable.ts, 63, 24)) >maybeMap : Symbol(maybeMap, Decl(immutable.ts, 64, 19)) >maybeMap : Symbol(maybeMap, Decl(immutable.ts, 64, 19)) >Map : Symbol(Map, Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66), Decl(immutable.ts, 70, 41) ... and 2 more) @@ -618,9 +618,9 @@ declare module Immutable { >Map : Symbol(Map, Decl(immutable.ts, 66, 3), Decl(immutable.ts, 67, 69), Decl(immutable.ts, 68, 71), Decl(immutable.ts, 69, 66), Decl(immutable.ts, 70, 41) ... and 2 more) >K : Symbol(K, Decl(immutable.ts, 72, 23)) >V : Symbol(V, Decl(immutable.ts, 72, 25)) ->Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 72, 23)) >V : Symbol(V, Decl(immutable.ts, 72, 25)) @@ -915,11 +915,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 107, 40)) >context : Symbol(context, Decl(immutable.ts, 107, 60)) } - export module OrderedMap { + export namespace OrderedMap { >OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80), Decl(immutable.ts, 115, 55) ... and 2 more) function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; ->isOrderedMap : Symbol(isOrderedMap, Decl(immutable.ts, 109, 28)) +>isOrderedMap : Symbol(isOrderedMap, Decl(immutable.ts, 109, 31)) >maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.ts, 110, 26)) >maybeOrderedMap : Symbol(maybeOrderedMap, Decl(immutable.ts, 110, 26)) >OrderedMap : Symbol(OrderedMap, Decl(immutable.ts, 111, 3), Decl(immutable.ts, 112, 83), Decl(immutable.ts, 113, 85), Decl(immutable.ts, 114, 80), Decl(immutable.ts, 115, 55) ... and 2 more) @@ -1092,11 +1092,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 126, 40)) >context : Symbol(context, Decl(immutable.ts, 126, 60)) } - export module Set { + export namespace Set { >Set : Symbol(Set, Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 127, 3), Decl(immutable.ts, 138, 58)) function isSet(maybeSet: any): maybeSet is Set; ->isSet : Symbol(isSet, Decl(immutable.ts, 128, 21)) +>isSet : Symbol(isSet, Decl(immutable.ts, 128, 24)) >maybeSet : Symbol(maybeSet, Decl(immutable.ts, 129, 19)) >maybeSet : Symbol(maybeSet, Decl(immutable.ts, 129, 19)) >Set : Symbol(Set, Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 127, 3), Decl(immutable.ts, 138, 58)) @@ -1167,9 +1167,9 @@ declare module Immutable { export interface Set extends Collection.Set { >Set : Symbol(Set, Decl(immutable.ts, 135, 3), Decl(immutable.ts, 136, 34), Decl(immutable.ts, 137, 35), Decl(immutable.ts, 127, 3), Decl(immutable.ts, 138, 58)) >T : Symbol(T, Decl(immutable.ts, 139, 23)) ->Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 139, 23)) // Persistent changes @@ -1303,11 +1303,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 158, 44)) >context : Symbol(context, Decl(immutable.ts, 158, 64)) } - export module OrderedSet { + export namespace OrderedSet { >OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 159, 3), Decl(immutable.ts, 168, 72)) function isOrderedSet(maybeOrderedSet: any): boolean; ->isOrderedSet : Symbol(isOrderedSet, Decl(immutable.ts, 160, 28)) +>isOrderedSet : Symbol(isOrderedSet, Decl(immutable.ts, 160, 31)) >maybeOrderedSet : Symbol(maybeOrderedSet, Decl(immutable.ts, 161, 26)) function of(...values: Array): OrderedSet; @@ -1481,11 +1481,11 @@ declare module Immutable { >OrderedSet : Symbol(OrderedSet, Decl(immutable.ts, 165, 3), Decl(immutable.ts, 166, 48), Decl(immutable.ts, 167, 49), Decl(immutable.ts, 159, 3), Decl(immutable.ts, 168, 72)) >Z : Symbol(Z, Decl(immutable.ts, 179, 12)) } - export module Stack { + export namespace Stack { >Stack : Symbol(Stack, Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 180, 3), Decl(immutable.ts, 187, 62)) function isStack(maybeStack: any): maybeStack is Stack; ->isStack : Symbol(isStack, Decl(immutable.ts, 181, 23)) +>isStack : Symbol(isStack, Decl(immutable.ts, 181, 26)) >maybeStack : Symbol(maybeStack, Decl(immutable.ts, 182, 21)) >maybeStack : Symbol(maybeStack, Decl(immutable.ts, 182, 21)) >Stack : Symbol(Stack, Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 180, 3), Decl(immutable.ts, 187, 62)) @@ -1521,9 +1521,9 @@ declare module Immutable { export interface Stack extends Collection.Indexed { >Stack : Symbol(Stack, Decl(immutable.ts, 184, 3), Decl(immutable.ts, 185, 38), Decl(immutable.ts, 186, 39), Decl(immutable.ts, 180, 3), Decl(immutable.ts, 187, 62)) >T : Symbol(T, Decl(immutable.ts, 188, 25)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 188, 25)) // Reading values @@ -1673,11 +1673,11 @@ declare module Immutable { >Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 281, 5), Decl(immutable.ts, 287, 72)) >T : Symbol(T, Decl(immutable.ts, 211, 25)) - export module Record { + export namespace Record { >Record : Symbol(Record, Decl(immutable.ts, 259, 3), Decl(immutable.ts, 211, 70)) export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; ->isRecord : Symbol(isRecord, Decl(immutable.ts, 212, 24)) +>isRecord : Symbol(isRecord, Decl(immutable.ts, 212, 27)) >maybeRecord : Symbol(maybeRecord, Decl(immutable.ts, 213, 29)) >maybeRecord : Symbol(maybeRecord, Decl(immutable.ts, 213, 29)) >Record : Symbol(Record, Decl(immutable.ts, 259, 3), Decl(immutable.ts, 211, 70)) @@ -1904,7 +1904,7 @@ declare module Immutable { toSeq(): Seq.Keyed; >toSeq : Symbol(Instance.toSeq, Decl(immutable.ts, 254, 26)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >T : Symbol(T, Decl(immutable.ts, 219, 30)) >T : Symbol(T, Decl(immutable.ts, 219, 30)) >T : Symbol(T, Decl(immutable.ts, 219, 30)) @@ -1930,17 +1930,17 @@ declare module Immutable { >Class : Symbol(Record.Class, Decl(immutable.ts, 214, 70)) >T : Symbol(T, Decl(immutable.ts, 260, 25)) - export module Seq { + export namespace Seq { >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; ->isSeq : Symbol(isSeq, Decl(immutable.ts, 261, 21)) +>isSeq : Symbol(isSeq, Decl(immutable.ts, 261, 24)) >maybeSeq : Symbol(maybeSeq, Decl(immutable.ts, 262, 19)) >maybeSeq : Symbol(maybeSeq, Decl(immutable.ts, 262, 19)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >Indexed : Symbol(Indexed, Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 281, 5), Decl(immutable.ts, 287, 72)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) function of(...values: Array): Seq.Indexed; >of : Symbol(of, Decl(immutable.ts, 262, 86)) @@ -1952,11 +1952,11 @@ declare module Immutable { >Indexed : Symbol(Indexed, Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 281, 5), Decl(immutable.ts, 287, 72)) >T : Symbol(T, Decl(immutable.ts, 263, 16)) - export module Keyed {} ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) + export namespace Keyed {} +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 265, 26)) >V : Symbol(V, Decl(immutable.ts, 265, 28)) >collection : Symbol(collection, Decl(immutable.ts, 265, 32)) @@ -1964,44 +1964,44 @@ declare module Immutable { >K : Symbol(K, Decl(immutable.ts, 265, 26)) >V : Symbol(V, Decl(immutable.ts, 265, 28)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 265, 26)) >V : Symbol(V, Decl(immutable.ts, 265, 28)) export function Keyed(obj: {[key: string]: V}): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >V : Symbol(V, Decl(immutable.ts, 266, 26)) >obj : Symbol(obj, Decl(immutable.ts, 266, 29)) >key : Symbol(key, Decl(immutable.ts, 266, 36)) >V : Symbol(V, Decl(immutable.ts, 266, 26)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >V : Symbol(V, Decl(immutable.ts, 266, 26)) export function Keyed(): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 267, 26)) >V : Symbol(V, Decl(immutable.ts, 267, 28)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 267, 26)) >V : Symbol(V, Decl(immutable.ts, 267, 28)) export function Keyed(): Seq.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) export interface Keyed extends Seq, Collection.Keyed { ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) ->Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Collection.Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) @@ -2027,7 +2027,7 @@ declare module Immutable { >KC : Symbol(KC, Decl(immutable.ts, 273, 13)) >VC : Symbol(VC, Decl(immutable.ts, 273, 16)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >KC : Symbol(KC, Decl(immutable.ts, 273, 13)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) @@ -2041,7 +2041,7 @@ declare module Immutable { >key : Symbol(key, Decl(immutable.ts, 274, 40)) >C : Symbol(C, Decl(immutable.ts, 274, 13)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) >C : Symbol(C, Decl(immutable.ts, 274, 13)) @@ -2058,7 +2058,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 275, 10)) >context : Symbol(context, Decl(immutable.ts, 275, 57)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >M : Symbol(M, Decl(immutable.ts, 275, 10)) @@ -2074,7 +2074,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 276, 14)) >context : Symbol(context, Decl(immutable.ts, 276, 61)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >M : Symbol(M, Decl(immutable.ts, 276, 14)) >V : Symbol(V, Decl(immutable.ts, 269, 29)) @@ -2092,7 +2092,7 @@ declare module Immutable { >VM : Symbol(VM, Decl(immutable.ts, 277, 20)) >context : Symbol(context, Decl(immutable.ts, 277, 88)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >KM : Symbol(KM, Decl(immutable.ts, 277, 17)) >VM : Symbol(VM, Decl(immutable.ts, 277, 20)) @@ -2109,7 +2109,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 278, 14)) >context : Symbol(context, Decl(immutable.ts, 278, 71)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Seq.Keyed; >filter : Symbol(Keyed.filter, Decl(immutable.ts, 278, 108), Decl(immutable.ts, 279, 115)) @@ -2125,7 +2125,7 @@ declare module Immutable { >F : Symbol(F, Decl(immutable.ts, 279, 13)) >context : Symbol(context, Decl(immutable.ts, 279, 82)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 269, 27)) >F : Symbol(F, Decl(immutable.ts, 279, 13)) @@ -2139,11 +2139,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 280, 42)) >context : Symbol(context, Decl(immutable.ts, 280, 62)) } - module Indexed { + namespace Indexed { >Indexed : Symbol(Indexed, Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 281, 5), Decl(immutable.ts, 287, 72)) function of(...values: Array): Seq.Indexed; ->of : Symbol(of, Decl(immutable.ts, 282, 20)) +>of : Symbol(of, Decl(immutable.ts, 282, 23)) >T : Symbol(T, Decl(immutable.ts, 283, 18)) >values : Symbol(values, Decl(immutable.ts, 283, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) @@ -2179,9 +2179,9 @@ declare module Immutable { >T : Symbol(T, Decl(immutable.ts, 288, 29)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >T : Symbol(T, Decl(immutable.ts, 288, 29)) ->Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Collection.Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 288, 29)) toJS(): Array; @@ -2263,11 +2263,11 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 296, 49)) >context : Symbol(context, Decl(immutable.ts, 296, 69)) } - export module Set { + export namespace Set { >Set : Symbol(Set, Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 297, 5), Decl(immutable.ts, 303, 64)) function of(...values: Array): Seq.Set; ->of : Symbol(of, Decl(immutable.ts, 298, 23)) +>of : Symbol(of, Decl(immutable.ts, 298, 26)) >T : Symbol(T, Decl(immutable.ts, 299, 18)) >values : Symbol(values, Decl(immutable.ts, 299, 21)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) @@ -2303,9 +2303,9 @@ declare module Immutable { >T : Symbol(T, Decl(immutable.ts, 304, 25)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >T : Symbol(T, Decl(immutable.ts, 304, 25)) ->Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Collection.Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 304, 25)) toJS(): Array; @@ -2402,11 +2402,11 @@ declare module Immutable { >V : Symbol(V, Decl(immutable.ts, 316, 24)) >collection : Symbol(collection, Decl(immutable.ts, 316, 28)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 316, 22)) >V : Symbol(V, Decl(immutable.ts, 316, 24)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 316, 22)) >V : Symbol(V, Decl(immutable.ts, 316, 24)) @@ -2415,7 +2415,7 @@ declare module Immutable { >T : Symbol(T, Decl(immutable.ts, 317, 22)) >collection : Symbol(collection, Decl(immutable.ts, 317, 25)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 317, 22)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >Indexed : Symbol(Seq.Indexed, Decl(immutable.ts, 284, 5), Decl(immutable.ts, 285, 48), Decl(immutable.ts, 286, 49), Decl(immutable.ts, 281, 5), Decl(immutable.ts, 287, 72)) @@ -2426,7 +2426,7 @@ declare module Immutable { >T : Symbol(T, Decl(immutable.ts, 318, 22)) >collection : Symbol(collection, Decl(immutable.ts, 318, 25)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Collection.Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 318, 22)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) >Set : Symbol(Seq.Set, Decl(immutable.ts, 300, 5), Decl(immutable.ts, 301, 40), Decl(immutable.ts, 302, 41), Decl(immutable.ts, 297, 5), Decl(immutable.ts, 303, 64)) @@ -2449,7 +2449,7 @@ declare module Immutable { >key : Symbol(key, Decl(immutable.ts, 320, 32)) >V : Symbol(V, Decl(immutable.ts, 320, 22)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >V : Symbol(V, Decl(immutable.ts, 320, 22)) export function Seq(): Seq; @@ -2530,41 +2530,41 @@ declare module Immutable { >iter : Symbol(iter, Decl(immutable.ts, 330, 40)) >context : Symbol(context, Decl(immutable.ts, 330, 60)) } - export module Collection { + export namespace Collection { >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; ->isKeyed : Symbol(isKeyed, Decl(immutable.ts, 332, 28)) +>isKeyed : Symbol(isKeyed, Decl(immutable.ts, 332, 31)) >maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 333, 21)) >maybeKeyed : Symbol(maybeKeyed, Decl(immutable.ts, 333, 21)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) function isIndexed(maybeIndexed: any): maybeIndexed is Collection.Indexed; >isIndexed : Symbol(isIndexed, Decl(immutable.ts, 333, 80)) >maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 334, 23)) >maybeIndexed : Symbol(maybeIndexed, Decl(immutable.ts, 334, 23)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) function isAssociative(maybeAssociative: any): maybeAssociative is Collection.Keyed | Collection.Indexed; >isAssociative : Symbol(isAssociative, Decl(immutable.ts, 334, 83)) >maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 335, 27)) >maybeAssociative : Symbol(maybeAssociative, Decl(immutable.ts, 335, 27)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) function isOrdered(maybeOrdered: any): boolean; >isOrdered : Symbol(isOrdered, Decl(immutable.ts, 335, 124)) >maybeOrdered : Symbol(maybeOrdered, Decl(immutable.ts, 336, 23)) - export module Keyed {} ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) + export namespace Keyed {} +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 338, 26)) >V : Symbol(V, Decl(immutable.ts, 338, 28)) >collection : Symbol(collection, Decl(immutable.ts, 338, 32)) @@ -2572,22 +2572,22 @@ declare module Immutable { >K : Symbol(K, Decl(immutable.ts, 338, 26)) >V : Symbol(V, Decl(immutable.ts, 338, 28)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 338, 26)) >V : Symbol(V, Decl(immutable.ts, 338, 28)) export function Keyed(obj: {[key: string]: V}): Collection.Keyed; ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >V : Symbol(V, Decl(immutable.ts, 339, 26)) >obj : Symbol(obj, Decl(immutable.ts, 339, 29)) >key : Symbol(key, Decl(immutable.ts, 339, 36)) >V : Symbol(V, Decl(immutable.ts, 339, 26)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >V : Symbol(V, Decl(immutable.ts, 339, 26)) export interface Keyed extends Collection { ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) @@ -2606,7 +2606,7 @@ declare module Immutable { toSeq(): Seq.Keyed; >toSeq : Symbol(Keyed.toSeq, Decl(immutable.ts, 342, 37)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) @@ -2624,7 +2624,7 @@ declare module Immutable { >KC : Symbol(KC, Decl(immutable.ts, 346, 13)) >VC : Symbol(VC, Decl(immutable.ts, 346, 16)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >KC : Symbol(KC, Decl(immutable.ts, 346, 13)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) @@ -2638,7 +2638,7 @@ declare module Immutable { >key : Symbol(key, Decl(immutable.ts, 347, 40)) >C : Symbol(C, Decl(immutable.ts, 347, 13)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) >C : Symbol(C, Decl(immutable.ts, 347, 13)) @@ -2655,7 +2655,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 348, 10)) >context : Symbol(context, Decl(immutable.ts, 348, 57)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >M : Symbol(M, Decl(immutable.ts, 348, 10)) @@ -2671,7 +2671,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 349, 14)) >context : Symbol(context, Decl(immutable.ts, 349, 61)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >M : Symbol(M, Decl(immutable.ts, 349, 14)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) @@ -2689,7 +2689,7 @@ declare module Immutable { >VM : Symbol(VM, Decl(immutable.ts, 350, 20)) >context : Symbol(context, Decl(immutable.ts, 350, 88)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >KM : Symbol(KM, Decl(immutable.ts, 350, 17)) >VM : Symbol(VM, Decl(immutable.ts, 350, 20)) @@ -2706,7 +2706,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 351, 14)) >context : Symbol(context, Decl(immutable.ts, 351, 71)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) filter(predicate: (value: V, key: K, iter: this) => value is F, context?: any): Collection.Keyed; >filter : Symbol(Keyed.filter, Decl(immutable.ts, 351, 115), Decl(immutable.ts, 352, 122)) @@ -2722,7 +2722,7 @@ declare module Immutable { >F : Symbol(F, Decl(immutable.ts, 352, 13)) >context : Symbol(context, Decl(immutable.ts, 352, 82)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >K : Symbol(K, Decl(immutable.ts, 340, 27)) >F : Symbol(F, Decl(immutable.ts, 352, 13)) @@ -2745,21 +2745,21 @@ declare module Immutable { >K : Symbol(K, Decl(immutable.ts, 340, 27)) >V : Symbol(V, Decl(immutable.ts, 340, 29)) } - export module Indexed {} ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) + export namespace Indexed {} +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) export function Indexed(collection: Iterable): Collection.Indexed; ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 357, 28)) >collection : Symbol(collection, Decl(immutable.ts, 357, 31)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 357, 28)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 357, 28)) export interface Indexed extends Collection { ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 358, 29)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >T : Symbol(T, Decl(immutable.ts, 358, 29)) @@ -2798,7 +2798,7 @@ declare module Immutable { fromEntrySeq(): Seq.Keyed; >fromEntrySeq : Symbol(Indexed.fromEntrySeq, Decl(immutable.ts, 365, 30)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) // Combination interpose(separator: T): this; @@ -2827,7 +2827,7 @@ declare module Immutable { >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) zipWith(zipper: (value: T, otherValue: U) => Z, otherCollection: Collection): Collection.Indexed; >zipWith : Symbol(Indexed.zipWith, Decl(immutable.ts, 371, 80), Decl(immutable.ts, 372, 120), Decl(immutable.ts, 373, 175)) @@ -2843,7 +2843,7 @@ declare module Immutable { >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >U : Symbol(U, Decl(immutable.ts, 372, 14)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Z : Symbol(Z, Decl(immutable.ts, 372, 16)) zipWith(zipper: (value: T, otherValue: U, thirdValue: V) => Z, otherCollection: Collection, thirdCollection: Collection): Collection.Indexed; @@ -2866,7 +2866,7 @@ declare module Immutable { >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >V : Symbol(V, Decl(immutable.ts, 373, 16)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Z : Symbol(Z, Decl(immutable.ts, 373, 19)) zipWith(zipper: (...any: Array) => Z, ...collections: Array>): Collection.Indexed; @@ -2880,7 +2880,7 @@ declare module Immutable { >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >Z : Symbol(Z, Decl(immutable.ts, 374, 14)) // Search for value @@ -2922,7 +2922,7 @@ declare module Immutable { >C : Symbol(C, Decl(immutable.ts, 381, 13)) >C : Symbol(C, Decl(immutable.ts, 381, 13)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 358, 29)) >C : Symbol(C, Decl(immutable.ts, 381, 13)) @@ -2937,7 +2937,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 382, 10)) >context : Symbol(context, Decl(immutable.ts, 382, 62)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >M : Symbol(M, Decl(immutable.ts, 382, 10)) flatMap(mapper: (value: T, key: number, iter: this) => Iterable, context?: any): Collection.Indexed; @@ -2952,7 +2952,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 383, 14)) >context : Symbol(context, Decl(immutable.ts, 383, 76)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >M : Symbol(M, Decl(immutable.ts, 383, 14)) filter(predicate: (value: T, index: number, iter: this) => value is F, context?: any): Collection.Indexed; @@ -2968,7 +2968,7 @@ declare module Immutable { >F : Symbol(F, Decl(immutable.ts, 384, 13)) >context : Symbol(context, Decl(immutable.ts, 384, 89)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >F : Symbol(F, Decl(immutable.ts, 384, 13)) filter(predicate: (value: T, index: number, iter: this) => any, context?: any): this; @@ -2988,21 +2988,21 @@ declare module Immutable { >IterableIterator : Symbol(IterableIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 358, 29)) } - export module Set {} ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) + export namespace Set {} +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) export function Set(collection: Iterable): Collection.Set; ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 389, 24)) >collection : Symbol(collection, Decl(immutable.ts, 389, 27)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 389, 24)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 389, 24)) export interface Set extends Collection { ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 390, 25)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >T : Symbol(T, Decl(immutable.ts, 390, 25)) @@ -3032,7 +3032,7 @@ declare module Immutable { >C : Symbol(C, Decl(immutable.ts, 395, 13)) >C : Symbol(C, Decl(immutable.ts, 395, 13)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >T : Symbol(T, Decl(immutable.ts, 390, 25)) >C : Symbol(C, Decl(immutable.ts, 395, 13)) @@ -3047,7 +3047,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 396, 10)) >context : Symbol(context, Decl(immutable.ts, 396, 61)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >M : Symbol(M, Decl(immutable.ts, 396, 10)) flatMap(mapper: (value: T, key: never, iter: this) => Iterable, context?: any): Collection.Set; @@ -3062,7 +3062,7 @@ declare module Immutable { >M : Symbol(M, Decl(immutable.ts, 397, 14)) >context : Symbol(context, Decl(immutable.ts, 397, 75)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >M : Symbol(M, Decl(immutable.ts, 397, 14)) filter(predicate: (value: T, key: never, iter: this) => value is F, context?: any): Collection.Set; @@ -3078,7 +3078,7 @@ declare module Immutable { >F : Symbol(F, Decl(immutable.ts, 398, 13)) >context : Symbol(context, Decl(immutable.ts, 398, 86)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Set : Symbol(Set, Decl(immutable.ts, 388, 24), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) +>Set : Symbol(Set, Decl(immutable.ts, 388, 27), Decl(immutable.ts, 387, 5), Decl(immutable.ts, 389, 71)) >F : Symbol(F, Decl(immutable.ts, 398, 13)) filter(predicate: (value: T, key: never, iter: this) => any, context?: any): this; @@ -3114,7 +3114,7 @@ declare module Immutable { >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) >T : Symbol(T, Decl(immutable.ts, 404, 29)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 28), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) +>Indexed : Symbol(Collection.Indexed, Decl(immutable.ts, 356, 31), Decl(immutable.ts, 355, 5), Decl(immutable.ts, 357, 79)) >T : Symbol(T, Decl(immutable.ts, 404, 29)) export function Collection(obj: {[key: string]: V}): Collection.Keyed; @@ -3124,7 +3124,7 @@ declare module Immutable { >key : Symbol(key, Decl(immutable.ts, 405, 39)) >V : Symbol(V, Decl(immutable.ts, 405, 29)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) ->Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 26), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) +>Keyed : Symbol(Collection.Keyed, Decl(immutable.ts, 337, 29), Decl(immutable.ts, 338, 86), Decl(immutable.ts, 336, 51), Decl(immutable.ts, 339, 83)) >V : Symbol(V, Decl(immutable.ts, 405, 29)) export interface Collection extends ValueObject { @@ -3265,7 +3265,7 @@ declare module Immutable { toKeyedSeq(): Seq.Keyed; >toKeyedSeq : Symbol(Collection.toKeyedSeq, Decl(immutable.ts, 436, 18)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >K : Symbol(K, Decl(immutable.ts, 406, 30)) >V : Symbol(V, Decl(immutable.ts, 406, 32)) @@ -3410,7 +3410,7 @@ declare module Immutable { >G : Symbol(G, Decl(immutable.ts, 456, 12)) >context : Symbol(context, Decl(immutable.ts, 456, 60)) >Seq : Symbol(Seq, Decl(immutable.ts, 314, 3), Decl(immutable.ts, 315, 58), Decl(immutable.ts, 316, 81), Decl(immutable.ts, 317, 76), Decl(immutable.ts, 318, 68) ... and 4 more) ->Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 26), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) +>Keyed : Symbol(Seq.Keyed, Decl(immutable.ts, 264, 29), Decl(immutable.ts, 265, 79), Decl(immutable.ts, 266, 76), Decl(immutable.ts, 267, 51), Decl(immutable.ts, 263, 56) ... and 1 more) >G : Symbol(G, Decl(immutable.ts, 456, 12)) >Collection : Symbol(Collection, Decl(immutable.ts, 402, 3), Decl(immutable.ts, 403, 79), Decl(immutable.ts, 404, 80), Decl(immutable.ts, 331, 3), Decl(immutable.ts, 405, 86)) >K : Symbol(K, Decl(immutable.ts, 406, 30)) diff --git a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types index 6f96af55fc..9904441114 100644 --- a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types +++ b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types @@ -83,7 +83,7 @@ interface N2 extends N1 { // Test that complex recursive collections can pass the `extends` assignability check without // running out of memory. This bug was exposed in Typescript 2.4 when more generic signatures // started being checked. -declare module Immutable { +declare namespace Immutable { >Immutable : typeof Immutable export function fromJS(jsValue: any, reviver?: (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any): any; @@ -145,7 +145,7 @@ declare module Immutable { hashCode(): number; >hashCode : () => number } - export module List { + export namespace List { >List : typeof List function isList(maybeList: any): maybeList is List; @@ -341,7 +341,7 @@ declare module Immutable { >iter : this >context : any } - export module Map { + export namespace Map { >Map : typeof Map function isMap(maybeMap: any): maybeMap is Map; @@ -552,7 +552,7 @@ declare module Immutable { >iter : this >context : any } - export module OrderedMap { + export namespace OrderedMap { >OrderedMap : typeof OrderedMap function isOrderedMap(maybeOrderedMap: any): maybeOrderedMap is OrderedMap; @@ -637,7 +637,7 @@ declare module Immutable { >iter : this >context : any } - export module Set { + export namespace Set { >Set : typeof Set function isSet(maybeSet: any): maybeSet is Set; @@ -759,7 +759,7 @@ declare module Immutable { >iter : this >context : any } - export module OrderedSet { + export namespace OrderedSet { >OrderedSet : typeof OrderedSet function isOrderedSet(maybeOrderedSet: any): boolean; @@ -853,7 +853,7 @@ declare module Immutable { >any : any[] >collections : Collection[] } - export module Stack { + export namespace Stack { >Stack : typeof Stack function isStack(maybeStack: any): maybeStack is Stack; @@ -969,7 +969,7 @@ declare module Immutable { >times : number >Seq : any - export module Record { + export namespace Record { >Record : typeof Record export function isRecord(maybeRecord: any): maybeRecord is Record.Instance; @@ -1135,7 +1135,7 @@ declare module Immutable { >name : string >Record : any - export module Seq { + export namespace Seq { >Seq : typeof Seq function isSeq(maybeSeq: any): maybeSeq is Seq.Indexed | Seq.Keyed; @@ -1149,7 +1149,7 @@ declare module Immutable { >values : T[] >Seq : any - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; >Keyed : { (collection: Iterable<[K, V]>): Keyed; (obj: { [key: string]: V; }): Keyed; (): Keyed; (): Keyed; } >collection : Iterable<[K, V]> @@ -1246,7 +1246,7 @@ declare module Immutable { >iter : this >context : any } - module Indexed { + namespace Indexed { >Indexed : typeof Indexed function of(...values: Array): Seq.Indexed; @@ -1319,7 +1319,7 @@ declare module Immutable { >iter : this >context : any } - export module Set { + export namespace Set { >Set : typeof Set function of(...values: Array): Seq.Set; @@ -1470,7 +1470,7 @@ declare module Immutable { >iter : this >context : any } - export module Collection { + export namespace Collection { >Collection : typeof Collection function isKeyed(maybeKeyed: any): maybeKeyed is Collection.Keyed; @@ -1493,7 +1493,7 @@ declare module Immutable { >isOrdered : (maybeOrdered: any) => boolean >maybeOrdered : any - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; >Keyed : { (collection: Iterable<[K, V]>): Keyed; (obj: { [key: string]: V; }): Keyed; } >collection : Iterable<[K, V]> @@ -1591,7 +1591,7 @@ declare module Immutable { >Symbol : SymbolConstructor >iterator : unique symbol } - export module Indexed {} + export namespace Indexed {} export function Indexed(collection: Iterable): Collection.Indexed; >Indexed : (collection: Iterable) => Indexed >collection : Iterable @@ -1740,7 +1740,7 @@ declare module Immutable { >Symbol : SymbolConstructor >iterator : unique symbol } - export module Set {} + export namespace Set {} export function Set(collection: Iterable): Collection.Set; >Set : (collection: Iterable) => Set >collection : Iterable diff --git a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types.diff b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types.diff index 5959fd03fc..6c5eb88000 100644 --- a/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types.diff +++ b/testdata/baselines/reference/submodule/compiler/complexRecursiveCollections.types.diff @@ -15,11 +15,13 @@ reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduce : { (reducer: (reduction: R_1, value: V, key: K, iter: this) => R_1, initialReduction: R_1, context?: any): R_1; (reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; } ->reducer : (reduction: V | R, value: V, key: K, iter: this) => R +->reduction : V | R +>reduce : { (reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; (reducer: (reduction: R | V, value: V, key: K, iter: this) => R): R; } +>reducer : (reduction: R | V, value: V, key: K, iter: this) => R - >reduction : R | V ++>reduction : R | V >value : V >key : K + >iter : this @@= skipped -55, +55 lines =@@ >Immutable : typeof Immutable @@ -30,8 +32,11 @@ ->reviver : (key: string | number, sequence: Collection.Keyed | Collection.Indexed, path?: Array) => any +>reviver : (key: string | number, sequence: Collection.Indexed | Collection.Keyed, path?: (string | number)[]) => any >key : string | number - >sequence : Collection.Indexed | Collection.Keyed +->sequence : Collection.Keyed | Collection.Indexed ++>sequence : Collection.Indexed | Collection.Keyed + >Collection : any >Collection : any + >path : (string | number)[] @@= skipped -37, +37 lines =@@ >Collection : any @@ -72,8 +77,9 @@ merge(...collections: Array | Array>): this; ->merge : (...collections: Array | Array>) => this +->collections : (Collection.Indexed | T[])[] +>merge : (...collections: (T[] | Collection.Indexed)[]) => this - >collections : (T[] | Collection.Indexed)[] ++>collections : (T[] | Collection.Indexed)[] >Collection : any mergeWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; @@ -82,13 +88,16 @@ >merger : (oldVal: T, newVal: T, key: number) => T >oldVal : T >newVal : T -@@= skipped -14, +14 lines =@@ + >key : number +->collections : (Collection.Indexed | T[])[] ++>collections : (T[] | Collection.Indexed)[] >Collection : any mergeDeep(...collections: Array | Array>): this; ->mergeDeep : (...collections: Array | Array>) => this +->collections : (Collection.Indexed | T[])[] +>mergeDeep : (...collections: (T[] | Collection.Indexed)[]) => this - >collections : (T[] | Collection.Indexed)[] ++>collections : (T[] | Collection.Indexed)[] >Collection : any mergeDeepWith(merger: (oldVal: T, newVal: T, key: number) => T, ...collections: Array | Array>): this; @@ -97,7 +106,13 @@ >merger : (oldVal: T, newVal: T, key: number) => T >oldVal : T >newVal : T -@@= skipped -45, +45 lines =@@ + >key : number +->collections : (Collection.Indexed | T[])[] ++>collections : (T[] | Collection.Indexed)[] + >Collection : any + + setSize(size: number): List; +@@= skipped -59, +59 lines =@@ >value : any mergeIn(keyPath: Iterable, ...collections: Array): this; @@ -217,25 +232,30 @@ union(...collections: Array | Array>): this; ->union : (...collections: Array | Array>) => this +->collections : (Collection | T[])[] +>union : (...collections: (T[] | Collection)[]) => this - >collections : (T[] | Collection)[] ++>collections : (T[] | Collection)[] merge(...collections: Array | Array>): this; ->merge : (...collections: Array | Array>) => this +->collections : (Collection | T[])[] +>merge : (...collections: (T[] | Collection)[]) => this - >collections : (T[] | Collection)[] ++>collections : (T[] | Collection)[] intersect(...collections: Array | Array>): this; ->intersect : (...collections: Array | Array>) => this +->collections : (Collection | T[])[] +>intersect : (...collections: (T[] | Collection)[]) => this - >collections : (T[] | Collection)[] ++>collections : (T[] | Collection)[] subtract(...collections: Array | Array>): this; ->subtract : (...collections: Array | Array>) => this +->collections : (Collection | T[])[] +>subtract : (...collections: (T[] | Collection)[]) => this - >collections : (T[] | Collection)[] ++>collections : (T[] | Collection)[] // Transient changes + withMutations(mutator: (mutable: this) => any): this; @@= skipped -29, +29 lines =@@ // Sequence algorithms @@ -349,7 +369,20 @@ >maybeRecord : any >Record : any -@@= skipped -58, +58 lines =@@ +@@= skipped -10, +10 lines =@@ + + export interface Class { + (values?: Partial | Iterable<[string, any]>): Instance & Readonly; +->values : Partial | Iterable<[string, any]> ++>values : Iterable<[string, any]> | Partial + + new (values?: Partial | Iterable<[string, any]>): Instance & Readonly; +->values : Partial | Iterable<[string, any]> ++>values : Iterable<[string, any]> | Partial + } + export interface Instance { + readonly size: number; +@@= skipped -48, +48 lines =@@ >value : T[K] merge(...collections: Array | Iterable<[string, any]>>): this; @@ -408,7 +441,7 @@ >values : T[] >Seq : any - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Seq.Keyed; ->Keyed : { (collection: Iterable<[K, V]>): Seq.Keyed; (obj: { [key: string]: V_1; }): Seq.Keyed; (): Seq.Keyed; (): Seq.Keyed; } +>Keyed : { (collection: Iterable<[K, V]>): Keyed; (obj: { [key: string]: V; }): Keyed; (): Keyed; (): Keyed; } @@ -647,7 +680,7 @@ >Collection : any @@= skipped -21, +21 lines =@@ - export module Keyed {} + export namespace Keyed {} export function Keyed(collection: Iterable<[K, V]>): Collection.Keyed; ->Keyed : { (collection: Iterable<[K, V]>): Collection.Keyed; (obj: { [key: string]: V_1; }): Collection.Keyed; } +>Keyed : { (collection: Iterable<[K, V]>): Keyed; (obj: { [key: string]: V; }): Keyed; } @@ -729,7 +762,7 @@ >key : K @@= skipped -15, +15 lines =@@ } - export module Indexed {} + export namespace Indexed {} export function Indexed(collection: Iterable): Collection.Indexed; ->Indexed : (collection: Iterable) => Collection.Indexed +>Indexed : (collection: Iterable) => Indexed @@ -849,7 +882,7 @@ >index : number @@= skipped -15, +15 lines =@@ } - export module Set {} + export namespace Set {} export function Set(collection: Iterable): Collection.Set; ->Set : (collection: Iterable) => Collection.Set +>Set : (collection: Iterable) => Set @@ -980,9 +1013,10 @@ reduce(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduce : { (reducer: (reduction: R_1, value: V, key: K, iter: this) => R_1, initialReduction: R_1, context?: any): R_1; (reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; } ->reducer : (reduction: V | R, value: V, key: K, iter: this) => R +->reduction : V | R +>reduce : { (reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; (reducer: (reduction: R | V, value: V, key: K, iter: this) => R): R; } +>reducer : (reduction: R | V, value: V, key: K, iter: this) => R - >reduction : R | V ++>reduction : R | V >value : V >key : K >iter : this @@ -999,11 +1033,13 @@ reduceRight(reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; ->reduceRight : { (reducer: (reduction: R_1, value: V, key: K, iter: this) => R_1, initialReduction: R_1, context?: any): R_1; (reducer: (reduction: V | R, value: V, key: K, iter: this) => R): R; } ->reducer : (reduction: V | R, value: V, key: K, iter: this) => R +->reduction : V | R +>reduceRight : { (reducer: (reduction: R, value: V, key: K, iter: this) => R, initialReduction: R, context?: any): R; (reducer: (reduction: R | V, value: V, key: K, iter: this) => R): R; } +>reducer : (reduction: R | V, value: V, key: K, iter: this) => R - >reduction : R | V ++>reduction : R | V >value : V >key : K + >iter : this @@= skipped -51, +51 lines =@@ // Search for value diff --git a/testdata/baselines/reference/submodule/compiler/complicatedGenericRecursiveBaseClassReference.js.diff b/testdata/baselines/reference/submodule/compiler/complicatedGenericRecursiveBaseClassReference.js.diff new file mode 100644 index 0000000000..0a79027570 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/complicatedGenericRecursiveBaseClassReference.js.diff @@ -0,0 +1,31 @@ +--- old.complicatedGenericRecursiveBaseClassReference.js ++++ new.complicatedGenericRecursiveBaseClassReference.js +@@= skipped -7, +7 lines =@@ + + + //// [complicatedGenericRecursiveBaseClassReference.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var S18 = /** @class */ (function (_super) { +- __extends(S18, _super); +- function S18() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return S18; +-}(S18)); ++class S18 extends S18 { ++} + (new S18(123)).S18 = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt.diff new file mode 100644 index 0000000000..ff69abb2d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt.diff @@ -0,0 +1,107 @@ +--- old.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt ++++ new.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.errors.txt +@@= skipped -0, +0 lines =@@ +-complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel | ChannelOfType>'. +- Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick | ChannelOfType, "type">'. ++complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts(33,5): error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel | ChannelOfType>'. ++ Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick | ChannelOfType, "type">'. + Types of property 'type' are incompatible. +- Type 'T' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +- Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +- Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +- Type 'string' is not assignable to type 'ChannelOfType["type"]'. +- Type '"text"' is not assignable to type 'T & "text"'. +- Type '"text"' is not assignable to type 'T'. +- '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +- Type 'T' is not assignable to type 'ChannelOfType["type"]'. +- Type 'string' is not assignable to type 'ChannelOfType["type"]'. +- Type 'string' is not assignable to type 'ChannelOfType["type"]'. +- Type '"text"' is not assignable to type 'T & "text"'. +- Type '"text"' is not assignable to type 'T'. +- '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +- Type 'T' is not assignable to type 'T & "text"'. +- Type '"text" | "email"' is not assignable to type 'T & "text"'. +- Type '"text"' is not assignable to type 'T & "text"'. +- Type '"text"' is not assignable to type 'T'. +- '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +- Type 'T' is not assignable to type '"text"'. +- Type '"text" | "email"' is not assignable to type '"text"'. +- Type '"email"' is not assignable to type '"text"'. ++ Type 'T' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++ Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++ Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++ Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++ Type '"email"' is not assignable to type 'T & "email"'. ++ Type '"email"' is not assignable to type 'T'. ++ '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++ Type 'T' is not assignable to type 'ChannelOfType["type"]'. ++ Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++ Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++ Type '"email"' is not assignable to type 'T & "email"'. ++ Type '"email"' is not assignable to type 'T'. ++ '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++ Type 'T' is not assignable to type 'T & "email"'. ++ Type '"email" | "text"' is not assignable to type 'T & "email"'. ++ Type '"email"' is not assignable to type 'T & "email"'. ++ Type '"email"' is not assignable to type 'T'. ++ '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++ Type 'T' is not assignable to type '"email"'. ++ Type '"email" | "text"' is not assignable to type '"email"'. ++ Type '"text"' is not assignable to type '"email"'. + + + ==== complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.ts (1 errors) ==== +@@= skipped -58, +58 lines =@@ + const localChannelId = `blahblahblah`; + return { type, localChannelId }; + ~~~~~~ +-!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel | ChannelOfType>'. +-!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick | ChannelOfType, "type">'. ++!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel | ChannelOfType>'. ++!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick | ChannelOfType, "type">'. + !!! error TS2322: Types of property 'type' are incompatible. +-!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +-!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +-!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. +-!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T'. +-!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +-!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"]'. +-!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. +-!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T'. +-!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +-!!! error TS2322: Type 'T' is not assignable to type 'T & "text"'. +-!!! error TS2322: Type '"text" | "email"' is not assignable to type 'T & "text"'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T & "text"'. +-!!! error TS2322: Type '"text"' is not assignable to type 'T'. +-!!! error TS2322: '"text"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"text" | "email"'. +-!!! error TS2322: Type 'T' is not assignable to type '"text"'. +-!!! error TS2322: Type '"text" | "email"' is not assignable to type '"text"'. +-!!! error TS2322: Type '"email"' is not assignable to type '"text"'. ++!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"] & ChannelOfType["type"]'. ++!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T'. ++!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++!!! error TS2322: Type 'T' is not assignable to type 'ChannelOfType["type"]'. ++!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++!!! error TS2322: Type 'string' is not assignable to type 'ChannelOfType["type"]'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T'. ++!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++!!! error TS2322: Type 'T' is not assignable to type 'T & "email"'. ++!!! error TS2322: Type '"email" | "text"' is not assignable to type 'T & "email"'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T & "email"'. ++!!! error TS2322: Type '"email"' is not assignable to type 'T'. ++!!! error TS2322: '"email"' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '"email" | "text"'. ++!!! error TS2322: Type 'T' is not assignable to type '"email"'. ++!!! error TS2322: Type '"email" | "text"' is not assignable to type '"email"'. ++!!! error TS2322: Type '"text"' is not assignable to type '"email"'. + } + + const newTextChannel = makeNewChannel('text'); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js.diff b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js.diff new file mode 100644 index 0000000000..18adca8cea --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js.diff @@ -0,0 +1,19 @@ +--- old.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js ++++ new.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.js +@@= skipped -49, +49 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.makeNewChannel = makeNewChannel; + function makeNewChannel(type) { +- var localChannelId = "blahblahblah"; +- return { type: type, localChannelId: localChannelId }; ++ const localChannelId = `blahblahblah`; ++ return { type, localChannelId }; + } +-var newTextChannel = makeNewChannel('text'); ++const newTextChannel = makeNewChannel('text'); + // This should work + newTextChannel.phoneNumber = '613-555-1234'; +-var newTextChannel2 = makeNewChannel('text'); ++const newTextChannel2 = makeNewChannel('text'); + // Compare with this, which ofc works. + newTextChannel2.phoneNumber = '613-555-1234'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types.diff b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types.diff index cd34a07b53..4ca8bb4f77 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types.diff +++ b/testdata/baselines/reference/submodule/compiler/complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types.diff @@ -1,6 +1,15 @@ --- old.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types +++ new.complicatedIndexedAccessKeyofReliesOnKeyofNeverUpperBound.types -@@= skipped -54, +54 lines =@@ +@@= skipped -26, +26 lines =@@ + >Channel : Channel + + export type ChannelType = Channel extends { type: infer R } ? R : never; +->ChannelType : "text" | "email" ++>ChannelType : "email" | "text" + >type : R + + type Omit = Pick< +@@= skipped -28, +28 lines =@@ export function makeNewChannel(type: T): NewChannel> { diff --git a/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.js.diff b/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.js.diff index 9ac3616e3a..04de38ab95 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.js.diff +++ b/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.js.diff @@ -7,4 +7,10 @@ -"use strict"; Func({ initialValues: { - foo: "" \ No newline at end of file + foo: "" + }, +- validate: function (props) { ++ validate: props => { + props.foo; + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.types.diff b/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.types.diff index c4edee470c..1b35961473 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.types.diff +++ b/testdata/baselines/reference/submodule/compiler/complicatedIndexesOfIntersectionsAreInferencable.types.diff @@ -8,7 +8,11 @@ +>Func : (x: string extends "initialValues" | "validate" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "initialValues" | "validate" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>>) => void x: (string extends "validate" | "initialValues" | keyof ExtraProps - >x : string extends "initialValues" | "validate" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "initialValues" | "validate" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>> +->x : string extends "validate" | "initialValues" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>> ++>x : string extends "initialValues" | "validate" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "initialValues" | "validate" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>> + + ? Readonly & ExtraProps> + : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> @@= skipped -12, +12 lines =@@ Func({ diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt index 0131f5117a..10fbd465c6 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.errors.txt @@ -4,8 +4,8 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me ==== complicatedPrivacy.ts (3 errors) ==== - module m1 { - export module m2 { + namespace m1 { + export namespace m2 { export function f1(c1: C1) { @@ -51,7 +51,7 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me new (arg1: C1) : C1 }) { } - module m3 { + namespace m3 { function f2(f1: C1) { } @@ -77,8 +77,8 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me class C2 { } - module m2 { - export module m3 { + namespace m2 { + export namespace m3 { export class c_pr implements mglo5.i5, mglo5.i6 { ~~ @@ -88,12 +88,12 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me } } - module m4 { + namespace m4 { class C { } - module m5 { + namespace m5 { - export module m6 { + export namespace m6 { function f1() { return new C(); } @@ -104,7 +104,7 @@ complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported me } } - module mglo5 { + namespace mglo5 { export interface i5 { f1(): string; } diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js index 9b1700e68a..0571634b24 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/complicatedPrivacy.ts] //// //// [complicatedPrivacy.ts] -module m1 { - export module m2 { +namespace m1 { + export namespace m2 { export function f1(c1: C1) { @@ -44,7 +44,7 @@ module m1 { new (arg1: C1) : C1 }) { } - module m3 { + namespace m3 { function f2(f1: C1) { } @@ -70,8 +70,8 @@ module m1 { class C2 { } -module m2 { - export module m3 { +namespace m2 { + export namespace m3 { export class c_pr implements mglo5.i5, mglo5.i6 { f1() { @@ -79,12 +79,12 @@ module m2 { } } - module m4 { + namespace m4 { class C { } - module m5 { + namespace m5 { - export module m6 { + export namespace m6 { function f1() { return new C(); } @@ -95,7 +95,7 @@ module m2 { } } -module mglo5 { +namespace mglo5 { export interface i5 { f1(): string; } diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js.diff b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js.diff index 1621697464..4559110121 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js.diff +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.js.diff @@ -1,10 +1,114 @@ --- old.complicatedPrivacy.js +++ new.complicatedPrivacy.js -@@= skipped -149, +149 lines =@@ - class C1 { +@@= skipped -108, +108 lines =@@ + //// [complicatedPrivacy.js] + var m1; + (function (m1) { +- var m2; ++ let m2; + (function (m2) { + function f1(c1) { + } +@@= skipped -8, +8 lines =@@ + function f2(c2) { + } + m2.f2 = f2; +- var C2 = /** @class */ (function () { +- function C2() { +- } +- Object.defineProperty(C2.prototype, "p1", { +- get: function (arg) { +- return new C1(); +- }, +- set: function (arg1) { +- }, +- enumerable: false, +- configurable: true +- }); +- C2.prototype.f55 = function () { ++ class C2 { ++ get p1(arg) { ++ return new C1(); ++ } ++ set p1(arg1) { ++ } ++ f55() { + return "Hello world"; +- }; +- return C2; +- }()); ++ } ++ } + m2.C2 = C2; + })(m2 = m1.m2 || (m1.m2 = {})); + function f2(arg1) { +@@= skipped -32, +25 lines =@@ + function f5(arg2) { } - class C5 { + m1.f5 = f5; +- var m3; ++ let m3; + (function (m3) { + function f2(f1) { + } + })(m3 || (m3 = {})); +- var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +- }()); +- var C5 = /** @class */ (function () { +- function C5() { +- } +- return C5; +- }()); ++ class C1 { ++ } ++ class C5 { + x; - } ++ } m1.C5 = C5; - })(m1 || (m1 = {})); \ No newline at end of file + })(m1 || (m1 = {})); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C2 { ++} + var m2; + (function (m2) { +- var m3; ++ let m3; + (function (m3) { +- var c_pr = /** @class */ (function () { +- function c_pr() { +- } +- c_pr.prototype.f1 = function () { ++ class c_pr { ++ f1() { + return "Hello"; +- }; +- return c_pr; +- }()); ++ } ++ } + m3.c_pr = c_pr; +- var m4; ++ let m4; + (function (m4) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); +- var m5; ++ class C { ++ } ++ let m5; + (function (m5) { +- var m6; ++ let m6; + (function (m6) { + function f1() { + return new C(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.symbols b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.symbols index 3c06bdfa7c..01708f27d7 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.symbols +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/complicatedPrivacy.ts] //// === complicatedPrivacy.ts === -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(complicatedPrivacy.ts, 0, 0)) - export module m2 { ->m2 : Symbol(m2, Decl(complicatedPrivacy.ts, 0, 11)) + export namespace m2 { +>m2 : Symbol(m2, Decl(complicatedPrivacy.ts, 0, 14)) export function f1(c1: C1) { ->f1 : Symbol(f1, Decl(complicatedPrivacy.ts, 1, 22)) +>f1 : Symbol(f1, Decl(complicatedPrivacy.ts, 1, 25)) >c1 : Symbol(c1, Decl(complicatedPrivacy.ts, 4, 27)) >C1 : Symbol(C1, Decl(complicatedPrivacy.ts, 50, 5)) } @@ -89,11 +89,11 @@ module m1 { }) { } - module m3 { + namespace m3 { >m3 : Symbol(m3, Decl(complicatedPrivacy.ts, 42, 5)) function f2(f1: C1) { ->f2 : Symbol(f2, Decl(complicatedPrivacy.ts, 43, 15)) +>f2 : Symbol(f2, Decl(complicatedPrivacy.ts, 43, 18)) >f1 : Symbol(f1, Decl(complicatedPrivacy.ts, 44, 20)) >C1 : Symbol(C1, Decl(complicatedPrivacy.ts, 50, 5)) } @@ -134,17 +134,17 @@ class C2 { >C2 : Symbol(C2, Decl(complicatedPrivacy.ts, 64, 1)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(complicatedPrivacy.ts, 67, 1)) - export module m3 { ->m3 : Symbol(m3, Decl(complicatedPrivacy.ts, 69, 11)) + export namespace m3 { +>m3 : Symbol(m3, Decl(complicatedPrivacy.ts, 69, 14)) export class c_pr implements mglo5.i5, mglo5.i6 { ->c_pr : Symbol(c_pr, Decl(complicatedPrivacy.ts, 70, 22)) ->mglo5.i5 : Symbol(mglo5.i5, Decl(complicatedPrivacy.ts, 94, 14)) +>c_pr : Symbol(c_pr, Decl(complicatedPrivacy.ts, 70, 25)) +>mglo5.i5 : Symbol(mglo5.i5, Decl(complicatedPrivacy.ts, 94, 17)) >mglo5 : Symbol(mglo5, Decl(complicatedPrivacy.ts, 92, 1)) ->i5 : Symbol(mglo5.i5, Decl(complicatedPrivacy.ts, 94, 14)) +>i5 : Symbol(mglo5.i5, Decl(complicatedPrivacy.ts, 94, 17)) >mglo5 : Symbol(mglo5, Decl(complicatedPrivacy.ts, 92, 1)) f1() { @@ -154,23 +154,23 @@ module m2 { } } - module m4 { + namespace m4 { >m4 : Symbol(m4, Decl(complicatedPrivacy.ts, 76, 9)) class C { ->C : Symbol(C, Decl(complicatedPrivacy.ts, 78, 19)) +>C : Symbol(C, Decl(complicatedPrivacy.ts, 78, 22)) } - module m5 { + namespace m5 { >m5 : Symbol(m5, Decl(complicatedPrivacy.ts, 80, 13)) - export module m6 { ->m6 : Symbol(m6, Decl(complicatedPrivacy.ts, 81, 23)) + export namespace m6 { +>m6 : Symbol(m6, Decl(complicatedPrivacy.ts, 81, 26)) function f1() { ->f1 : Symbol(f1, Decl(complicatedPrivacy.ts, 83, 34)) +>f1 : Symbol(f1, Decl(complicatedPrivacy.ts, 83, 37)) return new C(); ->C : Symbol(C, Decl(complicatedPrivacy.ts, 78, 19)) +>C : Symbol(C, Decl(complicatedPrivacy.ts, 78, 22)) } } } @@ -179,11 +179,11 @@ module m2 { } } -module mglo5 { +namespace mglo5 { >mglo5 : Symbol(mglo5, Decl(complicatedPrivacy.ts, 92, 1)) export interface i5 { ->i5 : Symbol(i5, Decl(complicatedPrivacy.ts, 94, 14)) +>i5 : Symbol(i5, Decl(complicatedPrivacy.ts, 94, 17)) f1(): string; >f1 : Symbol(i5.f1, Decl(complicatedPrivacy.ts, 95, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.types b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.types index 70d78c78ec..2faf2e838a 100644 --- a/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.types +++ b/testdata/baselines/reference/submodule/compiler/complicatedPrivacy.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/complicatedPrivacy.ts] //// === complicatedPrivacy.ts === -module m1 { +namespace m1 { >m1 : typeof m1 - export module m2 { + export namespace m2 { >m2 : typeof m2 @@ -82,7 +82,7 @@ module m1 { }) { } - module m3 { + namespace m3 { >m3 : typeof m3 function f2(f1: C1) { @@ -120,10 +120,10 @@ class C2 { >C2 : C2 } -module m2 { +namespace m2 { >m2 : typeof m2 - export module m3 { + export namespace m3 { >m3 : typeof m3 export class c_pr implements mglo5.i5, mglo5.i6 { @@ -139,16 +139,16 @@ module m2 { } } - module m4 { + namespace m4 { >m4 : typeof m4 class C { >C : C } - module m5 { + namespace m5 { >m5 : typeof m5 - export module m6 { + export namespace m6 { >m6 : typeof m6 function f1() { @@ -165,7 +165,7 @@ module m2 { } } -module mglo5 { +namespace mglo5 { export interface i5 { f1(): string; >f1 : () => string diff --git a/testdata/baselines/reference/submodule/compiler/compositeContextualSignature.symbols.diff b/testdata/baselines/reference/submodule/compiler/compositeContextualSignature.symbols.diff new file mode 100644 index 0000000000..e4aba06b06 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/compositeContextualSignature.symbols.diff @@ -0,0 +1,11 @@ +--- old.compositeContextualSignature.symbols ++++ new.compositeContextualSignature.symbols +@@= skipped -6, +6 lines =@@ + >f : Symbol(f, Decl(compositeContextualSignature.ts, 0, 0)) + >T : Symbol(T, Decl(compositeContextualSignature.ts, 2, 11)) + >v : Symbol(v, Decl(compositeContextualSignature.ts, 2, 28)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(compositeContextualSignature.ts, 2, 11)) + + f([ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.js b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.js index f8a8a664cb..1b9992d5f5 100644 --- a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.js +++ b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/compoundVarDecl1.ts] //// //// [compoundVarDecl1.ts] -module Foo { var a = 1, b = 1; a = b + 2; } +namespace Foo { var a = 1, b = 1; a = b + 2; } var foo = 4, bar = 5; diff --git a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.symbols b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.symbols index 8c4dde2f4e..1233f47d1f 100644 --- a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.symbols +++ b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.symbols @@ -1,12 +1,12 @@ //// [tests/cases/compiler/compoundVarDecl1.ts] //// === compoundVarDecl1.ts === -module Foo { var a = 1, b = 1; a = b + 2; } +namespace Foo { var a = 1, b = 1; a = b + 2; } >Foo : Symbol(Foo, Decl(compoundVarDecl1.ts, 0, 0)) ->a : Symbol(a, Decl(compoundVarDecl1.ts, 0, 16)) ->b : Symbol(b, Decl(compoundVarDecl1.ts, 0, 23)) ->a : Symbol(a, Decl(compoundVarDecl1.ts, 0, 16)) ->b : Symbol(b, Decl(compoundVarDecl1.ts, 0, 23)) +>a : Symbol(a, Decl(compoundVarDecl1.ts, 0, 19)) +>b : Symbol(b, Decl(compoundVarDecl1.ts, 0, 26)) +>a : Symbol(a, Decl(compoundVarDecl1.ts, 0, 19)) +>b : Symbol(b, Decl(compoundVarDecl1.ts, 0, 26)) var foo = 4, bar = 5; >foo : Symbol(foo, Decl(compoundVarDecl1.ts, 2, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.types b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.types index 9136288da8..2601dded22 100644 --- a/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.types +++ b/testdata/baselines/reference/submodule/compiler/compoundVarDecl1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/compoundVarDecl1.ts] //// === compoundVarDecl1.ts === -module Foo { var a = 1, b = 1; a = b + 2; } +namespace Foo { var a = 1, b = 1; a = b + 2; } >Foo : typeof Foo >a : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.js.diff b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.js.diff index 835664175c..bf4c2e4d97 100644 --- a/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.js.diff +++ b/testdata/baselines/reference/submodule/compiler/computedEnumTypeWidening.js.diff @@ -21,25 +21,113 @@ + if (typeof E.D !== "string") E[E.D] = "D"; })(E || (E = {})); function f1() { - const c1 = E.B; // Fresh E.B -@@= skipped -51, +54 lines =@@ - let v1 = E.B; - let v2 = E.B; - class C { -- constructor() { +- var c1 = E.B; // Fresh E.B +- var v1 = c1; // E +- var c2 = c1; // Fresh E.B +- var v2 = c2; // E +- var c3 = E.B; // E.B +- var v3 = c3; // E.B +- var c4 = c1; // E.B +- var v4 = c4; // E.B ++ const c1 = E.B; // Fresh E.B ++ let v1 = c1; // E ++ const c2 = c1; // Fresh E.B ++ let v2 = c2; // E ++ const c3 = E.B; // E.B ++ let v3 = c3; // E.B ++ const c4 = c1; // E.B ++ let v4 = c4; // E.B + } + function f2(cond) { +- var c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B +- var c2 = c1; // E.A | E.B +- var c3 = cond ? c1 : c2; // E.A | E.B +- var c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C +- var c5 = c4; // E.A | E.B | E.C +- var v1 = c1; // E +- var v2 = c2; // E.A | E.B +- var v3 = c3; // E.A | E.B +- var v4 = c4; // E +- var v5 = c5; // E.A | E.B | E.C ++ const c1 = cond ? E.A : E.B; // Fresh E.A | fresh E.B ++ const c2 = c1; // E.A | E.B ++ const c3 = cond ? c1 : c2; // E.A | E.B ++ const c4 = cond ? c3 : E.C; // E.A | E.B | fresh E.C ++ const c5 = c4; // E.A | E.B | E.C ++ let v1 = c1; // E ++ let v2 = c2; // E.A | E.B ++ let v3 = c3; // E.A | E.B ++ let v4 = c4; // E ++ let v5 = c5; // E.A | E.B | E.C + } + function f3() { +- var c1 = E.B; +- var v1 = c1; // E +- var c2 = E.B; +- var v2 = c2; // E.B +- var c3 = E.B; +- var v3 = c3; // E.B +- var c4 = E.B; +- var v4 = c4; // E.B +- var c5 = E.B; +- var v5 = c5; // E.B ++ const c1 = E.B; ++ let v1 = c1; // E ++ const c2 = E.B; ++ let v2 = c2; // E.B ++ const c3 = E.B; ++ let v3 = c3; // E.B ++ const c4 = E.B; ++ let v4 = c4; // E.B ++ const c5 = E.B; ++ let v5 = c5; // E.B + } + function f4() { +- var c1 = E2.B; // Fresh E2.B +- var v1 = E.B; // E2 +-} +-var c1 = E.B; +-var c2 = E.B; +-var v1 = E.B; +-var v2 = E.B; +-var C = /** @class */ (function () { +- function C() { - this.p1 = E.B; - this.p2 = E.B; - this.p3 = E.B; - this.p4 = E.B; - } +- return C; +-}()); ++ const c1 = E2.B; // Fresh E2.B ++ let v1 = E.B; // E2 ++} ++const c1 = E.B; ++const c2 = E.B; ++let v1 = E.B; ++let v2 = E.B; ++class C { + p1 = E.B; + p2 = E.B; + p3 = E.B; + p4 = E.B; - } ++} // Repro from #52531 var MyEnum; -@@= skipped -45, +43 lines =@@ + (function (MyEnum) { +@@= skipped -66, +66 lines =@@ + MyEnum[MyEnum["B"] = 1] = "B"; + MyEnum[MyEnum["C"] = 2] = "C"; + })(MyEnum || (MyEnum = {})); +-var val1 = MyEnum.A; ++let val1 = MyEnum.A; + val1 = MyEnum.B; +-var val2 = MyDeclaredEnum.A; ++let val2 = MyDeclaredEnum.A; + val2 = MyDeclaredEnum.B; + + +@@= skipped -31, +31 lines =@@ declare class C { p1: E; p2: E.B; diff --git a/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring1.js.diff b/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring1.js.diff new file mode 100644 index 0000000000..e3eab6f979 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring1.js.diff @@ -0,0 +1,62 @@ +--- old.computedPropertiesInDestructuring1.js ++++ new.computedPropertiesInDestructuring1.js +@@= skipped -39, +39 lines =@@ + + + //// [computedPropertiesInDestructuring1.js] +-var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + // destructuring in variable declarations +-var foo = "bar"; +-var _o = { bar: "bar" }, _p = foo, bar = _o[_p]; +-var bar2 = { bar: "bar" }["bar"]; +-var foo2 = function () { return "bar"; }; +-var _q = { bar: "bar" }, _r = foo2(), bar3 = _q[_r]; +-var _s = [{ bar: "bar" }], _t = foo, bar4 = _s[0][_t]; +-var _u = [{ bar: "bar" }], _v = foo2(), bar5 = _u[0][_v]; +-function f1(_a) { +- var x = _a["bar"]; +-} +-function f2(_a) { +- var _b = foo, x = _a[_b]; +-} +-function f3(_a) { +- var _b = foo2(), x = _a[_b]; +-} +-function f4(_a) { +- var _b = foo, x = _a[0][_b]; +-} +-function f5(_a) { +- var _b = foo2(), x = _a[0][_b]; +-} ++let foo = "bar"; ++let { [foo]: bar } = { bar: "bar" }; ++let { ["bar"]: bar2 } = { bar: "bar" }; ++let foo2 = () => "bar"; ++let { [foo2()]: bar3 } = { bar: "bar" }; ++let [{ [foo]: bar4 }] = [{ bar: "bar" }]; ++let [{ [foo2()]: bar5 }] = [{ bar: "bar" }]; ++function f1({ ["bar"]: x }) { } ++function f2({ [foo]: x }) { } ++function f3({ [foo2()]: x }) { } ++function f4([{ [foo]: x }]) { } ++function f5([{ [foo2()]: x }]) { } + // report errors on type errors in computed properties used in destructuring +-var _w = [{ bar: "bar" }], _x = foo(), bar6 = _w[0][_x]; +-var _y = [{ bar: "bar" }], _z = foo.toExponential(), bar7 = _y[0][_z]; ++let [{ [foo()]: bar6 }] = [{ bar: "bar" }]; ++let [{ [foo.toExponential()]: bar7 }] = [{ bar: "bar" }]; + // destructuring assignment +-(_a = { bar: "bar" }, _b = foo, bar = _a[_b]); +-(bar2 = { bar: "bar" }["bar"]); +-(_c = { bar: "bar" }, _d = foo2(), bar3 = _c[_d]); +-_e = [{ bar: "bar" }], _f = foo, bar4 = _e[0][_f]; +-_g = [{ bar: "bar" }], _h = foo2(), bar5 = _g[0][_h]; +-_j = [{ bar: "bar" }], _k = foo(), bar4 = _j[0][_k]; +-_l = [{ bar: "bar" }], _m = (1 + {}), bar4 = _l[0][_m]; ++({ [foo]: bar } = { bar: "bar" }); ++({ ["bar"]: bar2 } = { bar: "bar" }); ++({ [foo2()]: bar3 } = { bar: "bar" }); ++[{ [foo]: bar4 }] = [{ bar: "bar" }]; ++[{ [foo2()]: bar5 }] = [{ bar: "bar" }]; ++[{ [foo()]: bar4 }] = [{ bar: "bar" }]; ++[{ [(1 + {})]: bar4 }] = [{ bar: "bar" }]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring2.js.diff b/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring2.js.diff new file mode 100644 index 0000000000..b711d42c02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/computedPropertiesInDestructuring2.js.diff @@ -0,0 +1,10 @@ +--- old.computedPropertiesInDestructuring2.js ++++ new.computedPropertiesInDestructuring2.js +@@= skipped -4, +4 lines =@@ + let {[foo2()]: bar3} = {}; + + //// [computedPropertiesInDestructuring2.js] +-var foo2 = function () { return "bar"; }; +-var _a = {}, _b = foo2(), bar3 = _a[_b]; ++let foo2 = () => "bar"; ++let { [foo2()]: bar3 } = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/computedPropertiesTransformedInOtherwiseNonTSClasses.js.diff b/testdata/baselines/reference/submodule/compiler/computedPropertiesTransformedInOtherwiseNonTSClasses.js.diff index 417e74fb26..bedba702c1 100644 --- a/testdata/baselines/reference/submodule/compiler/computedPropertiesTransformedInOtherwiseNonTSClasses.js.diff +++ b/testdata/baselines/reference/submodule/compiler/computedPropertiesTransformedInOtherwiseNonTSClasses.js.diff @@ -1,10 +1,16 @@ --- old.computedPropertiesTransformedInOtherwiseNonTSClasses.js +++ new.computedPropertiesTransformedInOtherwiseNonTSClasses.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + var NS; (function (NS) { NS.x = Symbol(); - class NotTransformed { -+ [NS.x]; - } +- var NotTransformed = /** @class */ (function () { +- function NotTransformed() { +- } +- return NotTransformed; +- }()); - NS.x; ++ class NotTransformed { ++ [NS.x]; ++ } })(NS || (NS = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/computedPropertyNameWithImportedKey.js.diff b/testdata/baselines/reference/submodule/compiler/computedPropertyNameWithImportedKey.js.diff index 3012b0c7f0..ccb209a808 100644 --- a/testdata/baselines/reference/submodule/compiler/computedPropertyNameWithImportedKey.js.diff +++ b/testdata/baselines/reference/submodule/compiler/computedPropertyNameWithImportedKey.js.diff @@ -5,7 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.fn = fn; -var a_1 = require("./a"); +-function fn(_a) { +- var _b = a_1.a, value = _a[_b]; +const a_1 = require("./a"); - function fn({ [a_1.a]: value }) { ++function fn({ [a_1.a]: value }) { return value; - } \ No newline at end of file + } diff --git a/testdata/baselines/reference/submodule/compiler/computedTypesKeyofNoIndexSignatureType.types.diff b/testdata/baselines/reference/submodule/compiler/computedTypesKeyofNoIndexSignatureType.types.diff new file mode 100644 index 0000000000..20b4028fbf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/computedTypesKeyofNoIndexSignatureType.types.diff @@ -0,0 +1,8 @@ +--- old.computedTypesKeyofNoIndexSignatureType.types ++++ new.computedTypesKeyofNoIndexSignatureType.types +@@= skipped -40, +40 lines =@@ + >WithIndexKey : string | number + + type WithoutIndexKey = keyof WithoutIndex; // number <-- Expected: "foo" | "bar" +->WithoutIndexKey : "foo" | "bar" ++>WithoutIndexKey : "bar" | "foo" diff --git a/testdata/baselines/reference/submodule/compiler/computerPropertiesInES5ShouldBeTransformed.js.diff b/testdata/baselines/reference/submodule/compiler/computerPropertiesInES5ShouldBeTransformed.js.diff new file mode 100644 index 0000000000..72e5e47bb1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/computerPropertiesInES5ShouldBeTransformed.js.diff @@ -0,0 +1,11 @@ +--- old.computerPropertiesInES5ShouldBeTransformed.js ++++ new.computerPropertiesInES5ShouldBeTransformed.js +@@= skipped -3, +3 lines =@@ + const b = ({ [`key`]: renamed }) => renamed; + + //// [computerPropertiesInES5ShouldBeTransformed.js] +-var b = function (_a) { +- var _b = "key", renamed = _a[_b]; +- return renamed; +-}; ++const b = ({ [`key`]: renamed }) => renamed; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/concatClassAndString.js.diff b/testdata/baselines/reference/submodule/compiler/concatClassAndString.js.diff new file mode 100644 index 0000000000..85a705bdbd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/concatClassAndString.js.diff @@ -0,0 +1,14 @@ +--- old.concatClassAndString.js ++++ new.concatClassAndString.js +@@= skipped -8, +8 lines =@@ + + //// [concatClassAndString.js] + // Shouldn't compile (the long form f = f + ""; doesn't): +-var f = /** @class */ (function () { +- function f() { +- } +- return f; +-}()); ++class f { ++} + f += ''; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/concatTuples.js.diff b/testdata/baselines/reference/submodule/compiler/concatTuples.js.diff new file mode 100644 index 0000000000..b684870633 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/concatTuples.js.diff @@ -0,0 +1,9 @@ +--- old.concatTuples.js ++++ new.concatTuples.js +@@= skipped -5, +5 lines =@@ + + + //// [concatTuples.js] +-var ijs = [[1, 2]]; ++let ijs = [[1, 2]]; + ijs = ijs.concat([[3, 4], [5, 6]]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/concatTuples.types.diff b/testdata/baselines/reference/submodule/compiler/concatTuples.types.diff new file mode 100644 index 0000000000..50e3ff947d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/concatTuples.types.diff @@ -0,0 +1,14 @@ +--- old.concatTuples.types ++++ new.concatTuples.types +@@= skipped -11, +11 lines =@@ + >ijs = ijs.concat([[3, 4], [5, 6]]) : [number, number][] + >ijs : [number, number][] + >ijs.concat([[3, 4], [5, 6]]) : [number, number][] +->ijs.concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: ([number, number] | ConcatArray<[number, number]>)[]): [number, number][]; } ++>ijs.concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: (ConcatArray<[number, number]> | [number, number])[]): [number, number][]; } + >ijs : [number, number][] +->concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: ([number, number] | ConcatArray<[number, number]>)[]): [number, number][]; } ++>concat : { (...items: ConcatArray<[number, number]>[]): [number, number][]; (...items: (ConcatArray<[number, number]> | [number, number])[]): [number, number][]; } + >[[3, 4], [5, 6]] : [number, number][] + >[3, 4] : [number, number] + >3 : 3 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalAnyCheckTypePicksBothBranches.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalAnyCheckTypePicksBothBranches.js.diff new file mode 100644 index 0000000000..5690106a61 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalAnyCheckTypePicksBothBranches.js.diff @@ -0,0 +1,14 @@ +--- old.conditionalAnyCheckTypePicksBothBranches.js ++++ new.conditionalAnyCheckTypePicksBothBranches.js +@@= skipped -11, +11 lines =@@ + y = 0; // error + + //// [conditionalAnyCheckTypePicksBothBranches.js] +-var x; ++let x; + x = 1; + x = 0; // not an error +-var y; ++let y; + y = 1; + y = 0; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalDoesntLeakUninstantiatedTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalDoesntLeakUninstantiatedTypeParameter.js.diff new file mode 100644 index 0000000000..2d15370251 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalDoesntLeakUninstantiatedTypeParameter.js.diff @@ -0,0 +1,10 @@ +--- old.conditionalDoesntLeakUninstantiatedTypeParameter.js ++++ new.conditionalDoesntLeakUninstantiatedTypeParameter.js +@@= skipped -10, +10 lines =@@ + + + //// [conditionalDoesntLeakUninstantiatedTypeParameter.js] +-var y = 3; // Type '3' is not assignable to type 'T'. (shouldn't error) +-var z = '3'; // Type '"3""' is not assignable to type 'T'. (should not mention T) ++const y = 3; // Type '3' is not assignable to type 'T'. (shouldn't error) ++const z = '3'; // Type '"3""' is not assignable to type 'T'. (should not mention T) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalEqualityOnLiteralObjects.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalEqualityOnLiteralObjects.js.diff new file mode 100644 index 0000000000..69548b85fa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalEqualityOnLiteralObjects.js.diff @@ -0,0 +1,13 @@ +--- old.conditionalEqualityOnLiteralObjects.js ++++ new.conditionalEqualityOnLiteralObjects.js +@@= skipped -57, +57 lines =@@ + + + //// [conditionalEqualityOnLiteralObjects.js] +-var a = { a: 1 }; +-var b = [1]; ++const a = { a: 1 }; ++const b = [1]; + if ({ a: 1 } === { a: 1 }) { + } + if ([1] === [1]) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalEqualityTestingNullability.symbols.diff b/testdata/baselines/reference/submodule/compiler/conditionalEqualityTestingNullability.symbols.diff new file mode 100644 index 0000000000..8044319bca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalEqualityTestingNullability.symbols.diff @@ -0,0 +1,17 @@ +--- old.conditionalEqualityTestingNullability.symbols ++++ new.conditionalEqualityTestingNullability.symbols +@@= skipped -28, +28 lines =@@ + declare const a: Foo; + >a : Symbol(a, Decl(conditionalEqualityTestingNullability.ts, 9, 13)) + >Foo : Symbol(Foo, Decl(conditionalEqualityTestingNullability.ts, 3, 7)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + declare const b: Foo; + >b : Symbol(b, Decl(conditionalEqualityTestingNullability.ts, 10, 13)) + >Foo : Symbol(Foo, Decl(conditionalEqualityTestingNullability.ts, 3, 7)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + //Expected 0, Actual 1 + type ShouldBe0 = Equals; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalExpression1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/conditionalExpression1.errors.txt.diff new file mode 100644 index 0000000000..322e411826 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalExpression1.errors.txt.diff @@ -0,0 +1,14 @@ +--- old.conditionalExpression1.errors.txt ++++ new.conditionalExpression1.errors.txt +@@= skipped -0, +0 lines =@@ + conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean'. +- Type 'number' is not assignable to type 'boolean'. ++ Type 'string' is not assignable to type 'boolean'. + + + ==== conditionalExpression1.ts (1 errors) ==== + var x: boolean = (true ? 1 : ""); // should be an error + ~ + !!! error TS2322: Type 'string | number' is not assignable to type 'boolean'. +-!!! error TS2322: Type 'number' is not assignable to type 'boolean'. ++!!! error TS2322: Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalExpressions2.types.diff b/testdata/baselines/reference/submodule/compiler/conditionalExpressions2.types.diff new file mode 100644 index 0000000000..956d733537 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalExpressions2.types.diff @@ -0,0 +1,11 @@ +--- old.conditionalExpressions2.types ++++ new.conditionalExpressions2.types +@@= skipped -29, +29 lines =@@ + + var e = false ? "foo" : "bar"; + >e : string +->false ? "foo" : "bar" : "foo" | "bar" ++>false ? "foo" : "bar" : "bar" | "foo" + >false : false + >"foo" : "foo" + >"bar" : "bar" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.js.diff index 8b2eaf3a4e..dccc957660 100644 --- a/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.js.diff @@ -1,10 +1,54 @@ --- old.conditionalTypeAssignabilityWhenDeferred.js +++ new.conditionalTypeAssignabilityWhenDeferred.js -@@= skipped -169, +169 lines =@@ - const o6 = o; +@@= skipped -145, +145 lines =@@ + x = s; // Error } - class Foo2 { + function testAssignabilityToConditionalType() { +- var o = { a: 1, b: 2 }; +- var x = undefined; ++ const o = { a: 1, b: 2 }; ++ const x = undefined; + // Simple case: OK +- var o1 = o; ++ const o1 = o; + // Simple case where source happens to be a conditional type: also OK +- var x1 = x; ++ const x1 = x; + // Infer type parameters: no good +- var o2 = o; ++ const o2 = o; + // The next 4 are arguable - if you choose to ignore the `never` distribution case, + // then they're all good. The `never` case _is_ a bit of an outlier - we say distributive types + // look approximately like the sum of their branches, but the `never` case bucks that. +@@= skipped -15, +15 lines =@@ + // being not `never`, but instead the intersection of the branches - a much more precise bound + // on that "impossible" input. + // Distributive where T might instantiate to never: no good +- var o3 = o; ++ const o3 = o; + // Distributive where T & string might instantiate to never: also no good +- var o4 = o; ++ const o4 = o; + // Distributive where {a: T} cannot instantiate to never: OK +- var o5 = o; ++ const o5 = o; + // Distributive where check type is a conditional which returns a non-never type upon instantiation with `never` but can still return never otherwise: no good +- var o6 = o; ++ const o6 = o; + } +-var Foo2 = /** @class */ (function () { +- function Foo2() { +- } +- Foo2.prototype.method = function () { ++class Foo2 { + prop; - method() { ++ method() { set(this, "prop", "hi"); // <-- type error - } \ No newline at end of file +- }; +- return Foo2; +-}()); ++ } ++} + set(new Foo2(), "prop", "hi"); // <-- typechecks + function f3(x) { + return x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.symbols.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.symbols.diff new file mode 100644 index 0000000000..c1d18a58e5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeAssignabilityWhenDeferred.symbols.diff @@ -0,0 +1,10 @@ +--- old.conditionalTypeAssignabilityWhenDeferred.symbols ++++ new.conditionalTypeAssignabilityWhenDeferred.symbols +@@= skipped -108, +108 lines =@@ + >x : Symbol(x, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 31, 5)) + >T : Symbol(T, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 11)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + >t : Symbol(t, Decl(conditionalTypeAssignabilityWhenDeferred.ts, 30, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.js.diff new file mode 100644 index 0000000000..f321d8390a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.js.diff @@ -0,0 +1,14 @@ +--- old.conditionalTypeBasedContextualTypeReturnTypeWidening.js ++++ new.conditionalTypeBasedContextualTypeReturnTypeWidening.js +@@= skipped -14, +14 lines =@@ + + + //// [conditionalTypeBasedContextualTypeReturnTypeWidening.js] +-var func1 = useState1(function () { return function () { return 0; }; }); +-var func2 = useState2(function () { return function () { return 0; }; }); +-var func3 = useState1(function () { return function () { return 0; }; }); +-var func4 = useState2(function () { return function () { return 0; }; }); ++const func1 = useState1(() => () => 0); ++const func2 = useState2(() => () => 0); ++const func3 = useState1(() => () => 0); ++const func4 = useState2(() => () => 0); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.types.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.types.diff index ea8947681a..c8eac602ea 100644 --- a/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.types.diff +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeBasedContextualTypeReturnTypeWidening.types.diff @@ -5,13 +5,15 @@ === conditionalTypeBasedContextualTypeReturnTypeWidening.ts === declare function useState1(initialState: (S extends (() => any) ? never : S) | (() => S)): S; // No args ->useState1 : (initialState: (S extends (() => any) ? never : S) | (() => S)) => S +->initialState : (S extends () => any ? never : S) | (() => S) +>useState1 : (initialState: (() => S) | (S extends () => any ? never : S)) => S - >initialState : (() => S) | (S extends () => any ? never : S) ++>initialState : (() => S) | (S extends () => any ? never : S) declare function useState2(initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)): S; // Any args ->useState2 : (initialState: (S extends ((...args: any[]) => any) ? never : S) | (() => S)) => S +->initialState : (S extends (...args: any[]) => any ? never : S) | (() => S) +>useState2 : (initialState: (() => S) | (S extends (...args: any[]) => any ? never : S)) => S - >initialState : (() => S) | (S extends (...args: any[]) => any ? never : S) ++>initialState : (() => S) | (S extends (...args: any[]) => any ? never : S) >args : any[] const func1 = useState1(() => () => 0); @@ -34,13 +36,15 @@ declare function useState3(initialState: (T extends (() => any) ? never : T) | (() => S)): S; // No args ->useState3 : (initialState: (T extends (() => any) ? never : T) | (() => S)) => S +->initialState : (T extends () => any ? never : T) | (() => S) +>useState3 : (initialState: (() => S) | (T extends () => any ? never : T)) => S - >initialState : (() => S) | (T extends () => any ? never : T) ++>initialState : (() => S) | (T extends () => any ? never : T) declare function useState4(initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)): S; // Any args ->useState4 : (initialState: (T extends ((...args: any[]) => any) ? never : T) | (() => S)) => S +->initialState : (T extends (...args: any[]) => any ? never : T) | (() => S) +>useState4 : (initialState: (() => S) | (T extends (...args: any[]) => any ? never : T)) => S - >initialState : (() => S) | (T extends (...args: any[]) => any ? never : T) ++>initialState : (() => S) | (T extends (...args: any[]) => any ? never : T) >args : any[] const func3 = useState1(() => () => 0); diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeContextualTypeSimplificationsSuceeds.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeContextualTypeSimplificationsSuceeds.js.diff index 6be09e1a0e..6b1514ac12 100644 --- a/testdata/baselines/reference/submodule/compiler/conditionalTypeContextualTypeSimplificationsSuceeds.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeContextualTypeSimplificationsSuceeds.js.diff @@ -7,4 +7,10 @@ -"use strict"; function bad(attrs) { } function good1(attrs) { } - function good2(attrs) { } \ No newline at end of file + function good2(attrs) { } +-bad({ when: function (value) { return false; } }); +-good1({ when: function (value) { return false; } }); +-good2({ when: function (value) { return false; } }); ++bad({ when: value => false }); ++good1({ when: value => false }); ++good2({ when: value => false }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js.diff new file mode 100644 index 0000000000..a357e703c2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js.diff @@ -0,0 +1,10 @@ +--- old.conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js ++++ new.conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.js +@@= skipped -8017, +8017 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.makeThing = makeThing; +-function makeThing(name, children) { +- if (children === void 0) { children = []; } +-} ++function makeThing(name, children = []) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypeRelaxingConstraintAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypeRelaxingConstraintAssignability.js.diff index ce4051457c..f9acb3c258 100644 --- a/testdata/baselines/reference/submodule/compiler/conditionalTypeRelaxingConstraintAssignability.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypeRelaxingConstraintAssignability.js.diff @@ -1,10 +1,19 @@ --- old.conditionalTypeRelaxingConstraintAssignability.js +++ new.conditionalTypeRelaxingConstraintAssignability.js -@@= skipped -43, +43 lines =@@ +@@= skipped -42, +42 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Elem = void 0; - class Elem { +-var Elem = /** @class */ (function () { +- function Elem(children_) { ++class Elem { + children_; - constructor(children_) { ++ constructor(children_) { this.children_ = children_; - } \ No newline at end of file + } +- return Elem; +-}()); ++} + exports.Elem = Elem; + new Elem(undefined); + new Elem(''); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionalTypesSimplifyWhenTrivial.js.diff b/testdata/baselines/reference/submodule/compiler/conditionalTypesSimplifyWhenTrivial.js.diff index 6f01d300a4..793da3f92e 100644 --- a/testdata/baselines/reference/submodule/compiler/conditionalTypesSimplifyWhenTrivial.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conditionalTypesSimplifyWhenTrivial.js.diff @@ -5,6 +5,41 @@ //// [conditionalTypesSimplifyWhenTrivial.js] -"use strict"; - const fn1 = (params) => params; +-var fn1 = function (params) { return params; }; ++const fn1 = (params) => params; function fn2(x) { - var y = x; \ No newline at end of file + var y = x; + x = y; + } +-var fn3 = function (params) { return params; }; ++const fn3 = (params) => params; + function fn4(x) { + var y = x; + x = y; + } +-var fn5 = function (params) { return params; }; ++const fn5 = (params) => params; + function fn6(x) { + var y = x; + x = y; + } +-var fn7 = function (params) { return params; }; ++const fn7 = (params) => params; + function fn8(x) { + var y = x; + x = y; + } +-var fn9 = function (params) { return params; }; ++const fn9 = (params) => params; + function fn10(x) { + var y = x; + x = y; + } +-var fn11 = function (params) { return params; }; ++const fn11 = (params) => params; + function fn12(x) { + var y = x; + x = y; + } +-var zee = z; // since x is `any`, `x extends null | undefined` should be both true and false - and thus yield `any` ++const zee = z; // since x is `any`, `x extends null | undefined` should be both true and false - and thus yield `any` \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.js.diff b/testdata/baselines/reference/submodule/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.js.diff new file mode 100644 index 0000000000..9996a97252 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conditionallyDuplicateOverloadsCausedByOverloadResolution.js.diff @@ -0,0 +1,16 @@ +--- old.conditionallyDuplicateOverloadsCausedByOverloadResolution.js ++++ new.conditionallyDuplicateOverloadsCausedByOverloadResolution.js +@@= skipped -22, +22 lines =@@ + }); + + //// [conditionallyDuplicateOverloadsCausedByOverloadResolution.js] +-var out = foo(function (x, y) { ++var out = foo((x, y) => { + function bar() { } + return bar; + }); +-var out2 = foo2(function (x, y) { ++var out2 = foo2((x, y) => { + var bar; + return bar; + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/configFileExtendsAsList.js.diff b/testdata/baselines/reference/submodule/compiler/configFileExtendsAsList.js.diff new file mode 100644 index 0000000000..ff8c5c2a51 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/configFileExtendsAsList.js.diff @@ -0,0 +1,9 @@ +--- old.configFileExtendsAsList.js ++++ new.configFileExtendsAsList.js +@@= skipped -20, +20 lines =@@ + + //// [index.js] + function f(x) { } // noImplicitAny error +-var y; ++let y; + y.toLowerCase(); // strictNullChecks error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia1.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia1.js.diff index a3dfeaaec1..27d0a5d733 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia1.js.diff @@ -1,11 +1,15 @@ --- old.conflictMarkerDiff3Trivia1.js +++ new.conflictMarkerDiff3Trivia1.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + } //// [conflictMarkerDiff3Trivia1.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.v = 1; - } +- return C; +-}()); ++class C { + v = 1; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia2.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia2.js.diff new file mode 100644 index 0000000000..f75dc0a31e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerDiff3Trivia2.js.diff @@ -0,0 +1,20 @@ +--- old.conflictMarkerDiff3Trivia2.js ++++ new.conflictMarkerDiff3Trivia2.js +@@= skipped -18, +18 lines =@@ + + + //// [conflictMarkerDiff3Trivia2.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class C { ++ foo() { + a(); +- }; +- C.prototype.bar = function () { }; +- return C; +-}()); ++ } ++ bar() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia1.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia1.js.diff index 98c309fb30..de06458013 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia1.js.diff @@ -1,11 +1,15 @@ --- old.conflictMarkerTrivia1.js +++ new.conflictMarkerTrivia1.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [conflictMarkerTrivia1.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.v = 1; - } +- return C; +-}()); ++class C { + v = 1; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia2.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia2.js.diff new file mode 100644 index 0000000000..08dd314711 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia2.js.diff @@ -0,0 +1,20 @@ +--- old.conflictMarkerTrivia2.js ++++ new.conflictMarkerTrivia2.js +@@= skipped -15, +15 lines =@@ + + + //// [conflictMarkerTrivia2.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class C { ++ foo() { + a(); +- }; +- C.prototype.bar = function () { }; +- return C; +-}()); ++ } ++ bar() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia3.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia3.js.diff new file mode 100644 index 0000000000..903d51c962 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia3.js.diff @@ -0,0 +1,8 @@ +--- old.conflictMarkerTrivia3.js ++++ new.conflictMarkerTrivia3.js +@@= skipped -4, +4 lines =@@ + <<<<<<< HEAD + + //// [conflictMarkerTrivia3.js] +-var x =
; ++const x =
; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia4.js.diff b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia4.js.diff new file mode 100644 index 0000000000..c1d5a6b702 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictMarkerTrivia4.js.diff @@ -0,0 +1,8 @@ +--- old.conflictMarkerTrivia4.js ++++ new.conflictMarkerTrivia4.js +@@= skipped -4, +4 lines =@@ + <<<<<<< HEAD + + //// [conflictMarkerTrivia4.js] +-var x = ; ++const x = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.js.diff b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.js.diff index e854b89c8d..5898f1721a 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.js.diff @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.pick = void 0; -var pick = require("lodash/pick"); +-var pick = function () { return (0, exports.pick)(); }; +const pick = require("lodash/pick"); - const pick = () => (0, exports.pick)(); ++const pick = () => (0, exports.pick)(); exports.pick = pick; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.symbols.diff b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.symbols.diff new file mode 100644 index 0000000000..dd83282234 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace1.symbols.diff @@ -0,0 +1,11 @@ +--- old.conflictingDeclarationsImportFromNamespace1.symbols ++++ new.conflictingDeclarationsImportFromNamespace1.symbols +@@= skipped -21, +21 lines =@@ + + ...props: Array + >props : Symbol(props, Decl(object.d.ts, 4, 18)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >U : Symbol(U, Decl(object.d.ts, 3, 28)) + + ): Pick; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.js.diff b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.js.diff index 018d6fa105..008c55192d 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.js.diff @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.pick = void 0; -var pick = require("lodash/pick"); +-var pick = function () { return (0, exports.pick)(); }; +const pick = require("lodash/pick"); - const pick = () => (0, exports.pick)(); ++const pick = () => (0, exports.pick)(); exports.pick = pick; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.symbols.diff b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.symbols.diff new file mode 100644 index 0000000000..93f9fa04be --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/conflictingDeclarationsImportFromNamespace2.symbols.diff @@ -0,0 +1,11 @@ +--- old.conflictingDeclarationsImportFromNamespace2.symbols ++++ new.conflictingDeclarationsImportFromNamespace2.symbols +@@= skipped -21, +21 lines =@@ + + ...props: Array + >props : Symbol(props, Decl(object.d.ts, 4, 18)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >U : Symbol(U, Decl(object.d.ts, 3, 30)) + + ) => Pick; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff index a9203fd8cd..3a28111456 100644 --- a/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/conflictingTypeParameterSymbolTransfer.js.diff @@ -5,36 +5,97 @@ //// [conflictingTypeParameterSymbolTransfer.js] "use strict"; -// @strict +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.C2 = void 0; +// @strict // Via #56620 - class Base { - } - class C2 extends Base { +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2(T) { +- var _this = _super.call(this) || this; ++class Base { ++} ++class C2 extends Base { + T; - constructor(T) { - super(); ++ constructor(T) { ++ super(); // Should not error -@@= skipped -20, +21 lines =@@ - class Leg { - } - class Foo extends Leg { -- constructor() { -- super(...arguments); -- this.t = {}; +- _this.T = T; ++ this.T = T; + // Should error +- var a = null; +- return _this; ++ let a = null; + } +- return C2; +-}(Base)); ++} + exports.C2 = C2; + // via #56689 +-var Leg = /** @class */ (function () { +- function Leg() { +- } +- return Leg; +-}()); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.t = {}; - // should allow this access since t was declared as a property on Foo -- this.foo = this.t; +- _this.foo = _this.t; +- return _this; - } +- return Foo; +-}(Leg)); ++class Leg { ++} ++class Foo extends Leg { + t = {}; + // should allow this access since t was declared as a property on Foo + foo = this.t; - } ++} // via #56661 - class BaseClass { - } - class Item extends BaseClass { +-var BaseClass = /** @class */ (function () { +- function BaseClass() { +- } +- return BaseClass; +-}()); +-var Item = /** @class */ (function (_super) { +- __extends(Item, _super); +- function Item() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Item.prototype.getData = function () { ++class BaseClass { ++} ++class Item extends BaseClass { + data; - getData() { ++ getData() { // should OK - return this.data; \ No newline at end of file + return this.data; +- }; +- return Item; +-}(BaseClass)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.js.diff b/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.js.diff index 849d0044e3..64d91f33a4 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.js.diff @@ -1,14 +1,19 @@ --- old.constDeclarationShadowedByVarDeclaration3.js +++ new.constDeclarationShadowedByVarDeclaration3.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [constDeclarationShadowedByVarDeclaration3.js] // Ensure only checking for const declarations shadowed by vars - class Rule { -+ regex = new RegExp(''); -+ name = ''; - constructor(name) { +-var Rule = /** @class */ (function () { +- function Rule(name) { - this.regex = new RegExp(''); - this.name = ''; ++class Rule { ++ regex = new RegExp(''); ++ name = ''; ++ constructor(name) { this.name = name; } - } \ No newline at end of file +- return Rule; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.symbols.diff b/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.symbols.diff new file mode 100644 index 0000000000..abd8f2aca6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constDeclarationShadowedByVarDeclaration3.symbols.diff @@ -0,0 +1,13 @@ +--- old.constDeclarationShadowedByVarDeclaration3.symbols ++++ new.constDeclarationShadowedByVarDeclaration3.symbols +@@= skipped -6, +6 lines =@@ + + public regex: RegExp = new RegExp(''); + >regex : Symbol(Rule.regex, Decl(constDeclarationShadowedByVarDeclaration3.ts, 1, 12)) +->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + public name: string = ''; + >name : Symbol(Rule.name, Decl(constDeclarationShadowedByVarDeclaration3.ts, 2, 42)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.errors.txt index a6265f7d63..c52880fe7e 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.errors.txt @@ -19,7 +19,7 @@ constDeclarations-access3.ts(26,3): error TS2540: Cannot assign to 'x' because i ==== constDeclarations-access3.ts (18 errors) ==== - module M { + namespace M { export const x = 0; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.js index a5a01b6dba..a6f967bb8c 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access3.ts] //// //// [constDeclarations-access3.ts] -module M { +namespace M { export const x = 0; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.symbols index 627a56d2d5..f1e837089f 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access3.ts] //// === constDeclarations-access3.ts === -module M { +namespace M { >M : Symbol(M, Decl(constDeclarations-access3.ts, 0, 0)) export const x = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.types index 6177cbbe34..595f437283 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access3.ts] //// === constDeclarations-access3.ts === -module M { +namespace M { >M : typeof M export const x = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.errors.txt index c1cd937f6e..a1fcb44423 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.errors.txt @@ -19,7 +19,7 @@ constDeclarations-access4.ts(26,3): error TS2540: Cannot assign to 'x' because i ==== constDeclarations-access4.ts (18 errors) ==== - declare module M { + declare namespace M { const x: number; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.js index 1032e368b0..1cfd9e1926 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access4.ts] //// //// [constDeclarations-access4.ts] -declare module M { +declare namespace M { const x: number; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.symbols index ed22cde08e..bb6e045eb4 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access4.ts] //// === constDeclarations-access4.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(constDeclarations-access4.ts, 0, 0)) const x: number; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.types index 68802f30b6..a7f2b9ae64 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-access4.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constDeclarations-access4.ts] //// === constDeclarations-access4.ts === -declare module M { +declare namespace M { >M : typeof M const x: number; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.errors.txt index c9aa397371..ceaa5e8cde 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.errors.txt @@ -22,7 +22,7 @@ constDeclarations-ambient-errors.ts(8,24): error TS1039: Initializers are not al ~ !!! error TS1039: Initializers are not allowed in ambient contexts. - declare module M { + declare namespace M { const c6 = 0; const c7: number = 7; ~ diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.js index c05eda9bba..a1ded54925 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.js @@ -6,7 +6,7 @@ declare const c1: boolean = true; declare const c2: number = 0; declare const c3 = null, c4 :string = "", c5: any = 0; -declare module M { +declare namespace M { const c6 = 0; const c7: number = 7; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.symbols index 68d9bed8ce..dab90a4e5f 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.symbols @@ -13,7 +13,7 @@ declare const c3 = null, c4 :string = "", c5: any = 0; >c4 : Symbol(c4, Decl(constDeclarations-ambient-errors.ts, 3, 24)) >c5 : Symbol(c5, Decl(constDeclarations-ambient-errors.ts, 3, 41)) -declare module M { +declare namespace M { >M : Symbol(M, Decl(constDeclarations-ambient-errors.ts, 3, 54)) const c6 = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.types index d5aec58fd3..069f1d039c 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient-errors.types @@ -17,7 +17,7 @@ declare const c3 = null, c4 :string = "", c5: any = 0; >c5 : any >0 : 0 -declare module M { +declare namespace M { >M : typeof M const c6 = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.js index c5a523f7bc..92b46de553 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.js @@ -6,7 +6,7 @@ declare const c1: boolean; declare const c2: number; declare const c3, c4 :string, c5: any; -declare module M { +declare namespace M { const c6; const c7: number; } diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.symbols index 6048f44d5f..c96e97df74 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.symbols @@ -13,7 +13,7 @@ declare const c3, c4 :string, c5: any; >c4 : Symbol(c4, Decl(constDeclarations-ambient.ts, 3, 17)) >c5 : Symbol(c5, Decl(constDeclarations-ambient.ts, 3, 29)) -declare module M { +declare namespace M { >M : Symbol(M, Decl(constDeclarations-ambient.ts, 3, 38)) const c6; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.types index 376dc7bfb5..dba96f4c34 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-ambient.types @@ -13,7 +13,7 @@ declare const c3, c4 :string, c5: any; >c4 : string >c5 : any -declare module M { +declare namespace M { >M : typeof M const c6; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-es5.js.diff b/testdata/baselines/reference/submodule/compiler/constDeclarations-es5.js.diff new file mode 100644 index 0000000000..b4d7ac4b73 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-es5.js.diff @@ -0,0 +1,12 @@ +--- old.constDeclarations-es5.js ++++ new.constDeclarations-es5.js +@@= skipped -6, +6 lines =@@ + + + //// [constDeclarations-es5.js] +-var z7 = false; +-var z8 = 23; +-var z9 = 0, z10 = "", z11 = null; ++const z7 = false; ++const z8 = 23; ++const z9 = 0, z10 = "", z11 = null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.errors.txt index 9e20946833..a715ebc860 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.errors.txt @@ -105,7 +105,7 @@ constDeclarations-scopes.ts(27,1): error TS2410: The 'with' statement is not sup }; // modules - module m { + namespace m { const c = 0; n = c; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.js index 9c728bfc81..b7fbe90211 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.js @@ -102,7 +102,7 @@ var F3 = function () { }; // modules -module m { +namespace m { const c = 0; n = c; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.symbols index 661cace4d9..6093e1a4ad 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.symbols @@ -194,7 +194,7 @@ var F3 = function () { }; // modules -module m { +namespace m { >m : Symbol(m, Decl(constDeclarations-scopes.ts, 98, 2)) const c = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.types index ba7417a8e3..7e4bad649d 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-scopes.types @@ -258,7 +258,7 @@ var F3 = function () { }; // modules -module m { +namespace m { >m : typeof m const c = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.errors.txt b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.errors.txt index 35f0f8b777..ea2262681b 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.errors.txt @@ -88,7 +88,7 @@ constDeclarations-validContexts.ts(18,1): error TS2410: The 'with' statement is }; // modules - module m { + namespace m { const c22 = 0; { diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.js b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.js index 0d42323e7d..138e482878 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.js @@ -85,7 +85,7 @@ var F3 = function () { }; // modules -module m { +namespace m { const c22 = 0; { diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.symbols index 59b8b07835..3496aabc5b 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.symbols @@ -129,7 +129,7 @@ var F3 = function () { }; // modules -module m { +namespace m { >m : Symbol(m, Decl(constDeclarations-validContexts.ts, 81, 2)) const c22 = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.types b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.types index 7abe9d4348..9516c9a4a6 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations-validContexts.types @@ -176,7 +176,7 @@ var F3 = function () { }; // modules -module m { +namespace m { >m : typeof m const c22 = 0; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations2.js b/testdata/baselines/reference/submodule/compiler/constDeclarations2.js index e870d7dcc9..f95a4755c6 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations2.js +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations2.js @@ -2,7 +2,7 @@ //// [constDeclarations2.ts] // No error -module M { +namespace M { export const c1 = false; export const c2: number = 23; export const c3 = 0, c4 :string = "", c5 = null; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations2.symbols b/testdata/baselines/reference/submodule/compiler/constDeclarations2.symbols index 746f585416..12496ffc41 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations2.symbols +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations2.symbols @@ -2,7 +2,7 @@ === constDeclarations2.ts === // No error -module M { +namespace M { >M : Symbol(M, Decl(constDeclarations2.ts, 0, 0)) export const c1 = false; diff --git a/testdata/baselines/reference/submodule/compiler/constDeclarations2.types b/testdata/baselines/reference/submodule/compiler/constDeclarations2.types index 34fedf2315..b9155c784a 100644 --- a/testdata/baselines/reference/submodule/compiler/constDeclarations2.types +++ b/testdata/baselines/reference/submodule/compiler/constDeclarations2.types @@ -2,7 +2,7 @@ === constDeclarations2.ts === // No error -module M { +namespace M { >M : typeof M export const c1 = false; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt b/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt index 9c5eb5e7fa..e02d569b52 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.errors.txt @@ -1,5 +1,5 @@ constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(5,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. @@ -23,8 +23,8 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval A } - module E { - ~ + namespace E { + ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. var x = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.js b/testdata/baselines/reference/submodule/compiler/constEnumErrors.js index 3ec1c79e49..7a0fe892e2 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.js +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.js @@ -5,7 +5,7 @@ const enum E { A } -module E { +namespace E { var x = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.js.diff b/testdata/baselines/reference/submodule/compiler/constEnumErrors.js.diff new file mode 100644 index 0000000000..f0e2f1b1d5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.js.diff @@ -0,0 +1,11 @@ +--- old.constEnumErrors.js ++++ new.constEnumErrors.js +@@= skipped -53, +53 lines =@@ + var y0 = E2[1]; + var name = "A"; + var y1 = E2[name]; +-var y2 = E2["".concat(name)]; ++var y2 = E2[`${name}`]; + var x = E2; + var y = [E2]; + function foo(t) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.symbols b/testdata/baselines/reference/submodule/compiler/constEnumErrors.symbols index 7834f22be0..fc0456f600 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.symbols +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.symbols @@ -8,7 +8,7 @@ const enum E { >A : Symbol(E.A, Decl(constEnumErrors.ts, 0, 14)) } -module E { +namespace E { >E : Symbol(E, Decl(constEnumErrors.ts, 2, 1)) var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types index ca2f750c85..fe9a560880 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumErrors.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumErrors.types @@ -8,7 +8,7 @@ const enum E { >A : E.A } -module E { +namespace E { >E : typeof E var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js b/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js index 19bf2acc7d..ab05fc0005 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js +++ b/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// //// [foo.ts] -export module ConstEnumOnlyModule { +export namespace ConstEnumOnlyModule { export const enum ConstFooEnum { Some, Values, diff --git a/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js.diff b/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js.diff index 83b57bd3ed..b3765d5305 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnumNamespaceReferenceCausesNoImport2.js.diff @@ -1,6 +1,15 @@ --- old.constEnumNamespaceReferenceCausesNoImport2.js +++ new.constEnumNamespaceReferenceCausesNoImport2.js -@@= skipped -36, +36 lines =@@ +@@= skipped -27, +27 lines =@@ + exports.ConstEnumOnlyModule = void 0; + var ConstEnumOnlyModule; + (function (ConstEnumOnlyModule) { +- var ConstFooEnum; ++ let ConstFooEnum; + (function (ConstFooEnum) { + ConstFooEnum[ConstFooEnum["Some"] = 0] = "Some"; + ConstFooEnum[ConstFooEnum["Values"] = 1] = "Values"; +@@= skipped -9, +9 lines =@@ })(ConstEnumOnlyModule || (exports.ConstEnumOnlyModule = ConstEnumOnlyModule = {})); //// [reexport.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.js b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.js index d35fce7e17..4bcd24bf59 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.js +++ b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/constEnumOnlyModuleMerging.ts] //// //// [constEnumOnlyModuleMerging.ts] -module Outer { +namespace Outer { export var x = 1; } -module Outer { +namespace Outer { export const enum A { X } } -module B { +namespace B { import O = Outer; var x = O.A.X; var y = O.x; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.symbols b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.symbols index e44dc6513f..121c46a5ae 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.symbols +++ b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.symbols @@ -1,39 +1,39 @@ //// [tests/cases/compiler/constEnumOnlyModuleMerging.ts] //// === constEnumOnlyModuleMerging.ts === -module Outer { +namespace Outer { >Outer : Symbol(Outer, Decl(constEnumOnlyModuleMerging.ts, 0, 0), Decl(constEnumOnlyModuleMerging.ts, 2, 1)) export var x = 1; >x : Symbol(x, Decl(constEnumOnlyModuleMerging.ts, 1, 14)) } -module Outer { +namespace Outer { >Outer : Symbol(Outer, Decl(constEnumOnlyModuleMerging.ts, 0, 0), Decl(constEnumOnlyModuleMerging.ts, 2, 1)) export const enum A { X } ->A : Symbol(A, Decl(constEnumOnlyModuleMerging.ts, 4, 14)) +>A : Symbol(A, Decl(constEnumOnlyModuleMerging.ts, 4, 17)) >X : Symbol(A.X, Decl(constEnumOnlyModuleMerging.ts, 5, 25)) } -module B { +namespace B { >B : Symbol(B, Decl(constEnumOnlyModuleMerging.ts, 6, 1)) import O = Outer; ->O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 10)) +>O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 13)) >Outer : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 0, 0), Decl(constEnumOnlyModuleMerging.ts, 2, 1)) var x = O.A.X; >x : Symbol(x, Decl(constEnumOnlyModuleMerging.ts, 10, 7)) >O.A.X : Symbol(O.A.X, Decl(constEnumOnlyModuleMerging.ts, 5, 25)) ->O.A : Symbol(O.A, Decl(constEnumOnlyModuleMerging.ts, 4, 14)) ->O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 10)) ->A : Symbol(O.A, Decl(constEnumOnlyModuleMerging.ts, 4, 14)) +>O.A : Symbol(O.A, Decl(constEnumOnlyModuleMerging.ts, 4, 17)) +>O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 13)) +>A : Symbol(O.A, Decl(constEnumOnlyModuleMerging.ts, 4, 17)) >X : Symbol(O.A.X, Decl(constEnumOnlyModuleMerging.ts, 5, 25)) var y = O.x; >y : Symbol(y, Decl(constEnumOnlyModuleMerging.ts, 11, 7)) >O.x : Symbol(O.x, Decl(constEnumOnlyModuleMerging.ts, 1, 14)) ->O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 10)) +>O : Symbol(O, Decl(constEnumOnlyModuleMerging.ts, 8, 13)) >x : Symbol(O.x, Decl(constEnumOnlyModuleMerging.ts, 1, 14)) } diff --git a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types index bcb0817c2d..73a3d301ce 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types +++ b/testdata/baselines/reference/submodule/compiler/constEnumOnlyModuleMerging.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constEnumOnlyModuleMerging.ts] //// === constEnumOnlyModuleMerging.ts === -module Outer { +namespace Outer { >Outer : typeof Outer export var x = 1; @@ -9,13 +9,13 @@ module Outer { >1 : 1 } -module Outer { +namespace Outer { export const enum A { X } >A : A >X : A.X } -module B { +namespace B { >B : typeof B import O = Outer; diff --git a/testdata/baselines/reference/submodule/compiler/constEnumToStringNoComments.js.diff b/testdata/baselines/reference/submodule/compiler/constEnumToStringNoComments.js.diff new file mode 100644 index 0000000000..1f84183f8a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constEnumToStringNoComments.js.diff @@ -0,0 +1,30 @@ +--- old.constEnumToStringNoComments.js ++++ new.constEnumToStringNoComments.js +@@= skipped -24, +24 lines =@@ + + + //// [constEnumToStringNoComments.js] +-var x0 = 100..toString(); +-var x1 = 100..toString(); +-var y0 = 0.5.toString(); +-var y1 = 0.5.toString(); +-var z0 = 2..toString(); +-var z1 = 2..toString(); +-var a0 = (-1).toString(); +-var a1 = (-1).toString(); +-var b0 = (-1.5).toString(); +-var b1 = (-1.5).toString(); +-var c0 = (-1).toString(); +-var c1 = (-1).toString(); ++let x0 = 100..toString(); ++let x1 = 100..toString(); ++let y0 = 0.5.toString(); ++let y1 = 0.5.toString(); ++let z0 = 2..toString(); ++let z1 = 2..toString(); ++let a0 = (-1).toString(); ++let a1 = (-1).toString(); ++let b0 = (-1.5).toString(); ++let b1 = (-1.5).toString(); ++let c0 = (-1).toString(); ++let c1 = (-1).toString(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constEnumToStringWithComments.js.diff b/testdata/baselines/reference/submodule/compiler/constEnumToStringWithComments.js.diff new file mode 100644 index 0000000000..6645aae755 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constEnumToStringWithComments.js.diff @@ -0,0 +1,30 @@ +--- old.constEnumToStringWithComments.js ++++ new.constEnumToStringWithComments.js +@@= skipped -24, +24 lines =@@ + + + //// [constEnumToStringWithComments.js] +-var x0 = 100 /* Foo.X */.toString(); +-var x1 = 100 /* Foo["X"] */.toString(); +-var y0 = 0.5 /* Foo.Y */.toString(); +-var y1 = 0.5 /* Foo["Y"] */.toString(); +-var z0 = 2 /* Foo.Z */.toString(); +-var z1 = 2 /* Foo["Z"] */.toString(); +-var a0 = (-1 /* Foo.A */).toString(); +-var a1 = (-1 /* Foo["A"] */).toString(); +-var b0 = (-1.5 /* Foo.B */).toString(); +-var b1 = (-1.5 /* Foo["B"] */).toString(); +-var c0 = (-1 /* Foo.C */).toString(); +-var c1 = (-1 /* Foo["C"] */).toString(); ++let x0 = 100 /* Foo.X */.toString(); ++let x1 = 100 /* Foo["X"] */.toString(); ++let y0 = 0.5 /* Foo.Y */.toString(); ++let y1 = 0.5 /* Foo["Y"] */.toString(); ++let z0 = 2 /* Foo.Z */.toString(); ++let z1 = 2 /* Foo["Z"] */.toString(); ++let a0 = (-1 /* Foo.A */).toString(); ++let a1 = (-1 /* Foo["A"] */).toString(); ++let b0 = (-1.5 /* Foo.B */).toString(); ++let b1 = (-1.5 /* Foo["B"] */).toString(); ++let c0 = (-1 /* Foo.C */).toString(); ++let c1 = (-1 /* Foo["C"] */).toString(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js b/testdata/baselines/reference/submodule/compiler/constEnums.js index 997e58ea41..dda020701d 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnums.js +++ b/testdata/baselines/reference/submodule/compiler/constEnums.js @@ -50,9 +50,9 @@ const enum Comments { "-->", } -module A { - export module B { - export module C { +namespace A { + export namespace B { + export namespace C { export const enum E { V1 = 1, V2 = A.B.C.E.V1 | 100 @@ -61,9 +61,9 @@ module A { } } -module A { - export module B { - export module C { +namespace A { + export namespace B { + export namespace C { export const enum E { V3 = A.B.C.E["V2"] & 200, V4 = A.B.C.E[`V1`] << 1, @@ -72,9 +72,9 @@ module A { } } -module A1 { - export module B { - export module C { +namespace A1 { + export namespace B { + export namespace C { export const enum E { V1 = 10, V2 = 110, @@ -83,16 +83,16 @@ module A1 { } } -module A2 { - export module B { - export module C { +namespace A2 { + export namespace B { + export namespace C { export const enum E { V1 = 10, V2 = 110, } } // module C will be classified as value - export module C { + export namespace C { var x = 1 } } diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff b/testdata/baselines/reference/submodule/compiler/constEnums.js.diff index 4e58af014f..10323cd478 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnums.js.diff @@ -1,6 +1,17 @@ --- old.constEnums.js +++ new.constEnums.js -@@= skipped -191, +191 lines =@@ +@@= skipped -182, +182 lines =@@ + //// [constEnums.js] + var A2; + (function (A2) { +- var B; ++ let B; + (function (B) { + // module C will be classified as value +- var C; ++ let C; + (function (C) { + var x = 1; })(C = B.C || (B.C = {})); })(B = A2.B || (A2.B = {})); })(A2 || (A2 = {})); diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.symbols b/testdata/baselines/reference/submodule/compiler/constEnums.symbols index ffb7bed831..a3e08d57a7 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnums.symbols +++ b/testdata/baselines/reference/submodule/compiler/constEnums.symbols @@ -162,17 +162,17 @@ const enum Comments { >"-->" : Symbol(Comments["-->"], Decl(constEnums.ts, 45, 11)) } -module A { +namespace A { >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) - export module B { ->B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) + export namespace B { +>B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) - export module C { ->C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) + export namespace C { +>C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) V1 = 1, >V1 : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) @@ -180,68 +180,68 @@ module A { V2 = A.B.C.E.V1 | 100 >V2 : Symbol(I.V2, Decl(constEnums.ts, 53, 23)) >A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >V1 : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) } } } } -module A { +namespace A { >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) - export module B { ->B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) + export namespace B { +>B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) - export module C { ->C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) + export namespace C { +>C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) V3 = A.B.C.E["V2"] & 200, >V3 : Symbol(I.V3, Decl(constEnums.ts, 63, 33)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >"V2" : Symbol(I.V2, Decl(constEnums.ts, 53, 23)) V4 = A.B.C.E[`V1`] << 1, >V4 : Symbol(I.V4, Decl(constEnums.ts, 64, 41)) ->A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(E, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(E, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >`V1` : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) } } } } -module A1 { +namespace A1 { >A1 : Symbol(A1, Decl(constEnums.ts, 69, 1)) - export module B { ->B : Symbol(B, Decl(constEnums.ts, 71, 11)) + export namespace B { +>B : Symbol(B, Decl(constEnums.ts, 71, 14)) - export module C { ->C : Symbol(C, Decl(constEnums.ts, 72, 21)) + export namespace C { +>C : Symbol(C, Decl(constEnums.ts, 72, 24)) export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 73, 25)) +>E : Symbol(E, Decl(constEnums.ts, 73, 28)) V1 = 10, >V1 : Symbol(E.V1, Decl(constEnums.ts, 74, 33)) @@ -253,17 +253,17 @@ module A1 { } } -module A2 { +namespace A2 { >A2 : Symbol(A2, Decl(constEnums.ts, 80, 1)) - export module B { ->B : Symbol(B, Decl(constEnums.ts, 82, 11)) + export namespace B { +>B : Symbol(B, Decl(constEnums.ts, 82, 14)) - export module C { ->C : Symbol(C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) + export namespace C { +>C : Symbol(C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) export const enum E { ->E : Symbol(E, Decl(constEnums.ts, 84, 25)) +>E : Symbol(E, Decl(constEnums.ts, 84, 28)) V1 = 10, >V1 : Symbol(E.V1, Decl(constEnums.ts, 85, 33)) @@ -273,8 +273,8 @@ module A2 { } } // module C will be classified as value - export module C { ->C : Symbol(C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) + export namespace C { +>C : Symbol(C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) var x = 1 >x : Symbol(x, Decl(constEnums.ts, 92, 15)) @@ -285,19 +285,19 @@ module A2 { import I = A.B.C.E; >I : Symbol(I, Decl(constEnums.ts, 95, 1)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) import I1 = A1.B; >I1 : Symbol(I1, Decl(constEnums.ts, 97, 19)) >A1 : Symbol(A1, Decl(constEnums.ts, 69, 1)) ->B : Symbol(I1, Decl(constEnums.ts, 71, 11)) +>B : Symbol(I1, Decl(constEnums.ts, 71, 14)) import I2 = A2.B; >I2 : Symbol(I2, Decl(constEnums.ts, 98, 17)) >A2 : Symbol(A2, Decl(constEnums.ts, 80, 1)) ->B : Symbol(I2, Decl(constEnums.ts, 82, 11)) +>B : Symbol(I2, Decl(constEnums.ts, 82, 14)) function foo0(e: I): void { >foo0 : Symbol(foo0, Decl(constEnums.ts, 99, 17)) @@ -322,27 +322,27 @@ function foo1(e: I1.C.E): void { >foo1 : Symbol(foo1, Decl(constEnums.ts, 106, 1)) >e : Symbol(e, Decl(constEnums.ts, 108, 14)) >I1 : Symbol(I1, Decl(constEnums.ts, 97, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 72, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 25)) +>C : Symbol(I1.C, Decl(constEnums.ts, 72, 24)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 28)) if (e === I1.C.E.V1) { >e : Symbol(e, Decl(constEnums.ts, 108, 14)) >I1.C.E.V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 74, 33)) ->I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 25)) ->I1.C : Symbol(I1.C, Decl(constEnums.ts, 72, 21)) +>I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 28)) +>I1.C : Symbol(I1.C, Decl(constEnums.ts, 72, 24)) >I1 : Symbol(I1, Decl(constEnums.ts, 97, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 72, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 25)) +>C : Symbol(I1.C, Decl(constEnums.ts, 72, 24)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 28)) >V1 : Symbol(I1.C.E.V1, Decl(constEnums.ts, 74, 33)) } else if (e === I1.C.E.V2) { >e : Symbol(e, Decl(constEnums.ts, 108, 14)) >I1.C.E.V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 75, 24)) ->I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 25)) ->I1.C : Symbol(I1.C, Decl(constEnums.ts, 72, 21)) +>I1.C.E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 28)) +>I1.C : Symbol(I1.C, Decl(constEnums.ts, 72, 24)) >I1 : Symbol(I1, Decl(constEnums.ts, 97, 19)) ->C : Symbol(I1.C, Decl(constEnums.ts, 72, 21)) ->E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 25)) +>C : Symbol(I1.C, Decl(constEnums.ts, 72, 24)) +>E : Symbol(I1.C.E, Decl(constEnums.ts, 73, 28)) >V2 : Symbol(I1.C.E.V2, Decl(constEnums.ts, 75, 24)) } } @@ -351,27 +351,27 @@ function foo2(e: I2.C.E): void { >foo2 : Symbol(foo2, Decl(constEnums.ts, 113, 1)) >e : Symbol(e, Decl(constEnums.ts, 115, 14)) >I2 : Symbol(I2, Decl(constEnums.ts, 98, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 25)) +>C : Symbol(I2.C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 28)) if (e === I2.C.E.V1) { >e : Symbol(e, Decl(constEnums.ts, 115, 14)) >I2.C.E.V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 85, 33)) ->I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 25)) ->I2.C : Symbol(I2.C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) +>I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 28)) +>I2.C : Symbol(I2.C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) >I2 : Symbol(I2, Decl(constEnums.ts, 98, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 25)) +>C : Symbol(I2.C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 28)) >V1 : Symbol(I2.C.E.V1, Decl(constEnums.ts, 85, 33)) } else if (e === I2.C.E.V2) { >e : Symbol(e, Decl(constEnums.ts, 115, 14)) >I2.C.E.V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 86, 24)) ->I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 25)) ->I2.C : Symbol(I2.C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) +>I2.C.E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 28)) +>I2.C : Symbol(I2.C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) >I2 : Symbol(I2, Decl(constEnums.ts, 98, 17)) ->C : Symbol(I2.C, Decl(constEnums.ts, 83, 21), Decl(constEnums.ts, 89, 9)) ->E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 25)) +>C : Symbol(I2.C, Decl(constEnums.ts, 83, 24), Decl(constEnums.ts, 89, 9)) +>E : Symbol(I2.C.E, Decl(constEnums.ts, 84, 28)) >V2 : Symbol(I2.C.E.V2, Decl(constEnums.ts, 86, 24)) } } @@ -531,44 +531,44 @@ function bar(e: A.B.C.E): number { >bar : Symbol(bar, Decl(constEnums.ts, 155, 1)) >e : Symbol(e, Decl(constEnums.ts, 157, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) switch (e) { >e : Symbol(e, Decl(constEnums.ts, 157, 13)) case A.B.C.E.V1: return 1; >A.B.C.E.V1 : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >V1 : Symbol(I.V1, Decl(constEnums.ts, 52, 33)) case A.B.C.E.V2: return 1; >A.B.C.E.V2 : Symbol(I.V2, Decl(constEnums.ts, 53, 23)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >V2 : Symbol(I.V2, Decl(constEnums.ts, 53, 23)) case A.B.C.E.V3: return 1; >A.B.C.E.V3 : Symbol(I.V3, Decl(constEnums.ts, 63, 33)) ->A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) ->A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->A.B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) +>A.B.C.E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) +>A.B.C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>A.B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) >A : Symbol(A, Decl(constEnums.ts, 47, 1), Decl(constEnums.ts, 58, 1)) ->B : Symbol(A.B, Decl(constEnums.ts, 49, 10), Decl(constEnums.ts, 60, 10)) ->C : Symbol(A.B.C, Decl(constEnums.ts, 50, 21), Decl(constEnums.ts, 61, 21)) ->E : Symbol(I, Decl(constEnums.ts, 51, 25), Decl(constEnums.ts, 62, 25)) +>B : Symbol(A.B, Decl(constEnums.ts, 49, 13), Decl(constEnums.ts, 60, 13)) +>C : Symbol(A.B.C, Decl(constEnums.ts, 50, 24), Decl(constEnums.ts, 61, 24)) +>E : Symbol(I, Decl(constEnums.ts, 51, 28), Decl(constEnums.ts, 62, 28)) >V3 : Symbol(I.V3, Decl(constEnums.ts, 63, 33)) } } diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.types b/testdata/baselines/reference/submodule/compiler/constEnums.types index 59fd3b189d..5434bba7c6 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnums.types +++ b/testdata/baselines/reference/submodule/compiler/constEnums.types @@ -207,9 +207,9 @@ const enum Comments { >"-->" : typeof Comments["-->"] } -module A { - export module B { - export module C { +namespace A { + export namespace B { + export namespace C { export const enum E { >E : E @@ -235,9 +235,9 @@ module A { } } -module A { - export module B { - export module C { +namespace A { + export namespace B { + export namespace C { export const enum E { >E : E @@ -273,9 +273,9 @@ module A { } } -module A1 { - export module B { - export module C { +namespace A1 { + export namespace B { + export namespace C { export const enum E { >E : E @@ -291,13 +291,13 @@ module A1 { } } -module A2 { +namespace A2 { >A2 : typeof A2 - export module B { + export namespace B { >B : typeof B - export module C { + export namespace C { export const enum E { >E : E @@ -311,7 +311,7 @@ module A2 { } } // module C will be classified as value - export module C { + export namespace C { >C : typeof C var x = 1 diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.types.diff b/testdata/baselines/reference/submodule/compiler/constEnums.types.diff index c08c01917a..68496e3c2e 100644 --- a/testdata/baselines/reference/submodule/compiler/constEnums.types.diff +++ b/testdata/baselines/reference/submodule/compiler/constEnums.types.diff @@ -32,7 +32,7 @@ +>"-->" : typeof Comments["-->"] } - module A { + namespace A { @@= skipped -385, +385 lines =@@ } diff --git a/testdata/baselines/reference/submodule/compiler/constInClassExpression.js.diff b/testdata/baselines/reference/submodule/compiler/constInClassExpression.js.diff index 7229d3b99c..1df340f7cf 100644 --- a/testdata/baselines/reference/submodule/compiler/constInClassExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constInClassExpression.js.diff @@ -1,11 +1,15 @@ --- old.constInClassExpression.js +++ new.constInClassExpression.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + //// [constInClassExpression.js] - let C = class { -- constructor() { +-var C = /** @class */ (function () { +- function class_1() { - this.a = 4; - } +- return class_1; +-}()); ++let C = class { + a = 4; - }; \ No newline at end of file ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constIndexedAccess.js.diff b/testdata/baselines/reference/submodule/compiler/constIndexedAccess.js.diff new file mode 100644 index 0000000000..f810e230c3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constIndexedAccess.js.diff @@ -0,0 +1,29 @@ +--- old.constIndexedAccess.js ++++ new.constIndexedAccess.js +@@= skipped -31, +31 lines =@@ + + + //// [constIndexedAccess.js] +-var test; +-var s = test[0]; +-var n = test[1]; +-var s1 = test[0 /* numbers.zero */]; +-var n1 = test[1 /* numbers.one */]; +-var s2 = test[0 /* numbers["zero"] */]; +-var n2 = test[1 /* numbers["one"] */]; ++let test; ++let s = test[0]; ++let n = test[1]; ++let s1 = test[0 /* numbers.zero */]; ++let n1 = test[1 /* numbers.one */]; ++let s2 = test[0 /* numbers["zero"] */]; ++let n2 = test[1 /* numbers["one"] */]; + var numbersNotConst; + (function (numbersNotConst) { + numbersNotConst[numbersNotConst["zero"] = 0] = "zero"; + numbersNotConst[numbersNotConst["one"] = 1] = "one"; + })(numbersNotConst || (numbersNotConst = {})); +-var s3 = test[numbersNotConst.zero]; +-var n3 = test[numbersNotConst.one]; ++let s3 = test[numbersNotConst.zero]; ++let n3 = test[numbersNotConst.one]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constantEnumAssert.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/constantEnumAssert.errors.txt.diff new file mode 100644 index 0000000000..47762d877b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constantEnumAssert.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.constantEnumAssert.errors.txt ++++ new.constantEnumAssert.errors.txt +@@= skipped -0, +0 lines =@@ +-constantEnumAssert.ts(49,20): error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. ++constantEnumAssert.ts(49,20): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + + + ==== constantEnumAssert.ts (1 errors) ==== +@@= skipped -51, +51 lines =@@ + + const foo12 = { a: E5.a as const } + ~~~~ +-!!! error TS1355: A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals. ++!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constantEnumAssert.js.diff b/testdata/baselines/reference/submodule/compiler/constantEnumAssert.js.diff new file mode 100644 index 0000000000..ad1ca558a5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constantEnumAssert.js.diff @@ -0,0 +1,35 @@ +--- old.constantEnumAssert.js ++++ new.constantEnumAssert.js +@@= skipped -68, +68 lines =@@ + E3[E3["b"] = 2] = "b"; + E3[E3["c"] = 4] = "c"; + })(E3 || (E3 = {})); +-var E5 = { ++const E5 = { + a: 'a', + b: 'b' + }; +-var foo1 = { a: E1.a }; +-var foo2 = { a: E2.a }; +-var foo3 = { a: E1.a }; +-var foo4 = { a: E2.a }; +-var foo5 = { a: E3.a }; +-var foo6 = { a: 0 /* E4.a */ }; +-var foo7 = { a: E5.a }; +-var foo8 = { a: E1.a }; +-var foo9 = { a: E2.a }; +-var foo10 = { a: E3.a }; +-var foo11 = { a: 0 /* E4.a */ }; +-var foo12 = { a: E5.a }; ++const foo1 = { a: E1.a }; ++const foo2 = { a: E2.a }; ++const foo3 = { a: E1.a }; ++const foo4 = { a: E2.a }; ++const foo5 = { a: E3.a }; ++const foo6 = { a: 0 /* E4.a */ }; ++const foo7 = { a: E5.a }; ++const foo8 = { a: E1.a }; ++const foo9 = { a: E2.a }; ++const foo10 = { a: E3.a }; ++const foo11 = { a: 0 /* E4.a */ }; ++const foo12 = { a: E5.a }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constantOverloadFunction.js.diff b/testdata/baselines/reference/submodule/compiler/constantOverloadFunction.js.diff new file mode 100644 index 0000000000..229e189327 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constantOverloadFunction.js.diff @@ -0,0 +1,66 @@ +--- old.constantOverloadFunction.js ++++ new.constantOverloadFunction.js +@@= skipped -15, +15 lines =@@ + + + //// [constantOverloadFunction.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.foo = function () { }; +- return Base; +-}()); +-var Derived1 = /** @class */ (function (_super) { +- __extends(Derived1, _super); +- function Derived1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived1.prototype.bar = function () { }; +- return Derived1; +-}(Base)); +-var Derived2 = /** @class */ (function (_super) { +- __extends(Derived2, _super); +- function Derived2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived2.prototype.baz = function () { }; +- return Derived2; +-}(Base)); +-var Derived3 = /** @class */ (function (_super) { +- __extends(Derived3, _super); +- function Derived3() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived3.prototype.biz = function () { }; +- return Derived3; +-}(Base)); ++class Base { ++ foo() { } ++} ++class Derived1 extends Base { ++ bar() { } ++} ++class Derived2 extends Base { ++ baz() { } ++} ++class Derived3 extends Base { ++ biz() { } ++} + function foo(tagName) { + return null; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constantOverloadFunctionNoSubtypeError.js.diff b/testdata/baselines/reference/submodule/compiler/constantOverloadFunctionNoSubtypeError.js.diff new file mode 100644 index 0000000000..35cbdf0588 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constantOverloadFunctionNoSubtypeError.js.diff @@ -0,0 +1,66 @@ +--- old.constantOverloadFunctionNoSubtypeError.js ++++ new.constantOverloadFunctionNoSubtypeError.js +@@= skipped -16, +16 lines =@@ + + + //// [constantOverloadFunctionNoSubtypeError.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.foo = function () { }; +- return Base; +-}()); +-var Derived1 = /** @class */ (function (_super) { +- __extends(Derived1, _super); +- function Derived1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived1.prototype.bar = function () { }; +- return Derived1; +-}(Base)); +-var Derived2 = /** @class */ (function (_super) { +- __extends(Derived2, _super); +- function Derived2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived2.prototype.baz = function () { }; +- return Derived2; +-}(Base)); +-var Derived3 = /** @class */ (function (_super) { +- __extends(Derived3, _super); +- function Derived3() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived3.prototype.biz = function () { }; +- return Derived3; +-}(Base)); ++class Base { ++ foo() { } ++} ++class Derived1 extends Base { ++ bar() { } ++} ++class Derived2 extends Base { ++ baz() { } ++} ++class Derived3 extends Base { ++ biz() { } ++} + function foo(tagName) { + return null; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constraintCheckInGenericBaseTypeReference.js.diff b/testdata/baselines/reference/submodule/compiler/constraintCheckInGenericBaseTypeReference.js.diff index fb85053d67..7aeeeab654 100644 --- a/testdata/baselines/reference/submodule/compiler/constraintCheckInGenericBaseTypeReference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constraintCheckInGenericBaseTypeReference.js.diff @@ -1,16 +1,67 @@ --- old.constraintCheckInGenericBaseTypeReference.js +++ new.constraintCheckInGenericBaseTypeReference.js -@@= skipped -26, +26 lines =@@ - method() { } +@@= skipped -21, +21 lines =@@ } - class GenericBase { + + //// [constraintCheckInGenericBaseTypeReference.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + // No errors +-var Constraint = /** @class */ (function () { +- function Constraint() { +- } +- Constraint.prototype.method = function () { }; +- return Constraint; +-}()); +-var GenericBase = /** @class */ (function () { +- function GenericBase() { +- } +- return GenericBase; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(GenericBase)); +-var TypeArg = /** @class */ (function () { +- function TypeArg() { +- } +- TypeArg.prototype.method = function () { ++class Constraint { ++ method() { } ++} ++class GenericBase { + items; - } - class Derived extends GenericBase { - } -@@= skipped -9, +10 lines =@@ ++} ++class Derived extends GenericBase { ++} ++class TypeArg { ++ method() { + Container.People.items; +- }; +- return TypeArg; +-}()); +-var Container = /** @class */ (function () { +- function Container() { } - } - class Container { +- return Container; +-}()); ++} ++class Container { + static People; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constraintsThatReferenceOtherContstraints1.js.diff b/testdata/baselines/reference/submodule/compiler/constraintsThatReferenceOtherContstraints1.js.diff index 0c8a35029b..46929e531b 100644 --- a/testdata/baselines/reference/submodule/compiler/constraintsThatReferenceOtherContstraints1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constraintsThatReferenceOtherContstraints1.js.diff @@ -1,9 +1,22 @@ --- old.constraintsThatReferenceOtherContstraints1.js +++ new.constraintsThatReferenceOtherContstraints1.js -@@= skipped -14, +14 lines =@@ - class Foo { - } - class Bar { +@@= skipped -11, +11 lines =@@ + + + //// [constraintsThatReferenceOtherContstraints1.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); ++class Foo { ++} ++class Bar { + data; // Error 1 Type 'Object' does not satisfy the constraint 'T' for type parameter 'U extends T'. - } ++} var x; // Error 2 Type '{ a: string; b: number; }' does not satisfy the constraint 'T' for type \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constraintsUsedInPrototypeProperty.js.diff b/testdata/baselines/reference/submodule/compiler/constraintsUsedInPrototypeProperty.js.diff new file mode 100644 index 0000000000..95b3bd13ba --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constraintsUsedInPrototypeProperty.js.diff @@ -0,0 +1,14 @@ +--- old.constraintsUsedInPrototypeProperty.js ++++ new.constraintsUsedInPrototypeProperty.js +@@= skipped -4, +4 lines =@@ + Foo.prototype; // Foo + + //// [constraintsUsedInPrototypeProperty.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + Foo.prototype; // Foo \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js index 22d8711da3..3af6853e98 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js +++ b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constructorArgWithGenericCallSignature.ts] //// //// [constructorArgWithGenericCallSignature.ts] -module Test { +namespace Test { export interface MyFunc { (value1: T): T; } diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js.diff new file mode 100644 index 0000000000..f626436931 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.js.diff @@ -0,0 +1,17 @@ +--- old.constructorArgWithGenericCallSignature.js ++++ new.constructorArgWithGenericCallSignature.js +@@= skipped -18, +18 lines =@@ + //// [constructorArgWithGenericCallSignature.js] + var Test; + (function (Test) { +- var MyClass = /** @class */ (function () { +- function MyClass(func) { +- } +- return MyClass; +- }()); ++ class MyClass { ++ constructor(func) { } ++ } + Test.MyClass = MyClass; + function F(func) { } + Test.F = F; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.symbols b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.symbols index 61392a8436..6c623128a2 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.symbols +++ b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/constructorArgWithGenericCallSignature.ts] //// === constructorArgWithGenericCallSignature.ts === -module Test { +namespace Test { >Test : Symbol(Test, Decl(constructorArgWithGenericCallSignature.ts, 0, 0)) export interface MyFunc { ->MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 13)) +>MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 16)) (value1: T): T; >T : Symbol(T, Decl(constructorArgWithGenericCallSignature.ts, 2, 9)) @@ -18,18 +18,18 @@ module Test { constructor(func: MyFunc) { } >func : Symbol(func, Decl(constructorArgWithGenericCallSignature.ts, 5, 20)) ->MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 13)) +>MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 16)) } export function F(func: MyFunc) { } >F : Symbol(F, Decl(constructorArgWithGenericCallSignature.ts, 6, 5)) >func : Symbol(func, Decl(constructorArgWithGenericCallSignature.ts, 8, 19)) ->MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 13)) +>MyFunc : Symbol(MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 16)) } var func: Test.MyFunc; >func : Symbol(func, Decl(constructorArgWithGenericCallSignature.ts, 10, 3)) >Test : Symbol(Test, Decl(constructorArgWithGenericCallSignature.ts, 0, 0)) ->MyFunc : Symbol(Test.MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 13)) +>MyFunc : Symbol(Test.MyFunc, Decl(constructorArgWithGenericCallSignature.ts, 0, 16)) Test.F(func); // OK >Test.F : Symbol(Test.F, Decl(constructorArgWithGenericCallSignature.ts, 6, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.types b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.types index 1b676909cf..1bcb7c9e58 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.types +++ b/testdata/baselines/reference/submodule/compiler/constructorArgWithGenericCallSignature.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constructorArgWithGenericCallSignature.ts] //// === constructorArgWithGenericCallSignature.ts === -module Test { +namespace Test { >Test : typeof Test export interface MyFunc { diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgs.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgs.js.diff index 4fff0e4688..03d43cd3fc 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgs.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorArgs.js.diff @@ -1,10 +1,46 @@ --- old.constructorArgs.js +++ new.constructorArgs.js -@@= skipped -22, +22 lines =@@ - } - } - class Sub extends Super { +@@= skipped -17, +17 lines =@@ + + + //// [constructorArgs.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Super = /** @class */ (function () { +- function Super(value) { +- } +- return Super; +-}()); +-var Sub = /** @class */ (function (_super) { +- __extends(Sub, _super); +- function Sub(options) { +- var _this = _super.call(this, options.value) || this; +- _this.options = options; +- return _this; +- } +- return Sub; +-}(Super)); ++class Super { ++ constructor(value) { ++ } ++} ++class Sub extends Super { + options; - constructor(options) { - super(options.value); - this.options = options; \ No newline at end of file ++ constructor(options) { ++ super(options.value); ++ this.options = options; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors1.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors1.js.diff new file mode 100644 index 0000000000..006a885b8f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors1.js.diff @@ -0,0 +1,14 @@ +--- old.constructorArgsErrors1.js ++++ new.constructorArgsErrors1.js +@@= skipped -6, +6 lines =@@ + } + + //// [constructorArgsErrors1.js] +-var foo = /** @class */ (function () { +- function foo(a) { ++class foo { ++ constructor(a) { + } +- return foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors2.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors2.js.diff index 2b611336db..0b173cac65 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors2.js.diff @@ -1,10 +1,16 @@ --- old.constructorArgsErrors2.js +++ new.constructorArgsErrors2.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [constructorArgsErrors2.js] - class foo { +-var foo = /** @class */ (function () { +- function foo(a) { ++class foo { + a; - constructor(a) { ++ constructor(a) { this.a = a; - } \ No newline at end of file + } +- return foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors3.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors3.js.diff index 172d56a575..52d94ffae1 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors3.js.diff @@ -1,10 +1,16 @@ --- old.constructorArgsErrors3.js +++ new.constructorArgsErrors3.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [constructorArgsErrors3.js] - class foo { +-var foo = /** @class */ (function () { +- function foo(a) { ++class foo { + a; - constructor(a) { ++ constructor(a) { this.a = a; - } \ No newline at end of file + } +- return foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors4.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors4.js.diff index d239fc6d30..9774b45742 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors4.js.diff @@ -1,10 +1,16 @@ --- old.constructorArgsErrors4.js +++ new.constructorArgsErrors4.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [constructorArgsErrors4.js] - class foo { +-var foo = /** @class */ (function () { +- function foo(a) { ++class foo { + a; - constructor(a) { ++ constructor(a) { this.a = a; - } \ No newline at end of file + } +- return foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorArgsErrors5.js.diff b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors5.js.diff new file mode 100644 index 0000000000..db7cf1d946 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorArgsErrors5.js.diff @@ -0,0 +1,14 @@ +--- old.constructorArgsErrors5.js ++++ new.constructorArgsErrors5.js +@@= skipped -7, +7 lines =@@ + + + //// [constructorArgsErrors5.js] +-var foo = /** @class */ (function () { +- function foo(a) { ++class foo { ++ constructor(a) { + } +- return foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorInvocationWithTooFewTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/constructorInvocationWithTooFewTypeArgs.js.diff index 9595f07bac..157420a9f5 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorInvocationWithTooFewTypeArgs.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorInvocationWithTooFewTypeArgs.js.diff @@ -1,10 +1,16 @@ --- old.constructorInvocationWithTooFewTypeArgs.js +++ new.constructorInvocationWithTooFewTypeArgs.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [constructorInvocationWithTooFewTypeArgs.js] - class D { +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); ++class D { + x; + y; - } ++} var d = new D(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads1.js.diff b/testdata/baselines/reference/submodule/compiler/constructorOverloads1.js.diff new file mode 100644 index 0000000000..a63fb11010 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads1.js.diff @@ -0,0 +1,24 @@ +--- old.constructorOverloads1.js ++++ new.constructorOverloads1.js +@@= skipped -23, +23 lines =@@ + + + //// [constructorOverloads1.js] +-var Foo = /** @class */ (function () { +- function Foo(x) { +- } +- Foo.prototype.bar1 = function () { }; +- Foo.prototype.bar2 = function () { }; +- return Foo; +-}()); ++class Foo { ++ constructor(x) { ++ } ++ constructor(x) { ++ } ++ bar1() { } ++ bar2() { } ++} + var f1 = new Foo("hey"); + var f2 = new Foo(0); + var f3 = new Foo(f1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads2.js.diff b/testdata/baselines/reference/submodule/compiler/constructorOverloads2.js.diff new file mode 100644 index 0000000000..58a06f9fef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads2.js.diff @@ -0,0 +1,49 @@ +--- old.constructorOverloads2.js ++++ new.constructorOverloads2.js +@@= skipped -27, +27 lines =@@ + + + //// [constructorOverloads2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var FooBase = /** @class */ (function () { +- function FooBase(x) { +- } +- FooBase.prototype.bar1 = function () { }; +- return FooBase; +-}()); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo(x, y) { +- return _super.call(this, x) || this; +- } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}(FooBase)); ++class FooBase { ++ constructor(x) { ++ } ++ bar1() { } ++} ++class Foo extends FooBase { ++ constructor(x, y) { ++ super(x); ++ } ++ bar1() { } ++} + var f1 = new Foo("hey"); + var f2 = new Foo(0); + var f3 = new Foo(f1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads3.js.diff b/testdata/baselines/reference/submodule/compiler/constructorOverloads3.js.diff new file mode 100644 index 0000000000..cc97d8fbd5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads3.js.diff @@ -0,0 +1,37 @@ +--- old.constructorOverloads3.js ++++ new.constructorOverloads3.js +@@= skipped -24, +24 lines =@@ + + + //// [constructorOverloads3.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo(x, y) { +- var _this = this; +- return _this; +- } +- Foo.prototype.bar1 = function () { }; +- return Foo; +-}(FooBase)); ++class Foo extends FooBase { ++ constructor(x, y) { } ++ bar1() { } ++} + var f1 = new Foo("hey"); + var f2 = new Foo(0); + var f3 = new Foo(f1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.errors.txt b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.errors.txt index 92562825b8..bda005f151 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.errors.txt @@ -3,7 +3,7 @@ constructorOverloads4.ts(10,1): error TS2349: This expression is not callable. ==== constructorOverloads4.ts (1 errors) ==== - declare module M { + declare namespace M { export class Function { constructor(...args: string[]); } diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.js b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.js index 12e8f809cc..bf0b60d949 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.js +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constructorOverloads4.ts] //// //// [constructorOverloads4.ts] -declare module M { +declare namespace M { export class Function { constructor(...args: string[]); } diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.symbols b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.symbols index 2d36ada4a3..4cbb0eb406 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.symbols +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.symbols @@ -1,33 +1,33 @@ //// [tests/cases/compiler/constructorOverloads4.ts] //// === constructorOverloads4.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(constructorOverloads4.ts, 0, 0)) export class Function { ->Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) constructor(...args: string[]); >args : Symbol(args, Decl(constructorOverloads4.ts, 2, 20)) } export function Function(...args: any[]): any; ->Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) >args : Symbol(args, Decl(constructorOverloads4.ts, 4, 29)) export function Function(...args: string[]): Function; ->Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) >args : Symbol(args, Decl(constructorOverloads4.ts, 5, 29)) ->Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) } (new M.Function("return 5"))(); ->M.Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>M.Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) >M : Symbol(M, Decl(constructorOverloads4.ts, 0, 0)) ->Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) M.Function("yo"); ->M.Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>M.Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) >M : Symbol(M, Decl(constructorOverloads4.ts, 0, 0)) ->Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 18)) +>Function : Symbol(M.Function, Decl(constructorOverloads4.ts, 3, 5), Decl(constructorOverloads4.ts, 4, 50), Decl(constructorOverloads4.ts, 0, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.types b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.types index 246ee8dd23..3906f45c26 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads4.types +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads4.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/constructorOverloads4.ts] //// === constructorOverloads4.ts === -declare module M { +declare namespace M { >M : typeof M export class Function { diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.js b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.js index 9c5788936c..3cd36ce116 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.js +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.js @@ -3,7 +3,7 @@ //// [constructorOverloads5.ts] interface IArguments {} - declare module M { + declare namespace M { export function RegExp(pattern: string): RegExp; export function RegExp(pattern: string, flags: string): RegExp; export class RegExp { diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols index ce385996cb..6d7cdec80f 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols @@ -4,22 +4,22 @@ interface IArguments {} >IArguments : Symbol(IArguments, Decl(lib.es5.d.ts, --, --), Decl(constructorOverloads5.ts, 0, 0)) - declare module M { + declare namespace M { >M : Symbol(M, Decl(constructorOverloads5.ts, 0, 24)) export function RegExp(pattern: string): RegExp; ->RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 19), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) +>RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 22), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) >pattern : Symbol(pattern, Decl(constructorOverloads5.ts, 3, 27)) ->RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 19), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) +>RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 22), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) export function RegExp(pattern: string, flags: string): RegExp; ->RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 19), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) +>RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 22), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) >pattern : Symbol(pattern, Decl(constructorOverloads5.ts, 4, 27)) >flags : Symbol(flags, Decl(constructorOverloads5.ts, 4, 43)) ->RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 19), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) +>RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 22), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) export class RegExp { ->RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 19), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) +>RegExp : Symbol(RegExp, Decl(constructorOverloads5.ts, 2, 22), Decl(constructorOverloads5.ts, 3, 52), Decl(constructorOverloads5.ts, 4, 67)) constructor(pattern: string); >pattern : Symbol(pattern, Decl(constructorOverloads5.ts, 6, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols.diff b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols.diff new file mode 100644 index 0000000000..918a9966d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.symbols.diff @@ -0,0 +1,11 @@ +--- old.constructorOverloads5.symbols ++++ new.constructorOverloads5.symbols +@@= skipped -1, +1 lines =@@ + + === constructorOverloads5.ts === + interface IArguments {} +->IArguments : Symbol(IArguments, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(constructorOverloads5.ts, 0, 0)) ++>IArguments : Symbol(IArguments, Decl(lib.es5.d.ts, --, --), Decl(constructorOverloads5.ts, 0, 0)) + + declare namespace M { + >M : Symbol(M, Decl(constructorOverloads5.ts, 0, 24)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.types b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.types index 35996d63d0..f4c70a1eed 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorOverloads5.types +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads5.types @@ -3,7 +3,7 @@ === constructorOverloads5.ts === interface IArguments {} - declare module M { + declare namespace M { >M : typeof M export function RegExp(pattern: string): RegExp; diff --git a/testdata/baselines/reference/submodule/compiler/constructorOverloads8.js.diff b/testdata/baselines/reference/submodule/compiler/constructorOverloads8.js.diff new file mode 100644 index 0000000000..d817d0940f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorOverloads8.js.diff @@ -0,0 +1,23 @@ +--- old.constructorOverloads8.js ++++ new.constructorOverloads8.js +@@= skipped -17, +17 lines =@@ + } + + //// [constructorOverloads8.js] +-var C = /** @class */ (function () { +- function C(x) { +- } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D(x) { +- } +- return D; +-}()); ++class C { ++ constructor(x) { } ++ constructor(y, x) { } // illegal, 2 constructor implementations ++} ++class D { ++ constructor(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorParametersInVariableDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/constructorParametersInVariableDeclarations.js.diff index 241de5921f..8070775458 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorParametersInVariableDeclarations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorParametersInVariableDeclarations.js.diff @@ -1,26 +1,35 @@ --- old.constructorParametersInVariableDeclarations.js +++ new.constructorParametersInVariableDeclarations.js -@@= skipped -19, +19 lines =@@ +@@= skipped -18, +18 lines =@@ + } //// [constructorParametersInVariableDeclarations.js] - class A { +-var A = /** @class */ (function () { +- function A(x) { +- this.a = x; +- this.b = { p: x }; +- this.c = function () { return x; }; ++class A { + a = x; + b = { p: x }; + c = () => x; - constructor(x) { ++ constructor(x) { + } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.a = x; - this.b = { p: x }; -- this.c = () => x; - } - } - class B { +- this.c = function () { return x; }; ++} ++class B { + a = x; + b = { p: x }; + c = () => x; - constructor() { -- this.a = x; -- this.b = { p: x }; -- this.c = () => x; ++ constructor() { var x = 1; } - } \ No newline at end of file +- return B; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.js.diff index 7aef3cb751..121e39621a 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorParametersThatShadowExternalNamesInVariableDeclarations.js.diff @@ -1,18 +1,27 @@ --- old.constructorParametersThatShadowExternalNamesInVariableDeclarations.js +++ new.constructorParametersThatShadowExternalNamesInVariableDeclarations.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [constructorParametersThatShadowExternalNamesInVariableDeclarations.js] var x = 1; - class A { -+ a = x; - constructor(x) { +-var A = /** @class */ (function () { +- function A(x) { - this.a = x; - } - } - class B { ++class A { + a = x; - constructor() { ++ constructor(x) { + } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.a = x; ++} ++class B { ++ a = x; ++ constructor() { var x = ""; } - } \ No newline at end of file +- return B; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorReturningAPrimitive.js.diff b/testdata/baselines/reference/submodule/compiler/constructorReturningAPrimitive.js.diff new file mode 100644 index 0000000000..849947814d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorReturningAPrimitive.js.diff @@ -0,0 +1,27 @@ +--- old.constructorReturningAPrimitive.js ++++ new.constructorReturningAPrimitive.js +@@= skipped -23, +23 lines =@@ + //// [constructorReturningAPrimitive.js] + // technically not allowed by JavaScript but we don't have a 'not-primitive' constraint + // functionally only possible when your class is otherwise devoid of members so of little consequence in practice +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + return 1; + } +- return A; +-}()); ++} + var a = new A(); +-var B = /** @class */ (function () { +- function B() { ++class B { ++ constructor() { + var x; + return x; + } +- return B; +-}()); ++} + var b = new B(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorReturnsInvalidType.js.diff b/testdata/baselines/reference/submodule/compiler/constructorReturnsInvalidType.js.diff new file mode 100644 index 0000000000..f8bc33d896 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorReturnsInvalidType.js.diff @@ -0,0 +1,18 @@ +--- old.constructorReturnsInvalidType.js ++++ new.constructorReturnsInvalidType.js +@@= skipped -11, +11 lines =@@ + + + //// [constructorReturnsInvalidType.js] +-var X = /** @class */ (function () { +- function X() { ++class X { ++ constructor() { + return 1; + } +- X.prototype.foo = function () { }; +- return X; +-}()); ++ foo() { } ++} + var x = new X(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorStaticParamName.js.diff b/testdata/baselines/reference/submodule/compiler/constructorStaticParamName.js.diff new file mode 100644 index 0000000000..1e84f9e054 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorStaticParamName.js.diff @@ -0,0 +1,14 @@ +--- old.constructorStaticParamName.js ++++ new.constructorStaticParamName.js +@@= skipped -9, +9 lines =@@ + + //// [constructorStaticParamName.js] + // static as constructor parameter name should only give error if 'use strict' +-var test = /** @class */ (function () { +- function test(static) { +- } +- return test; +-}()); ++class test { ++ constructor(static) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorStaticParamNameErrors.js.diff b/testdata/baselines/reference/submodule/compiler/constructorStaticParamNameErrors.js.diff new file mode 100644 index 0000000000..dbb83953e8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorStaticParamNameErrors.js.diff @@ -0,0 +1,14 @@ +--- old.constructorStaticParamNameErrors.js ++++ new.constructorStaticParamNameErrors.js +@@= skipped -9, +9 lines =@@ + //// [constructorStaticParamNameErrors.js] + 'use strict'; + // static as constructor parameter name should give error if 'use strict' +-var test = /** @class */ (function () { +- function test(static) { +- } +- return test; +-}()); ++class test { ++ constructor(static) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithCapturedSuper.js.diff b/testdata/baselines/reference/submodule/compiler/constructorWithCapturedSuper.js.diff new file mode 100644 index 0000000000..da46d52180 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorWithCapturedSuper.js.diff @@ -0,0 +1,112 @@ +--- old.constructorWithCapturedSuper.js ++++ new.constructorWithCapturedSuper.js +@@= skipped -54, +54 lines =@@ + } + + //// [constructorWithCapturedSuper.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var oneA; +-var A = /** @class */ (function () { +- function A() { ++let oneA; ++class A { ++ constructor() { + return oneA; + } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B(x) { +- var _this = _super.call(this) || this; ++} ++class B extends A { ++ constructor(x) { ++ super(); + if (x === 1) { +- return _this; ++ return; + } + while (x < 2) { +- return _this; ++ return; + } + try { +- return _this; ++ return; + } + catch (e) { +- return _this; ++ return; + } + finally { +- return _this; ++ return; + } +- return _this; + } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C(x) { +- var _this = _super.call(this) || this; +- var _loop_1 = function (i) { +- (function () { return i + x; }); ++} ++class C extends A { ++ constructor(x) { ++ super(); ++ for (let i = 0; i < 10; ++i) { ++ () => i + x; + if (x === 1) { +- return { value: _this }; ++ return; + } ++ } ++ } ++} ++class D extends A { ++ constructor(x) { ++ super(); ++ () => { ++ return; + }; +- for (var i = 0; i < 10; ++i) { +- var state_1 = _loop_1(i); +- if (typeof state_1 === "object") +- return state_1.value; +- } +- return _this; +- } +- return C; +-}(A)); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D(x) { +- var _this = _super.call(this) || this; +- (function () { +- return; +- }); + function foo() { + return; + } +- return _this; + } +- return D; +-}(A)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt index 5e9dbe5981..d9cde182b7 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.errors.txt @@ -110,7 +110,7 @@ constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or !!! error TS1005: ';' expected. - module TypeScriptAllInOne { + namespace TypeScriptAllInOne { export class Program { static Main(...args: string[]) { try { diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js index 6e7de480a0..54f8167e0e 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js @@ -14,7 +14,7 @@ declare module "fs" { import fs = module("fs"); -module TypeScriptAllInOne { +namespace TypeScriptAllInOne { export class Program { static Main(...args: string[]) { try { diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff index 4237e5af02..df2972a093 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff @@ -4,18 +4,39 @@ //// [constructorWithIncompleteTypeAnnotation.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var fs = module; ("fs"); var TypeScriptAllInOne; (function (TypeScriptAllInOne) { - class Program { -- constructor() { +- var Program = /** @class */ (function () { +- function Program() { - this.case = bfs.STATEMENTS(4); - } - static Main(...args) { +- Program.Main = function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } ++ class Program { ++ static Main(...args) { try { var bfs = new BasicFeatures(); -@@= skipped -15, +11 lines =@@ + var retValue = 0; retValue = bfs.VARIABLES(); if (retValue != 0) ^= { @@ -25,30 +46,166 @@ } finally { } - } +- }; +- Program.prototype.if = function (retValue) { }; +- return Program; +- }()); ++ } + case = bfs.STATEMENTS(4); - if(retValue) { } - } ++ if(retValue) { } ++ } TypeScriptAllInOne.Program = Program; -@@= skipped -178, +179 lines =@@ - } - } - class CLASS { -- constructor() { -- this.d = () => { yield 0; }; + != 0; + { +@@= skipped -70, +47 lines =@@ + console.log('Done'); + return 0; + })(TypeScriptAllInOne || (TypeScriptAllInOne = {})); +-var BasicFeatures = /** @class */ (function () { +- function BasicFeatures() { - } -+ d = () => { yield 0; }; - get Property() { return 0; } - Member() { ++class BasicFeatures { + /// + /// Test various of variables. Including nullable,key world as variable,special format + /// + /// +- BasicFeatures.prototype.VARIABLES = function () { ++ VARIABLES() { + var local = Number.MAX_VALUE; + var min = Number.MIN_VALUE; + var inf = Number.NEGATIVE_INFINITY - +@@= skipped -24, +22 lines =@@ + ; + var quoted = '"', quoted2 = "'"; + var reg = /\w*/; +- var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: function () { return 'objLit{42}'; } }; ++ var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof: () => 'objLit{42}' }; + var weekday = Weekdays.Monday; + var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; + // +@@= skipped -26, +26 lines =@@ + var yield = 0; + var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; return 0; -@@= skipped -34, +32 lines =@@ +- }; ++ } + /// + /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally + /// + /// + /// +- BasicFeatures.prototype.STATEMENTS = function (i) { ++ STATEMENTS(i) { + var retVal = 0; + if (i == 1) + retVal = 1; +@@= skipped -36, +36 lines =@@ + catch (Exception) { } + } + return retVal; +- }; ++ } + /// + /// Test types in ts language. Including class,struct,interface,delegate,anonymous type + /// + /// +- BasicFeatures.prototype.TYPES = function () { ++ TYPES() { + var retVal = 0; + var c = new CLASS(); + var xx = c; +@@= skipped -19, +19 lines =@@ + var anony = { a: new CLASS() }; + retVal += anony.a.d(); + return retVal; +- }; ++ } + ///// + ///// Test different operators + ///// + ///// +- BasicFeatures.prototype.OPERATOR = function () { ++ OPERATOR() { + var a = [1, 2, 3, 4, 5,]; /*[] bug*/ // YES [] + var i = a[1]; /*[]*/ + i = i + i - i * i / i % i & i | i ^ i; /*+ - * / % & | ^*/ +@@= skipped -37, +37 lines =@@ + return 0; + else + return 1; +- }; +- return BasicFeatures; +-}()); +-var CLASS = /** @class */ (function () { +- function CLASS() { +- this.d = function () { yield 0; }; } +- Object.defineProperty(CLASS.prototype, "Property", { +- get: function () { return 0; }, +- enumerable: false, +- configurable: true +- }); +- CLASS.prototype.Member = function () { ++} ++class CLASS { ++ d = () => { yield 0; }; ++ get Property() { return 0; } ++ Member() { + return 0; +- }; +- CLASS.prototype.Foo = function () { +- var myEvent = function () { return 1; }; ++ } ++ Foo() { ++ var myEvent = () => { return 1; }; + if (myEvent() == 1) + return true ? + : + ; + else + return false; +- }; +- return CLASS; +-}()); ++ } ++} + // todo: use these +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} + method1(val, number); + { + return val; +@@= skipped -40, +29 lines =@@ + { + return 2 * this.method1(2); } - class Overloading { -- constructor() { -- this.otherValue = 42; +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; - } +- B.prototype.method2 = function () { ++class B extends A { ++ method2() { + return this.method1(2); +- }; +- return B; +-}(A)); +-var Overloading = /** @class */ (function () { +- function Overloading() { +- this.otherValue = 42; + } +- return Overloading; +-}()); ++} ++class Overloading { + otherValue = 42; - } ++} Overloads(value, string); - Overloads(); \ No newline at end of file + Overloads(); + while () \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.symbols b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.symbols index defff2eae0..aedba390a3 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.symbols +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.symbols @@ -25,11 +25,11 @@ import fs = module("fs"); >fs : Symbol(fs, Decl(constructorWithIncompleteTypeAnnotation.ts, 8, 1)) -module TypeScriptAllInOne { +namespace TypeScriptAllInOne { >TypeScriptAllInOne : Symbol(TypeScriptAllInOne, Decl(constructorWithIncompleteTypeAnnotation.ts, 10, 25)) export class Program { ->Program : Symbol(Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 27)) +>Program : Symbol(Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 30)) static Main(...args: string[]) { >Main : Symbol(Program.Main, Decl(constructorWithIncompleteTypeAnnotation.ts, 14, 26)) @@ -649,8 +649,8 @@ interface IDisposable { TypeScriptAllInOne.Program.Main(); >TypeScriptAllInOne.Program.Main : Symbol(TypeScriptAllInOne.Program.Main, Decl(constructorWithIncompleteTypeAnnotation.ts, 14, 26)) ->TypeScriptAllInOne.Program : Symbol(TypeScriptAllInOne.Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 27)) +>TypeScriptAllInOne.Program : Symbol(TypeScriptAllInOne.Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 30)) >TypeScriptAllInOne : Symbol(TypeScriptAllInOne, Decl(constructorWithIncompleteTypeAnnotation.ts, 10, 25)) ->Program : Symbol(TypeScriptAllInOne.Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 27)) +>Program : Symbol(TypeScriptAllInOne.Program, Decl(constructorWithIncompleteTypeAnnotation.ts, 13, 30)) >Main : Symbol(TypeScriptAllInOne.Program.Main, Decl(constructorWithIncompleteTypeAnnotation.ts, 14, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.types b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.types index 3c09e7a0cb..d5e246cc5d 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.types +++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.types @@ -26,7 +26,7 @@ import fs = module("fs"); >"fs" : "fs" -module TypeScriptAllInOne { +namespace TypeScriptAllInOne { >TypeScriptAllInOne : typeof TypeScriptAllInOne export class Program { diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithSuperAndPrologue.es5.js.diff b/testdata/baselines/reference/submodule/compiler/constructorWithSuperAndPrologue.es5.js.diff index 68182998cf..ac9973ed36 100644 --- a/testdata/baselines/reference/submodule/compiler/constructorWithSuperAndPrologue.es5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/constructorWithSuperAndPrologue.es5.js.diff @@ -1,10 +1,44 @@ --- old.constructorWithSuperAndPrologue.es5.js +++ new.constructorWithSuperAndPrologue.es5.js -@@= skipped -29, +29 lines =@@ - class B extends A { - constructor() { - "ngInject"; +@@= skipped -21, +21 lines =@@ + //// [constructorWithSuperAndPrologue.es5.js] + // https://github.com/microsoft/TypeScript/issues/48761 + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + console.log("A"); + } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { ++} ++class B extends A { ++ constructor() { + "ngInject"; + "ngInject"; console.log("B"); - super(); - } \ No newline at end of file +- return _super.call(this) || this; ++ super(); + } +- return B; +-}(A)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/constructorsWithSpecializedSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/constructorsWithSpecializedSignatures.js.diff new file mode 100644 index 0000000000..1cd432aa8b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/constructorsWithSpecializedSignatures.js.diff @@ -0,0 +1,23 @@ +--- old.constructorsWithSpecializedSignatures.js ++++ new.constructorsWithSpecializedSignatures.js +@@= skipped -46, +46 lines =@@ + + //// [constructorsWithSpecializedSignatures.js] + // errors +-var D = /** @class */ (function () { +- function D(x) { +- } +- return D; +-}()); ++class D { ++ constructor(x) { } ++} + // overloads are ok +-var D2 = /** @class */ (function () { +- function D2(x) { +- } // error +- return D2; +-}()); ++class D2 { ++ constructor(x) { } // error ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextSensitiveReturnTypeInference.js.diff b/testdata/baselines/reference/submodule/compiler/contextSensitiveReturnTypeInference.js.diff index e92610a536..f87efbb327 100644 --- a/testdata/baselines/reference/submodule/compiler/contextSensitiveReturnTypeInference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextSensitiveReturnTypeInference.js.diff @@ -6,6 +6,46 @@ //// [contextSensitiveReturnTypeInference.js] -"use strict"; -// Repro from #34849 - const DEPS = { +-var DEPS = { ++const DEPS = { foo: 1 - }; \ No newline at end of file + }; +-test(function (deps, data) { return ({ +- fn1: function () { return deps.foo; }, +- fn2: data.bar +-}); }, DEPS); +-test(function (deps, data) { return ({ +- fn1: function () { return deps.foo; }, +- fn2: data.bar +-}); }, DEPS); +-test(function (deps, data) { return ({ +- fn1: function () { return deps.foo; }, +- fn2: data.bar +-}); }, DEPS); +-test(function (deps, data) { ++test((deps, data) => ({ ++ fn1: function () { return deps.foo; }, ++ fn2: data.bar ++}), DEPS); ++test((deps, data) => ({ ++ fn1: function () { return deps.foo; }, ++ fn2: data.bar ++}), DEPS); ++test((deps, data) => ({ ++ fn1: () => deps.foo, ++ fn2: data.bar ++}), DEPS); ++test((deps, data) => { + return { +- fn1: function () { return deps.foo; }, ++ fn1() { return deps.foo; }, + fn2: data.bar + }; + }, DEPS); +-test(function (deps) { return ({ +- fn1: function () { return deps.foo; }, ++test((deps) => ({ ++ fn1() { return deps.foo; }, + fn2: 1 +-}); }, DEPS); ++}), DEPS); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.js.diff b/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.js.diff new file mode 100644 index 0000000000..52fe934999 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.js.diff @@ -0,0 +1,36 @@ +--- old.contextualExpressionTypecheckingDoesntBlowStack.js ++++ new.contextualExpressionTypecheckingDoesntBlowStack.js +@@= skipped -26, +26 lines =@@ + //// [contextualExpressionTypecheckingDoesntBlowStack.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Operation = /** @class */ (function () { +- function Operation() { +- } +- Operation.prototype.validateParameters = function (parameterValues) { +- var result = null; +- for (var _i = 0, _a = Object.keys(parameterValues); _i < _a.length; _i++) { +- var parameterLocation = _a[_i]; +- var parameter = this.getParameter(); ++class Operation { ++ validateParameters(parameterValues) { ++ let result = null; ++ for (const parameterLocation of Object.keys(parameterValues)) { ++ const parameter = this.getParameter(); + ; +- var values = this.getValues(); +- var innerResult = parameter.validate(values[parameter.oaParameter.name]); ++ const values = this.getValues(); ++ const innerResult = parameter.validate(values[parameter.oaParameter.name]); + if (innerResult && innerResult.length > 0) { + // Commenting out this line will fix the problem. + result = (result || []).concat(innerResult); + } + } + return result; +- }; +- return Operation; +-}()); ++ } ++} + exports.default = Operation; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.types.diff b/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.types.diff new file mode 100644 index 0000000000..1c20fd5349 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualExpressionTypecheckingDoesntBlowStack.types.diff @@ -0,0 +1,17 @@ +--- old.contextualExpressionTypecheckingDoesntBlowStack.types ++++ new.contextualExpressionTypecheckingDoesntBlowStack.types +@@= skipped -70, +70 lines =@@ + >result = (result || []).concat(innerResult) : IValidationError[] + >result : IValidationError[] | null + >(result || []).concat(innerResult) : IValidationError[] +->(result || []).concat : { (...items: ConcatArray[]): IValidationError[]; (...items: (IValidationError | ConcatArray)[]): IValidationError[]; } ++>(result || []).concat : { (...items: ConcatArray[]): IValidationError[]; (...items: (ConcatArray | IValidationError)[]): IValidationError[]; } + >(result || []) : IValidationError[] + >result || [] : IValidationError[] + >result : IValidationError[] | null + >[] : never[] +->concat : { (...items: ConcatArray[]): IValidationError[]; (...items: (IValidationError | ConcatArray)[]): IValidationError[]; } ++>concat : { (...items: ConcatArray[]): IValidationError[]; (...items: (ConcatArray | IValidationError)[]): IValidationError[]; } + >innerResult : any + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualOverloadListFromArrayUnion.types.diff b/testdata/baselines/reference/submodule/compiler/contextualOverloadListFromArrayUnion.types.diff index 2ec2329de2..c73dbf9e52 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualOverloadListFromArrayUnion.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualOverloadListFromArrayUnion.types.diff @@ -1,6 +1,25 @@ --- old.contextualOverloadListFromArrayUnion.types +++ new.contextualOverloadListFromArrayUnion.types -@@= skipped -150, +150 lines =@@ +@@= skipped -1, +1 lines =@@ + + === one.ts === + declare const y: never[] | string[]; +->y : never[] | string[] ++>y : string[] | never[] + + export const yThen = y.map(item => item.length); + >yThen : number[] + >y.map(item => item.length) : number[] +->y.map : ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) +->y : never[] | string[] +->map : ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) ++>y.map : ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) ++>y : string[] | never[] ++>map : ((callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: never, index: number, array: never[]) => U, thisArg?: any) => U[]) + >item => item.length : (item: string) => number + >item : string + >item.length : number +@@= skipped -149, +149 lines =@@ >cb => setTimeout(() => cb(null, 1), 300) : (cb: Callback) => number >cb : Callback >setTimeout(() => cb(null, 1), 300) : number diff --git a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericMappedType.js.diff b/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericMappedType.js.diff index b79e469d24..20879e2b59 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericMappedType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualPropertyOfGenericMappedType.js.diff @@ -5,4 +5,5 @@ //// [contextualPropertyOfGenericMappedType.js] -// Repro for #24694 - f({ data: 0 }, { data(value, key) { } }); \ No newline at end of file +-f({ data: 0 }, { data: function (value, key) { } }); ++f({ data: 0 }, { data(value, key) { } }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.js.diff b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.js.diff index 7e1f1a8e97..1c34b6d8e1 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.js.diff @@ -13,11 +13,46 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; --const test1 = (() => __awaiter(this, void 0, void 0, function* () { +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-var _this = this; +-var test1 = (function () { return __awaiter(_this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/, [1, 'two']]; +- }); +-}); })(); +-var test2 = new Promise(function (resolve) { return resolve([1, 'two']); }); +-var obj = { +- foo: (function () { return [1, 'two']; })() +const test1 = (async () => { - return [1, 'two']; --}))(); ++ return [1, 'two']; +})(); - const test2 = new Promise((resolve) => resolve([1, 'two'])); - const obj = { - foo: (() => [1, 'two'])() \ No newline at end of file ++const test2 = new Promise((resolve) => resolve([1, 'two'])); ++const obj = { ++ foo: (() => [1, 'two'])() + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.types.diff b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.types.diff new file mode 100644 index 0000000000..f82525ccf7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE.types.diff @@ -0,0 +1,16 @@ +--- old.contextualReturnTypeOfIIFE.types ++++ new.contextualReturnTypeOfIIFE.types +@@= skipped -19, +19 lines =@@ + >Promise : PromiseConstructor + + (resolve) => resolve([1, 'two']), +->(resolve) => resolve([1, 'two']) : (resolve: (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void) => void +->resolve : (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void ++>(resolve) => resolve([1, 'two']) : (resolve: (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void) => void ++>resolve : (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void + >resolve([1, 'two']) : void +->resolve : (value: [one: number, two: string] | PromiseLike<[one: number, two: string]>) => void ++>resolve : (value: PromiseLike<[one: number, two: string]> | [one: number, two: string]) => void + >[1, 'two'] : [number, string] + >1 : 1 + >'two' : "two" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE2.js.diff new file mode 100644 index 0000000000..934a2723cc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE2.js.diff @@ -0,0 +1,12 @@ +--- old.contextualReturnTypeOfIIFE2.js ++++ new.contextualReturnTypeOfIIFE2.js +@@= skipped -14, +14 lines =@@ + + //// [contextualReturnTypeOfIIFE2.js] + app.foo.bar = (function () { +- var someFun = function (arg) { }; +- return { someFun: someFun }; ++ const someFun = (arg) => { }; ++ return { someFun }; + })(); + app.foo.bar.someFun(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE3.js.diff b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE3.js.diff new file mode 100644 index 0000000000..f60ecdde91 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualReturnTypeOfIIFE3.js.diff @@ -0,0 +1,10 @@ +--- old.contextualReturnTypeOfIIFE3.js ++++ new.contextualReturnTypeOfIIFE3.js +@@= skipped -17, +17 lines =@@ + + //// [contextualReturnTypeOfIIFE3.js] + app.foo.bar = (function () { +- return { someFun: function (arg) { } }; ++ return { someFun(arg) { } }; + })(); + app.foo.bar.someFun(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs2015.types.diff b/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs2015.types.diff index b2db4dae6a..190b8777cd 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs2015.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs2015.types.diff @@ -8,7 +8,11 @@ +>test : (arg: ((arg: number) => void)[] | Record void>) => void arg: Record void> | Array<(arg: number) => void> - >arg : ((arg: number) => void)[] | Record void> +->arg : Record void> | ((arg: number) => void)[] ++>arg : ((arg: number) => void)[] | Record void> + >arg : string + >arg : number + @@= skipped -11, +11 lines =@@ test([ diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs5.types.diff b/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs5.types.diff index d594d435f2..eeee98fb41 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs5.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualSignatureInArrayElementLibEs5.types.diff @@ -8,7 +8,11 @@ +>test : (arg: ((arg: number) => void)[] | Record void>) => void arg: Record void> | Array<(arg: number) => void> - >arg : ((arg: number) => void)[] | Record void> +->arg : Record void> | ((arg: number) => void)[] ++>arg : ((arg: number) => void)[] | Record void> + >arg : string + >arg : number + @@= skipped -11, +11 lines =@@ test([ diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation1.js.diff b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation1.js.diff new file mode 100644 index 0000000000..f62d2afb33 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation1.js.diff @@ -0,0 +1,12 @@ +--- old.contextualSignatureInstantiation1.js ++++ new.contextualSignatureInstantiation1.js +@@= skipped -9, +9 lines =@@ + var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } + + //// [contextualSignatureInstantiation1.js] +-var e = function (x, y) { return x.length; }; ++var e = (x, y) => x.length; + var r99 = map(e); // should be {}[] for S since a generic lambda is not inferentially typed +-var e2 = function (x, y) { return x.length; }; ++var e2 = (x, y) => x.length; + var r100 = map2(e2); // type arg inference should fail for S since a generic lambda is not inferentially typed. Falls back to { length: number } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation2.js.diff new file mode 100644 index 0000000000..d953558221 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation2.js.diff @@ -0,0 +1,10 @@ +--- old.contextualSignatureInstantiation2.js ++++ new.contextualSignatureInstantiation2.js +@@= skipped -9, +9 lines =@@ + //// [contextualSignatureInstantiation2.js] + // dot f g x = f(g(x)) + var dot; +-dot = function (f) { return function (g) { return function (x) { return f(g(x)); }; }; }; ++dot = (f) => (g) => (x) => f(g(x)); + var id; + var r23 = dot(id)(id); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation4.js.diff b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation4.js.diff index be8fb6e1e8..26876c0450 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualSignatureInstantiation4.js.diff @@ -6,6 +6,13 @@ //// [contextualSignatureInstantiation4.js] -"use strict"; -// Repros from #32976 - const banana1 = fruitFactory1(Banana); // Banana - const banana2 = fruitFactory2(Banana); // Banana - const banana3 = fruitFactory3(Banana); // Banana<"foo"> \ No newline at end of file +-var banana1 = fruitFactory1(Banana); // Banana +-var banana2 = fruitFactory2(Banana); // Banana +-var banana3 = fruitFactory3(Banana); // Banana<"foo"> +-var banana4 = fruitFactory4(Banana); // Banana<"foo"> +-var banana5 = fruitFactory5(Banana); // Banana<"foo"> ++const banana1 = fruitFactory1(Banana); // Banana ++const banana2 = fruitFactory2(Banana); // Banana ++const banana3 = fruitFactory3(Banana); // Banana<"foo"> ++const banana4 = fruitFactory4(Banana); // Banana<"foo"> ++const banana5 = fruitFactory5(Banana); // Banana<"foo"> \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualSignature_objectLiteralMethodMayReturnNever.js.diff b/testdata/baselines/reference/submodule/compiler/contextualSignature_objectLiteralMethodMayReturnNever.js.diff new file mode 100644 index 0000000000..9efe437114 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualSignature_objectLiteralMethodMayReturnNever.js.diff @@ -0,0 +1,8 @@ +--- old.contextualSignature_objectLiteralMethodMayReturnNever.js ++++ new.contextualSignature_objectLiteralMethodMayReturnNever.js +@@= skipped -5, +5 lines =@@ + + + //// [contextualSignature_objectLiteralMethodMayReturnNever.js] +-var o = { m: function () { throw new Error("not implemented"); } }; ++const o = { m() { throw new Error("not implemented"); } }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.js.diff index 3bc70edc1a..8530cb5f01 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.js.diff @@ -5,6 +5,27 @@ //// [contextualTupleTypeParameterReadonly.js] -"use strict"; - const cases = [ +-var cases = [ ++const cases = [ [1, '1'], - [2, '2'], \ No newline at end of file + [2, '2'], + ]; +-var eacher = each(cases); +-eacher(function (a, b) { ++const eacher = each(cases); ++eacher((a, b) => { + a; + b; + }); + // TODO: https://github.com/microsoft/TypeScript/issues/53255 +-eacher(function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- var a = args[0], b = args[1]; ++eacher((...args) => { ++ const [a, b] = args; + a; + b; + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.symbols.diff b/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.symbols.diff new file mode 100644 index 0000000000..fc18072c2d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTupleTypeParameterReadonly.symbols.diff @@ -0,0 +1,14 @@ +--- old.contextualTupleTypeParameterReadonly.symbols ++++ new.contextualTupleTypeParameterReadonly.symbols +@@= skipped -3, +3 lines =@@ + declare function each>(cases: ReadonlyArray): (fn: (...args: T) => any) => void; + >each : Symbol(each, Decl(contextualTupleTypeParameterReadonly.ts, 0, 0)) + >T : Symbol(T, Decl(contextualTupleTypeParameterReadonly.ts, 0, 22)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >cases : Symbol(cases, Decl(contextualTupleTypeParameterReadonly.ts, 0, 52)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(contextualTupleTypeParameterReadonly.ts, 0, 22)) + >fn : Symbol(fn, Decl(contextualTupleTypeParameterReadonly.ts, 0, 79)) + >args : Symbol(args, Decl(contextualTupleTypeParameterReadonly.ts, 0, 84)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeAppliedToVarArgs.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeAppliedToVarArgs.js.diff new file mode 100644 index 0000000000..45c727bc0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeAppliedToVarArgs.js.diff @@ -0,0 +1,21 @@ +--- old.contextualTypeAppliedToVarArgs.js ++++ new.contextualTypeAppliedToVarArgs.js +@@= skipped -21, +21 lines =@@ + function delegate(instance, method, data) { + return function () { }; + } +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.Bar = function () { ++class Foo { ++ Bar() { + delegate(this, function (source, args2) { + var a = source.node; + var b = args2.node; + }); +- }; +- return Foo; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeArrayReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeArrayReturnType.js.diff new file mode 100644 index 0000000000..aaaac7f228 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeArrayReturnType.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypeArrayReturnType.js ++++ new.contextualTypeArrayReturnType.js +@@= skipped -23, +23 lines =@@ + + //// [contextualTypeArrayReturnType.js] + var style = { +- initialLeftPageTransforms: function (width) { ++ initialLeftPageTransforms: (width) => { + return [ + { 'ry': null } + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix1.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix1.types.diff index 27884310c7..5718ce6158 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix1.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix1.types.diff @@ -8,4 +8,13 @@ +>attrs : & U> & { [others: string]: any; } = {}>(attrs: NewA) => StyledFunction U, - NewA extends Partial & U> & { \ No newline at end of file + NewA extends Partial & U> & { +@@= skipped -25, +25 lines =@@ + + interface BaseProps { + as?: "select" | "input"; +->as : "select" | "input" | undefined ++>as : "input" | "select" | undefined + } + + declare const Flex: (props: BaseProps) => null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types.diff index 0d44095cce..1070f9eee5 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types.diff @@ -24,9 +24,10 @@ declare function test2(a: { type: "foo" | "bar" } & { type: any }): void; ->test2 : (a: { type: "foo" | "bar"; } & { type: any; }) => void ->a : { type: "foo" | "bar"; } & { type: any; } +->type : "foo" | "bar" +>test2 : (a: { type: "bar" | "foo"; } & { type: any; }) => void +>a : { type: "bar" | "foo"; } & { type: any; } - >type : "bar" | "foo" ++>type : "bar" | "foo" >type : any test2({ type: "foo" }); diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols.diff new file mode 100644 index 0000000000..ac4a32f3e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols.diff @@ -0,0 +1,11 @@ +--- old.contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols ++++ new.contextualTypeBasedOnIntersectionWithAnyInTheMix5.symbols +@@= skipped -87, +87 lines =@@ + interface InjectionKey extends Symbol {} + >InjectionKey : Symbol(InjectionKey, Decl(contextualTypeBasedOnIntersectionWithAnyInTheMix5.ts, 24, 1)) + >T : Symbol(T, Decl(contextualTypeBasedOnIntersectionWithAnyInTheMix5.ts, 26, 23)) +->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --)) + + interface Ref { + >Ref : Symbol(Ref, Decl(contextualTypeBasedOnIntersectionWithAnyInTheMix5.ts, 26, 43)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeCaching.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeCaching.types.diff new file mode 100644 index 0000000000..bb5d042a60 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeCaching.types.diff @@ -0,0 +1,11 @@ +--- old.contextualTypeCaching.types ++++ new.contextualTypeCaching.types +@@= skipped -74, +74 lines =@@ + + interface Optimization { + minimizer?: (WebpackPluginInstance | WebpackPluginFunction)[]; +->minimizer : (WebpackPluginInstance | WebpackPluginFunction)[] | undefined ++>minimizer : (WebpackPluginFunction | WebpackPluginInstance)[] | undefined + } + declare const A: ( + >A : (obj: T, prop: P, factory: () => T[P]) => void \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.js.diff index f77b42cc2c..608f552bb6 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeForInitalizedVariablesFiltersUndefined.js.diff @@ -5,6 +5,20 @@ //// [contextualTypeForInitalizedVariablesFiltersUndefined.js] -"use strict"; - const fInferred = ({ a = 0 } = {}) => a; +-var fInferred = function (_a) { +- var _b = _a === void 0 ? {} : _a, _c = _b.a, a = _c === void 0 ? 0 : _c; +- return a; +-}; ++const fInferred = ({ a = 0 } = {}) => a; // const fInferred: ({ a }?: { a?: number; }) => number - const fAnnotated = ({ a = 0 } = {}) => a; \ No newline at end of file +-var fAnnotated = function (_a) { +- var _b = _a === void 0 ? {} : _a, _c = _b.a, a = _c === void 0 ? 0 : _c; +- return a; +-}; +-var s = t.s; +-function fst(_a) { +- var _b = _a === void 0 ? t : _a, s = _b.s; +-} ++const fAnnotated = ({ a = 0 } = {}) => a; ++const { s } = t; ++function fst({ s } = t) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeFunctionObjectPropertyIntersection.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeFunctionObjectPropertyIntersection.types.diff index f07aed5900..e6d567a711 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeFunctionObjectPropertyIntersection.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeFunctionObjectPropertyIntersection.types.diff @@ -9,7 +9,19 @@ [K in TEvent["type"]]?: Action; >type : K -@@= skipped -102, +102 lines =@@ +@@= skipped -83, +83 lines =@@ + >ev : { type: "FOO"; } | { type: "BAR"; } + + ev.type; // should be 'FOO' | 'BAR' +->ev.type : "FOO" | "BAR" ++>ev.type : "BAR" | "FOO" + >ev : { type: "FOO"; } | { type: "BAR"; } +->type : "FOO" | "BAR" ++>type : "BAR" | "FOO" + + }, + }, +@@= skipped -19, +19 lines =@@ }; on?: { diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeIterableUnions.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeIterableUnions.types.diff new file mode 100644 index 0000000000..8096f27f9b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeIterableUnions.types.diff @@ -0,0 +1,10 @@ +--- old.contextualTypeIterableUnions.types ++++ new.contextualTypeIterableUnions.types +@@= skipped -35, +35 lines =@@ + >false : false + + const i3: Iterable | 1[] = [2]; +->i3 : Iterable | 1[] ++>i3 : 1[] | Iterable + >[2] : 2[] + >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeLogicalOr.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeLogicalOr.js.diff new file mode 100644 index 0000000000..bdc5e23c52 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeLogicalOr.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypeLogicalOr.js ++++ new.contextualTypeLogicalOr.js +@@= skipped -21, +21 lines =@@ + + //// [contextualTypeLogicalOr.js] + // Repro from #18005 +-var x = 123; ++let x = 123; + var a = x && [1, 2, 3, 4] || + x && [1, 2, 3, 4] || + x && [1, 2, 3, 4] || \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeObjectSpreadExpression.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeObjectSpreadExpression.js.diff new file mode 100644 index 0000000000..73c2992c8e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeObjectSpreadExpression.js.diff @@ -0,0 +1,9 @@ +--- old.contextualTypeObjectSpreadExpression.js ++++ new.contextualTypeObjectSpreadExpression.js +@@= skipped -19, +19 lines =@@ + }; + return __assign.apply(this, arguments); + }; +-var i; ++let i; + i = __assign({ a: "a" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeOfIndexedAccessParameter.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeOfIndexedAccessParameter.js.diff index 08a5f1b9dd..b36298b2c7 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeOfIndexedAccessParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeOfIndexedAccessParameter.js.diff @@ -6,5 +6,8 @@ //// [contextualTypeOfIndexedAccessParameter.js] -"use strict"; f("a", { - cb: p => p, - }); \ No newline at end of file +- cb: function (p) { return p; }, ++ cb: p => p, + }); + function g(x, y) { + x = y; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.js.diff index 7d0a087e6f..45d6ce9d01 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.js.diff @@ -7,4 +7,46 @@ -"use strict"; function foo(bar) { } foo({ - type: 'y', \ No newline at end of file + type: 'y', + value: 'done', +- method: function () { ++ method() { + this; + this.type; + this.value; +@@= skipped -15, +14 lines =@@ + foo2({ + type2: 'y', + value: 'done', +- method: function () { ++ method() { + this; + this.value; + } + }); +-var xy = { ++let xy = { + type: 'y', + value: 11, + ytra: 12 + }; + xy; +-var xyz = { ++let xyz = { + x: 'x', + y: 'y', + value: "foo", +- method: function () { ++ method() { + this; + this.x; + this.y; +@@= skipped -23, +23 lines =@@ + } + }; + xyz; +-var test = { ++const test = { + items: { + hello: { type: 'string' }, + world: { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.types.diff new file mode 100644 index 0000000000..579478d14a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypeShouldBeLiteral.types.diff @@ -0,0 +1,32 @@ +--- old.contextualTypeShouldBeLiteral.types ++++ new.contextualTypeShouldBeLiteral.types +@@= skipped -16, +16 lines =@@ + >type : "y" + + value: 'none' | 'done'; +->value : "none" | "done" ++>value : "done" | "none" + + method(): void; + >method : () => void +@@= skipped -35, +35 lines =@@ + >type : "y" + + this.value; +->this.value : "none" | "done" ++>this.value : "done" | "none" + >this : Y +->value : "none" | "done" ++>value : "done" | "none" + } + }); + +@@= skipped -22, +22 lines =@@ + >type2 : "y" + + value: 'none' | 'done'; +->value : "none" | "done" ++>value : "done" | "none" + + method(): void; + >method : () => void \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.errors.txt b/testdata/baselines/reference/submodule/compiler/contextualTyping.errors.txt index adb7c9330d..664d9780d6 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.errors.txt @@ -23,7 +23,7 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b } // CONTEXT: Module property declaration - module C2T5 { + namespace C2T5 { export var foo: (i: number, s: string) => number = function(i) { return i; } @@ -68,7 +68,7 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b } // CONTEXT: Module property assignment - module C5T5 { + namespace C5T5 { export var foo: (i: number, s: string) => string; foo = function(i, s) { return s; diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.js b/testdata/baselines/reference/submodule/compiler/contextualTyping.js index ab796ec61d..a2860caca5 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.js +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.js @@ -21,7 +21,7 @@ class C1T5 { } // CONTEXT: Module property declaration -module C2T5 { +namespace C2T5 { export var foo: (i: number, s: string) => number = function(i) { return i; } @@ -66,7 +66,7 @@ class C4T5 { } // CONTEXT: Module property assignment -module C5T5 { +namespace C5T5 { export var foo: (i: number, s: string) => string; foo = function(i, s) { return s; diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.diff index 955d3f2bc1..fb808237bf 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.diff @@ -1,25 +1,56 @@ --- old.contextualTyping.js +++ new.contextualTyping.js -@@= skipped -228, +228 lines =@@ +@@= skipped -227, +227 lines =@@ + //// [contextualTyping.js] // CONTEXT: Class property declaration - class C1T5 { -- constructor() { +-var C1T5 = /** @class */ (function () { +- function C1T5() { - this.foo = function (i) { - return i; - }; - } +- return C1T5; +-}()); ++class C1T5 { + foo = function (i) { + return i; + }; - } ++} // CONTEXT: Module property declaration var C2T5; -@@= skipped -38, +36 lines =@@ + (function (C2T5) { +@@= skipped -39, +36 lines =@@ + a: [] }); // CONTEXT: Class property assignment - class C4T5 { +-var C4T5 = /** @class */ (function () { +- function C4T5() { ++class C4T5 { + foo; - constructor() { ++ constructor() { this.foo = function (i, s) { - return s; \ No newline at end of file + return s; + }; + } +- return C4T5; +-}()); ++} + // CONTEXT: Module property assignment + var C5T5; + (function (C5T5) { +@@= skipped -53, +53 lines =@@ + // CONTEXT: Return statement + var c10t5 = function () { return function (n) { return ({}); }; }; + // CONTEXT: Newing a class +-var C11t5 = /** @class */ (function () { +- function C11t5(f) { +- } +- return C11t5; +-}()); ++class C11t5 { ++ constructor(f) { } ++} + ; + var i = new C11t5(function (n) { return ({}); }); + // CONTEXT: Type annotated expression \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map index c959900df6..1a05005edf 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map @@ -1,3 +1,3 @@ //// [contextualTyping.js.map] -{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IACN,GAAG,GAAqC,UAAS,CAAC,EAAE;QAChD,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;CACJ;AAED,uCAAuC;AACvC,IAAO,IAIN;AAJD,WAAO,IAAI,EAAC;IACG,QAAG,GAAqC,UAAS,CAAC,EAAE;QAC3D,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EAJM,IAAI,KAAJ,IAAI,QAIV;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IACN,GAAG,CAAmC;IACtC,cAAc;QACV,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,CAAC,CAAC;QAAA,CACZ,CAAA;IAAA,CACJ;CACJ;AAED,sCAAsC;AACtC,IAAO,IAKN;AALD,WAAO,IAAI,EAAC;IAER,QAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EALM,IAAI,KAAJ,IAAI,QAKV;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,EAAE,EAAC,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC,EAAE;IACb,OAAa,CAAC,EAAE,CAAC,CAAC;AAAA,CACrB,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,YAAW,EAAE,OAAO,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAA,CAAA,CAAE,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,EAAE,EAAC,CAAE;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,OAAO,CAAC,GAAC,CAAC,CAAC,CAAA,CAAE;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE,EAAE;IACnC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAAA,CAC9C,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE,EAAE;QAClB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAAA,CAC9C;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgIHJldHVybiBpOw0KICAgIH07DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgZm9vOw0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgICAgICByZXR1cm4gczsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgYXNzaWdubWVudA0KdmFyIEM1VDU7DQooZnVuY3Rpb24gKEM1VDUpIHsNCiAgICBDNVQ1LmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgIHJldHVybiBzOw0KICAgIH07DQp9KShDNVQ1IHx8IChDNVQ1ID0ge30pKTsNCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGFzc2lnbm1lbnQNCnZhciBjNnQ1Ow0KYzZ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KLy8gQ09OVEVYVDogQXJyYXkgaW5kZXggYXNzaWdubWVudA0KdmFyIGM3dDI7DQpjN3QyWzBdID0gKHsgbjogMSB9KTsNCnZhciBvYmpjOCA9ICh7fSk7DQpvYmpjOC50MSA9IChmdW5jdGlvbiAocykgeyByZXR1cm4gczsgfSk7DQpvYmpjOC50MiA9ICh7DQogICAgbjogMQ0KfSk7DQpvYmpjOC50MyA9IFtdOw0Kb2JqYzgudDQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NyA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ5ID0gW1tdLCBbXV07DQpvYmpjOC50MTAgPSBbKHt9KSwgKHt9KV07DQpvYmpjOC50MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0Kb2JqYzgudDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCm9iamM4LnQxMyA9ICh7DQogICAgZjogZnVuY3Rpb24gKGksIHMpIHsgcmV0dXJuIHM7IH0NCn0pOw0Kb2JqYzgudDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsDQpmdW5jdGlvbiBjOXQ1KGYpIHsgfQ0KOw0KYzl0NShmdW5jdGlvbiAobikgew0KICAgIHJldHVybiAoe30pOw0KfSk7DQovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50DQp2YXIgYzEwdDUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsgfTsNCi8vIENPTlRFWFQ6IE5ld2luZyBhIGNsYXNzDQpjbGFzcyBDMTF0NSB7DQogICAgY29uc3RydWN0b3IoZikgeyB9DQp9DQo7DQp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfSk7DQovLyBDT05URVhUOiBUeXBlIGFubm90YXRlZCBleHByZXNzaW9uDQp2YXIgYzEydDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMxMnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCnZhciBjMTJ0MyA9IFtdOw0KdmFyIGMxMnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ5ID0gW1tdLCBbXV07DQp2YXIgYzEydDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMxMnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQp2YXIgYzEydDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCnZhciBjMTJ0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjMTJ0MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCmZ1bmN0aW9uIEVGMShhLCBiKSB7IHJldHVybiBhICsgYjsgfQ0KdmFyIGVmdiA9IEVGMSgxLCAyKTsNClBvaW50Lm9yaWdpbiA9IG5ldyBQb2ludCgwLCAwKTsNClBvaW50LnByb3RvdHlwZS5hZGQgPSBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KfTsNClBvaW50LnByb3RvdHlwZSA9IHsNCiAgICB4OiAwLA0KICAgIHk6IDAsDQogICAgYWRkOiBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCiAgICB9DQp9Ow0KdmFyIHggPSB7fTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNvbnRleHR1YWxUeXBpbmcuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUNOLEdBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDaEQsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7Q0FDSjtBQUVELHVDQUF1QztBQUN2QyxJQUFPLElBSU47QUFKRCxXQUFPLElBQUksRUFBQztJQUNHLFFBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDM0QsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBSk0sSUFBSSxLQUFKLElBQUksUUFJVjtBQUVELGdDQUFnQztBQUNoQyxJQUFJLElBQUksR0FBMEIsQ0FBQyxVQUFTLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLFlBQVcsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDeEQsSUFBSSxJQUFJLEdBQXdCLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xFLElBQUksSUFBSSxHQUFtQyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUU5QixJQUFJLElBQUksR0FBcUMsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUN2RSxJQUFJLElBQUksR0FBZSxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUMvQixJQUFJLEtBQUssR0FBVyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksS0FBSyxHQUF3QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQUVGLHFDQUFxQztBQUNyQyxNQUFNLElBQUk7SUFDTixHQUFHLENBQW1DO0lBQ3RDLGNBQWM7UUFDVixJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRTtZQUN0QixPQUFPLENBQUMsQ0FBQztRQUFBLENBQ1osQ0FBQTtJQUFBLENBQ0o7Q0FDSjtBQUVELHNDQUFzQztBQUN0QyxJQUFPLElBS047QUFMRCxXQUFPLElBQUksRUFBQztJQUVSLFFBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUU7UUFDakIsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBTE0sSUFBSSxLQUFKLElBQUksUUFLVjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUU5RCxrQ0FBa0M7QUFDbEMsSUFBSSxJQUFZLENBQUM7QUFDakIsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFTLENBQUMsRUFBQyxDQUFDLEVBQUUsQ0FBQyxFQUFDLENBQUMsQ0FBQztBQXVCekIsSUFBSSxLQUFLLEdBa0JTLENBQUMsRUFBRSxDQUFDLENBQUM7QUFFdkIsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUN0QyxLQUFLLENBQUMsRUFBRSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ2QsS0FBSyxDQUFDLEVBQUUsR0FBRyxZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDN0MsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEQsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQVMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUNyQyxLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ25CLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNwQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMzQyxLQUFLLENBQUMsR0FBRyxHQUFHO0lBQ1IsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLEVBQUUsRUFBQyxDQUFDO0FBQUEsQ0FBQztBQUN6QyxJQUFJLENBQUMsVUFBUyxDQUFDLEVBQUU7SUFDYixPQUFhLENBQUMsRUFBRSxDQUFDLENBQUM7QUFBQSxDQUNyQixDQUFDLENBQUM7QUFFSCw0QkFBNEI7QUFDNUIsSUFBSSxLQUFLLEdBQThCLFlBQVcsRUFBRSxPQUFPLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRS9GLDBCQUEwQjtBQUMxQixNQUFNLEtBQUs7SUFBRyxZQUFZLENBQXNCLEVBQUUsRUFBQyxDQUFFO0NBQUU7QUFBQSxDQUFDO0FBQ3hELElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFFckQscUNBQXFDO0FBQ3JDLElBQUksS0FBSyxHQUEyQixDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzFELElBQUksS0FBSyxHQUF5QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUNwRSxJQUFJLEtBQUssR0FBb0MsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFFbkMsSUFBSSxLQUFLLEdBQXNDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUM7QUFDekUsSUFBSSxLQUFLLEdBQWdCLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLElBQUksTUFBTSxHQUFZLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsSUFBSSxNQUFNLEdBQXlDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRTtDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBT0YsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxHQUFDLENBQUMsQ0FBQyxDQUFBLENBQUU7QUFFakMsSUFBSSxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLENBQUMsQ0FBQztBQWNuQixLQUFLLENBQUMsTUFBTSxHQUFHLElBQUksS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUUvQixLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxVQUFTLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDbkMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQUEsQ0FDOUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUUsRUFBRTtRQUNsQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFBQSxDQUM5QztDQUNKLENBQUM7QUFJRixJQUFJLENBQUMsR0FBTSxFQUFHLENBQUMifQ==,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgptb2R1bGUgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm1vZHVsZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== +{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IACN,GAAG,GAAqC,UAAS,CAAC,EAAE;QAChD,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;CACJ;AAED,uCAAuC;AACvC,IAAU,IAIT;AAJD,WAAU,IAAI,EAAC;IACA,QAAG,GAAqC,UAAS,CAAC,EAAE;QAC3D,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EAJS,IAAI,KAAJ,IAAI,QAIb;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IACN,GAAG,CAAmC;IACtC,cAAc;QACV,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,CAAC,CAAC;QAAA,CACZ,CAAA;IAAA,CACJ;CACJ;AAED,sCAAsC;AACtC,IAAU,IAKT;AALD,WAAU,IAAI,EAAC;IAEX,QAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EALS,IAAI,KAAJ,IAAI,QAKb;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,EAAE,EAAC,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC,EAAE;IACb,OAAa,CAAC,EAAE,CAAC,CAAC;AAAA,CACrB,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,YAAW,EAAE,OAAO,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAA,CAAA,CAAE,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,EAAE,EAAC,CAAE;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,OAAO,CAAC,GAAC,CAAC,CAAC,CAAA,CAAE;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE,EAAE;IACnC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAAA,CAC9C,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE,EAAE;QAClB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAAA,CAC9C;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgIHJldHVybiBpOw0KICAgIH07DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgZm9vOw0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgICAgICByZXR1cm4gczsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgYXNzaWdubWVudA0KdmFyIEM1VDU7DQooZnVuY3Rpb24gKEM1VDUpIHsNCiAgICBDNVQ1LmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgIHJldHVybiBzOw0KICAgIH07DQp9KShDNVQ1IHx8IChDNVQ1ID0ge30pKTsNCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGFzc2lnbm1lbnQNCnZhciBjNnQ1Ow0KYzZ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KLy8gQ09OVEVYVDogQXJyYXkgaW5kZXggYXNzaWdubWVudA0KdmFyIGM3dDI7DQpjN3QyWzBdID0gKHsgbjogMSB9KTsNCnZhciBvYmpjOCA9ICh7fSk7DQpvYmpjOC50MSA9IChmdW5jdGlvbiAocykgeyByZXR1cm4gczsgfSk7DQpvYmpjOC50MiA9ICh7DQogICAgbjogMQ0KfSk7DQpvYmpjOC50MyA9IFtdOw0Kb2JqYzgudDQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NyA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ5ID0gW1tdLCBbXV07DQpvYmpjOC50MTAgPSBbKHt9KSwgKHt9KV07DQpvYmpjOC50MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0Kb2JqYzgudDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCm9iamM4LnQxMyA9ICh7DQogICAgZjogZnVuY3Rpb24gKGksIHMpIHsgcmV0dXJuIHM7IH0NCn0pOw0Kb2JqYzgudDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsDQpmdW5jdGlvbiBjOXQ1KGYpIHsgfQ0KOw0KYzl0NShmdW5jdGlvbiAobikgew0KICAgIHJldHVybiAoe30pOw0KfSk7DQovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50DQp2YXIgYzEwdDUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsgfTsNCi8vIENPTlRFWFQ6IE5ld2luZyBhIGNsYXNzDQpjbGFzcyBDMTF0NSB7DQogICAgY29uc3RydWN0b3IoZikgeyB9DQp9DQo7DQp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfSk7DQovLyBDT05URVhUOiBUeXBlIGFubm90YXRlZCBleHByZXNzaW9uDQp2YXIgYzEydDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMxMnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCnZhciBjMTJ0MyA9IFtdOw0KdmFyIGMxMnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ5ID0gW1tdLCBbXV07DQp2YXIgYzEydDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMxMnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQp2YXIgYzEydDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCnZhciBjMTJ0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjMTJ0MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCmZ1bmN0aW9uIEVGMShhLCBiKSB7IHJldHVybiBhICsgYjsgfQ0KdmFyIGVmdiA9IEVGMSgxLCAyKTsNClBvaW50Lm9yaWdpbiA9IG5ldyBQb2ludCgwLCAwKTsNClBvaW50LnByb3RvdHlwZS5hZGQgPSBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KfTsNClBvaW50LnByb3RvdHlwZSA9IHsNCiAgICB4OiAwLA0KICAgIHk6IDAsDQogICAgYWRkOiBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCiAgICB9DQp9Ow0KdmFyIHggPSB7fTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNvbnRleHR1YWxUeXBpbmcuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUNOLEdBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDaEQsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7Q0FDSjtBQUVELHVDQUF1QztBQUN2QyxJQUFVLElBSVQ7QUFKRCxXQUFVLElBQUksRUFBQztJQUNBLFFBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDM0QsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBSlMsSUFBSSxLQUFKLElBQUksUUFJYjtBQUVELGdDQUFnQztBQUNoQyxJQUFJLElBQUksR0FBMEIsQ0FBQyxVQUFTLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLFlBQVcsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDeEQsSUFBSSxJQUFJLEdBQXdCLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xFLElBQUksSUFBSSxHQUFtQyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUU5QixJQUFJLElBQUksR0FBcUMsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUN2RSxJQUFJLElBQUksR0FBZSxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUMvQixJQUFJLEtBQUssR0FBVyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksS0FBSyxHQUF3QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQUVGLHFDQUFxQztBQUNyQyxNQUFNLElBQUk7SUFDTixHQUFHLENBQW1DO0lBQ3RDLGNBQWM7UUFDVixJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRTtZQUN0QixPQUFPLENBQUMsQ0FBQztRQUFBLENBQ1osQ0FBQTtJQUFBLENBQ0o7Q0FDSjtBQUVELHNDQUFzQztBQUN0QyxJQUFVLElBS1Q7QUFMRCxXQUFVLElBQUksRUFBQztJQUVYLFFBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUU7UUFDakIsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBTFMsSUFBSSxLQUFKLElBQUksUUFLYjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUU5RCxrQ0FBa0M7QUFDbEMsSUFBSSxJQUFZLENBQUM7QUFDakIsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFTLENBQUMsRUFBQyxDQUFDLEVBQUUsQ0FBQyxFQUFDLENBQUMsQ0FBQztBQXVCekIsSUFBSSxLQUFLLEdBa0JTLENBQUMsRUFBRSxDQUFDLENBQUM7QUFFdkIsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUN0QyxLQUFLLENBQUMsRUFBRSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ2QsS0FBSyxDQUFDLEVBQUUsR0FBRyxZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDN0MsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEQsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQVMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUNyQyxLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ25CLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNwQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMzQyxLQUFLLENBQUMsR0FBRyxHQUFHO0lBQ1IsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLEVBQUUsRUFBQyxDQUFDO0FBQUEsQ0FBQztBQUN6QyxJQUFJLENBQUMsVUFBUyxDQUFDLEVBQUU7SUFDYixPQUFhLENBQUMsRUFBRSxDQUFDLENBQUM7QUFBQSxDQUNyQixDQUFDLENBQUM7QUFFSCw0QkFBNEI7QUFDNUIsSUFBSSxLQUFLLEdBQThCLFlBQVcsRUFBRSxPQUFPLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRS9GLDBCQUEwQjtBQUMxQixNQUFNLEtBQUs7SUFBRyxZQUFZLENBQXNCLEVBQUUsRUFBQyxDQUFFO0NBQUU7QUFBQSxDQUFDO0FBQ3hELElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFFckQscUNBQXFDO0FBQ3JDLElBQUksS0FBSyxHQUEyQixDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzFELElBQUksS0FBSyxHQUF5QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUNwRSxJQUFJLEtBQUssR0FBb0MsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFFbkMsSUFBSSxLQUFLLEdBQXNDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUM7QUFDekUsSUFBSSxLQUFLLEdBQWdCLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLElBQUksTUFBTSxHQUFZLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsSUFBSSxNQUFNLEdBQXlDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRTtDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBT0YsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxHQUFDLENBQUMsQ0FBQyxDQUFBLENBQUU7QUFFakMsSUFBSSxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLENBQUMsQ0FBQztBQWNuQixLQUFLLENBQUMsTUFBTSxHQUFHLElBQUksS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUUvQixLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxVQUFTLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDbkMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQUEsQ0FDOUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUUsRUFBRTtRQUNsQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFBQSxDQUM5QztDQUNKLENBQUM7QUFJRixJQUFJLENBQUMsR0FBTSxFQUFHLENBQUMifQ==,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpuYW1lc3BhY2UgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm5hbWVzcGFjZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map.diff index 146419abeb..df95ec003b 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.js.map.diff @@ -2,7 +2,7 @@ +++ new.contextualTyping.js.map @@= skipped -0, +0 lines =@@ //// [contextualTyping.js.map] --{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IAAV;QACI,QAAG,GAAqC,UAAS,CAAC;YAC9C,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CAAA;AAED,uCAAuC;AACvC,IAAO,IAAI,CAIV;AAJD,WAAO,IAAI;IACI,QAAG,GAAqC,UAAS,CAAC;QACzD,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EAJM,IAAI,KAAJ,IAAI,QAIV;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IAEN;QACI,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;CACJ;AAED,sCAAsC;AACtC,IAAO,IAAI,CAKV;AALD,WAAO,IAAI;IAEP,KAAA,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;QACf,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EALM,IAAI,KAAJ,IAAI,QAKV;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,IAAG,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,OAAa,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,OAAO,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,IAAI,CAAC;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,IAAI,OAAO,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} --//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgICAgICByZXR1cm4gaTsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgY29uc3RydWN0b3IoKSB7DQogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgICAgIHJldHVybiBzOw0KICAgICAgICB9Ow0KICAgIH0NCn0NCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50DQp2YXIgQzVUNTsNCihmdW5jdGlvbiAoQzVUNSkgew0KICAgIEM1VDUuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgcmV0dXJuIHM7DQogICAgfTsNCn0pKEM1VDUgfHwgKEM1VDUgPSB7fSkpOw0KLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudA0KdmFyIGM2dDU7DQpjNnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQovLyBDT05URVhUOiBBcnJheSBpbmRleCBhc3NpZ25tZW50DQp2YXIgYzd0MjsNCmM3dDJbMF0gPSAoeyBuOiAxIH0pOw0KdmFyIG9iamM4ID0gKHt9KTsNCm9iamM4LnQxID0gKGZ1bmN0aW9uIChzKSB7IHJldHVybiBzOyB9KTsNCm9iamM4LnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCm9iamM4LnQzID0gW107DQpvYmpjOC50NCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDYgPSBmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ3ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQpvYmpjOC50OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDkgPSBbW10sIFtdXTsNCm9iamM4LnQxMCA9IFsoe30pLCAoe30pXTsNCm9iamM4LnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQpvYmpjOC50MTIgPSB7DQogICAgZm9vOiAoe30pDQp9Ow0Kb2JqYzgudDEzID0gKHsNCiAgICBmOiBmdW5jdGlvbiAoaSwgcykgeyByZXR1cm4gczsgfQ0KfSk7DQpvYmpjOC50MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCi8vIENPTlRFWFQ6IEZ1bmN0aW9uIGNhbGwNCmZ1bmN0aW9uIGM5dDUoZikgeyB9DQo7DQpjOXQ1KGZ1bmN0aW9uIChuKSB7DQogICAgcmV0dXJuICh7fSk7DQp9KTsNCi8vIENPTlRFWFQ6IFJldHVybiBzdGF0ZW1lbnQNCnZhciBjMTB0NSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9OyB9Ow0KLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MNCmNsYXNzIEMxMXQ1IHsNCiAgICBjb25zdHJ1Y3RvcihmKSB7IH0NCn0NCjsNCnZhciBpID0gbmV3IEMxMXQ1KGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9KTsNCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24NCnZhciBjMTJ0MSA9IChmdW5jdGlvbiAocykgeyByZXR1cm4gczsgfSk7DQp2YXIgYzEydDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMxMnQzID0gW107DQp2YXIgYzEydDQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDYgPSBmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NyA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzEydDkgPSBbW10sIFtdXTsNCnZhciBjMTJ0MTAgPSBbKHt9KSwgKHt9KV07DQp2YXIgYzEydDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjMTJ0MTIgPSB7DQogICAgZm9vOiAoe30pDQp9Ow0KdmFyIGMxMnQxMyA9ICh7DQogICAgZjogZnVuY3Rpb24gKGksIHMpIHsgcmV0dXJuIHM7IH0NCn0pOw0KdmFyIGMxMnQxNCA9ICh7DQogICAgYTogW10NCn0pOw0KZnVuY3Rpb24gRUYxKGEsIGIpIHsgcmV0dXJuIGEgKyBiOyB9DQp2YXIgZWZ2ID0gRUYxKDEsIDIpOw0KUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOw0KUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uIChkeCwgZHkpIHsNCiAgICByZXR1cm4gbmV3IFBvaW50KHRoaXMueCArIGR4LCB0aGlzLnkgKyBkeSk7DQp9Ow0KUG9pbnQucHJvdG90eXBlID0gew0KICAgIHg6IDAsDQogICAgeTogMCwNCiAgICBhZGQ6IGZ1bmN0aW9uIChkeCwgZHkpIHsNCiAgICAgICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KICAgIH0NCn07DQp2YXIgeCA9IHt9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y29udGV4dHVhbFR5cGluZy5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUFWO1FBQ0ksUUFBRyxHQUFxQyxVQUFTLENBQUM7WUFDOUMsT0FBTyxDQUFDLENBQUM7UUFDYixDQUFDLENBQUE7SUFDTCxDQUFDO0NBQUE7QUFFRCx1Q0FBdUM7QUFDdkMsSUFBTyxJQUFJLENBSVY7QUFKRCxXQUFPLElBQUk7SUFDSSxRQUFHLEdBQXFDLFVBQVMsQ0FBQztRQUN6RCxPQUFPLENBQUMsQ0FBQztJQUNiLENBQUMsQ0FBQTtBQUNMLENBQUMsRUFKTSxJQUFJLEtBQUosSUFBSSxRQUlWO0FBRUQsZ0NBQWdDO0FBQ2hDLElBQUksSUFBSSxHQUEwQixDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ3hELElBQUksSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDbEUsSUFBSSxJQUFJLEdBQW1DLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFFOUIsSUFBSSxJQUFJLEdBQXFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLElBQUksSUFBSSxHQUFlLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQy9CLElBQUksS0FBSyxHQUFXLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDNUMsSUFBSSxLQUFLLEdBQXdDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLEtBQUssR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLEVBQUU7Q0FDUixDQUFDLENBQUE7QUFFRixxQ0FBcUM7QUFDckMsTUFBTSxJQUFJO0lBRU47UUFDSSxJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUM7WUFDcEIsT0FBTyxDQUFDLENBQUM7UUFDYixDQUFDLENBQUE7SUFDTCxDQUFDO0NBQ0o7QUFFRCxzQ0FBc0M7QUFDdEMsSUFBTyxJQUFJLENBS1Y7QUFMRCxXQUFPLElBQUk7SUFFUCxLQUFBLEdBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDO1FBQ2YsT0FBTyxDQUFDLENBQUM7SUFDYixDQUFDLENBQUE7QUFDTCxDQUFDLEVBTE0sSUFBSSxLQUFKLElBQUksUUFLVjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFOUQsa0NBQWtDO0FBQ2xDLElBQUksSUFBWSxDQUFDO0FBQ2pCLElBQUksQ0FBQyxDQUFDLENBQUMsR0FBUyxDQUFDLEVBQUMsQ0FBQyxFQUFFLENBQUMsRUFBQyxDQUFDLENBQUM7QUF1QnpCLElBQUksS0FBSyxHQWtCUyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBRXZCLEtBQUssQ0FBQyxFQUFFLEdBQUcsQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3RDLEtBQUssQ0FBQyxFQUFFLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsS0FBSyxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUM7QUFDZCxLQUFLLENBQUMsRUFBRSxHQUFHLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQzdDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUNoRCxLQUFLLENBQUMsRUFBRSxHQUFHLFVBQVMsQ0FBUyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDckMsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUNuQixLQUFLLENBQUMsR0FBRyxHQUFHLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDcEMsS0FBSyxDQUFDLEdBQUcsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQzNDLEtBQUssQ0FBQyxHQUFHLEdBQUc7SUFDUixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLElBQUcsQ0FBQztBQUFBLENBQUM7QUFDekMsSUFBSSxDQUFDLFVBQVMsQ0FBQztJQUNYLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUN0QixDQUFDLENBQUMsQ0FBQztBQUVILDRCQUE0QjtBQUM1QixJQUFJLEtBQUssR0FBOEIsY0FBYSxPQUFPLFVBQVMsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUUvRiwwQkFBMEI7QUFDMUIsTUFBTSxLQUFLO0lBQUcsWUFBWSxDQUFzQixJQUFJLENBQUM7Q0FBRTtBQUFBLENBQUM7QUFDeEQsSUFBSSxDQUFDLEdBQUcsSUFBSSxLQUFLLENBQUMsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFFckQscUNBQXFDO0FBQ3JDLElBQUksS0FBSyxHQUEyQixDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDL0QsSUFBSSxLQUFLLEdBQVUsQ0FBQztJQUNoQixDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILElBQUksS0FBSyxHQUFjLEVBQUUsQ0FBQztBQUMxQixJQUFJLEtBQUssR0FBZ0IsY0FBYSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDMUQsSUFBSSxLQUFLLEdBQXlCLFVBQVMsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUNwRSxJQUFJLEtBQUssR0FBb0MsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUNsRixJQUFJLEtBQUssR0FHTixVQUFTLENBQVEsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUVuQyxJQUFJLEtBQUssR0FBc0MsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDekUsSUFBSSxLQUFLLEdBQWdCLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLElBQUksTUFBTSxHQUFZLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsSUFBSSxNQUFNLEdBQXlDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDbEYsSUFBSSxNQUFNLEdBQVU7SUFDaEIsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLEVBQUU7Q0FDUixDQUFDLENBQUE7QUFPRixTQUFTLEdBQUcsQ0FBQyxDQUFDLEVBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxHQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFFakMsSUFBSSxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLENBQUMsQ0FBQztBQWNuQixLQUFLLENBQUMsTUFBTSxHQUFHLElBQUksS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUUvQixLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxVQUFTLEVBQUUsRUFBRSxFQUFFO0lBQ2pDLE9BQU8sSUFBSSxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsR0FBRyxFQUFFLEVBQUUsSUFBSSxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQztBQUMvQyxDQUFDLENBQUM7QUFFRixLQUFLLENBQUMsU0FBUyxHQUFHO0lBQ2QsQ0FBQyxFQUFFLENBQUM7SUFDSixDQUFDLEVBQUUsQ0FBQztJQUNKLEdBQUcsRUFBRSxVQUFTLEVBQUUsRUFBRSxFQUFFO1FBQ2hCLE9BQU8sSUFBSSxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsR0FBRyxFQUFFLEVBQUUsSUFBSSxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQztJQUMvQyxDQUFDO0NBQ0osQ0FBQztBQUlGLElBQUksQ0FBQyxHQUFNLEVBQUcsQ0FBQyJ9,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgptb2R1bGUgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm1vZHVsZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== -+{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IACN,GAAG,GAAqC,UAAS,CAAC,EAAE;QAChD,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;CACJ;AAED,uCAAuC;AACvC,IAAO,IAIN;AAJD,WAAO,IAAI,EAAC;IACG,QAAG,GAAqC,UAAS,CAAC,EAAE;QAC3D,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EAJM,IAAI,KAAJ,IAAI,QAIV;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IACN,GAAG,CAAmC;IACtC,cAAc;QACV,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,CAAC,CAAC;QAAA,CACZ,CAAA;IAAA,CACJ;CACJ;AAED,sCAAsC;AACtC,IAAO,IAKN;AALD,WAAO,IAAI,EAAC;IAER,QAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EALM,IAAI,KAAJ,IAAI,QAKV;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,EAAE,EAAC,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC,EAAE;IACb,OAAa,CAAC,EAAE,CAAC,CAAC;AAAA,CACrB,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,YAAW,EAAE,OAAO,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAA,CAAA,CAAE,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,EAAE,EAAC,CAAE;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,OAAO,CAAC,GAAC,CAAC,CAAC,CAAA,CAAE;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE,EAAE;IACnC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAAA,CAC9C,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE,EAAE;QAClB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAAA,CAC9C;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} -+//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgIHJldHVybiBpOw0KICAgIH07DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgZm9vOw0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgICAgICByZXR1cm4gczsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgYXNzaWdubWVudA0KdmFyIEM1VDU7DQooZnVuY3Rpb24gKEM1VDUpIHsNCiAgICBDNVQ1LmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgIHJldHVybiBzOw0KICAgIH07DQp9KShDNVQ1IHx8IChDNVQ1ID0ge30pKTsNCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGFzc2lnbm1lbnQNCnZhciBjNnQ1Ow0KYzZ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KLy8gQ09OVEVYVDogQXJyYXkgaW5kZXggYXNzaWdubWVudA0KdmFyIGM3dDI7DQpjN3QyWzBdID0gKHsgbjogMSB9KTsNCnZhciBvYmpjOCA9ICh7fSk7DQpvYmpjOC50MSA9IChmdW5jdGlvbiAocykgeyByZXR1cm4gczsgfSk7DQpvYmpjOC50MiA9ICh7DQogICAgbjogMQ0KfSk7DQpvYmpjOC50MyA9IFtdOw0Kb2JqYzgudDQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NyA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ5ID0gW1tdLCBbXV07DQpvYmpjOC50MTAgPSBbKHt9KSwgKHt9KV07DQpvYmpjOC50MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0Kb2JqYzgudDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCm9iamM4LnQxMyA9ICh7DQogICAgZjogZnVuY3Rpb24gKGksIHMpIHsgcmV0dXJuIHM7IH0NCn0pOw0Kb2JqYzgudDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsDQpmdW5jdGlvbiBjOXQ1KGYpIHsgfQ0KOw0KYzl0NShmdW5jdGlvbiAobikgew0KICAgIHJldHVybiAoe30pOw0KfSk7DQovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50DQp2YXIgYzEwdDUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsgfTsNCi8vIENPTlRFWFQ6IE5ld2luZyBhIGNsYXNzDQpjbGFzcyBDMTF0NSB7DQogICAgY29uc3RydWN0b3IoZikgeyB9DQp9DQo7DQp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfSk7DQovLyBDT05URVhUOiBUeXBlIGFubm90YXRlZCBleHByZXNzaW9uDQp2YXIgYzEydDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMxMnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCnZhciBjMTJ0MyA9IFtdOw0KdmFyIGMxMnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ5ID0gW1tdLCBbXV07DQp2YXIgYzEydDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMxMnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQp2YXIgYzEydDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCnZhciBjMTJ0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjMTJ0MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCmZ1bmN0aW9uIEVGMShhLCBiKSB7IHJldHVybiBhICsgYjsgfQ0KdmFyIGVmdiA9IEVGMSgxLCAyKTsNClBvaW50Lm9yaWdpbiA9IG5ldyBQb2ludCgwLCAwKTsNClBvaW50LnByb3RvdHlwZS5hZGQgPSBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KfTsNClBvaW50LnByb3RvdHlwZSA9IHsNCiAgICB4OiAwLA0KICAgIHk6IDAsDQogICAgYWRkOiBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCiAgICB9DQp9Ow0KdmFyIHggPSB7fTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNvbnRleHR1YWxUeXBpbmcuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUNOLEdBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDaEQsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7Q0FDSjtBQUVELHVDQUF1QztBQUN2QyxJQUFPLElBSU47QUFKRCxXQUFPLElBQUksRUFBQztJQUNHLFFBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDM0QsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBSk0sSUFBSSxLQUFKLElBQUksUUFJVjtBQUVELGdDQUFnQztBQUNoQyxJQUFJLElBQUksR0FBMEIsQ0FBQyxVQUFTLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLFlBQVcsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDeEQsSUFBSSxJQUFJLEdBQXdCLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xFLElBQUksSUFBSSxHQUFtQyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUU5QixJQUFJLElBQUksR0FBcUMsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUN2RSxJQUFJLElBQUksR0FBZSxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUMvQixJQUFJLEtBQUssR0FBVyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksS0FBSyxHQUF3QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQUVGLHFDQUFxQztBQUNyQyxNQUFNLElBQUk7SUFDTixHQUFHLENBQW1DO0lBQ3RDLGNBQWM7UUFDVixJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRTtZQUN0QixPQUFPLENBQUMsQ0FBQztRQUFBLENBQ1osQ0FBQTtJQUFBLENBQ0o7Q0FDSjtBQUVELHNDQUFzQztBQUN0QyxJQUFPLElBS047QUFMRCxXQUFPLElBQUksRUFBQztJQUVSLFFBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUU7UUFDakIsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBTE0sSUFBSSxLQUFKLElBQUksUUFLVjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUU5RCxrQ0FBa0M7QUFDbEMsSUFBSSxJQUFZLENBQUM7QUFDakIsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFTLENBQUMsRUFBQyxDQUFDLEVBQUUsQ0FBQyxFQUFDLENBQUMsQ0FBQztBQXVCekIsSUFBSSxLQUFLLEdBa0JTLENBQUMsRUFBRSxDQUFDLENBQUM7QUFFdkIsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUN0QyxLQUFLLENBQUMsRUFBRSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ2QsS0FBSyxDQUFDLEVBQUUsR0FBRyxZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDN0MsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEQsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQVMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUNyQyxLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ25CLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNwQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMzQyxLQUFLLENBQUMsR0FBRyxHQUFHO0lBQ1IsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLEVBQUUsRUFBQyxDQUFDO0FBQUEsQ0FBQztBQUN6QyxJQUFJLENBQUMsVUFBUyxDQUFDLEVBQUU7SUFDYixPQUFhLENBQUMsRUFBRSxDQUFDLENBQUM7QUFBQSxDQUNyQixDQUFDLENBQUM7QUFFSCw0QkFBNEI7QUFDNUIsSUFBSSxLQUFLLEdBQThCLFlBQVcsRUFBRSxPQUFPLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRS9GLDBCQUEwQjtBQUMxQixNQUFNLEtBQUs7SUFBRyxZQUFZLENBQXNCLEVBQUUsRUFBQyxDQUFFO0NBQUU7QUFBQSxDQUFDO0FBQ3hELElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFFckQscUNBQXFDO0FBQ3JDLElBQUksS0FBSyxHQUEyQixDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzFELElBQUksS0FBSyxHQUF5QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUNwRSxJQUFJLEtBQUssR0FBb0MsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFFbkMsSUFBSSxLQUFLLEdBQXNDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUM7QUFDekUsSUFBSSxLQUFLLEdBQWdCLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLElBQUksTUFBTSxHQUFZLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsSUFBSSxNQUFNLEdBQXlDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRTtDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBT0YsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxHQUFDLENBQUMsQ0FBQyxDQUFBLENBQUU7QUFFakMsSUFBSSxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLENBQUMsQ0FBQztBQWNuQixLQUFLLENBQUMsTUFBTSxHQUFHLElBQUksS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUUvQixLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxVQUFTLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDbkMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQUEsQ0FDOUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUUsRUFBRTtRQUNsQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFBQSxDQUM5QztDQUNKLENBQUM7QUFJRixJQUFJLENBQUMsR0FBTSxFQUFHLENBQUMifQ==,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgptb2R1bGUgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm1vZHVsZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== \ No newline at end of file +-{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC;IAAA;QACI,QAAG,GAAqC,UAAS,CAAC;YAC9C,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;IAAD,WAAC;AAAD,CAAC,AAJD,IAIC;AAED,uCAAuC;AACvC,IAAU,IAAI,CAIb;AAJD,WAAU,IAAI;IACC,QAAG,GAAqC,UAAS,CAAC;QACzD,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EAJS,IAAI,KAAJ,IAAI,QAIb;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC;IAEI;QACI,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,CAAC;QACb,CAAC,CAAA;IACL,CAAC;IACL,WAAC;AAAD,CAAC,AAPD,IAOC;AAED,sCAAsC;AACtC,IAAU,IAAI,CAKb;AALD,WAAU,IAAI;IAEV,KAAA,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC;QACf,OAAO,CAAC,CAAC;IACb,CAAC,CAAA;AACL,CAAC,EALS,IAAI,KAAJ,IAAI,QAKb;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,IAAG,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC;IACX,OAAa,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,cAAa,OAAO,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAA,CAAC,CAAC,CAAC;AAE/F,0BAA0B;AAC1B;IAAc,eAAY,CAAsB;IAAI,CAAC;IAAC,YAAC;AAAD,CAAC,AAAvD,IAAuD;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,cAAa,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAa,CAAC,EAAE,CAAC,CAAA,CAAC,CAAC,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,IAAI,OAAO,CAAC,CAAA,CAAC,CAAC,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,IAAI,OAAO,CAAC,GAAC,CAAC,CAAC,CAAC,CAAC;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE;IACjC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE;QAChB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} +-//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMVQ1ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgIGZ1bmN0aW9uIEMxVDUoKSB7DQogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24gKGkpIHsNCiAgICAgICAgICAgIHJldHVybiBpOw0KICAgICAgICB9Ow0KICAgIH0NCiAgICByZXR1cm4gQzFUNTsNCn0oKSk7DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KdmFyIEM0VDUgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gQzRUNSgpIHsNCiAgICAgICAgdGhpcy5mb28gPSBmdW5jdGlvbiAoaSwgcykgew0KICAgICAgICAgICAgcmV0dXJuIHM7DQogICAgICAgIH07DQogICAgfQ0KICAgIHJldHVybiBDNFQ1Ow0KfSgpKTsNCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50DQp2YXIgQzVUNTsNCihmdW5jdGlvbiAoQzVUNSkgew0KICAgIEM1VDUuZm9vID0gZnVuY3Rpb24gKGksIHMpIHsNCiAgICAgICAgcmV0dXJuIHM7DQogICAgfTsNCn0pKEM1VDUgfHwgKEM1VDUgPSB7fSkpOw0KLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudA0KdmFyIGM2dDU7DQpjNnQ1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQovLyBDT05URVhUOiBBcnJheSBpbmRleCBhc3NpZ25tZW50DQp2YXIgYzd0MjsNCmM3dDJbMF0gPSAoeyBuOiAxIH0pOw0KdmFyIG9iamM4ID0gKHt9KTsNCm9iamM4LnQxID0gKGZ1bmN0aW9uIChzKSB7IHJldHVybiBzOyB9KTsNCm9iamM4LnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCm9iamM4LnQzID0gW107DQpvYmpjOC50NCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDYgPSBmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ3ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQpvYmpjOC50OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDkgPSBbW10sIFtdXTsNCm9iamM4LnQxMCA9IFsoe30pLCAoe30pXTsNCm9iamM4LnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQpvYmpjOC50MTIgPSB7DQogICAgZm9vOiAoe30pDQp9Ow0Kb2JqYzgudDEzID0gKHsNCiAgICBmOiBmdW5jdGlvbiAoaSwgcykgeyByZXR1cm4gczsgfQ0KfSk7DQpvYmpjOC50MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCi8vIENPTlRFWFQ6IEZ1bmN0aW9uIGNhbGwNCmZ1bmN0aW9uIGM5dDUoZikgeyB9DQo7DQpjOXQ1KGZ1bmN0aW9uIChuKSB7DQogICAgcmV0dXJuICh7fSk7DQp9KTsNCi8vIENPTlRFWFQ6IFJldHVybiBzdGF0ZW1lbnQNCnZhciBjMTB0NSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9OyB9Ow0KLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MNCnZhciBDMTF0NSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsNCiAgICBmdW5jdGlvbiBDMTF0NShmKSB7DQogICAgfQ0KICAgIHJldHVybiBDMTF0NTsNCn0oKSk7DQo7DQp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfSk7DQovLyBDT05URVhUOiBUeXBlIGFubm90YXRlZCBleHByZXNzaW9uDQp2YXIgYzEydDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMxMnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCnZhciBjMTJ0MyA9IFtdOw0KdmFyIGMxMnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ5ID0gW1tdLCBbXV07DQp2YXIgYzEydDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMxMnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQp2YXIgYzEydDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCnZhciBjMTJ0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjMTJ0MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCmZ1bmN0aW9uIEVGMShhLCBiKSB7IHJldHVybiBhICsgYjsgfQ0KdmFyIGVmdiA9IEVGMSgxLCAyKTsNClBvaW50Lm9yaWdpbiA9IG5ldyBQb2ludCgwLCAwKTsNClBvaW50LnByb3RvdHlwZS5hZGQgPSBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KfTsNClBvaW50LnByb3RvdHlwZSA9IHsNCiAgICB4OiAwLA0KICAgIHk6IDAsDQogICAgYWRkOiBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCiAgICB9DQp9Ow0KdmFyIHggPSB7fTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNvbnRleHR1YWxUeXBpbmcuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDO0lBQUE7UUFDSSxRQUFHLEdBQXFDLFVBQVMsQ0FBQztZQUM5QyxPQUFPLENBQUMsQ0FBQztRQUNiLENBQUMsQ0FBQTtJQUNMLENBQUM7SUFBRCxXQUFDO0FBQUQsQ0FBQyxBQUpELElBSUM7QUFFRCx1Q0FBdUM7QUFDdkMsSUFBVSxJQUFJLENBSWI7QUFKRCxXQUFVLElBQUk7SUFDQyxRQUFHLEdBQXFDLFVBQVMsQ0FBQztRQUN6RCxPQUFPLENBQUMsQ0FBQztJQUNiLENBQUMsQ0FBQTtBQUNMLENBQUMsRUFKUyxJQUFJLEtBQUosSUFBSSxRQUliO0FBRUQsZ0NBQWdDO0FBQ2hDLElBQUksSUFBSSxHQUEwQixDQUFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ3hELElBQUksSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDbEUsSUFBSSxJQUFJLEdBQW1DLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFFOUIsSUFBSSxJQUFJLEdBQXFDLFVBQVMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLElBQUksSUFBSSxHQUFlLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQy9CLElBQUksS0FBSyxHQUFXLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDNUMsSUFBSSxLQUFLLEdBQXdDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLEtBQUssR0FBUyxDQUFDO0lBQ2YsQ0FBQyxFQUFFLEVBQUU7Q0FDUixDQUFDLENBQUE7QUFFRixxQ0FBcUM7QUFDckM7SUFFSTtRQUNJLElBQUksQ0FBQyxHQUFHLEdBQUcsVUFBUyxDQUFDLEVBQUUsQ0FBQztZQUNwQixPQUFPLENBQUMsQ0FBQztRQUNiLENBQUMsQ0FBQTtJQUNMLENBQUM7SUFDTCxXQUFDO0FBQUQsQ0FBQyxBQVBELElBT0M7QUFFRCxzQ0FBc0M7QUFDdEMsSUFBVSxJQUFJLENBS2I7QUFMRCxXQUFVLElBQUk7SUFFVixLQUFBLEdBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDO1FBQ2YsT0FBTyxDQUFDLENBQUM7SUFDYixDQUFDLENBQUE7QUFDTCxDQUFDLEVBTFMsSUFBSSxLQUFKLElBQUksUUFLYjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUM7QUFFOUQsa0NBQWtDO0FBQ2xDLElBQUksSUFBWSxDQUFDO0FBQ2pCLElBQUksQ0FBQyxDQUFDLENBQUMsR0FBUyxDQUFDLEVBQUMsQ0FBQyxFQUFFLENBQUMsRUFBQyxDQUFDLENBQUM7QUF1QnpCLElBQUksS0FBSyxHQWtCUyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBRXZCLEtBQUssQ0FBQyxFQUFFLEdBQUcsQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ3RDLEtBQUssQ0FBQyxFQUFFLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsS0FBSyxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUM7QUFDZCxLQUFLLENBQUMsRUFBRSxHQUFHLGNBQWEsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQzdDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUNoRCxLQUFLLENBQUMsRUFBRSxHQUFHLFVBQVMsQ0FBUyxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDckMsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUNuQixLQUFLLENBQUMsR0FBRyxHQUFHLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDcEMsS0FBSyxDQUFDLEdBQUcsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQzNDLEtBQUssQ0FBQyxHQUFHLEdBQUc7SUFDUixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLElBQUcsQ0FBQztBQUFBLENBQUM7QUFDekMsSUFBSSxDQUFDLFVBQVMsQ0FBQztJQUNYLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQztBQUN0QixDQUFDLENBQUMsQ0FBQztBQUVILDRCQUE0QjtBQUM1QixJQUFJLEtBQUssR0FBOEIsY0FBYSxPQUFPLFVBQVMsQ0FBQyxJQUFJLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUUvRiwwQkFBMEI7QUFDMUI7SUFBYyxlQUFZLENBQXNCO0lBQUksQ0FBQztJQUFDLFlBQUM7QUFBRCxDQUFDLEFBQXZELElBQXVEO0FBQUEsQ0FBQztBQUN4RCxJQUFJLENBQUMsR0FBRyxJQUFJLEtBQUssQ0FBQyxVQUFTLENBQUMsSUFBSSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUVyRCxxQ0FBcUM7QUFDckMsSUFBSSxLQUFLLEdBQTJCLENBQUMsVUFBUyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUEsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixjQUFhLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFDLENBQUMsQ0FBQztBQUMxRCxJQUFJLEtBQUssR0FBeUIsVUFBUyxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ3BFLElBQUksS0FBSyxHQUFvQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxJQUFJLE9BQU8sQ0FBQyxDQUFBLENBQUMsQ0FBQyxDQUFDO0FBRW5DLElBQUksS0FBSyxHQUFzQyxVQUFTLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN6RSxJQUFJLEtBQUssR0FBZ0IsQ0FBQyxFQUFFLEVBQUMsRUFBRSxDQUFDLENBQUM7QUFDakMsSUFBSSxNQUFNLEdBQVksQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUM5QyxJQUFJLE1BQU0sR0FBeUMsQ0FBQyxVQUFTLENBQUMsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsSUFBSSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7Q0FDbEMsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxNQUFNLEdBQVUsQ0FBQztJQUNqQixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQU9GLFNBQVMsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLElBQUksT0FBTyxDQUFDLEdBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUVqQyxJQUFJLEdBQUcsR0FBRyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsQ0FBQyxDQUFDO0FBY25CLEtBQUssQ0FBQyxNQUFNLEdBQUcsSUFBSSxLQUFLLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBRS9CLEtBQUssQ0FBQyxTQUFTLENBQUMsR0FBRyxHQUFHLFVBQVMsRUFBRSxFQUFFLEVBQUU7SUFDakMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQy9DLENBQUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUU7UUFDaEIsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0lBQy9DLENBQUM7Q0FDSixDQUFDO0FBSUYsSUFBSSxDQUFDLEdBQU0sRUFBRyxDQUFDIn0=,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpuYW1lc3BhY2UgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm5hbWVzcGFjZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== ++{"version":3,"file":"contextualTyping.js","sourceRoot":"","sources":["contextualTyping.ts"],"names":[],"mappings":"AAYA,sCAAsC;AACtC,MAAM,IAAI;IACN,GAAG,GAAqC,UAAS,CAAC,EAAE;QAChD,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;CACJ;AAED,uCAAuC;AACvC,IAAU,IAIT;AAJD,WAAU,IAAI,EAAC;IACA,QAAG,GAAqC,UAAS,CAAC,EAAE;QAC3D,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EAJS,IAAI,KAAJ,IAAI,QAIb;AAED,gCAAgC;AAChC,IAAI,IAAI,GAA0B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC7D,IAAI,IAAI,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAA;AACF,IAAI,IAAI,GAAa,EAAE,CAAC;AACxB,IAAI,IAAI,GAAe,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACxD,IAAI,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClE,IAAI,IAAI,GAAmC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChF,IAAI,IAAI,GAGJ,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AAE9B,IAAI,IAAI,GAAqC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACvE,IAAI,IAAI,GAAe,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,KAAK,GAAW,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5C,IAAI,KAAK,GAAwC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAChF,IAAI,KAAK,GAAS;IACd,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,KAAK,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAEF,qCAAqC;AACrC,MAAM,IAAI;IACN,GAAG,CAAmC;IACtC,cAAc;QACV,IAAI,CAAC,GAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;YACtB,OAAO,CAAC,CAAC;QAAA,CACZ,CAAA;IAAA,CACJ;CACJ;AAED,sCAAsC;AACtC,IAAU,IAKT;AALD,WAAU,IAAI,EAAC;IAEX,QAAG,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE;QACjB,OAAO,CAAC,CAAC;IAAA,CACZ,CAAA;AAAA,CACJ,EALS,IAAI,KAAJ,IAAI,QAKb;AAED,+BAA+B;AAC/B,IAAI,IAAyB,CAAC;AAC9B,IAAI,GAAwB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAE9D,kCAAkC;AAClC,IAAI,IAAY,CAAC;AACjB,IAAI,CAAC,CAAC,CAAC,GAAS,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;AAuBzB,IAAI,KAAK,GAkBS,CAAC,EAAE,CAAC,CAAC;AAEvB,KAAK,CAAC,EAAE,GAAG,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AACtC,KAAK,CAAC,EAAE,GAAS,CAAC;IACd,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC;AACd,KAAK,CAAC,EAAE,GAAG,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC7C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAChD,KAAK,CAAC,EAAE,GAAG,UAAS,CAAS,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAE5C,KAAK,CAAC,EAAE,GAAG,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACrC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACnB,KAAK,CAAC,GAAG,GAAG,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,KAAK,CAAC,GAAG,GAAG,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAC3C,KAAK,CAAC,GAAG,GAAG;IACR,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,KAAK,CAAC,GAAG,GAAS,CAAC;IACf,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AACF,yBAAyB;AACzB,SAAS,IAAI,CAAC,CAAsB,EAAE,EAAC,CAAC;AAAA,CAAC;AACzC,IAAI,CAAC,UAAS,CAAC,EAAE;IACb,OAAa,CAAC,EAAE,CAAC,CAAC;AAAA,CACrB,CAAC,CAAC;AAEH,4BAA4B;AAC5B,IAAI,KAAK,GAA8B,YAAW,EAAE,OAAO,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAA,CAAA,CAAE,CAAC;AAE/F,0BAA0B;AAC1B,MAAM,KAAK;IAAG,YAAY,CAAsB,EAAE,EAAC,CAAE;CAAE;AAAA,CAAC;AACxD,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAErD,qCAAqC;AACrC,IAAI,KAAK,GAA2B,CAAC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC,CAAC;AAC/D,IAAI,KAAK,GAAU,CAAC;IAChB,CAAC,EAAE,CAAC;CACP,CAAC,CAAC;AACH,IAAI,KAAK,GAAc,EAAE,CAAC;AAC1B,IAAI,KAAK,GAAgB,YAAW,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAC1D,IAAI,KAAK,GAAyB,UAAS,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AACpE,IAAI,KAAK,GAAoC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAa,CAAC,EAAE,CAAC,CAAA,CAAA,CAAE,CAAC;AAClF,IAAI,KAAK,GAGN,UAAS,CAAQ,EAAE,EAAE,OAAO,CAAC,CAAA,CAAA,CAAE,CAAC;AAEnC,IAAI,KAAK,GAAsC,UAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC;AACzE,IAAI,KAAK,GAAgB,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;AACjC,IAAI,MAAM,GAAY,CAAO,CAAC,EAAE,CAAC,EAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,IAAI,MAAM,GAAyC,CAAC,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE,CAAC,CAAC;AAClF,IAAI,MAAM,GAAU;IAChB,GAAG,EAAQ,CAAC,EAAE,CAAC;CAClB,CAAA;AACD,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,UAAS,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAA,CAAE;CAClC,CAAC,CAAA;AACF,IAAI,MAAM,GAAU,CAAC;IACjB,CAAC,EAAE,EAAE;CACR,CAAC,CAAA;AAOF,SAAS,GAAG,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,OAAO,CAAC,GAAC,CAAC,CAAC,CAAA,CAAE;AAEjC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;AAcnB,KAAK,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,UAAS,EAAE,EAAE,EAAE,EAAE;IACnC,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAAA,CAC9C,CAAC;AAEF,KAAK,CAAC,SAAS,GAAG;IACd,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,GAAG,EAAE,UAAS,EAAE,EAAE,EAAE,EAAE;QAClB,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAAA,CAC9C;CACJ,CAAC;AAIF,IAAI,CAAC,GAAM,EAAG,CAAC"} ++//// https://sokra.github.io/source-map-visualization#base64,Ly8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgZGVjbGFyYXRpb24NCmNsYXNzIEMxVDUgew0KICAgIGZvbyA9IGZ1bmN0aW9uIChpKSB7DQogICAgICAgIHJldHVybiBpOw0KICAgIH07DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgZGVjbGFyYXRpb24NCnZhciBDMlQ1Ow0KKGZ1bmN0aW9uIChDMlQ1KSB7DQogICAgQzJUNS5mb28gPSBmdW5jdGlvbiAoaSkgew0KICAgICAgICByZXR1cm4gaTsNCiAgICB9Ow0KfSkoQzJUNSB8fCAoQzJUNSA9IHt9KSk7DQovLyBDT05URVhUOiBWYXJpYWJsZSBkZWNsYXJhdGlvbg0KdmFyIGMzdDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMzdDIgPSAoew0KICAgIG46IDENCn0pOw0KdmFyIGMzdDMgPSBbXTsNCnZhciBjM3Q0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjM3Q1ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzN0NiA9IGZ1bmN0aW9uIChuLCBzKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMzdDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjM3Q4ID0gZnVuY3Rpb24gKG4pIHsgcmV0dXJuIG47IH07DQp2YXIgYzN0OSA9IFtbXSwgW11dOw0KdmFyIGMzdDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMzdDExID0gW2Z1bmN0aW9uIChuLCBzKSB7IHJldHVybiBzOyB9XTsNCnZhciBjM3QxMiA9IHsNCiAgICBmb286ICh7fSkNCn07DQp2YXIgYzN0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjM3QxNCA9ICh7DQogICAgYTogW10NCn0pOw0KLy8gQ09OVEVYVDogQ2xhc3MgcHJvcGVydHkgYXNzaWdubWVudA0KY2xhc3MgQzRUNSB7DQogICAgZm9vOw0KICAgIGNvbnN0cnVjdG9yKCkgew0KICAgICAgICB0aGlzLmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgICAgICByZXR1cm4gczsNCiAgICAgICAgfTsNCiAgICB9DQp9DQovLyBDT05URVhUOiBNb2R1bGUgcHJvcGVydHkgYXNzaWdubWVudA0KdmFyIEM1VDU7DQooZnVuY3Rpb24gKEM1VDUpIHsNCiAgICBDNVQ1LmZvbyA9IGZ1bmN0aW9uIChpLCBzKSB7DQogICAgICAgIHJldHVybiBzOw0KICAgIH07DQp9KShDNVQ1IHx8IChDNVQ1ID0ge30pKTsNCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGFzc2lnbm1lbnQNCnZhciBjNnQ1Ow0KYzZ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KLy8gQ09OVEVYVDogQXJyYXkgaW5kZXggYXNzaWdubWVudA0KdmFyIGM3dDI7DQpjN3QyWzBdID0gKHsgbjogMSB9KTsNCnZhciBvYmpjOCA9ICh7fSk7DQpvYmpjOC50MSA9IChmdW5jdGlvbiAocykgeyByZXR1cm4gczsgfSk7DQpvYmpjOC50MiA9ICh7DQogICAgbjogMQ0KfSk7DQpvYmpjOC50MyA9IFtdOw0Kb2JqYzgudDQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiAoe30pOyB9Ow0Kb2JqYzgudDUgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsNCm9iamM4LnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQpvYmpjOC50NyA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0Kb2JqYzgudDggPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCm9iamM4LnQ5ID0gW1tdLCBbXV07DQpvYmpjOC50MTAgPSBbKHt9KSwgKHt9KV07DQpvYmpjOC50MTEgPSBbZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuIHM7IH1dOw0Kb2JqYzgudDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCm9iamM4LnQxMyA9ICh7DQogICAgZjogZnVuY3Rpb24gKGksIHMpIHsgcmV0dXJuIHM7IH0NCn0pOw0Kb2JqYzgudDE0ID0gKHsNCiAgICBhOiBbXQ0KfSk7DQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsDQpmdW5jdGlvbiBjOXQ1KGYpIHsgfQ0KOw0KYzl0NShmdW5jdGlvbiAobikgew0KICAgIHJldHVybiAoe30pOw0KfSk7DQovLyBDT05URVhUOiBSZXR1cm4gc3RhdGVtZW50DQp2YXIgYzEwdDUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfTsgfTsNCi8vIENPTlRFWFQ6IE5ld2luZyBhIGNsYXNzDQpjbGFzcyBDMTF0NSB7DQogICAgY29uc3RydWN0b3IoZikgeyB9DQp9DQo7DQp2YXIgaSA9IG5ldyBDMTF0NShmdW5jdGlvbiAobikgeyByZXR1cm4gKHt9KTsgfSk7DQovLyBDT05URVhUOiBUeXBlIGFubm90YXRlZCBleHByZXNzaW9uDQp2YXIgYzEydDEgPSAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHM7IH0pOw0KdmFyIGMxMnQyID0gKHsNCiAgICBuOiAxDQp9KTsNCnZhciBjMTJ0MyA9IFtdOw0KdmFyIGMxMnQ0ID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gKHt9KTsgfTsNCnZhciBjMTJ0NSA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiAoe30pOyB9Ow0KdmFyIGMxMnQ2ID0gZnVuY3Rpb24gKG4sIHMpIHsgcmV0dXJuICh7fSk7IH07DQp2YXIgYzEydDcgPSBmdW5jdGlvbiAobikgeyByZXR1cm4gbjsgfTsNCnZhciBjMTJ0OCA9IGZ1bmN0aW9uIChuKSB7IHJldHVybiBuOyB9Ow0KdmFyIGMxMnQ5ID0gW1tdLCBbXV07DQp2YXIgYzEydDEwID0gWyh7fSksICh7fSldOw0KdmFyIGMxMnQxMSA9IFtmdW5jdGlvbiAobiwgcykgeyByZXR1cm4gczsgfV07DQp2YXIgYzEydDEyID0gew0KICAgIGZvbzogKHt9KQ0KfTsNCnZhciBjMTJ0MTMgPSAoew0KICAgIGY6IGZ1bmN0aW9uIChpLCBzKSB7IHJldHVybiBzOyB9DQp9KTsNCnZhciBjMTJ0MTQgPSAoew0KICAgIGE6IFtdDQp9KTsNCmZ1bmN0aW9uIEVGMShhLCBiKSB7IHJldHVybiBhICsgYjsgfQ0KdmFyIGVmdiA9IEVGMSgxLCAyKTsNClBvaW50Lm9yaWdpbiA9IG5ldyBQb2ludCgwLCAwKTsNClBvaW50LnByb3RvdHlwZS5hZGQgPSBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOw0KfTsNClBvaW50LnByb3RvdHlwZSA9IHsNCiAgICB4OiAwLA0KICAgIHk6IDAsDQogICAgYWRkOiBmdW5jdGlvbiAoZHgsIGR5KSB7DQogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsNCiAgICB9DQp9Ow0KdmFyIHggPSB7fTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWNvbnRleHR1YWxUeXBpbmcuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dHVhbFR5cGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvbnRleHR1YWxUeXBpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWUEsc0NBQXNDO0FBQ3RDLE1BQU0sSUFBSTtJQUNOLEdBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDaEQsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7Q0FDSjtBQUVELHVDQUF1QztBQUN2QyxJQUFVLElBSVQ7QUFKRCxXQUFVLElBQUksRUFBQztJQUNBLFFBQUcsR0FBcUMsVUFBUyxDQUFDLEVBQUU7UUFDM0QsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBSlMsSUFBSSxLQUFKLElBQUksUUFJYjtBQUVELGdDQUFnQztBQUNoQyxJQUFJLElBQUksR0FBMEIsQ0FBQyxVQUFTLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDN0QsSUFBSSxJQUFJLEdBQVMsQ0FBQztJQUNkLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFBO0FBQ0YsSUFBSSxJQUFJLEdBQWEsRUFBRSxDQUFDO0FBQ3hCLElBQUksSUFBSSxHQUFlLFlBQVcsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDeEQsSUFBSSxJQUFJLEdBQXdCLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xFLElBQUksSUFBSSxHQUFtQyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEYsSUFBSSxJQUFJLEdBR0osVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUU5QixJQUFJLElBQUksR0FBcUMsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUN2RSxJQUFJLElBQUksR0FBZSxDQUFDLEVBQUUsRUFBQyxFQUFFLENBQUMsQ0FBQztBQUMvQixJQUFJLEtBQUssR0FBVyxDQUFPLENBQUMsRUFBRSxDQUFDLEVBQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksS0FBSyxHQUF3QyxDQUFDLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFDaEYsSUFBSSxLQUFLLEdBQVM7SUFDZCxHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLElBQUksS0FBSyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsRUFBRTtDQUNSLENBQUMsQ0FBQTtBQUVGLHFDQUFxQztBQUNyQyxNQUFNLElBQUk7SUFDTixHQUFHLENBQW1DO0lBQ3RDLGNBQWM7UUFDVixJQUFJLENBQUMsR0FBRyxHQUFHLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRTtZQUN0QixPQUFPLENBQUMsQ0FBQztRQUFBLENBQ1osQ0FBQTtJQUFBLENBQ0o7Q0FDSjtBQUVELHNDQUFzQztBQUN0QyxJQUFVLElBS1Q7QUFMRCxXQUFVLElBQUksRUFBQztJQUVYLFFBQUcsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUU7UUFDakIsT0FBTyxDQUFDLENBQUM7SUFBQSxDQUNaLENBQUE7QUFBQSxDQUNKLEVBTFMsSUFBSSxLQUFKLElBQUksUUFLYjtBQUVELCtCQUErQjtBQUMvQixJQUFJLElBQXlCLENBQUM7QUFDOUIsSUFBSSxHQUF3QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUU5RCxrQ0FBa0M7QUFDbEMsSUFBSSxJQUFZLENBQUM7QUFDakIsSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFTLENBQUMsRUFBQyxDQUFDLEVBQUUsQ0FBQyxFQUFDLENBQUMsQ0FBQztBQXVCekIsSUFBSSxLQUFLLEdBa0JTLENBQUMsRUFBRSxDQUFDLENBQUM7QUFFdkIsS0FBSyxDQUFDLEVBQUUsR0FBRyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUN0QyxLQUFLLENBQUMsRUFBRSxHQUFTLENBQUM7SUFDZCxDQUFDLEVBQUUsQ0FBQztDQUNQLENBQUMsQ0FBQztBQUNILEtBQUssQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDO0FBQ2QsS0FBSyxDQUFDLEVBQUUsR0FBRyxZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDN0MsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxPQUFhLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFDaEQsS0FBSyxDQUFDLEVBQUUsR0FBRyxVQUFTLENBQVMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRTVDLEtBQUssQ0FBQyxFQUFFLEdBQUcsVUFBUyxDQUFDLEVBQUUsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFBLENBQUUsQ0FBQztBQUNyQyxLQUFLLENBQUMsRUFBRSxHQUFHLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ25CLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBTyxDQUFDLEVBQUUsQ0FBQyxFQUFPLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNwQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMzQyxLQUFLLENBQUMsR0FBRyxHQUFHO0lBQ1IsR0FBRyxFQUFRLENBQUMsRUFBRSxDQUFDO0NBQ2xCLENBQUE7QUFDRCxLQUFLLENBQUMsR0FBRyxHQUFTLENBQUM7SUFDZixDQUFDLEVBQUUsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFO0NBQ2xDLENBQUMsQ0FBQTtBQUNGLEtBQUssQ0FBQyxHQUFHLEdBQVMsQ0FBQztJQUNmLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBQ0YseUJBQXlCO0FBQ3pCLFNBQVMsSUFBSSxDQUFDLENBQXNCLEVBQUUsRUFBQyxDQUFDO0FBQUEsQ0FBQztBQUN6QyxJQUFJLENBQUMsVUFBUyxDQUFDLEVBQUU7SUFDYixPQUFhLENBQUMsRUFBRSxDQUFDLENBQUM7QUFBQSxDQUNyQixDQUFDLENBQUM7QUFFSCw0QkFBNEI7QUFDNUIsSUFBSSxLQUFLLEdBQThCLFlBQVcsRUFBRSxPQUFPLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBRS9GLDBCQUEwQjtBQUMxQixNQUFNLEtBQUs7SUFBRyxZQUFZLENBQXNCLEVBQUUsRUFBQyxDQUFFO0NBQUU7QUFBQSxDQUFDO0FBQ3hELElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDLENBQUM7QUFFckQscUNBQXFDO0FBQ3JDLElBQUksS0FBSyxHQUEyQixDQUFDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUMvRCxJQUFJLEtBQUssR0FBVSxDQUFDO0lBQ2hCLENBQUMsRUFBRSxDQUFDO0NBQ1AsQ0FBQyxDQUFDO0FBQ0gsSUFBSSxLQUFLLEdBQWMsRUFBRSxDQUFDO0FBQzFCLElBQUksS0FBSyxHQUFnQixZQUFXLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQzFELElBQUksS0FBSyxHQUF5QixVQUFTLENBQUMsRUFBRSxFQUFFLE9BQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQSxDQUFBLENBQUUsQ0FBQztBQUNwRSxJQUFJLEtBQUssR0FBb0MsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBYSxDQUFDLEVBQUUsQ0FBQyxDQUFBLENBQUEsQ0FBRSxDQUFDO0FBQ2xGLElBQUksS0FBSyxHQUdOLFVBQVMsQ0FBUSxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUEsQ0FBQSxDQUFFLENBQUM7QUFFbkMsSUFBSSxLQUFLLEdBQXNDLFVBQVMsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUM7QUFDekUsSUFBSSxLQUFLLEdBQWdCLENBQUMsRUFBRSxFQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLElBQUksTUFBTSxHQUFZLENBQU8sQ0FBQyxFQUFFLENBQUMsRUFBTyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUMsSUFBSSxNQUFNLEdBQXlDLENBQUMsVUFBUyxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQSxDQUFFLENBQUMsQ0FBQztBQUNsRixJQUFJLE1BQU0sR0FBVTtJQUNoQixHQUFHLEVBQVEsQ0FBQyxFQUFFLENBQUM7Q0FDbEIsQ0FBQTtBQUNELElBQUksTUFBTSxHQUFVLENBQUM7SUFDakIsQ0FBQyxFQUFFLFVBQVMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxDQUFDLENBQUEsQ0FBRTtDQUNsQyxDQUFDLENBQUE7QUFDRixJQUFJLE1BQU0sR0FBVSxDQUFDO0lBQ2pCLENBQUMsRUFBRSxFQUFFO0NBQ1IsQ0FBQyxDQUFBO0FBT0YsU0FBUyxHQUFHLENBQUMsQ0FBQyxFQUFDLENBQUMsRUFBRSxFQUFFLE9BQU8sQ0FBQyxHQUFDLENBQUMsQ0FBQyxDQUFBLENBQUU7QUFFakMsSUFBSSxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsRUFBQyxDQUFDLENBQUMsQ0FBQztBQWNuQixLQUFLLENBQUMsTUFBTSxHQUFHLElBQUksS0FBSyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUUvQixLQUFLLENBQUMsU0FBUyxDQUFDLEdBQUcsR0FBRyxVQUFTLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDbkMsT0FBTyxJQUFJLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxJQUFJLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQUEsQ0FDOUMsQ0FBQztBQUVGLEtBQUssQ0FBQyxTQUFTLEdBQUc7SUFDZCxDQUFDLEVBQUUsQ0FBQztJQUNKLENBQUMsRUFBRSxDQUFDO0lBQ0osR0FBRyxFQUFFLFVBQVMsRUFBRSxFQUFFLEVBQUUsRUFBRTtRQUNsQixPQUFPLElBQUksS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUM7SUFBQSxDQUM5QztDQUNKLENBQUM7QUFJRixJQUFJLENBQUMsR0FBTSxFQUFHLENBQUMifQ==,Ly8gREVGQVVMVCBJTlRFUkZBQ0VTCmludGVyZmFjZSBJRm9vIHsKICAgIG46IG51bWJlcjsKICAgIHM6IHN0cmluZzsKICAgIGYoaTogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7CiAgICBhOiBudW1iZXJbXTsKfQoKaW50ZXJmYWNlIElCYXIgewogICAgZm9vOiBJRm9vOwp9CgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpjbGFzcyBDMVQ1IHsKICAgIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBkZWNsYXJhdGlvbgpuYW1lc3BhY2UgQzJUNSB7CiAgICBleHBvcnQgdmFyIGZvbzogKGk6IG51bWJlciwgczogc3RyaW5nKSA9PiBudW1iZXIgPSBmdW5jdGlvbihpKSB7CiAgICAgICAgcmV0dXJuIGk7CiAgICB9Cn0KCi8vIENPTlRFWFQ6IFZhcmlhYmxlIGRlY2xhcmF0aW9uCnZhciBjM3QxOiAoczogc3RyaW5nKSA9PiBzdHJpbmcgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKdmFyIGMzdDIgPSA8SUZvbz4oewogICAgbjogMQp9KQp2YXIgYzN0MzogbnVtYmVyW10gPSBbXTsKdmFyIGMzdDQ6ICgpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKdmFyIGMzdDU6IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q2OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IElGb28gPSBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjM3Q3OiB7CiAgICAobjogbnVtYmVyKTogbnVtYmVyOyAgICAKICAgIChzMTogc3RyaW5nKTogbnVtYmVyOwp9ID0gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKCnZhciBjM3Q4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlciA9IGZ1bmN0aW9uKG4pIHsgcmV0dXJuIG47IH07CnZhciBjM3Q5OiBudW1iZXJbXVtdID0gW1tdLFtdXTsKdmFyIGMzdDEwOiBJRm9vW10gPSBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMzdDExOiB7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXSA9IFtmdW5jdGlvbihuLCBzKSB7IHJldHVybiBzOyB9XTsKdmFyIGMzdDEyOiBJQmFyID0gewogICAgZm9vOiA8SUZvbz4oe30pCn0KdmFyIGMzdDEzID0gPElGb28+KHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMzdDE0ID0gPElGb28+KHsKICAgIGE6IFtdCn0pCgovLyBDT05URVhUOiBDbGFzcyBwcm9wZXJ0eSBhc3NpZ25tZW50CmNsYXNzIEM0VDUgewogICAgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZm9vID0gZnVuY3Rpb24oaSwgcykgewogICAgICAgICAgICByZXR1cm4gczsKICAgICAgICB9CiAgICB9Cn0KCi8vIENPTlRFWFQ6IE1vZHVsZSBwcm9wZXJ0eSBhc3NpZ25tZW50Cm5hbWVzcGFjZSBDNVQ1IHsKICAgIGV4cG9ydCB2YXIgZm9vOiAoaTogbnVtYmVyLCBzOiBzdHJpbmcpID0+IHN0cmluZzsKICAgIGZvbyA9IGZ1bmN0aW9uKGksIHMpIHsKICAgICAgICByZXR1cm4gczsKICAgIH0KfQoKLy8gQ09OVEVYVDogVmFyaWFibGUgYXNzaWdubWVudAp2YXIgYzZ0NTogKG46IG51bWJlcikgPT4gSUZvbzsKYzZ0NSA9IDwobjogbnVtYmVyKSA9PiBJRm9vPmZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKCi8vIENPTlRFWFQ6IEFycmF5IGluZGV4IGFzc2lnbm1lbnQKdmFyIGM3dDI6IElGb29bXTsKYzd0MlswXSA9IDxJRm9vPih7bjogMX0pOwoKLy8gQ09OVEVYVDogT2JqZWN0IHByb3BlcnR5IGFzc2lnbm1lbnQKaW50ZXJmYWNlIElQbGFjZUhvbGRlciB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwogICAgfQoKdmFyIG9iamM4OiB7CiAgICB0MTogKHM6IHN0cmluZykgPT4gc3RyaW5nOwogICAgdDI6IElGb287CiAgICB0MzogbnVtYmVyW107CiAgICB0NDogKCkgPT4gSUZvbzsKICAgIHQ1OiAobjogbnVtYmVyKSA9PiBJRm9vOwogICAgdDY6IChuOiBudW1iZXIsIHM6IHN0cmluZykgPT4gSUZvbzsKICAgIHQ3OiB7CiAgICAgICAgICAgIChuOiBudW1iZXIsIHM6IHN0cmluZyk6IG51bWJlcjsgICAgCiAgICAgICAgICAgIC8vKHMxOiBzdHJpbmcsIHMyOiBzdHJpbmcpOiBudW1iZXI7CiAgICAgICAgfTsKICAgIHQ4OiAobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcjsKICAgIHQ5OiBudW1iZXJbXVtdOwogICAgdDEwOiBJRm9vW107CiAgICB0MTE6IHsobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBzdHJpbmc7fVtdOwogICAgdDEyOiBJQmFyOwogICAgdDEzOiBJRm9vOwogICAgdDE0OiBJRm9vOwp9ID0gPElQbGFjZUhvbGRlcj4oe30pOwoKb2JqYzgudDEgPSAoZnVuY3Rpb24ocykgeyByZXR1cm4gcyB9KTsKb2JqYzgudDIgPSA8SUZvbz4oewogICAgbjogMQp9KTsKb2JqYzgudDMgPSBbXTsKb2JqYzgudDQgPSBmdW5jdGlvbigpIHsgcmV0dXJuIDxJRm9vPih7fSkgfTsKb2JqYzgudDUgPSBmdW5jdGlvbihuKSB7IHJldHVybiA8SUZvbz4oe30pIH07Cm9iamM4LnQ2ID0gZnVuY3Rpb24obiwgcykgeyByZXR1cm4gPElGb28+KHt9KSB9OwpvYmpjOC50NyA9IGZ1bmN0aW9uKG46IG51bWJlcikgeyByZXR1cm4gbiB9OwoKb2JqYzgudDggPSBmdW5jdGlvbihuKSB7IHJldHVybiBuOyB9OwpvYmpjOC50OSA9IFtbXSxbXV07Cm9iamM4LnQxMCA9IFs8SUZvbz4oe30pLDxJRm9vPih7fSldOwpvYmpjOC50MTEgPSBbZnVuY3Rpb24obiwgcykgeyByZXR1cm4gczsgfV07Cm9iamM4LnQxMiA9IHsKICAgIGZvbzogPElGb28+KHt9KQp9Cm9iamM4LnQxMyA9IDxJRm9vPih7CiAgICBmOiBmdW5jdGlvbihpLCBzKSB7IHJldHVybiBzOyB9Cn0pCm9iamM4LnQxNCA9IDxJRm9vPih7CiAgICBhOiBbXQp9KQovLyBDT05URVhUOiBGdW5jdGlvbiBjYWxsCmZ1bmN0aW9uIGM5dDUoZjogKG46IG51bWJlcikgPT4gSUZvbykge307CmM5dDUoZnVuY3Rpb24obikgewogICAgcmV0dXJuIDxJRm9vPih7fSk7Cn0pOwoKLy8gQ09OVEVYVDogUmV0dXJuIHN0YXRlbWVudAp2YXIgYzEwdDU6ICgpID0+IChuOiBudW1iZXIpID0+IElGb28gPSBmdW5jdGlvbigpIHsgcmV0dXJuIGZ1bmN0aW9uKG4pIHsgcmV0dXJuIDxJRm9vPih7fSkgfSB9OwoKLy8gQ09OVEVYVDogTmV3aW5nIGEgY2xhc3MKY2xhc3MgQzExdDUgeyBjb25zdHJ1Y3RvcihmOiAobjogbnVtYmVyKSA9PiBJRm9vKSB7IH0gfTsKdmFyIGkgPSBuZXcgQzExdDUoZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9KTsKCi8vIENPTlRFWFQ6IFR5cGUgYW5ub3RhdGVkIGV4cHJlc3Npb24KdmFyIGMxMnQxID0gPChzOiBzdHJpbmcpID0+IHN0cmluZz4gKGZ1bmN0aW9uKHMpIHsgcmV0dXJuIHMgfSk7CnZhciBjMTJ0MiA9IDxJRm9vPiAoewogICAgbjogMQp9KTsKdmFyIGMxMnQzID0gPG51bWJlcltdPiBbXTsKdmFyIGMxMnQ0ID0gPCgpID0+IElGb28+IGZ1bmN0aW9uKCkgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDUgPSA8KG46IG51bWJlcikgPT4gSUZvbz4gZnVuY3Rpb24obikgeyByZXR1cm4gPElGb28+KHt9KSB9Owp2YXIgYzEydDYgPSA8KG46IG51bWJlciwgczogc3RyaW5nKSA9PiBJRm9vPiBmdW5jdGlvbihuLCBzKSB7IHJldHVybiA8SUZvbz4oe30pIH07CnZhciBjMTJ0NyA9IDx7CiAgICAobjogbnVtYmVyLCBzOiBzdHJpbmcpOiBudW1iZXI7ICAgIAogICAgLy8oczE6IHN0cmluZywgczI6IHN0cmluZyk6IG51bWJlcjsKfT4gZnVuY3Rpb24objpudW1iZXIpIHsgcmV0dXJuIG4gfTsKCnZhciBjMTJ0OCA9IDwobjogbnVtYmVyLCBzOiBzdHJpbmcpID0+IG51bWJlcj4gZnVuY3Rpb24obikgeyByZXR1cm4gbjsgfTsKdmFyIGMxMnQ5ID0gPG51bWJlcltdW10+IFtbXSxbXV07CnZhciBjMTJ0MTAgPSA8SUZvb1tdPiBbPElGb28+KHt9KSw8SUZvbz4oe30pXTsKdmFyIGMxMnQxMSA9IDx7KG46IG51bWJlciwgczogc3RyaW5nKTogc3RyaW5nO31bXT4gW2Z1bmN0aW9uKG4sIHMpIHsgcmV0dXJuIHM7IH1dOwp2YXIgYzEydDEyID0gPElCYXI+IHsKICAgIGZvbzogPElGb28+KHt9KQp9CnZhciBjMTJ0MTMgPSA8SUZvbz4gKHsKICAgIGY6IGZ1bmN0aW9uKGksIHMpIHsgcmV0dXJuIHM7IH0KfSkKdmFyIGMxMnQxNCA9IDxJRm9vPiAoewogICAgYTogW10KfSkKCi8vIENPTlRFWFQ6IENvbnRleHR1YWwgdHlwaW5nIGRlY2xhcmF0aW9ucwoKLy8gY29udGV4dHVhbGx5IHR5cGluZyBmdW5jdGlvbiBkZWNsYXJhdGlvbnMKZGVjbGFyZSBmdW5jdGlvbiBFRjEoYTpudW1iZXIsIGI6bnVtYmVyKTpudW1iZXI7CgpmdW5jdGlvbiBFRjEoYSxiKSB7IHJldHVybiBhK2I7IH0KCnZhciBlZnYgPSBFRjEoMSwyKTsKCgovLyBjb250ZXh0dWFsbHkgdHlwaW5nIGZyb20gYW1iaWVudCBjbGFzcyBkZWNsYXJhdGlvbnMKZGVjbGFyZSBjbGFzcyBQb2ludAp7CiAgICAgIGNvbnN0cnVjdG9yKHg6IG51bWJlciwgeTogbnVtYmVyKTsKICAgICAgeDogbnVtYmVyOwogICAgICB5OiBudW1iZXI7CiAgICAgIGFkZChkeDogbnVtYmVyLCBkeTogbnVtYmVyKTogUG9pbnQ7CiAgICAgIHN0YXRpYyBvcmlnaW46IFBvaW50OwoKfQoKUG9pbnQub3JpZ2luID0gbmV3IFBvaW50KDAsIDApOwoKUG9pbnQucHJvdG90eXBlLmFkZCA9IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgcmV0dXJuIG5ldyBQb2ludCh0aGlzLnggKyBkeCwgdGhpcy55ICsgZHkpOwp9OwoKUG9pbnQucHJvdG90eXBlID0gewogICAgeDogMCwKICAgIHk6IDAsCiAgICBhZGQ6IGZ1bmN0aW9uKGR4LCBkeSkgewogICAgICAgIHJldHVybiBuZXcgUG9pbnQodGhpcy54ICsgZHgsIHRoaXMueSArIGR5KTsKICAgIH0KfTsKCmludGVyZmFjZSBBIHsgeDogc3RyaW5nOyB9CmludGVyZmFjZSBCIGV4dGVuZHMgQSB7IH0KdmFyIHg6IEIgPSB7IH07Cg== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt index c4df886eb9..d58c070bb1 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt @@ -113,14 +113,14 @@ sourceFile:contextualTyping.ts 4 > ^^^^^^^^^^^-> 1 > > -2 >module +2 >namespace 3 > C2T5 { > export var foo: (i: number, s: string) => number = function(i) { > return i; > } > } 1 >Emitted(8, 1) Source(21, 1) + SourceIndex(0) -2 >Emitted(8, 5) Source(21, 8) + SourceIndex(0) +2 >Emitted(8, 5) Source(21, 11) + SourceIndex(0) 3 >Emitted(8, 9) Source(25, 2) + SourceIndex(0) --- >>>(function (C2T5) { @@ -130,13 +130,13 @@ sourceFile:contextualTyping.ts 4 > ^^ 5 > ^^^^^^^^^^^^^-> 1-> -2 >module +2 >namespace 3 > C2T5 4 > 1->Emitted(9, 1) Source(21, 1) + SourceIndex(0) -2 >Emitted(9, 12) Source(21, 8) + SourceIndex(0) -3 >Emitted(9, 16) Source(21, 12) + SourceIndex(0) -4 >Emitted(9, 18) Source(21, 13) + SourceIndex(0) +2 >Emitted(9, 12) Source(21, 11) + SourceIndex(0) +3 >Emitted(9, 16) Source(21, 15) + SourceIndex(0) +4 >Emitted(9, 18) Source(21, 16) + SourceIndex(0) --- >>> C2T5.foo = function (i) { 1->^^^^ @@ -210,10 +210,10 @@ sourceFile:contextualTyping.ts > } 1->Emitted(13, 1) Source(24, 6) + SourceIndex(0) 2 >Emitted(13, 2) Source(25, 2) + SourceIndex(0) -3 >Emitted(13, 4) Source(21, 8) + SourceIndex(0) -4 >Emitted(13, 8) Source(21, 12) + SourceIndex(0) -5 >Emitted(13, 13) Source(21, 8) + SourceIndex(0) -6 >Emitted(13, 17) Source(21, 12) + SourceIndex(0) +3 >Emitted(13, 4) Source(21, 11) + SourceIndex(0) +4 >Emitted(13, 8) Source(21, 15) + SourceIndex(0) +5 >Emitted(13, 13) Source(21, 11) + SourceIndex(0) +6 >Emitted(13, 17) Source(21, 15) + SourceIndex(0) 7 >Emitted(13, 25) Source(25, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable declaration @@ -1041,7 +1041,7 @@ sourceFile:contextualTyping.ts 4 > ^^^^^^^^^^^-> 1 > > -2 >module +2 >namespace 3 > C5T5 { > export var foo: (i: number, s: string) => string; > foo = function(i, s) { @@ -1049,7 +1049,7 @@ sourceFile:contextualTyping.ts > } > } 1 >Emitted(47, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(47, 5) Source(66, 8) + SourceIndex(0) +2 >Emitted(47, 5) Source(66, 11) + SourceIndex(0) 3 >Emitted(47, 9) Source(71, 2) + SourceIndex(0) --- >>>(function (C5T5) { @@ -1059,13 +1059,13 @@ sourceFile:contextualTyping.ts 4 > ^^ 5 > ^^^^^^^^^^^^^^^^-> 1-> -2 >module +2 >namespace 3 > C5T5 4 > 1->Emitted(48, 1) Source(66, 1) + SourceIndex(0) -2 >Emitted(48, 12) Source(66, 8) + SourceIndex(0) -3 >Emitted(48, 16) Source(66, 12) + SourceIndex(0) -4 >Emitted(48, 18) Source(66, 13) + SourceIndex(0) +2 >Emitted(48, 12) Source(66, 11) + SourceIndex(0) +3 >Emitted(48, 16) Source(66, 15) + SourceIndex(0) +4 >Emitted(48, 18) Source(66, 16) + SourceIndex(0) --- >>> C5T5.foo = function (i, s) { 1->^^^^ @@ -1147,10 +1147,10 @@ sourceFile:contextualTyping.ts > } 1->Emitted(52, 1) Source(70, 6) + SourceIndex(0) 2 >Emitted(52, 2) Source(71, 2) + SourceIndex(0) -3 >Emitted(52, 4) Source(66, 8) + SourceIndex(0) -4 >Emitted(52, 8) Source(66, 12) + SourceIndex(0) -5 >Emitted(52, 13) Source(66, 8) + SourceIndex(0) -6 >Emitted(52, 17) Source(66, 12) + SourceIndex(0) +3 >Emitted(52, 4) Source(66, 11) + SourceIndex(0) +4 >Emitted(52, 8) Source(66, 15) + SourceIndex(0) +5 >Emitted(52, 13) Source(66, 11) + SourceIndex(0) +6 >Emitted(52, 17) Source(66, 15) + SourceIndex(0) 7 >Emitted(52, 25) Source(71, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable assignment diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt.diff index f1dd1d330e..949b26bd40 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.sourcemap.txt.diff @@ -1,19 +1,36 @@ --- old.contextualTyping.sourcemap.txt +++ new.contextualTyping.sourcemap.txt -@@= skipped -31, +31 lines =@@ +@@= skipped -10, +10 lines =@@ + >>>// CONTEXT: Class property declaration 1 > - 2 >^^^^^^ - 3 > ^^^^ --4 > ^^^^^^^^^^-> + 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +-3 > ^^-> + 1 >// DEFAULT INTERFACES + >interface IFoo { + > n: number; +@@= skipped -18, +17 lines =@@ + 1 >Emitted(1, 1) Source(13, 1) + SourceIndex(0) + 2 >Emitted(1, 39) Source(13, 39) + SourceIndex(0) + --- +->>>var C1T5 = /** @class */ (function () { +-1-> +-2 >^^^^^^^^^^^^^^^^^^^^^^-> +-1-> ++>>>class C1T5 { ++1 > ++2 >^^^^^^ ++3 > ^^^^ +4 > ^^^^^^^^^^^^^^^-> - 1 > ++1 > > - 2 >class -@@= skipped -9, +9 lines =@@ - 2 >Emitted(2, 7) Source(14, 7) + SourceIndex(0) - 3 >Emitted(2, 11) Source(14, 11) + SourceIndex(0) - --- -->>> constructor() { +-1->Emitted(2, 1) Source(14, 1) + SourceIndex(0) ++2 >class ++3 > C1T5 ++1 >Emitted(2, 1) Source(14, 1) + SourceIndex(0) ++2 >Emitted(2, 7) Source(14, 7) + SourceIndex(0) ++3 >Emitted(2, 11) Source(14, 11) + SourceIndex(0) + --- +->>> function C1T5() { +>>> foo = function (i) { 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> @@ -100,35 +117,63 @@ +>>> }; 1 >^^^^ 2 > ^ -+3 > ^ - 1 > +-3 > ^^^^^^^^^^^^-> +-1 > - > -2 > } -1 >Emitted(7, 5) Source(18, 1) + SourceIndex(0) -2 >Emitted(7, 6) Source(18, 2) + SourceIndex(0) +---- +->>> return C1T5; +-1->^^^^ +-2 > ^^^^^^^^^^^ +-1-> +-2 > } +-1->Emitted(8, 5) Source(18, 1) + SourceIndex(0) +-2 >Emitted(8, 16) Source(18, 2) + SourceIndex(0) +---- +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +-1 > +-2 >} +-3 > +-4 > class C1T5 { +- > foo: (i: number, s: string) => number = function(i) { +- > return i; +- > } +- > } +-1 >Emitted(9, 1) Source(18, 1) + SourceIndex(0) +-2 >Emitted(9, 2) Source(18, 2) + SourceIndex(0) +-3 >Emitted(9, 2) Source(14, 1) + SourceIndex(0) +-4 >Emitted(9, 6) Source(18, 2) + SourceIndex(0) ++3 > ^ ++1 > +2 > + > } +3 > +1 >Emitted(5, 5) Source(16, 18) + SourceIndex(0) +2 >Emitted(5, 6) Source(17, 6) + SourceIndex(0) +3 >Emitted(5, 7) Source(17, 6) + SourceIndex(0) - --- - >>>} - 1 >^ - 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > --1 >Emitted(8, 2) Source(18, 2) + SourceIndex(0) ++--- ++>>>} ++1 >^ ++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> ++1 > + >} +1 >Emitted(6, 2) Source(18, 2) + SourceIndex(0) --- >>>// CONTEXT: Module property declaration 1-> -@@= skipped -73, +62 lines =@@ +@@= skipped -102, +75 lines =@@ > > 2 >// CONTEXT: Module property declaration --1->Emitted(9, 1) Source(20, 1) + SourceIndex(0) --2 >Emitted(9, 40) Source(20, 40) + SourceIndex(0) +-1->Emitted(10, 1) Source(20, 1) + SourceIndex(0) +-2 >Emitted(10, 40) Source(20, 40) + SourceIndex(0) +1->Emitted(7, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(7, 40) Source(20, 40) + SourceIndex(0) --- @@ -141,7 +186,7 @@ +4 > ^^^^^^^^^^^-> 1 > > - 2 >module + 2 >namespace -3 > C2T5 -4 > { - > export var foo: (i: number, s: string) => number = function(i) { @@ -151,13 +196,13 @@ + > export var foo: (i: number, s: string) => number = function(i) { + > return i; > } --1 >Emitted(10, 1) Source(21, 1) + SourceIndex(0) --2 >Emitted(10, 5) Source(21, 8) + SourceIndex(0) --3 >Emitted(10, 9) Source(21, 12) + SourceIndex(0) --4 >Emitted(10, 10) Source(25, 2) + SourceIndex(0) +-1 >Emitted(11, 1) Source(21, 1) + SourceIndex(0) +-2 >Emitted(11, 5) Source(21, 11) + SourceIndex(0) +-3 >Emitted(11, 9) Source(21, 15) + SourceIndex(0) +-4 >Emitted(11, 10) Source(25, 2) + SourceIndex(0) + > } +1 >Emitted(8, 1) Source(21, 1) + SourceIndex(0) -+2 >Emitted(8, 5) Source(21, 8) + SourceIndex(0) ++2 >Emitted(8, 5) Source(21, 11) + SourceIndex(0) +3 >Emitted(8, 9) Source(25, 2) + SourceIndex(0) --- >>>(function (C2T5) { @@ -168,16 +213,16 @@ +4 > ^^ +5 > ^^^^^^^^^^^^^-> 1-> - 2 >module + 2 >namespace 3 > C2T5 --1->Emitted(11, 1) Source(21, 1) + SourceIndex(0) --2 >Emitted(11, 12) Source(21, 8) + SourceIndex(0) --3 >Emitted(11, 16) Source(21, 12) + SourceIndex(0) +-1->Emitted(12, 1) Source(21, 1) + SourceIndex(0) +-2 >Emitted(12, 12) Source(21, 11) + SourceIndex(0) +-3 >Emitted(12, 16) Source(21, 15) + SourceIndex(0) +4 > +1->Emitted(9, 1) Source(21, 1) + SourceIndex(0) -+2 >Emitted(9, 12) Source(21, 8) + SourceIndex(0) -+3 >Emitted(9, 16) Source(21, 12) + SourceIndex(0) -+4 >Emitted(9, 18) Source(21, 13) + SourceIndex(0) ++2 >Emitted(9, 12) Source(21, 11) + SourceIndex(0) ++3 >Emitted(9, 16) Source(21, 15) + SourceIndex(0) ++4 >Emitted(9, 18) Source(21, 16) + SourceIndex(0) --- >>> C2T5.foo = function (i) { 1->^^^^ @@ -193,11 +238,11 @@ 3 > : (i: number, s: string) => number = 4 > function( 5 > i --1->Emitted(12, 5) Source(22, 16) + SourceIndex(0) --2 >Emitted(12, 13) Source(22, 19) + SourceIndex(0) --3 >Emitted(12, 16) Source(22, 56) + SourceIndex(0) --4 >Emitted(12, 26) Source(22, 65) + SourceIndex(0) --5 >Emitted(12, 27) Source(22, 66) + SourceIndex(0) +-1->Emitted(13, 5) Source(22, 16) + SourceIndex(0) +-2 >Emitted(13, 13) Source(22, 19) + SourceIndex(0) +-3 >Emitted(13, 16) Source(22, 56) + SourceIndex(0) +-4 >Emitted(13, 26) Source(22, 65) + SourceIndex(0) +-5 >Emitted(13, 27) Source(22, 66) + SourceIndex(0) +6 > ) +1->Emitted(10, 5) Source(22, 16) + SourceIndex(0) +2 >Emitted(10, 13) Source(22, 19) + SourceIndex(0) @@ -217,10 +262,10 @@ 2 > return 3 > i 4 > ; --1 >Emitted(13, 9) Source(23, 9) + SourceIndex(0) --2 >Emitted(13, 16) Source(23, 16) + SourceIndex(0) --3 >Emitted(13, 17) Source(23, 17) + SourceIndex(0) --4 >Emitted(13, 18) Source(23, 18) + SourceIndex(0) +-1 >Emitted(14, 9) Source(23, 9) + SourceIndex(0) +-2 >Emitted(14, 16) Source(23, 16) + SourceIndex(0) +-3 >Emitted(14, 17) Source(23, 17) + SourceIndex(0) +-4 >Emitted(14, 18) Source(23, 18) + SourceIndex(0) +1 >Emitted(11, 9) Source(23, 9) + SourceIndex(0) +2 >Emitted(11, 16) Source(23, 16) + SourceIndex(0) +3 >Emitted(11, 17) Source(23, 17) + SourceIndex(0) @@ -237,9 +282,9 @@ +2 > + > } 3 > --1 >Emitted(14, 5) Source(24, 5) + SourceIndex(0) --2 >Emitted(14, 6) Source(24, 6) + SourceIndex(0) --3 >Emitted(14, 7) Source(24, 6) + SourceIndex(0) +-1 >Emitted(15, 5) Source(24, 5) + SourceIndex(0) +-2 >Emitted(15, 6) Source(24, 6) + SourceIndex(0) +-3 >Emitted(15, 7) Source(24, 6) + SourceIndex(0) +1 >Emitted(12, 5) Source(23, 18) + SourceIndex(0) +2 >Emitted(12, 6) Source(24, 6) + SourceIndex(0) +3 >Emitted(12, 7) Source(24, 6) + SourceIndex(0) @@ -261,19 +306,19 @@ > return i; > } > } --1->Emitted(15, 1) Source(25, 1) + SourceIndex(0) --2 >Emitted(15, 2) Source(25, 2) + SourceIndex(0) --3 >Emitted(15, 4) Source(21, 8) + SourceIndex(0) --4 >Emitted(15, 8) Source(21, 12) + SourceIndex(0) --5 >Emitted(15, 13) Source(21, 8) + SourceIndex(0) --6 >Emitted(15, 17) Source(21, 12) + SourceIndex(0) --7 >Emitted(15, 25) Source(25, 2) + SourceIndex(0) +-1->Emitted(16, 1) Source(25, 1) + SourceIndex(0) +-2 >Emitted(16, 2) Source(25, 2) + SourceIndex(0) +-3 >Emitted(16, 4) Source(21, 11) + SourceIndex(0) +-4 >Emitted(16, 8) Source(21, 15) + SourceIndex(0) +-5 >Emitted(16, 13) Source(21, 11) + SourceIndex(0) +-6 >Emitted(16, 17) Source(21, 15) + SourceIndex(0) +-7 >Emitted(16, 25) Source(25, 2) + SourceIndex(0) +1->Emitted(13, 1) Source(24, 6) + SourceIndex(0) +2 >Emitted(13, 2) Source(25, 2) + SourceIndex(0) -+3 >Emitted(13, 4) Source(21, 8) + SourceIndex(0) -+4 >Emitted(13, 8) Source(21, 12) + SourceIndex(0) -+5 >Emitted(13, 13) Source(21, 8) + SourceIndex(0) -+6 >Emitted(13, 17) Source(21, 12) + SourceIndex(0) ++3 >Emitted(13, 4) Source(21, 11) + SourceIndex(0) ++4 >Emitted(13, 8) Source(21, 15) + SourceIndex(0) ++5 >Emitted(13, 13) Source(21, 11) + SourceIndex(0) ++6 >Emitted(13, 17) Source(21, 15) + SourceIndex(0) +7 >Emitted(13, 25) Source(25, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable declaration @@ -282,8 +327,8 @@ > > 2 >// CONTEXT: Variable declaration --1->Emitted(16, 1) Source(27, 1) + SourceIndex(0) --2 >Emitted(16, 33) Source(27, 33) + SourceIndex(0) +-1->Emitted(17, 1) Source(27, 1) + SourceIndex(0) +-2 >Emitted(17, 33) Source(27, 33) + SourceIndex(0) +1->Emitted(14, 1) Source(27, 1) + SourceIndex(0) +2 >Emitted(14, 33) Source(27, 33) + SourceIndex(0) --- @@ -325,21 +370,21 @@ -13> } -14> ) -15> ; --1->Emitted(17, 1) Source(28, 1) + SourceIndex(0) --2 >Emitted(17, 5) Source(28, 5) + SourceIndex(0) --3 >Emitted(17, 9) Source(28, 9) + SourceIndex(0) --4 >Emitted(17, 12) Source(28, 35) + SourceIndex(0) --5 >Emitted(17, 13) Source(28, 36) + SourceIndex(0) --6 >Emitted(17, 23) Source(28, 45) + SourceIndex(0) --7 >Emitted(17, 24) Source(28, 46) + SourceIndex(0) --8 >Emitted(17, 28) Source(28, 50) + SourceIndex(0) --9 >Emitted(17, 35) Source(28, 57) + SourceIndex(0) --10>Emitted(17, 36) Source(28, 58) + SourceIndex(0) --11>Emitted(17, 37) Source(28, 58) + SourceIndex(0) --12>Emitted(17, 38) Source(28, 59) + SourceIndex(0) --13>Emitted(17, 39) Source(28, 60) + SourceIndex(0) --14>Emitted(17, 40) Source(28, 61) + SourceIndex(0) --15>Emitted(17, 41) Source(28, 62) + SourceIndex(0) +-1->Emitted(18, 1) Source(28, 1) + SourceIndex(0) +-2 >Emitted(18, 5) Source(28, 5) + SourceIndex(0) +-3 >Emitted(18, 9) Source(28, 9) + SourceIndex(0) +-4 >Emitted(18, 12) Source(28, 35) + SourceIndex(0) +-5 >Emitted(18, 13) Source(28, 36) + SourceIndex(0) +-6 >Emitted(18, 23) Source(28, 45) + SourceIndex(0) +-7 >Emitted(18, 24) Source(28, 46) + SourceIndex(0) +-8 >Emitted(18, 28) Source(28, 50) + SourceIndex(0) +-9 >Emitted(18, 35) Source(28, 57) + SourceIndex(0) +-10>Emitted(18, 36) Source(28, 58) + SourceIndex(0) +-11>Emitted(18, 37) Source(28, 58) + SourceIndex(0) +-12>Emitted(18, 38) Source(28, 59) + SourceIndex(0) +-13>Emitted(18, 39) Source(28, 60) + SourceIndex(0) +-14>Emitted(18, 40) Source(28, 61) + SourceIndex(0) +-15>Emitted(18, 41) Source(28, 62) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -372,11 +417,11 @@ 3 > c3t2 4 > = 5 > ( --1 >Emitted(18, 1) Source(29, 1) + SourceIndex(0) --2 >Emitted(18, 5) Source(29, 5) + SourceIndex(0) --3 >Emitted(18, 9) Source(29, 9) + SourceIndex(0) --4 >Emitted(18, 12) Source(29, 18) + SourceIndex(0) --5 >Emitted(18, 13) Source(29, 19) + SourceIndex(0) +-1 >Emitted(19, 1) Source(29, 1) + SourceIndex(0) +-2 >Emitted(19, 5) Source(29, 5) + SourceIndex(0) +-3 >Emitted(19, 9) Source(29, 9) + SourceIndex(0) +-4 >Emitted(19, 12) Source(29, 18) + SourceIndex(0) +-5 >Emitted(19, 13) Source(29, 19) + SourceIndex(0) +1 >Emitted(16, 1) Source(29, 1) + SourceIndex(0) +2 >Emitted(16, 5) Source(29, 5) + SourceIndex(0) +3 >Emitted(16, 9) Source(29, 9) + SourceIndex(0) @@ -389,10 +434,10 @@ 2 > n 3 > : 4 > 1 --1 >Emitted(19, 5) Source(30, 5) + SourceIndex(0) --2 >Emitted(19, 6) Source(30, 6) + SourceIndex(0) --3 >Emitted(19, 8) Source(30, 8) + SourceIndex(0) --4 >Emitted(19, 9) Source(30, 9) + SourceIndex(0) +-1 >Emitted(20, 5) Source(30, 5) + SourceIndex(0) +-2 >Emitted(20, 6) Source(30, 6) + SourceIndex(0) +-3 >Emitted(20, 8) Source(30, 8) + SourceIndex(0) +-4 >Emitted(20, 9) Source(30, 9) + SourceIndex(0) +1 >Emitted(17, 5) Source(30, 5) + SourceIndex(0) +2 >Emitted(17, 6) Source(30, 6) + SourceIndex(0) +3 >Emitted(17, 8) Source(30, 8) + SourceIndex(0) @@ -404,9 +449,9 @@ >} 2 > ) 3 > --1 >Emitted(20, 2) Source(31, 2) + SourceIndex(0) --2 >Emitted(20, 3) Source(31, 3) + SourceIndex(0) --3 >Emitted(20, 4) Source(31, 3) + SourceIndex(0) +-1 >Emitted(21, 2) Source(31, 2) + SourceIndex(0) +-2 >Emitted(21, 3) Source(31, 3) + SourceIndex(0) +-3 >Emitted(21, 4) Source(31, 3) + SourceIndex(0) +1 >Emitted(18, 2) Source(31, 2) + SourceIndex(0) +2 >Emitted(18, 3) Source(31, 3) + SourceIndex(0) +3 >Emitted(18, 4) Source(31, 3) + SourceIndex(0) @@ -417,12 +462,12 @@ 4 > : number[] = 5 > [] 6 > ; --1->Emitted(21, 1) Source(32, 1) + SourceIndex(0) --2 >Emitted(21, 5) Source(32, 5) + SourceIndex(0) --3 >Emitted(21, 9) Source(32, 9) + SourceIndex(0) --4 >Emitted(21, 12) Source(32, 22) + SourceIndex(0) --5 >Emitted(21, 14) Source(32, 24) + SourceIndex(0) --6 >Emitted(21, 15) Source(32, 25) + SourceIndex(0) +-1->Emitted(22, 1) Source(32, 1) + SourceIndex(0) +-2 >Emitted(22, 5) Source(32, 5) + SourceIndex(0) +-3 >Emitted(22, 9) Source(32, 9) + SourceIndex(0) +-4 >Emitted(22, 12) Source(32, 22) + SourceIndex(0) +-5 >Emitted(22, 14) Source(32, 24) + SourceIndex(0) +-6 >Emitted(22, 15) Source(32, 25) + SourceIndex(0) +1->Emitted(19, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(19, 5) Source(32, 5) + SourceIndex(0) +3 >Emitted(19, 9) Source(32, 9) + SourceIndex(0) @@ -470,19 +515,19 @@ -11> -12> } -13> ; --1->Emitted(22, 1) Source(33, 1) + SourceIndex(0) --2 >Emitted(22, 5) Source(33, 5) + SourceIndex(0) --3 >Emitted(22, 9) Source(33, 9) + SourceIndex(0) --4 >Emitted(22, 12) Source(33, 24) + SourceIndex(0) --5 >Emitted(22, 26) Source(33, 37) + SourceIndex(0) --6 >Emitted(22, 33) Source(33, 50) + SourceIndex(0) --7 >Emitted(22, 34) Source(33, 51) + SourceIndex(0) --8 >Emitted(22, 36) Source(33, 53) + SourceIndex(0) --9 >Emitted(22, 37) Source(33, 54) + SourceIndex(0) --10>Emitted(22, 38) Source(33, 54) + SourceIndex(0) --11>Emitted(22, 39) Source(33, 55) + SourceIndex(0) --12>Emitted(22, 40) Source(33, 56) + SourceIndex(0) --13>Emitted(22, 41) Source(33, 57) + SourceIndex(0) +-1->Emitted(23, 1) Source(33, 1) + SourceIndex(0) +-2 >Emitted(23, 5) Source(33, 5) + SourceIndex(0) +-3 >Emitted(23, 9) Source(33, 9) + SourceIndex(0) +-4 >Emitted(23, 12) Source(33, 24) + SourceIndex(0) +-5 >Emitted(23, 26) Source(33, 37) + SourceIndex(0) +-6 >Emitted(23, 33) Source(33, 50) + SourceIndex(0) +-7 >Emitted(23, 34) Source(33, 51) + SourceIndex(0) +-8 >Emitted(23, 36) Source(33, 53) + SourceIndex(0) +-9 >Emitted(23, 37) Source(33, 54) + SourceIndex(0) +-10>Emitted(23, 38) Source(33, 54) + SourceIndex(0) +-11>Emitted(23, 39) Source(33, 55) + SourceIndex(0) +-12>Emitted(23, 40) Source(33, 56) + SourceIndex(0) +-13>Emitted(23, 41) Source(33, 57) + SourceIndex(0) +5 > function() +6 > { +7 > return @@ -551,21 +596,21 @@ -13> -14> } -15> ; --1->Emitted(23, 1) Source(34, 1) + SourceIndex(0) --2 >Emitted(23, 5) Source(34, 5) + SourceIndex(0) --3 >Emitted(23, 9) Source(34, 9) + SourceIndex(0) --4 >Emitted(23, 12) Source(34, 33) + SourceIndex(0) --5 >Emitted(23, 22) Source(34, 42) + SourceIndex(0) --6 >Emitted(23, 23) Source(34, 43) + SourceIndex(0) --7 >Emitted(23, 27) Source(34, 47) + SourceIndex(0) --8 >Emitted(23, 34) Source(34, 60) + SourceIndex(0) --9 >Emitted(23, 35) Source(34, 61) + SourceIndex(0) --10>Emitted(23, 37) Source(34, 63) + SourceIndex(0) --11>Emitted(23, 38) Source(34, 64) + SourceIndex(0) --12>Emitted(23, 39) Source(34, 64) + SourceIndex(0) --13>Emitted(23, 40) Source(34, 65) + SourceIndex(0) --14>Emitted(23, 41) Source(34, 66) + SourceIndex(0) --15>Emitted(23, 42) Source(34, 67) + SourceIndex(0) +-1->Emitted(24, 1) Source(34, 1) + SourceIndex(0) +-2 >Emitted(24, 5) Source(34, 5) + SourceIndex(0) +-3 >Emitted(24, 9) Source(34, 9) + SourceIndex(0) +-4 >Emitted(24, 12) Source(34, 33) + SourceIndex(0) +-5 >Emitted(24, 22) Source(34, 42) + SourceIndex(0) +-6 >Emitted(24, 23) Source(34, 43) + SourceIndex(0) +-7 >Emitted(24, 27) Source(34, 47) + SourceIndex(0) +-8 >Emitted(24, 34) Source(34, 60) + SourceIndex(0) +-9 >Emitted(24, 35) Source(34, 61) + SourceIndex(0) +-10>Emitted(24, 37) Source(34, 63) + SourceIndex(0) +-11>Emitted(24, 38) Source(34, 64) + SourceIndex(0) +-12>Emitted(24, 39) Source(34, 64) + SourceIndex(0) +-13>Emitted(24, 40) Source(34, 65) + SourceIndex(0) +-14>Emitted(24, 41) Source(34, 66) + SourceIndex(0) +-15>Emitted(24, 42) Source(34, 67) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -634,23 +679,23 @@ -15> -16> } -17> ; --1->Emitted(24, 1) Source(35, 1) + SourceIndex(0) --2 >Emitted(24, 5) Source(35, 5) + SourceIndex(0) --3 >Emitted(24, 9) Source(35, 9) + SourceIndex(0) --4 >Emitted(24, 12) Source(35, 44) + SourceIndex(0) --5 >Emitted(24, 22) Source(35, 53) + SourceIndex(0) --6 >Emitted(24, 23) Source(35, 54) + SourceIndex(0) --7 >Emitted(24, 25) Source(35, 56) + SourceIndex(0) --8 >Emitted(24, 26) Source(35, 57) + SourceIndex(0) --9 >Emitted(24, 30) Source(35, 61) + SourceIndex(0) --10>Emitted(24, 37) Source(35, 74) + SourceIndex(0) --11>Emitted(24, 38) Source(35, 75) + SourceIndex(0) --12>Emitted(24, 40) Source(35, 77) + SourceIndex(0) --13>Emitted(24, 41) Source(35, 78) + SourceIndex(0) --14>Emitted(24, 42) Source(35, 78) + SourceIndex(0) --15>Emitted(24, 43) Source(35, 79) + SourceIndex(0) --16>Emitted(24, 44) Source(35, 80) + SourceIndex(0) --17>Emitted(24, 45) Source(35, 81) + SourceIndex(0) +-1->Emitted(25, 1) Source(35, 1) + SourceIndex(0) +-2 >Emitted(25, 5) Source(35, 5) + SourceIndex(0) +-3 >Emitted(25, 9) Source(35, 9) + SourceIndex(0) +-4 >Emitted(25, 12) Source(35, 44) + SourceIndex(0) +-5 >Emitted(25, 22) Source(35, 53) + SourceIndex(0) +-6 >Emitted(25, 23) Source(35, 54) + SourceIndex(0) +-7 >Emitted(25, 25) Source(35, 56) + SourceIndex(0) +-8 >Emitted(25, 26) Source(35, 57) + SourceIndex(0) +-9 >Emitted(25, 30) Source(35, 61) + SourceIndex(0) +-10>Emitted(25, 37) Source(35, 74) + SourceIndex(0) +-11>Emitted(25, 38) Source(35, 75) + SourceIndex(0) +-12>Emitted(25, 40) Source(35, 77) + SourceIndex(0) +-13>Emitted(25, 41) Source(35, 78) + SourceIndex(0) +-14>Emitted(25, 42) Source(35, 78) + SourceIndex(0) +-15>Emitted(25, 43) Source(35, 79) + SourceIndex(0) +-16>Emitted(25, 44) Source(35, 80) + SourceIndex(0) +-17>Emitted(25, 45) Source(35, 81) + SourceIndex(0) +9 > ) +10> { +11> return @@ -717,19 +762,19 @@ -11> -12> } -13> ; --1 >Emitted(25, 1) Source(36, 1) + SourceIndex(0) --2 >Emitted(25, 5) Source(36, 5) + SourceIndex(0) --3 >Emitted(25, 9) Source(36, 9) + SourceIndex(0) --4 >Emitted(25, 12) Source(39, 5) + SourceIndex(0) --5 >Emitted(25, 22) Source(39, 14) + SourceIndex(0) --6 >Emitted(25, 23) Source(39, 15) + SourceIndex(0) --7 >Emitted(25, 27) Source(39, 19) + SourceIndex(0) --8 >Emitted(25, 34) Source(39, 26) + SourceIndex(0) --9 >Emitted(25, 35) Source(39, 27) + SourceIndex(0) --10>Emitted(25, 36) Source(39, 28) + SourceIndex(0) --11>Emitted(25, 37) Source(39, 29) + SourceIndex(0) --12>Emitted(25, 38) Source(39, 30) + SourceIndex(0) --13>Emitted(25, 39) Source(39, 31) + SourceIndex(0) +-1 >Emitted(26, 1) Source(36, 1) + SourceIndex(0) +-2 >Emitted(26, 5) Source(36, 5) + SourceIndex(0) +-3 >Emitted(26, 9) Source(36, 9) + SourceIndex(0) +-4 >Emitted(26, 12) Source(39, 5) + SourceIndex(0) +-5 >Emitted(26, 22) Source(39, 14) + SourceIndex(0) +-6 >Emitted(26, 23) Source(39, 15) + SourceIndex(0) +-7 >Emitted(26, 27) Source(39, 19) + SourceIndex(0) +-8 >Emitted(26, 34) Source(39, 26) + SourceIndex(0) +-9 >Emitted(26, 35) Source(39, 27) + SourceIndex(0) +-10>Emitted(26, 36) Source(39, 28) + SourceIndex(0) +-11>Emitted(26, 37) Source(39, 29) + SourceIndex(0) +-12>Emitted(26, 38) Source(39, 30) + SourceIndex(0) +-13>Emitted(26, 39) Source(39, 31) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -788,19 +833,19 @@ -11> -12> } -13> ; --1->Emitted(26, 1) Source(41, 1) + SourceIndex(0) --2 >Emitted(26, 5) Source(41, 5) + SourceIndex(0) --3 >Emitted(26, 9) Source(41, 9) + SourceIndex(0) --4 >Emitted(26, 12) Source(41, 46) + SourceIndex(0) --5 >Emitted(26, 22) Source(41, 55) + SourceIndex(0) --6 >Emitted(26, 23) Source(41, 56) + SourceIndex(0) --7 >Emitted(26, 27) Source(41, 60) + SourceIndex(0) --8 >Emitted(26, 34) Source(41, 67) + SourceIndex(0) --9 >Emitted(26, 35) Source(41, 68) + SourceIndex(0) --10>Emitted(26, 36) Source(41, 69) + SourceIndex(0) --11>Emitted(26, 37) Source(41, 70) + SourceIndex(0) --12>Emitted(26, 38) Source(41, 71) + SourceIndex(0) --13>Emitted(26, 39) Source(41, 72) + SourceIndex(0) +-1->Emitted(27, 1) Source(41, 1) + SourceIndex(0) +-2 >Emitted(27, 5) Source(41, 5) + SourceIndex(0) +-3 >Emitted(27, 9) Source(41, 9) + SourceIndex(0) +-4 >Emitted(27, 12) Source(41, 46) + SourceIndex(0) +-5 >Emitted(27, 22) Source(41, 55) + SourceIndex(0) +-6 >Emitted(27, 23) Source(41, 56) + SourceIndex(0) +-7 >Emitted(27, 27) Source(41, 60) + SourceIndex(0) +-8 >Emitted(27, 34) Source(41, 67) + SourceIndex(0) +-9 >Emitted(27, 35) Source(41, 68) + SourceIndex(0) +-10>Emitted(27, 36) Source(41, 69) + SourceIndex(0) +-11>Emitted(27, 37) Source(41, 70) + SourceIndex(0) +-12>Emitted(27, 38) Source(41, 71) + SourceIndex(0) +-13>Emitted(27, 39) Source(41, 72) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -830,16 +875,16 @@ 8 > [] 9 > ] 10> ; --1 >Emitted(27, 1) Source(42, 1) + SourceIndex(0) --2 >Emitted(27, 5) Source(42, 5) + SourceIndex(0) --3 >Emitted(27, 9) Source(42, 9) + SourceIndex(0) --4 >Emitted(27, 12) Source(42, 24) + SourceIndex(0) --5 >Emitted(27, 13) Source(42, 25) + SourceIndex(0) --6 >Emitted(27, 15) Source(42, 27) + SourceIndex(0) --7 >Emitted(27, 17) Source(42, 28) + SourceIndex(0) --8 >Emitted(27, 19) Source(42, 30) + SourceIndex(0) --9 >Emitted(27, 20) Source(42, 31) + SourceIndex(0) --10>Emitted(27, 21) Source(42, 32) + SourceIndex(0) +-1 >Emitted(28, 1) Source(42, 1) + SourceIndex(0) +-2 >Emitted(28, 5) Source(42, 5) + SourceIndex(0) +-3 >Emitted(28, 9) Source(42, 9) + SourceIndex(0) +-4 >Emitted(28, 12) Source(42, 24) + SourceIndex(0) +-5 >Emitted(28, 13) Source(42, 25) + SourceIndex(0) +-6 >Emitted(28, 15) Source(42, 27) + SourceIndex(0) +-7 >Emitted(28, 17) Source(42, 28) + SourceIndex(0) +-8 >Emitted(28, 19) Source(42, 30) + SourceIndex(0) +-9 >Emitted(28, 20) Source(42, 31) + SourceIndex(0) +-10>Emitted(28, 21) Source(42, 32) + SourceIndex(0) +1 >Emitted(25, 1) Source(42, 1) + SourceIndex(0) +2 >Emitted(25, 5) Source(42, 5) + SourceIndex(0) +3 >Emitted(25, 9) Source(42, 9) + SourceIndex(0) @@ -857,20 +902,20 @@ 12> ) 13> ] 14> ; --1->Emitted(28, 1) Source(43, 1) + SourceIndex(0) --2 >Emitted(28, 5) Source(43, 5) + SourceIndex(0) --3 >Emitted(28, 10) Source(43, 10) + SourceIndex(0) --4 >Emitted(28, 13) Source(43, 21) + SourceIndex(0) --5 >Emitted(28, 14) Source(43, 28) + SourceIndex(0) --6 >Emitted(28, 15) Source(43, 29) + SourceIndex(0) --7 >Emitted(28, 17) Source(43, 31) + SourceIndex(0) --8 >Emitted(28, 18) Source(43, 32) + SourceIndex(0) --9 >Emitted(28, 20) Source(43, 39) + SourceIndex(0) --10>Emitted(28, 21) Source(43, 40) + SourceIndex(0) --11>Emitted(28, 23) Source(43, 42) + SourceIndex(0) --12>Emitted(28, 24) Source(43, 43) + SourceIndex(0) --13>Emitted(28, 25) Source(43, 44) + SourceIndex(0) --14>Emitted(28, 26) Source(43, 45) + SourceIndex(0) +-1->Emitted(29, 1) Source(43, 1) + SourceIndex(0) +-2 >Emitted(29, 5) Source(43, 5) + SourceIndex(0) +-3 >Emitted(29, 10) Source(43, 10) + SourceIndex(0) +-4 >Emitted(29, 13) Source(43, 21) + SourceIndex(0) +-5 >Emitted(29, 14) Source(43, 28) + SourceIndex(0) +-6 >Emitted(29, 15) Source(43, 29) + SourceIndex(0) +-7 >Emitted(29, 17) Source(43, 31) + SourceIndex(0) +-8 >Emitted(29, 18) Source(43, 32) + SourceIndex(0) +-9 >Emitted(29, 20) Source(43, 39) + SourceIndex(0) +-10>Emitted(29, 21) Source(43, 40) + SourceIndex(0) +-11>Emitted(29, 23) Source(43, 42) + SourceIndex(0) +-12>Emitted(29, 24) Source(43, 43) + SourceIndex(0) +-13>Emitted(29, 25) Source(43, 44) + SourceIndex(0) +-14>Emitted(29, 26) Source(43, 45) + SourceIndex(0) +1->Emitted(26, 1) Source(43, 1) + SourceIndex(0) +2 >Emitted(26, 5) Source(43, 5) + SourceIndex(0) +3 >Emitted(26, 10) Source(43, 10) + SourceIndex(0) @@ -924,23 +969,23 @@ -15> } -16> ] -17> ; --1->Emitted(29, 1) Source(44, 1) + SourceIndex(0) --2 >Emitted(29, 5) Source(44, 5) + SourceIndex(0) --3 >Emitted(29, 10) Source(44, 10) + SourceIndex(0) --4 >Emitted(29, 13) Source(44, 50) + SourceIndex(0) --5 >Emitted(29, 14) Source(44, 51) + SourceIndex(0) --6 >Emitted(29, 24) Source(44, 60) + SourceIndex(0) --7 >Emitted(29, 25) Source(44, 61) + SourceIndex(0) --8 >Emitted(29, 27) Source(44, 63) + SourceIndex(0) --9 >Emitted(29, 28) Source(44, 64) + SourceIndex(0) --10>Emitted(29, 32) Source(44, 68) + SourceIndex(0) --11>Emitted(29, 39) Source(44, 75) + SourceIndex(0) --12>Emitted(29, 40) Source(44, 76) + SourceIndex(0) --13>Emitted(29, 41) Source(44, 77) + SourceIndex(0) --14>Emitted(29, 42) Source(44, 78) + SourceIndex(0) --15>Emitted(29, 43) Source(44, 79) + SourceIndex(0) --16>Emitted(29, 44) Source(44, 80) + SourceIndex(0) --17>Emitted(29, 45) Source(44, 81) + SourceIndex(0) +-1->Emitted(30, 1) Source(44, 1) + SourceIndex(0) +-2 >Emitted(30, 5) Source(44, 5) + SourceIndex(0) +-3 >Emitted(30, 10) Source(44, 10) + SourceIndex(0) +-4 >Emitted(30, 13) Source(44, 50) + SourceIndex(0) +-5 >Emitted(30, 14) Source(44, 51) + SourceIndex(0) +-6 >Emitted(30, 24) Source(44, 60) + SourceIndex(0) +-7 >Emitted(30, 25) Source(44, 61) + SourceIndex(0) +-8 >Emitted(30, 27) Source(44, 63) + SourceIndex(0) +-9 >Emitted(30, 28) Source(44, 64) + SourceIndex(0) +-10>Emitted(30, 32) Source(44, 68) + SourceIndex(0) +-11>Emitted(30, 39) Source(44, 75) + SourceIndex(0) +-12>Emitted(30, 40) Source(44, 76) + SourceIndex(0) +-13>Emitted(30, 41) Source(44, 77) + SourceIndex(0) +-14>Emitted(30, 42) Source(44, 78) + SourceIndex(0) +-15>Emitted(30, 43) Source(44, 79) + SourceIndex(0) +-16>Emitted(30, 44) Source(44, 80) + SourceIndex(0) +-17>Emitted(30, 45) Source(44, 81) + SourceIndex(0) +10> ) +11> { +12> return @@ -975,10 +1020,10 @@ 2 >var 3 > c3t12 4 > : IBar = --1 >Emitted(30, 1) Source(45, 1) + SourceIndex(0) --2 >Emitted(30, 5) Source(45, 5) + SourceIndex(0) --3 >Emitted(30, 10) Source(45, 10) + SourceIndex(0) --4 >Emitted(30, 13) Source(45, 19) + SourceIndex(0) +-1 >Emitted(31, 1) Source(45, 1) + SourceIndex(0) +-2 >Emitted(31, 5) Source(45, 5) + SourceIndex(0) +-3 >Emitted(31, 10) Source(45, 10) + SourceIndex(0) +-4 >Emitted(31, 13) Source(45, 19) + SourceIndex(0) +1 >Emitted(28, 1) Source(45, 1) + SourceIndex(0) +2 >Emitted(28, 5) Source(45, 5) + SourceIndex(0) +3 >Emitted(28, 10) Source(45, 10) + SourceIndex(0) @@ -990,12 +1035,12 @@ 4 > ( 5 > {} 6 > ) --1->Emitted(31, 5) Source(46, 5) + SourceIndex(0) --2 >Emitted(31, 8) Source(46, 8) + SourceIndex(0) --3 >Emitted(31, 10) Source(46, 16) + SourceIndex(0) --4 >Emitted(31, 11) Source(46, 17) + SourceIndex(0) --5 >Emitted(31, 13) Source(46, 19) + SourceIndex(0) --6 >Emitted(31, 14) Source(46, 20) + SourceIndex(0) +-1->Emitted(32, 5) Source(46, 5) + SourceIndex(0) +-2 >Emitted(32, 8) Source(46, 8) + SourceIndex(0) +-3 >Emitted(32, 10) Source(46, 16) + SourceIndex(0) +-4 >Emitted(32, 11) Source(46, 17) + SourceIndex(0) +-5 >Emitted(32, 13) Source(46, 19) + SourceIndex(0) +-6 >Emitted(32, 14) Source(46, 20) + SourceIndex(0) +1->Emitted(29, 5) Source(46, 5) + SourceIndex(0) +2 >Emitted(29, 8) Source(46, 8) + SourceIndex(0) +3 >Emitted(29, 10) Source(46, 16) + SourceIndex(0) @@ -1009,8 +1054,8 @@ 1 > >} 2 > --1 >Emitted(32, 2) Source(47, 2) + SourceIndex(0) --2 >Emitted(32, 3) Source(47, 2) + SourceIndex(0) +-1 >Emitted(33, 2) Source(47, 2) + SourceIndex(0) +-2 >Emitted(33, 3) Source(47, 2) + SourceIndex(0) +1 >Emitted(30, 2) Source(47, 2) + SourceIndex(0) +2 >Emitted(30, 3) Source(47, 2) + SourceIndex(0) --- @@ -1020,11 +1065,11 @@ 3 > c3t13 4 > = 5 > ( --1->Emitted(33, 1) Source(48, 1) + SourceIndex(0) --2 >Emitted(33, 5) Source(48, 5) + SourceIndex(0) --3 >Emitted(33, 10) Source(48, 10) + SourceIndex(0) --4 >Emitted(33, 13) Source(48, 19) + SourceIndex(0) --5 >Emitted(33, 14) Source(48, 20) + SourceIndex(0) +-1->Emitted(34, 1) Source(48, 1) + SourceIndex(0) +-2 >Emitted(34, 5) Source(48, 5) + SourceIndex(0) +-3 >Emitted(34, 10) Source(48, 10) + SourceIndex(0) +-4 >Emitted(34, 13) Source(48, 19) + SourceIndex(0) +-5 >Emitted(34, 14) Source(48, 20) + SourceIndex(0) +1->Emitted(31, 1) Source(48, 1) + SourceIndex(0) +2 >Emitted(31, 5) Source(48, 5) + SourceIndex(0) +3 >Emitted(31, 10) Source(48, 10) + SourceIndex(0) @@ -1063,19 +1108,19 @@ -11> ; -12> -13> } --1->Emitted(34, 5) Source(49, 5) + SourceIndex(0) --2 >Emitted(34, 6) Source(49, 6) + SourceIndex(0) --3 >Emitted(34, 8) Source(49, 8) + SourceIndex(0) --4 >Emitted(34, 18) Source(49, 17) + SourceIndex(0) --5 >Emitted(34, 19) Source(49, 18) + SourceIndex(0) --6 >Emitted(34, 21) Source(49, 20) + SourceIndex(0) --7 >Emitted(34, 22) Source(49, 21) + SourceIndex(0) --8 >Emitted(34, 26) Source(49, 25) + SourceIndex(0) --9 >Emitted(34, 33) Source(49, 32) + SourceIndex(0) --10>Emitted(34, 34) Source(49, 33) + SourceIndex(0) --11>Emitted(34, 35) Source(49, 34) + SourceIndex(0) --12>Emitted(34, 36) Source(49, 35) + SourceIndex(0) --13>Emitted(34, 37) Source(49, 36) + SourceIndex(0) +-1->Emitted(35, 5) Source(49, 5) + SourceIndex(0) +-2 >Emitted(35, 6) Source(49, 6) + SourceIndex(0) +-3 >Emitted(35, 8) Source(49, 8) + SourceIndex(0) +-4 >Emitted(35, 18) Source(49, 17) + SourceIndex(0) +-5 >Emitted(35, 19) Source(49, 18) + SourceIndex(0) +-6 >Emitted(35, 21) Source(49, 20) + SourceIndex(0) +-7 >Emitted(35, 22) Source(49, 21) + SourceIndex(0) +-8 >Emitted(35, 26) Source(49, 25) + SourceIndex(0) +-9 >Emitted(35, 33) Source(49, 32) + SourceIndex(0) +-10>Emitted(35, 34) Source(49, 33) + SourceIndex(0) +-11>Emitted(35, 35) Source(49, 34) + SourceIndex(0) +-12>Emitted(35, 36) Source(49, 35) + SourceIndex(0) +-13>Emitted(35, 37) Source(49, 36) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -1104,9 +1149,9 @@ >} 2 > ) 3 > --1 >Emitted(35, 2) Source(50, 2) + SourceIndex(0) --2 >Emitted(35, 3) Source(50, 3) + SourceIndex(0) --3 >Emitted(35, 4) Source(50, 3) + SourceIndex(0) +-1 >Emitted(36, 2) Source(50, 2) + SourceIndex(0) +-2 >Emitted(36, 3) Source(50, 3) + SourceIndex(0) +-3 >Emitted(36, 4) Source(50, 3) + SourceIndex(0) +1 >Emitted(33, 2) Source(50, 2) + SourceIndex(0) +2 >Emitted(33, 3) Source(50, 3) + SourceIndex(0) +3 >Emitted(33, 4) Source(50, 3) + SourceIndex(0) @@ -1117,11 +1162,11 @@ 3 > c3t14 4 > = 5 > ( --1->Emitted(36, 1) Source(51, 1) + SourceIndex(0) --2 >Emitted(36, 5) Source(51, 5) + SourceIndex(0) --3 >Emitted(36, 10) Source(51, 10) + SourceIndex(0) --4 >Emitted(36, 13) Source(51, 19) + SourceIndex(0) --5 >Emitted(36, 14) Source(51, 20) + SourceIndex(0) +-1->Emitted(37, 1) Source(51, 1) + SourceIndex(0) +-2 >Emitted(37, 5) Source(51, 5) + SourceIndex(0) +-3 >Emitted(37, 10) Source(51, 10) + SourceIndex(0) +-4 >Emitted(37, 13) Source(51, 19) + SourceIndex(0) +-5 >Emitted(37, 14) Source(51, 20) + SourceIndex(0) +1->Emitted(34, 1) Source(51, 1) + SourceIndex(0) +2 >Emitted(34, 5) Source(51, 5) + SourceIndex(0) +3 >Emitted(34, 10) Source(51, 10) + SourceIndex(0) @@ -1134,10 +1179,10 @@ 2 > a 3 > : 4 > [] --1 >Emitted(37, 5) Source(52, 5) + SourceIndex(0) --2 >Emitted(37, 6) Source(52, 6) + SourceIndex(0) --3 >Emitted(37, 8) Source(52, 8) + SourceIndex(0) --4 >Emitted(37, 10) Source(52, 10) + SourceIndex(0) +-1 >Emitted(38, 5) Source(52, 5) + SourceIndex(0) +-2 >Emitted(38, 6) Source(52, 6) + SourceIndex(0) +-3 >Emitted(38, 8) Source(52, 8) + SourceIndex(0) +-4 >Emitted(38, 10) Source(52, 10) + SourceIndex(0) +1 >Emitted(35, 5) Source(52, 5) + SourceIndex(0) +2 >Emitted(35, 6) Source(52, 6) + SourceIndex(0) +3 >Emitted(35, 8) Source(52, 8) + SourceIndex(0) @@ -1149,36 +1194,41 @@ >} 2 > ) 3 > --1 >Emitted(38, 2) Source(53, 2) + SourceIndex(0) --2 >Emitted(38, 3) Source(53, 3) + SourceIndex(0) --3 >Emitted(38, 4) Source(53, 3) + SourceIndex(0) +-1 >Emitted(39, 2) Source(53, 2) + SourceIndex(0) +-2 >Emitted(39, 3) Source(53, 3) + SourceIndex(0) +-3 >Emitted(39, 4) Source(53, 3) + SourceIndex(0) +1 >Emitted(36, 2) Source(53, 2) + SourceIndex(0) +2 >Emitted(36, 3) Source(53, 3) + SourceIndex(0) +3 >Emitted(36, 4) Source(53, 3) + SourceIndex(0) --- >>>// CONTEXT: Class property assignment 1-> -@@= skipped -11, +11 lines =@@ + 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +-3 > ^^^-> + 1-> > > 2 >// CONTEXT: Class property assignment --1->Emitted(39, 1) Source(55, 1) + SourceIndex(0) --2 >Emitted(39, 38) Source(55, 38) + SourceIndex(0) +-1->Emitted(40, 1) Source(55, 1) + SourceIndex(0) +-2 >Emitted(40, 38) Source(55, 38) + SourceIndex(0) +1->Emitted(37, 1) Source(55, 1) + SourceIndex(0) +2 >Emitted(37, 38) Source(55, 38) + SourceIndex(0) --- - >>>class C4T5 { - 1 > - 2 >^^^^^^ - 3 > ^^^^ --4 > ^^^^^^^^^^-> - 1 > +->>>var C4T5 = /** @class */ (function () { +-1-> +-2 >^^^^^^^^^^^^^^^^^^^^^^-> +-1-> ++>>>class C4T5 { ++1 > ++2 >^^^^^^ ++3 > ^^^^ ++1 > > - 2 >class - 3 > C4T5 --1 >Emitted(40, 1) Source(56, 1) + SourceIndex(0) --2 >Emitted(40, 7) Source(56, 7) + SourceIndex(0) --3 >Emitted(40, 11) Source(56, 11) + SourceIndex(0) +-1->Emitted(41, 1) Source(56, 1) + SourceIndex(0) +---- +->>> function C4T5() { ++2 >class ++3 > C4T5 +1 >Emitted(38, 1) Source(56, 1) + SourceIndex(0) +2 >Emitted(38, 7) Source(56, 7) + SourceIndex(0) +3 >Emitted(38, 11) Source(56, 11) + SourceIndex(0) @@ -1195,24 +1245,24 @@ +1 >Emitted(39, 5) Source(57, 5) + SourceIndex(0) +2 >Emitted(39, 8) Source(57, 8) + SourceIndex(0) +3 >Emitted(39, 9) Source(57, 43) + SourceIndex(0) - --- - >>> constructor() { ++--- ++>>> constructor() { 1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> --1-> { +-1->class C4T5 { - > foo: (i: number, s: string) => string; +2 > ^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^-> +1-> > --1->Emitted(41, 5) Source(58, 5) + SourceIndex(0) +-1->Emitted(42, 5) Source(58, 5) + SourceIndex(0) +2 > constructor() +1->Emitted(40, 5) Source(58, 5) + SourceIndex(0) +2 >Emitted(40, 19) Source(58, 19) + SourceIndex(0) --- >>> this.foo = function (i, s) { 1->^^^^^^^^ -@@= skipped -34, +48 lines =@@ +@@= skipped -40, +59 lines =@@ 7 > ^ 8 > ^^ 9 > ^ @@ -1226,15 +1276,15 @@ 7 > i 8 > , 9 > s --1->Emitted(42, 9) Source(59, 9) + SourceIndex(0) --2 >Emitted(42, 13) Source(59, 13) + SourceIndex(0) --3 >Emitted(42, 14) Source(59, 14) + SourceIndex(0) --4 >Emitted(42, 17) Source(59, 17) + SourceIndex(0) --5 >Emitted(42, 20) Source(59, 20) + SourceIndex(0) --6 >Emitted(42, 30) Source(59, 29) + SourceIndex(0) --7 >Emitted(42, 31) Source(59, 30) + SourceIndex(0) --8 >Emitted(42, 33) Source(59, 32) + SourceIndex(0) --9 >Emitted(42, 34) Source(59, 33) + SourceIndex(0) +-1->Emitted(43, 9) Source(59, 9) + SourceIndex(0) +-2 >Emitted(43, 13) Source(59, 13) + SourceIndex(0) +-3 >Emitted(43, 14) Source(59, 14) + SourceIndex(0) +-4 >Emitted(43, 17) Source(59, 17) + SourceIndex(0) +-5 >Emitted(43, 20) Source(59, 20) + SourceIndex(0) +-6 >Emitted(43, 30) Source(59, 29) + SourceIndex(0) +-7 >Emitted(43, 31) Source(59, 30) + SourceIndex(0) +-8 >Emitted(43, 33) Source(59, 32) + SourceIndex(0) +-9 >Emitted(43, 34) Source(59, 33) + SourceIndex(0) +10> ) +1->Emitted(41, 9) Source(59, 9) + SourceIndex(0) +2 >Emitted(41, 13) Source(59, 13) + SourceIndex(0) @@ -1258,10 +1308,10 @@ 2 > return 3 > s 4 > ; --1 >Emitted(43, 13) Source(60, 13) + SourceIndex(0) --2 >Emitted(43, 20) Source(60, 20) + SourceIndex(0) --3 >Emitted(43, 21) Source(60, 21) + SourceIndex(0) --4 >Emitted(43, 22) Source(60, 22) + SourceIndex(0) +-1 >Emitted(44, 13) Source(60, 13) + SourceIndex(0) +-2 >Emitted(44, 20) Source(60, 20) + SourceIndex(0) +-3 >Emitted(44, 21) Source(60, 21) + SourceIndex(0) +-4 >Emitted(44, 22) Source(60, 22) + SourceIndex(0) +1 >Emitted(42, 13) Source(60, 13) + SourceIndex(0) +2 >Emitted(42, 20) Source(60, 20) + SourceIndex(0) +3 >Emitted(42, 21) Source(60, 21) + SourceIndex(0) @@ -1277,9 +1327,9 @@ +2 > + > } 3 > --1 >Emitted(44, 9) Source(61, 9) + SourceIndex(0) --2 >Emitted(44, 10) Source(61, 10) + SourceIndex(0) --3 >Emitted(44, 11) Source(61, 10) + SourceIndex(0) +-1 >Emitted(45, 9) Source(61, 9) + SourceIndex(0) +-2 >Emitted(45, 10) Source(61, 10) + SourceIndex(0) +-3 >Emitted(45, 11) Source(61, 10) + SourceIndex(0) +1 >Emitted(43, 9) Source(60, 22) + SourceIndex(0) +2 >Emitted(43, 10) Source(61, 10) + SourceIndex(0) +3 >Emitted(43, 11) Source(61, 10) + SourceIndex(0) @@ -1287,32 +1337,64 @@ >>> } 1 >^^^^ 2 > ^ - 1 > +-3 > ^^^^^^^^^^^^-> +-1 > - > -2 > } --1 >Emitted(45, 5) Source(62, 5) + SourceIndex(0) --2 >Emitted(45, 6) Source(62, 6) + SourceIndex(0) +-1 >Emitted(46, 5) Source(62, 5) + SourceIndex(0) +-2 >Emitted(46, 6) Source(62, 6) + SourceIndex(0) +---- +->>> return C4T5; +-1->^^^^ +-2 > ^^^^^^^^^^^ +-1-> +- > +-2 > } +-1->Emitted(47, 5) Source(63, 1) + SourceIndex(0) +-2 >Emitted(47, 16) Source(63, 2) + SourceIndex(0) +---- +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +-1 > +-2 >} +-3 > +-4 > class C4T5 { +- > foo: (i: number, s: string) => string; +- > constructor() { +- > this.foo = function(i, s) { +- > return s; +- > } +- > } +- > } +-1 >Emitted(48, 1) Source(63, 1) + SourceIndex(0) +-2 >Emitted(48, 2) Source(63, 2) + SourceIndex(0) +-3 >Emitted(48, 2) Source(56, 1) + SourceIndex(0) +-4 >Emitted(48, 6) Source(63, 2) + SourceIndex(0) ++1 > +2 > + > } +1 >Emitted(44, 5) Source(61, 10) + SourceIndex(0) +2 >Emitted(44, 6) Source(62, 6) + SourceIndex(0) - --- - >>>} - 1 >^ - 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 > - >} --1 >Emitted(46, 2) Source(63, 2) + SourceIndex(0) ++--- ++>>>} ++1 >^ ++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> ++1 > ++ >} +1 >Emitted(45, 2) Source(63, 2) + SourceIndex(0) --- >>>// CONTEXT: Module property assignment 1-> -@@= skipped -60, +62 lines =@@ +@@= skipped -85, +62 lines =@@ > > 2 >// CONTEXT: Module property assignment --1->Emitted(47, 1) Source(65, 1) + SourceIndex(0) --2 >Emitted(47, 39) Source(65, 39) + SourceIndex(0) +-1->Emitted(49, 1) Source(65, 1) + SourceIndex(0) +-2 >Emitted(49, 39) Source(65, 39) + SourceIndex(0) +1->Emitted(46, 1) Source(65, 1) + SourceIndex(0) +2 >Emitted(46, 39) Source(65, 39) + SourceIndex(0) --- @@ -1325,7 +1407,7 @@ +4 > ^^^^^^^^^^^-> 1 > > - 2 >module + 2 >namespace -3 > C5T5 -4 > { - > export var foo: (i: number, s: string) => string; @@ -1337,13 +1419,13 @@ + > foo = function(i, s) { + > return s; > } --1 >Emitted(48, 1) Source(66, 1) + SourceIndex(0) --2 >Emitted(48, 5) Source(66, 8) + SourceIndex(0) --3 >Emitted(48, 9) Source(66, 12) + SourceIndex(0) --4 >Emitted(48, 10) Source(71, 2) + SourceIndex(0) +-1 >Emitted(50, 1) Source(66, 1) + SourceIndex(0) +-2 >Emitted(50, 5) Source(66, 11) + SourceIndex(0) +-3 >Emitted(50, 9) Source(66, 15) + SourceIndex(0) +-4 >Emitted(50, 10) Source(71, 2) + SourceIndex(0) + > } +1 >Emitted(47, 1) Source(66, 1) + SourceIndex(0) -+2 >Emitted(47, 5) Source(66, 8) + SourceIndex(0) ++2 >Emitted(47, 5) Source(66, 11) + SourceIndex(0) +3 >Emitted(47, 9) Source(71, 2) + SourceIndex(0) --- >>>(function (C5T5) { @@ -1354,16 +1436,16 @@ +4 > ^^ +5 > ^^^^^^^^^^^^^^^^-> 1-> - 2 >module + 2 >namespace 3 > C5T5 --1->Emitted(49, 1) Source(66, 1) + SourceIndex(0) --2 >Emitted(49, 12) Source(66, 8) + SourceIndex(0) --3 >Emitted(49, 16) Source(66, 12) + SourceIndex(0) +-1->Emitted(51, 1) Source(66, 1) + SourceIndex(0) +-2 >Emitted(51, 12) Source(66, 11) + SourceIndex(0) +-3 >Emitted(51, 16) Source(66, 15) + SourceIndex(0) +4 > +1->Emitted(48, 1) Source(66, 1) + SourceIndex(0) -+2 >Emitted(48, 12) Source(66, 8) + SourceIndex(0) -+3 >Emitted(48, 16) Source(66, 12) + SourceIndex(0) -+4 >Emitted(48, 18) Source(66, 13) + SourceIndex(0) ++2 >Emitted(48, 12) Source(66, 11) + SourceIndex(0) ++3 >Emitted(48, 16) Source(66, 15) + SourceIndex(0) ++4 >Emitted(48, 18) Source(66, 16) + SourceIndex(0) --- >>> C5T5.foo = function (i, s) { 1->^^^^ @@ -1392,14 +1474,14 @@ -6 > i -7 > , -8 > s --1->Emitted(50, 5) Source(68, 5) + SourceIndex(0) --2 >Emitted(50, 10) Source(68, 5) + SourceIndex(0) --3 >Emitted(50, 13) Source(68, 8) + SourceIndex(0) --4 >Emitted(50, 16) Source(68, 11) + SourceIndex(0) --5 >Emitted(50, 26) Source(68, 20) + SourceIndex(0) --6 >Emitted(50, 27) Source(68, 21) + SourceIndex(0) --7 >Emitted(50, 29) Source(68, 23) + SourceIndex(0) --8 >Emitted(50, 30) Source(68, 24) + SourceIndex(0) +-1->Emitted(52, 5) Source(68, 5) + SourceIndex(0) +-2 >Emitted(52, 10) Source(68, 5) + SourceIndex(0) +-3 >Emitted(52, 13) Source(68, 8) + SourceIndex(0) +-4 >Emitted(52, 16) Source(68, 11) + SourceIndex(0) +-5 >Emitted(52, 26) Source(68, 20) + SourceIndex(0) +-6 >Emitted(52, 27) Source(68, 21) + SourceIndex(0) +-7 >Emitted(52, 29) Source(68, 23) + SourceIndex(0) +-8 >Emitted(52, 30) Source(68, 24) + SourceIndex(0) +2 > foo +3 > = +4 > function( @@ -1427,10 +1509,10 @@ 2 > return 3 > s 4 > ; --1 >Emitted(51, 9) Source(69, 9) + SourceIndex(0) --2 >Emitted(51, 16) Source(69, 16) + SourceIndex(0) --3 >Emitted(51, 17) Source(69, 17) + SourceIndex(0) --4 >Emitted(51, 18) Source(69, 18) + SourceIndex(0) +-1 >Emitted(53, 9) Source(69, 9) + SourceIndex(0) +-2 >Emitted(53, 16) Source(69, 16) + SourceIndex(0) +-3 >Emitted(53, 17) Source(69, 17) + SourceIndex(0) +-4 >Emitted(53, 18) Source(69, 18) + SourceIndex(0) +1 >Emitted(50, 9) Source(69, 9) + SourceIndex(0) +2 >Emitted(50, 16) Source(69, 16) + SourceIndex(0) +3 >Emitted(50, 17) Source(69, 17) + SourceIndex(0) @@ -1447,9 +1529,9 @@ +2 > + > } 3 > --1 >Emitted(52, 5) Source(70, 5) + SourceIndex(0) --2 >Emitted(52, 6) Source(70, 6) + SourceIndex(0) --3 >Emitted(52, 7) Source(70, 6) + SourceIndex(0) +-1 >Emitted(54, 5) Source(70, 5) + SourceIndex(0) +-2 >Emitted(54, 6) Source(70, 6) + SourceIndex(0) +-3 >Emitted(54, 7) Source(70, 6) + SourceIndex(0) +1 >Emitted(51, 5) Source(69, 18) + SourceIndex(0) +2 >Emitted(51, 6) Source(70, 6) + SourceIndex(0) +3 >Emitted(51, 7) Source(70, 6) + SourceIndex(0) @@ -1471,19 +1553,19 @@ > return s; > } > } --1->Emitted(53, 1) Source(71, 1) + SourceIndex(0) --2 >Emitted(53, 2) Source(71, 2) + SourceIndex(0) --3 >Emitted(53, 4) Source(66, 8) + SourceIndex(0) --4 >Emitted(53, 8) Source(66, 12) + SourceIndex(0) --5 >Emitted(53, 13) Source(66, 8) + SourceIndex(0) --6 >Emitted(53, 17) Source(66, 12) + SourceIndex(0) --7 >Emitted(53, 25) Source(71, 2) + SourceIndex(0) +-1->Emitted(55, 1) Source(71, 1) + SourceIndex(0) +-2 >Emitted(55, 2) Source(71, 2) + SourceIndex(0) +-3 >Emitted(55, 4) Source(66, 11) + SourceIndex(0) +-4 >Emitted(55, 8) Source(66, 15) + SourceIndex(0) +-5 >Emitted(55, 13) Source(66, 11) + SourceIndex(0) +-6 >Emitted(55, 17) Source(66, 15) + SourceIndex(0) +-7 >Emitted(55, 25) Source(71, 2) + SourceIndex(0) +1->Emitted(52, 1) Source(70, 6) + SourceIndex(0) +2 >Emitted(52, 2) Source(71, 2) + SourceIndex(0) -+3 >Emitted(52, 4) Source(66, 8) + SourceIndex(0) -+4 >Emitted(52, 8) Source(66, 12) + SourceIndex(0) -+5 >Emitted(52, 13) Source(66, 8) + SourceIndex(0) -+6 >Emitted(52, 17) Source(66, 12) + SourceIndex(0) ++3 >Emitted(52, 4) Source(66, 11) + SourceIndex(0) ++4 >Emitted(52, 8) Source(66, 15) + SourceIndex(0) ++5 >Emitted(52, 13) Source(66, 11) + SourceIndex(0) ++6 >Emitted(52, 17) Source(66, 15) + SourceIndex(0) +7 >Emitted(52, 25) Source(71, 2) + SourceIndex(0) --- >>>// CONTEXT: Variable assignment @@ -1492,8 +1574,8 @@ > > 2 >// CONTEXT: Variable assignment --1->Emitted(54, 1) Source(73, 1) + SourceIndex(0) --2 >Emitted(54, 32) Source(73, 32) + SourceIndex(0) +-1->Emitted(56, 1) Source(73, 1) + SourceIndex(0) +-2 >Emitted(56, 32) Source(73, 32) + SourceIndex(0) +1->Emitted(53, 1) Source(73, 1) + SourceIndex(0) +2 >Emitted(53, 32) Source(73, 32) + SourceIndex(0) --- @@ -1503,10 +1585,10 @@ 2 >var 3 > c6t5: (n: number) => IFoo 4 > ; --1 >Emitted(55, 1) Source(74, 1) + SourceIndex(0) --2 >Emitted(55, 5) Source(74, 5) + SourceIndex(0) --3 >Emitted(55, 9) Source(74, 30) + SourceIndex(0) --4 >Emitted(55, 10) Source(74, 31) + SourceIndex(0) +-1 >Emitted(57, 1) Source(74, 1) + SourceIndex(0) +-2 >Emitted(57, 5) Source(74, 5) + SourceIndex(0) +-3 >Emitted(57, 9) Source(74, 30) + SourceIndex(0) +-4 >Emitted(57, 10) Source(74, 31) + SourceIndex(0) +1 >Emitted(54, 1) Source(74, 1) + SourceIndex(0) +2 >Emitted(54, 5) Source(74, 5) + SourceIndex(0) +3 >Emitted(54, 9) Source(74, 30) + SourceIndex(0) @@ -1552,20 +1634,20 @@ -12> -13> } -14> ; --1->Emitted(56, 1) Source(75, 1) + SourceIndex(0) --2 >Emitted(56, 5) Source(75, 5) + SourceIndex(0) --3 >Emitted(56, 8) Source(75, 29) + SourceIndex(0) --4 >Emitted(56, 18) Source(75, 38) + SourceIndex(0) --5 >Emitted(56, 19) Source(75, 39) + SourceIndex(0) --6 >Emitted(56, 23) Source(75, 43) + SourceIndex(0) --7 >Emitted(56, 30) Source(75, 56) + SourceIndex(0) --8 >Emitted(56, 31) Source(75, 57) + SourceIndex(0) --9 >Emitted(56, 33) Source(75, 59) + SourceIndex(0) --10>Emitted(56, 34) Source(75, 60) + SourceIndex(0) --11>Emitted(56, 35) Source(75, 60) + SourceIndex(0) --12>Emitted(56, 36) Source(75, 61) + SourceIndex(0) --13>Emitted(56, 37) Source(75, 62) + SourceIndex(0) --14>Emitted(56, 38) Source(75, 63) + SourceIndex(0) +-1->Emitted(58, 1) Source(75, 1) + SourceIndex(0) +-2 >Emitted(58, 5) Source(75, 5) + SourceIndex(0) +-3 >Emitted(58, 8) Source(75, 29) + SourceIndex(0) +-4 >Emitted(58, 18) Source(75, 38) + SourceIndex(0) +-5 >Emitted(58, 19) Source(75, 39) + SourceIndex(0) +-6 >Emitted(58, 23) Source(75, 43) + SourceIndex(0) +-7 >Emitted(58, 30) Source(75, 56) + SourceIndex(0) +-8 >Emitted(58, 31) Source(75, 57) + SourceIndex(0) +-9 >Emitted(58, 33) Source(75, 59) + SourceIndex(0) +-10>Emitted(58, 34) Source(75, 60) + SourceIndex(0) +-11>Emitted(58, 35) Source(75, 60) + SourceIndex(0) +-12>Emitted(58, 36) Source(75, 61) + SourceIndex(0) +-13>Emitted(58, 37) Source(75, 62) + SourceIndex(0) +-14>Emitted(58, 38) Source(75, 63) + SourceIndex(0) +6 > ) +7 > { +8 > return @@ -1598,8 +1680,8 @@ > > 2 >// CONTEXT: Array index assignment --1 >Emitted(57, 1) Source(77, 1) + SourceIndex(0) --2 >Emitted(57, 35) Source(77, 35) + SourceIndex(0) +-1 >Emitted(59, 1) Source(77, 1) + SourceIndex(0) +-2 >Emitted(59, 35) Source(77, 35) + SourceIndex(0) +1 >Emitted(56, 1) Source(77, 1) + SourceIndex(0) +2 >Emitted(56, 35) Source(77, 35) + SourceIndex(0) --- @@ -1609,10 +1691,10 @@ 2 >var 3 > c7t2: IFoo[] 4 > ; --1 >Emitted(58, 1) Source(78, 1) + SourceIndex(0) --2 >Emitted(58, 5) Source(78, 5) + SourceIndex(0) --3 >Emitted(58, 9) Source(78, 17) + SourceIndex(0) --4 >Emitted(58, 10) Source(78, 18) + SourceIndex(0) +-1 >Emitted(60, 1) Source(78, 1) + SourceIndex(0) +-2 >Emitted(60, 5) Source(78, 5) + SourceIndex(0) +-3 >Emitted(60, 9) Source(78, 17) + SourceIndex(0) +-4 >Emitted(60, 10) Source(78, 18) + SourceIndex(0) +1 >Emitted(57, 1) Source(78, 1) + SourceIndex(0) +2 >Emitted(57, 5) Source(78, 5) + SourceIndex(0) +3 >Emitted(57, 9) Source(78, 17) + SourceIndex(0) @@ -1624,20 +1706,20 @@ 12> } 13> ) 14> ; --1->Emitted(59, 1) Source(79, 1) + SourceIndex(0) --2 >Emitted(59, 5) Source(79, 5) + SourceIndex(0) --3 >Emitted(59, 6) Source(79, 6) + SourceIndex(0) --4 >Emitted(59, 7) Source(79, 7) + SourceIndex(0) --5 >Emitted(59, 8) Source(79, 8) + SourceIndex(0) --6 >Emitted(59, 11) Source(79, 17) + SourceIndex(0) --7 >Emitted(59, 12) Source(79, 18) + SourceIndex(0) --8 >Emitted(59, 14) Source(79, 19) + SourceIndex(0) --9 >Emitted(59, 15) Source(79, 20) + SourceIndex(0) --10>Emitted(59, 17) Source(79, 22) + SourceIndex(0) --11>Emitted(59, 18) Source(79, 23) + SourceIndex(0) --12>Emitted(59, 20) Source(79, 24) + SourceIndex(0) --13>Emitted(59, 21) Source(79, 25) + SourceIndex(0) --14>Emitted(59, 22) Source(79, 26) + SourceIndex(0) +-1->Emitted(61, 1) Source(79, 1) + SourceIndex(0) +-2 >Emitted(61, 5) Source(79, 5) + SourceIndex(0) +-3 >Emitted(61, 6) Source(79, 6) + SourceIndex(0) +-4 >Emitted(61, 7) Source(79, 7) + SourceIndex(0) +-5 >Emitted(61, 8) Source(79, 8) + SourceIndex(0) +-6 >Emitted(61, 11) Source(79, 17) + SourceIndex(0) +-7 >Emitted(61, 12) Source(79, 18) + SourceIndex(0) +-8 >Emitted(61, 14) Source(79, 19) + SourceIndex(0) +-9 >Emitted(61, 15) Source(79, 20) + SourceIndex(0) +-10>Emitted(61, 17) Source(79, 22) + SourceIndex(0) +-11>Emitted(61, 18) Source(79, 23) + SourceIndex(0) +-12>Emitted(61, 20) Source(79, 24) + SourceIndex(0) +-13>Emitted(61, 21) Source(79, 25) + SourceIndex(0) +-14>Emitted(61, 22) Source(79, 26) + SourceIndex(0) +1->Emitted(58, 1) Source(79, 1) + SourceIndex(0) +2 >Emitted(58, 5) Source(79, 5) + SourceIndex(0) +3 >Emitted(58, 6) Source(79, 6) + SourceIndex(0) @@ -1659,14 +1741,14 @@ 6 > {} 7 > ) 8 > ; --1 >Emitted(60, 1) Source(102, 1) + SourceIndex(0) --2 >Emitted(60, 5) Source(102, 5) + SourceIndex(0) --3 >Emitted(60, 10) Source(102, 10) + SourceIndex(0) --4 >Emitted(60, 13) Source(120, 19) + SourceIndex(0) --5 >Emitted(60, 14) Source(120, 20) + SourceIndex(0) --6 >Emitted(60, 16) Source(120, 22) + SourceIndex(0) --7 >Emitted(60, 17) Source(120, 23) + SourceIndex(0) --8 >Emitted(60, 18) Source(120, 24) + SourceIndex(0) +-1 >Emitted(62, 1) Source(102, 1) + SourceIndex(0) +-2 >Emitted(62, 5) Source(102, 5) + SourceIndex(0) +-3 >Emitted(62, 10) Source(102, 10) + SourceIndex(0) +-4 >Emitted(62, 13) Source(120, 19) + SourceIndex(0) +-5 >Emitted(62, 14) Source(120, 20) + SourceIndex(0) +-6 >Emitted(62, 16) Source(120, 22) + SourceIndex(0) +-7 >Emitted(62, 17) Source(120, 23) + SourceIndex(0) +-8 >Emitted(62, 18) Source(120, 24) + SourceIndex(0) +1 >Emitted(59, 1) Source(102, 1) + SourceIndex(0) +2 >Emitted(59, 5) Source(102, 5) + SourceIndex(0) +3 >Emitted(59, 10) Source(102, 10) + SourceIndex(0) @@ -1714,22 +1796,22 @@ -14> } -15> ) -16> ; --1->Emitted(61, 1) Source(122, 1) + SourceIndex(0) --2 >Emitted(61, 6) Source(122, 6) + SourceIndex(0) --3 >Emitted(61, 7) Source(122, 7) + SourceIndex(0) --4 >Emitted(61, 9) Source(122, 9) + SourceIndex(0) --5 >Emitted(61, 12) Source(122, 12) + SourceIndex(0) --6 >Emitted(61, 13) Source(122, 13) + SourceIndex(0) --7 >Emitted(61, 23) Source(122, 22) + SourceIndex(0) --8 >Emitted(61, 24) Source(122, 23) + SourceIndex(0) --9 >Emitted(61, 28) Source(122, 27) + SourceIndex(0) --10>Emitted(61, 35) Source(122, 34) + SourceIndex(0) --11>Emitted(61, 36) Source(122, 35) + SourceIndex(0) --12>Emitted(61, 37) Source(122, 35) + SourceIndex(0) --13>Emitted(61, 38) Source(122, 36) + SourceIndex(0) --14>Emitted(61, 39) Source(122, 37) + SourceIndex(0) --15>Emitted(61, 40) Source(122, 38) + SourceIndex(0) --16>Emitted(61, 41) Source(122, 39) + SourceIndex(0) +-1->Emitted(63, 1) Source(122, 1) + SourceIndex(0) +-2 >Emitted(63, 6) Source(122, 6) + SourceIndex(0) +-3 >Emitted(63, 7) Source(122, 7) + SourceIndex(0) +-4 >Emitted(63, 9) Source(122, 9) + SourceIndex(0) +-5 >Emitted(63, 12) Source(122, 12) + SourceIndex(0) +-6 >Emitted(63, 13) Source(122, 13) + SourceIndex(0) +-7 >Emitted(63, 23) Source(122, 22) + SourceIndex(0) +-8 >Emitted(63, 24) Source(122, 23) + SourceIndex(0) +-9 >Emitted(63, 28) Source(122, 27) + SourceIndex(0) +-10>Emitted(63, 35) Source(122, 34) + SourceIndex(0) +-11>Emitted(63, 36) Source(122, 35) + SourceIndex(0) +-12>Emitted(63, 37) Source(122, 35) + SourceIndex(0) +-13>Emitted(63, 38) Source(122, 36) + SourceIndex(0) +-14>Emitted(63, 39) Source(122, 37) + SourceIndex(0) +-15>Emitted(63, 40) Source(122, 38) + SourceIndex(0) +-16>Emitted(63, 41) Source(122, 39) + SourceIndex(0) +9 > ) +10> { +11> return @@ -1763,12 +1845,12 @@ 4 > t2 5 > = 6 > ( --1 >Emitted(62, 1) Source(123, 1) + SourceIndex(0) --2 >Emitted(62, 6) Source(123, 6) + SourceIndex(0) --3 >Emitted(62, 7) Source(123, 7) + SourceIndex(0) --4 >Emitted(62, 9) Source(123, 9) + SourceIndex(0) --5 >Emitted(62, 12) Source(123, 18) + SourceIndex(0) --6 >Emitted(62, 13) Source(123, 19) + SourceIndex(0) +-1 >Emitted(64, 1) Source(123, 1) + SourceIndex(0) +-2 >Emitted(64, 6) Source(123, 6) + SourceIndex(0) +-3 >Emitted(64, 7) Source(123, 7) + SourceIndex(0) +-4 >Emitted(64, 9) Source(123, 9) + SourceIndex(0) +-5 >Emitted(64, 12) Source(123, 18) + SourceIndex(0) +-6 >Emitted(64, 13) Source(123, 19) + SourceIndex(0) +1 >Emitted(61, 1) Source(123, 1) + SourceIndex(0) +2 >Emitted(61, 6) Source(123, 6) + SourceIndex(0) +3 >Emitted(61, 7) Source(123, 7) + SourceIndex(0) @@ -1782,10 +1864,10 @@ 2 > n 3 > : 4 > 1 --1 >Emitted(63, 5) Source(124, 5) + SourceIndex(0) --2 >Emitted(63, 6) Source(124, 6) + SourceIndex(0) --3 >Emitted(63, 8) Source(124, 8) + SourceIndex(0) --4 >Emitted(63, 9) Source(124, 9) + SourceIndex(0) +-1 >Emitted(65, 5) Source(124, 5) + SourceIndex(0) +-2 >Emitted(65, 6) Source(124, 6) + SourceIndex(0) +-3 >Emitted(65, 8) Source(124, 8) + SourceIndex(0) +-4 >Emitted(65, 9) Source(124, 9) + SourceIndex(0) +1 >Emitted(62, 5) Source(124, 5) + SourceIndex(0) +2 >Emitted(62, 6) Source(124, 6) + SourceIndex(0) +3 >Emitted(62, 8) Source(124, 8) + SourceIndex(0) @@ -1797,9 +1879,9 @@ >} 2 > ) 3 > ; --1 >Emitted(64, 2) Source(125, 2) + SourceIndex(0) --2 >Emitted(64, 3) Source(125, 3) + SourceIndex(0) --3 >Emitted(64, 4) Source(125, 4) + SourceIndex(0) +-1 >Emitted(66, 2) Source(125, 2) + SourceIndex(0) +-2 >Emitted(66, 3) Source(125, 3) + SourceIndex(0) +-3 >Emitted(66, 4) Source(125, 4) + SourceIndex(0) +1 >Emitted(63, 2) Source(125, 2) + SourceIndex(0) +2 >Emitted(63, 3) Source(125, 3) + SourceIndex(0) +3 >Emitted(63, 4) Source(125, 4) + SourceIndex(0) @@ -1810,13 +1892,13 @@ 5 > = 6 > [] 7 > ; --1->Emitted(65, 1) Source(126, 1) + SourceIndex(0) --2 >Emitted(65, 6) Source(126, 6) + SourceIndex(0) --3 >Emitted(65, 7) Source(126, 7) + SourceIndex(0) --4 >Emitted(65, 9) Source(126, 9) + SourceIndex(0) --5 >Emitted(65, 12) Source(126, 12) + SourceIndex(0) --6 >Emitted(65, 14) Source(126, 14) + SourceIndex(0) --7 >Emitted(65, 15) Source(126, 15) + SourceIndex(0) +-1->Emitted(67, 1) Source(126, 1) + SourceIndex(0) +-2 >Emitted(67, 6) Source(126, 6) + SourceIndex(0) +-3 >Emitted(67, 7) Source(126, 7) + SourceIndex(0) +-4 >Emitted(67, 9) Source(126, 9) + SourceIndex(0) +-5 >Emitted(67, 12) Source(126, 12) + SourceIndex(0) +-6 >Emitted(67, 14) Source(126, 14) + SourceIndex(0) +-7 >Emitted(67, 15) Source(126, 15) + SourceIndex(0) +1->Emitted(64, 1) Source(126, 1) + SourceIndex(0) +2 >Emitted(64, 6) Source(126, 6) + SourceIndex(0) +3 >Emitted(64, 7) Source(126, 7) + SourceIndex(0) @@ -1867,20 +1949,20 @@ -12> -13> } -14> ; --1->Emitted(66, 1) Source(127, 1) + SourceIndex(0) --2 >Emitted(66, 6) Source(127, 6) + SourceIndex(0) --3 >Emitted(66, 7) Source(127, 7) + SourceIndex(0) --4 >Emitted(66, 9) Source(127, 9) + SourceIndex(0) --5 >Emitted(66, 12) Source(127, 12) + SourceIndex(0) --6 >Emitted(66, 26) Source(127, 25) + SourceIndex(0) --7 >Emitted(66, 33) Source(127, 38) + SourceIndex(0) --8 >Emitted(66, 34) Source(127, 39) + SourceIndex(0) --9 >Emitted(66, 36) Source(127, 41) + SourceIndex(0) --10>Emitted(66, 37) Source(127, 42) + SourceIndex(0) --11>Emitted(66, 38) Source(127, 42) + SourceIndex(0) --12>Emitted(66, 39) Source(127, 43) + SourceIndex(0) --13>Emitted(66, 40) Source(127, 44) + SourceIndex(0) --14>Emitted(66, 41) Source(127, 45) + SourceIndex(0) +-1->Emitted(68, 1) Source(127, 1) + SourceIndex(0) +-2 >Emitted(68, 6) Source(127, 6) + SourceIndex(0) +-3 >Emitted(68, 7) Source(127, 7) + SourceIndex(0) +-4 >Emitted(68, 9) Source(127, 9) + SourceIndex(0) +-5 >Emitted(68, 12) Source(127, 12) + SourceIndex(0) +-6 >Emitted(68, 26) Source(127, 25) + SourceIndex(0) +-7 >Emitted(68, 33) Source(127, 38) + SourceIndex(0) +-8 >Emitted(68, 34) Source(127, 39) + SourceIndex(0) +-9 >Emitted(68, 36) Source(127, 41) + SourceIndex(0) +-10>Emitted(68, 37) Source(127, 42) + SourceIndex(0) +-11>Emitted(68, 38) Source(127, 42) + SourceIndex(0) +-12>Emitted(68, 39) Source(127, 43) + SourceIndex(0) +-13>Emitted(68, 40) Source(127, 44) + SourceIndex(0) +-14>Emitted(68, 41) Source(127, 45) + SourceIndex(0) +6 > function() +7 > { +8 > return @@ -1950,22 +2032,22 @@ -14> -15> } -16> ; --1->Emitted(67, 1) Source(128, 1) + SourceIndex(0) --2 >Emitted(67, 6) Source(128, 6) + SourceIndex(0) --3 >Emitted(67, 7) Source(128, 7) + SourceIndex(0) --4 >Emitted(67, 9) Source(128, 9) + SourceIndex(0) --5 >Emitted(67, 12) Source(128, 12) + SourceIndex(0) --6 >Emitted(67, 22) Source(128, 21) + SourceIndex(0) --7 >Emitted(67, 23) Source(128, 22) + SourceIndex(0) --8 >Emitted(67, 27) Source(128, 26) + SourceIndex(0) --9 >Emitted(67, 34) Source(128, 39) + SourceIndex(0) --10>Emitted(67, 35) Source(128, 40) + SourceIndex(0) --11>Emitted(67, 37) Source(128, 42) + SourceIndex(0) --12>Emitted(67, 38) Source(128, 43) + SourceIndex(0) --13>Emitted(67, 39) Source(128, 43) + SourceIndex(0) --14>Emitted(67, 40) Source(128, 44) + SourceIndex(0) --15>Emitted(67, 41) Source(128, 45) + SourceIndex(0) --16>Emitted(67, 42) Source(128, 46) + SourceIndex(0) +-1->Emitted(69, 1) Source(128, 1) + SourceIndex(0) +-2 >Emitted(69, 6) Source(128, 6) + SourceIndex(0) +-3 >Emitted(69, 7) Source(128, 7) + SourceIndex(0) +-4 >Emitted(69, 9) Source(128, 9) + SourceIndex(0) +-5 >Emitted(69, 12) Source(128, 12) + SourceIndex(0) +-6 >Emitted(69, 22) Source(128, 21) + SourceIndex(0) +-7 >Emitted(69, 23) Source(128, 22) + SourceIndex(0) +-8 >Emitted(69, 27) Source(128, 26) + SourceIndex(0) +-9 >Emitted(69, 34) Source(128, 39) + SourceIndex(0) +-10>Emitted(69, 35) Source(128, 40) + SourceIndex(0) +-11>Emitted(69, 37) Source(128, 42) + SourceIndex(0) +-12>Emitted(69, 38) Source(128, 43) + SourceIndex(0) +-13>Emitted(69, 39) Source(128, 43) + SourceIndex(0) +-14>Emitted(69, 40) Source(128, 44) + SourceIndex(0) +-15>Emitted(69, 41) Source(128, 45) + SourceIndex(0) +-16>Emitted(69, 42) Source(128, 46) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -2035,24 +2117,24 @@ -16> -17> } -18> ; --1->Emitted(68, 1) Source(129, 1) + SourceIndex(0) --2 >Emitted(68, 6) Source(129, 6) + SourceIndex(0) --3 >Emitted(68, 7) Source(129, 7) + SourceIndex(0) --4 >Emitted(68, 9) Source(129, 9) + SourceIndex(0) --5 >Emitted(68, 12) Source(129, 12) + SourceIndex(0) --6 >Emitted(68, 22) Source(129, 21) + SourceIndex(0) --7 >Emitted(68, 23) Source(129, 22) + SourceIndex(0) --8 >Emitted(68, 25) Source(129, 24) + SourceIndex(0) --9 >Emitted(68, 26) Source(129, 25) + SourceIndex(0) --10>Emitted(68, 30) Source(129, 29) + SourceIndex(0) --11>Emitted(68, 37) Source(129, 42) + SourceIndex(0) --12>Emitted(68, 38) Source(129, 43) + SourceIndex(0) --13>Emitted(68, 40) Source(129, 45) + SourceIndex(0) --14>Emitted(68, 41) Source(129, 46) + SourceIndex(0) --15>Emitted(68, 42) Source(129, 46) + SourceIndex(0) --16>Emitted(68, 43) Source(129, 47) + SourceIndex(0) --17>Emitted(68, 44) Source(129, 48) + SourceIndex(0) --18>Emitted(68, 45) Source(129, 49) + SourceIndex(0) +-1->Emitted(70, 1) Source(129, 1) + SourceIndex(0) +-2 >Emitted(70, 6) Source(129, 6) + SourceIndex(0) +-3 >Emitted(70, 7) Source(129, 7) + SourceIndex(0) +-4 >Emitted(70, 9) Source(129, 9) + SourceIndex(0) +-5 >Emitted(70, 12) Source(129, 12) + SourceIndex(0) +-6 >Emitted(70, 22) Source(129, 21) + SourceIndex(0) +-7 >Emitted(70, 23) Source(129, 22) + SourceIndex(0) +-8 >Emitted(70, 25) Source(129, 24) + SourceIndex(0) +-9 >Emitted(70, 26) Source(129, 25) + SourceIndex(0) +-10>Emitted(70, 30) Source(129, 29) + SourceIndex(0) +-11>Emitted(70, 37) Source(129, 42) + SourceIndex(0) +-12>Emitted(70, 38) Source(129, 43) + SourceIndex(0) +-13>Emitted(70, 40) Source(129, 45) + SourceIndex(0) +-14>Emitted(70, 41) Source(129, 46) + SourceIndex(0) +-15>Emitted(70, 42) Source(129, 46) + SourceIndex(0) +-16>Emitted(70, 43) Source(129, 47) + SourceIndex(0) +-17>Emitted(70, 44) Source(129, 48) + SourceIndex(0) +-18>Emitted(70, 45) Source(129, 49) + SourceIndex(0) +10> ) +11> { +12> return @@ -2120,20 +2202,20 @@ -12> -13> } -14> ; --1 >Emitted(69, 1) Source(130, 1) + SourceIndex(0) --2 >Emitted(69, 6) Source(130, 6) + SourceIndex(0) --3 >Emitted(69, 7) Source(130, 7) + SourceIndex(0) --4 >Emitted(69, 9) Source(130, 9) + SourceIndex(0) --5 >Emitted(69, 12) Source(130, 12) + SourceIndex(0) --6 >Emitted(69, 22) Source(130, 21) + SourceIndex(0) --7 >Emitted(69, 23) Source(130, 30) + SourceIndex(0) --8 >Emitted(69, 27) Source(130, 34) + SourceIndex(0) --9 >Emitted(69, 34) Source(130, 41) + SourceIndex(0) --10>Emitted(69, 35) Source(130, 42) + SourceIndex(0) --11>Emitted(69, 36) Source(130, 42) + SourceIndex(0) --12>Emitted(69, 37) Source(130, 43) + SourceIndex(0) --13>Emitted(69, 38) Source(130, 44) + SourceIndex(0) --14>Emitted(69, 39) Source(130, 45) + SourceIndex(0) +-1 >Emitted(71, 1) Source(130, 1) + SourceIndex(0) +-2 >Emitted(71, 6) Source(130, 6) + SourceIndex(0) +-3 >Emitted(71, 7) Source(130, 7) + SourceIndex(0) +-4 >Emitted(71, 9) Source(130, 9) + SourceIndex(0) +-5 >Emitted(71, 12) Source(130, 12) + SourceIndex(0) +-6 >Emitted(71, 22) Source(130, 21) + SourceIndex(0) +-7 >Emitted(71, 23) Source(130, 30) + SourceIndex(0) +-8 >Emitted(71, 27) Source(130, 34) + SourceIndex(0) +-9 >Emitted(71, 34) Source(130, 41) + SourceIndex(0) +-10>Emitted(71, 35) Source(130, 42) + SourceIndex(0) +-11>Emitted(71, 36) Source(130, 42) + SourceIndex(0) +-12>Emitted(71, 37) Source(130, 43) + SourceIndex(0) +-13>Emitted(71, 38) Source(130, 44) + SourceIndex(0) +-14>Emitted(71, 39) Source(130, 45) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -2193,20 +2275,20 @@ -12> -13> } -14> ; --1->Emitted(70, 1) Source(132, 1) + SourceIndex(0) --2 >Emitted(70, 6) Source(132, 6) + SourceIndex(0) --3 >Emitted(70, 7) Source(132, 7) + SourceIndex(0) --4 >Emitted(70, 9) Source(132, 9) + SourceIndex(0) --5 >Emitted(70, 12) Source(132, 12) + SourceIndex(0) --6 >Emitted(70, 22) Source(132, 21) + SourceIndex(0) --7 >Emitted(70, 23) Source(132, 22) + SourceIndex(0) --8 >Emitted(70, 27) Source(132, 26) + SourceIndex(0) --9 >Emitted(70, 34) Source(132, 33) + SourceIndex(0) --10>Emitted(70, 35) Source(132, 34) + SourceIndex(0) --11>Emitted(70, 36) Source(132, 35) + SourceIndex(0) --12>Emitted(70, 37) Source(132, 36) + SourceIndex(0) --13>Emitted(70, 38) Source(132, 37) + SourceIndex(0) --14>Emitted(70, 39) Source(132, 38) + SourceIndex(0) +-1->Emitted(72, 1) Source(132, 1) + SourceIndex(0) +-2 >Emitted(72, 6) Source(132, 6) + SourceIndex(0) +-3 >Emitted(72, 7) Source(132, 7) + SourceIndex(0) +-4 >Emitted(72, 9) Source(132, 9) + SourceIndex(0) +-5 >Emitted(72, 12) Source(132, 12) + SourceIndex(0) +-6 >Emitted(72, 22) Source(132, 21) + SourceIndex(0) +-7 >Emitted(72, 23) Source(132, 22) + SourceIndex(0) +-8 >Emitted(72, 27) Source(132, 26) + SourceIndex(0) +-9 >Emitted(72, 34) Source(132, 33) + SourceIndex(0) +-10>Emitted(72, 35) Source(132, 34) + SourceIndex(0) +-11>Emitted(72, 36) Source(132, 35) + SourceIndex(0) +-12>Emitted(72, 37) Source(132, 36) + SourceIndex(0) +-13>Emitted(72, 38) Source(132, 37) + SourceIndex(0) +-14>Emitted(72, 39) Source(132, 38) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -2237,17 +2319,17 @@ 9 > [] 10> ] 11> ; --1 >Emitted(71, 1) Source(133, 1) + SourceIndex(0) --2 >Emitted(71, 6) Source(133, 6) + SourceIndex(0) --3 >Emitted(71, 7) Source(133, 7) + SourceIndex(0) --4 >Emitted(71, 9) Source(133, 9) + SourceIndex(0) --5 >Emitted(71, 12) Source(133, 12) + SourceIndex(0) --6 >Emitted(71, 13) Source(133, 13) + SourceIndex(0) --7 >Emitted(71, 15) Source(133, 15) + SourceIndex(0) --8 >Emitted(71, 17) Source(133, 16) + SourceIndex(0) --9 >Emitted(71, 19) Source(133, 18) + SourceIndex(0) --10>Emitted(71, 20) Source(133, 19) + SourceIndex(0) --11>Emitted(71, 21) Source(133, 20) + SourceIndex(0) +-1 >Emitted(73, 1) Source(133, 1) + SourceIndex(0) +-2 >Emitted(73, 6) Source(133, 6) + SourceIndex(0) +-3 >Emitted(73, 7) Source(133, 7) + SourceIndex(0) +-4 >Emitted(73, 9) Source(133, 9) + SourceIndex(0) +-5 >Emitted(73, 12) Source(133, 12) + SourceIndex(0) +-6 >Emitted(73, 13) Source(133, 13) + SourceIndex(0) +-7 >Emitted(73, 15) Source(133, 15) + SourceIndex(0) +-8 >Emitted(73, 17) Source(133, 16) + SourceIndex(0) +-9 >Emitted(73, 19) Source(133, 18) + SourceIndex(0) +-10>Emitted(73, 20) Source(133, 19) + SourceIndex(0) +-11>Emitted(73, 21) Source(133, 20) + SourceIndex(0) +1 >Emitted(70, 1) Source(133, 1) + SourceIndex(0) +2 >Emitted(70, 6) Source(133, 6) + SourceIndex(0) +3 >Emitted(70, 7) Source(133, 7) + SourceIndex(0) @@ -2266,21 +2348,21 @@ 13> ) 14> ] 15> ; --1->Emitted(72, 1) Source(134, 1) + SourceIndex(0) --2 >Emitted(72, 6) Source(134, 6) + SourceIndex(0) --3 >Emitted(72, 7) Source(134, 7) + SourceIndex(0) --4 >Emitted(72, 10) Source(134, 10) + SourceIndex(0) --5 >Emitted(72, 13) Source(134, 13) + SourceIndex(0) --6 >Emitted(72, 14) Source(134, 20) + SourceIndex(0) --7 >Emitted(72, 15) Source(134, 21) + SourceIndex(0) --8 >Emitted(72, 17) Source(134, 23) + SourceIndex(0) --9 >Emitted(72, 18) Source(134, 24) + SourceIndex(0) --10>Emitted(72, 20) Source(134, 31) + SourceIndex(0) --11>Emitted(72, 21) Source(134, 32) + SourceIndex(0) --12>Emitted(72, 23) Source(134, 34) + SourceIndex(0) --13>Emitted(72, 24) Source(134, 35) + SourceIndex(0) --14>Emitted(72, 25) Source(134, 36) + SourceIndex(0) --15>Emitted(72, 26) Source(134, 37) + SourceIndex(0) +-1->Emitted(74, 1) Source(134, 1) + SourceIndex(0) +-2 >Emitted(74, 6) Source(134, 6) + SourceIndex(0) +-3 >Emitted(74, 7) Source(134, 7) + SourceIndex(0) +-4 >Emitted(74, 10) Source(134, 10) + SourceIndex(0) +-5 >Emitted(74, 13) Source(134, 13) + SourceIndex(0) +-6 >Emitted(74, 14) Source(134, 20) + SourceIndex(0) +-7 >Emitted(74, 15) Source(134, 21) + SourceIndex(0) +-8 >Emitted(74, 17) Source(134, 23) + SourceIndex(0) +-9 >Emitted(74, 18) Source(134, 24) + SourceIndex(0) +-10>Emitted(74, 20) Source(134, 31) + SourceIndex(0) +-11>Emitted(74, 21) Source(134, 32) + SourceIndex(0) +-12>Emitted(74, 23) Source(134, 34) + SourceIndex(0) +-13>Emitted(74, 24) Source(134, 35) + SourceIndex(0) +-14>Emitted(74, 25) Source(134, 36) + SourceIndex(0) +-15>Emitted(74, 26) Source(134, 37) + SourceIndex(0) +1->Emitted(71, 1) Source(134, 1) + SourceIndex(0) +2 >Emitted(71, 6) Source(134, 6) + SourceIndex(0) +3 >Emitted(71, 7) Source(134, 7) + SourceIndex(0) @@ -2335,24 +2417,24 @@ -16> } -17> ] -18> ; --1->Emitted(73, 1) Source(135, 1) + SourceIndex(0) --2 >Emitted(73, 6) Source(135, 6) + SourceIndex(0) --3 >Emitted(73, 7) Source(135, 7) + SourceIndex(0) --4 >Emitted(73, 10) Source(135, 10) + SourceIndex(0) --5 >Emitted(73, 13) Source(135, 13) + SourceIndex(0) --6 >Emitted(73, 14) Source(135, 14) + SourceIndex(0) --7 >Emitted(73, 24) Source(135, 23) + SourceIndex(0) --8 >Emitted(73, 25) Source(135, 24) + SourceIndex(0) --9 >Emitted(73, 27) Source(135, 26) + SourceIndex(0) --10>Emitted(73, 28) Source(135, 27) + SourceIndex(0) --11>Emitted(73, 32) Source(135, 31) + SourceIndex(0) --12>Emitted(73, 39) Source(135, 38) + SourceIndex(0) --13>Emitted(73, 40) Source(135, 39) + SourceIndex(0) --14>Emitted(73, 41) Source(135, 40) + SourceIndex(0) --15>Emitted(73, 42) Source(135, 41) + SourceIndex(0) --16>Emitted(73, 43) Source(135, 42) + SourceIndex(0) --17>Emitted(73, 44) Source(135, 43) + SourceIndex(0) --18>Emitted(73, 45) Source(135, 44) + SourceIndex(0) +-1->Emitted(75, 1) Source(135, 1) + SourceIndex(0) +-2 >Emitted(75, 6) Source(135, 6) + SourceIndex(0) +-3 >Emitted(75, 7) Source(135, 7) + SourceIndex(0) +-4 >Emitted(75, 10) Source(135, 10) + SourceIndex(0) +-5 >Emitted(75, 13) Source(135, 13) + SourceIndex(0) +-6 >Emitted(75, 14) Source(135, 14) + SourceIndex(0) +-7 >Emitted(75, 24) Source(135, 23) + SourceIndex(0) +-8 >Emitted(75, 25) Source(135, 24) + SourceIndex(0) +-9 >Emitted(75, 27) Source(135, 26) + SourceIndex(0) +-10>Emitted(75, 28) Source(135, 27) + SourceIndex(0) +-11>Emitted(75, 32) Source(135, 31) + SourceIndex(0) +-12>Emitted(75, 39) Source(135, 38) + SourceIndex(0) +-13>Emitted(75, 40) Source(135, 39) + SourceIndex(0) +-14>Emitted(75, 41) Source(135, 40) + SourceIndex(0) +-15>Emitted(75, 42) Source(135, 41) + SourceIndex(0) +-16>Emitted(75, 43) Source(135, 42) + SourceIndex(0) +-17>Emitted(75, 44) Source(135, 43) + SourceIndex(0) +-18>Emitted(75, 45) Source(135, 44) + SourceIndex(0) +11> ) +12> { +13> return @@ -2388,11 +2470,11 @@ 3 > . 4 > t12 5 > = --1 >Emitted(74, 1) Source(136, 1) + SourceIndex(0) --2 >Emitted(74, 6) Source(136, 6) + SourceIndex(0) --3 >Emitted(74, 7) Source(136, 7) + SourceIndex(0) --4 >Emitted(74, 10) Source(136, 10) + SourceIndex(0) --5 >Emitted(74, 13) Source(136, 13) + SourceIndex(0) +-1 >Emitted(76, 1) Source(136, 1) + SourceIndex(0) +-2 >Emitted(76, 6) Source(136, 6) + SourceIndex(0) +-3 >Emitted(76, 7) Source(136, 7) + SourceIndex(0) +-4 >Emitted(76, 10) Source(136, 10) + SourceIndex(0) +-5 >Emitted(76, 13) Source(136, 13) + SourceIndex(0) +1 >Emitted(73, 1) Source(136, 1) + SourceIndex(0) +2 >Emitted(73, 6) Source(136, 6) + SourceIndex(0) +3 >Emitted(73, 7) Source(136, 7) + SourceIndex(0) @@ -2405,12 +2487,12 @@ 4 > ( 5 > {} 6 > ) --1->Emitted(75, 5) Source(137, 5) + SourceIndex(0) --2 >Emitted(75, 8) Source(137, 8) + SourceIndex(0) --3 >Emitted(75, 10) Source(137, 16) + SourceIndex(0) --4 >Emitted(75, 11) Source(137, 17) + SourceIndex(0) --5 >Emitted(75, 13) Source(137, 19) + SourceIndex(0) --6 >Emitted(75, 14) Source(137, 20) + SourceIndex(0) +-1->Emitted(77, 5) Source(137, 5) + SourceIndex(0) +-2 >Emitted(77, 8) Source(137, 8) + SourceIndex(0) +-3 >Emitted(77, 10) Source(137, 16) + SourceIndex(0) +-4 >Emitted(77, 11) Source(137, 17) + SourceIndex(0) +-5 >Emitted(77, 13) Source(137, 19) + SourceIndex(0) +-6 >Emitted(77, 14) Source(137, 20) + SourceIndex(0) +1->Emitted(74, 5) Source(137, 5) + SourceIndex(0) +2 >Emitted(74, 8) Source(137, 8) + SourceIndex(0) +3 >Emitted(74, 10) Source(137, 16) + SourceIndex(0) @@ -2424,8 +2506,8 @@ 1 > >} 2 > --1 >Emitted(76, 2) Source(138, 2) + SourceIndex(0) --2 >Emitted(76, 3) Source(138, 2) + SourceIndex(0) +-1 >Emitted(78, 2) Source(138, 2) + SourceIndex(0) +-2 >Emitted(78, 3) Source(138, 2) + SourceIndex(0) +1 >Emitted(75, 2) Source(138, 2) + SourceIndex(0) +2 >Emitted(75, 3) Source(138, 2) + SourceIndex(0) --- @@ -2435,12 +2517,12 @@ 4 > t13 5 > = 6 > ( --1->Emitted(77, 1) Source(139, 1) + SourceIndex(0) --2 >Emitted(77, 6) Source(139, 6) + SourceIndex(0) --3 >Emitted(77, 7) Source(139, 7) + SourceIndex(0) --4 >Emitted(77, 10) Source(139, 10) + SourceIndex(0) --5 >Emitted(77, 13) Source(139, 19) + SourceIndex(0) --6 >Emitted(77, 14) Source(139, 20) + SourceIndex(0) +-1->Emitted(79, 1) Source(139, 1) + SourceIndex(0) +-2 >Emitted(79, 6) Source(139, 6) + SourceIndex(0) +-3 >Emitted(79, 7) Source(139, 7) + SourceIndex(0) +-4 >Emitted(79, 10) Source(139, 10) + SourceIndex(0) +-5 >Emitted(79, 13) Source(139, 19) + SourceIndex(0) +-6 >Emitted(79, 14) Source(139, 20) + SourceIndex(0) +1->Emitted(76, 1) Source(139, 1) + SourceIndex(0) +2 >Emitted(76, 6) Source(139, 6) + SourceIndex(0) +3 >Emitted(76, 7) Source(139, 7) + SourceIndex(0) @@ -2480,19 +2562,19 @@ -11> ; -12> -13> } --1->Emitted(78, 5) Source(140, 5) + SourceIndex(0) --2 >Emitted(78, 6) Source(140, 6) + SourceIndex(0) --3 >Emitted(78, 8) Source(140, 8) + SourceIndex(0) --4 >Emitted(78, 18) Source(140, 17) + SourceIndex(0) --5 >Emitted(78, 19) Source(140, 18) + SourceIndex(0) --6 >Emitted(78, 21) Source(140, 20) + SourceIndex(0) --7 >Emitted(78, 22) Source(140, 21) + SourceIndex(0) --8 >Emitted(78, 26) Source(140, 25) + SourceIndex(0) --9 >Emitted(78, 33) Source(140, 32) + SourceIndex(0) --10>Emitted(78, 34) Source(140, 33) + SourceIndex(0) --11>Emitted(78, 35) Source(140, 34) + SourceIndex(0) --12>Emitted(78, 36) Source(140, 35) + SourceIndex(0) --13>Emitted(78, 37) Source(140, 36) + SourceIndex(0) +-1->Emitted(80, 5) Source(140, 5) + SourceIndex(0) +-2 >Emitted(80, 6) Source(140, 6) + SourceIndex(0) +-3 >Emitted(80, 8) Source(140, 8) + SourceIndex(0) +-4 >Emitted(80, 18) Source(140, 17) + SourceIndex(0) +-5 >Emitted(80, 19) Source(140, 18) + SourceIndex(0) +-6 >Emitted(80, 21) Source(140, 20) + SourceIndex(0) +-7 >Emitted(80, 22) Source(140, 21) + SourceIndex(0) +-8 >Emitted(80, 26) Source(140, 25) + SourceIndex(0) +-9 >Emitted(80, 33) Source(140, 32) + SourceIndex(0) +-10>Emitted(80, 34) Source(140, 33) + SourceIndex(0) +-11>Emitted(80, 35) Source(140, 34) + SourceIndex(0) +-12>Emitted(80, 36) Source(140, 35) + SourceIndex(0) +-13>Emitted(80, 37) Source(140, 36) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -2521,9 +2603,9 @@ >} 2 > ) 3 > --1 >Emitted(79, 2) Source(141, 2) + SourceIndex(0) --2 >Emitted(79, 3) Source(141, 3) + SourceIndex(0) --3 >Emitted(79, 4) Source(141, 3) + SourceIndex(0) +-1 >Emitted(81, 2) Source(141, 2) + SourceIndex(0) +-2 >Emitted(81, 3) Source(141, 3) + SourceIndex(0) +-3 >Emitted(81, 4) Source(141, 3) + SourceIndex(0) +1 >Emitted(78, 2) Source(141, 2) + SourceIndex(0) +2 >Emitted(78, 3) Source(141, 3) + SourceIndex(0) +3 >Emitted(78, 4) Source(141, 3) + SourceIndex(0) @@ -2534,12 +2616,12 @@ 4 > t14 5 > = 6 > ( --1->Emitted(80, 1) Source(142, 1) + SourceIndex(0) --2 >Emitted(80, 6) Source(142, 6) + SourceIndex(0) --3 >Emitted(80, 7) Source(142, 7) + SourceIndex(0) --4 >Emitted(80, 10) Source(142, 10) + SourceIndex(0) --5 >Emitted(80, 13) Source(142, 19) + SourceIndex(0) --6 >Emitted(80, 14) Source(142, 20) + SourceIndex(0) +-1->Emitted(82, 1) Source(142, 1) + SourceIndex(0) +-2 >Emitted(82, 6) Source(142, 6) + SourceIndex(0) +-3 >Emitted(82, 7) Source(142, 7) + SourceIndex(0) +-4 >Emitted(82, 10) Source(142, 10) + SourceIndex(0) +-5 >Emitted(82, 13) Source(142, 19) + SourceIndex(0) +-6 >Emitted(82, 14) Source(142, 20) + SourceIndex(0) +1->Emitted(79, 1) Source(142, 1) + SourceIndex(0) +2 >Emitted(79, 6) Source(142, 6) + SourceIndex(0) +3 >Emitted(79, 7) Source(142, 7) + SourceIndex(0) @@ -2553,10 +2635,10 @@ 2 > a 3 > : 4 > [] --1 >Emitted(81, 5) Source(143, 5) + SourceIndex(0) --2 >Emitted(81, 6) Source(143, 6) + SourceIndex(0) --3 >Emitted(81, 8) Source(143, 8) + SourceIndex(0) --4 >Emitted(81, 10) Source(143, 10) + SourceIndex(0) +-1 >Emitted(83, 5) Source(143, 5) + SourceIndex(0) +-2 >Emitted(83, 6) Source(143, 6) + SourceIndex(0) +-3 >Emitted(83, 8) Source(143, 8) + SourceIndex(0) +-4 >Emitted(83, 10) Source(143, 10) + SourceIndex(0) +1 >Emitted(80, 5) Source(143, 5) + SourceIndex(0) +2 >Emitted(80, 6) Source(143, 6) + SourceIndex(0) +3 >Emitted(80, 8) Source(143, 8) + SourceIndex(0) @@ -2568,9 +2650,9 @@ >} 2 > ) 3 > --1 >Emitted(82, 2) Source(144, 2) + SourceIndex(0) --2 >Emitted(82, 3) Source(144, 3) + SourceIndex(0) --3 >Emitted(82, 4) Source(144, 3) + SourceIndex(0) +-1 >Emitted(84, 2) Source(144, 2) + SourceIndex(0) +-2 >Emitted(84, 3) Source(144, 3) + SourceIndex(0) +-3 >Emitted(84, 4) Source(144, 3) + SourceIndex(0) +1 >Emitted(81, 2) Source(144, 2) + SourceIndex(0) +2 >Emitted(81, 3) Source(144, 3) + SourceIndex(0) +3 >Emitted(81, 4) Source(144, 3) + SourceIndex(0) @@ -2581,8 +2663,8 @@ 1-> > 2 >// CONTEXT: Function call --1->Emitted(83, 1) Source(145, 1) + SourceIndex(0) --2 >Emitted(83, 26) Source(145, 26) + SourceIndex(0) +-1->Emitted(85, 1) Source(145, 1) + SourceIndex(0) +-2 >Emitted(85, 26) Source(145, 26) + SourceIndex(0) +1->Emitted(82, 1) Source(145, 1) + SourceIndex(0) +2 >Emitted(82, 26) Source(145, 26) + SourceIndex(0) --- @@ -2605,13 +2687,13 @@ 5 > f: (n: number) => IFoo -6 > ) { -7 > } --1 >Emitted(84, 1) Source(146, 1) + SourceIndex(0) --2 >Emitted(84, 10) Source(146, 10) + SourceIndex(0) --3 >Emitted(84, 14) Source(146, 14) + SourceIndex(0) --4 >Emitted(84, 15) Source(146, 15) + SourceIndex(0) --5 >Emitted(84, 16) Source(146, 37) + SourceIndex(0) --6 >Emitted(84, 20) Source(146, 40) + SourceIndex(0) --7 >Emitted(84, 21) Source(146, 41) + SourceIndex(0) +-1 >Emitted(86, 1) Source(146, 1) + SourceIndex(0) +-2 >Emitted(86, 10) Source(146, 10) + SourceIndex(0) +-3 >Emitted(86, 14) Source(146, 14) + SourceIndex(0) +-4 >Emitted(86, 15) Source(146, 15) + SourceIndex(0) +-5 >Emitted(86, 16) Source(146, 37) + SourceIndex(0) +-6 >Emitted(86, 20) Source(146, 40) + SourceIndex(0) +-7 >Emitted(86, 21) Source(146, 41) + SourceIndex(0) +6 > ) +7 > { +8 > } @@ -2630,8 +2712,8 @@ 3 > ^^^^^^^^^^^^^^^^^^^-> 1 > 2 >; --1 >Emitted(85, 1) Source(146, 41) + SourceIndex(0) --2 >Emitted(85, 2) Source(146, 42) + SourceIndex(0) +-1 >Emitted(87, 1) Source(146, 41) + SourceIndex(0) +-2 >Emitted(87, 2) Source(146, 42) + SourceIndex(0) +1 >Emitted(84, 1) Source(146, 41) + SourceIndex(0) +2 >Emitted(84, 2) Source(146, 42) + SourceIndex(0) --- @@ -2649,11 +2731,11 @@ 3 > ( 4 > function( 5 > n --1->Emitted(86, 1) Source(147, 1) + SourceIndex(0) --2 >Emitted(86, 5) Source(147, 5) + SourceIndex(0) --3 >Emitted(86, 6) Source(147, 6) + SourceIndex(0) --4 >Emitted(86, 16) Source(147, 15) + SourceIndex(0) --5 >Emitted(86, 17) Source(147, 16) + SourceIndex(0) +-1->Emitted(88, 1) Source(147, 1) + SourceIndex(0) +-2 >Emitted(88, 5) Source(147, 5) + SourceIndex(0) +-3 >Emitted(88, 6) Source(147, 6) + SourceIndex(0) +-4 >Emitted(88, 16) Source(147, 15) + SourceIndex(0) +-5 >Emitted(88, 17) Source(147, 16) + SourceIndex(0) +6 > ) +1->Emitted(85, 1) Source(147, 1) + SourceIndex(0) +2 >Emitted(85, 5) Source(147, 5) + SourceIndex(0) @@ -2678,12 +2760,12 @@ 4 > {} 5 > ) 6 > ; --1->Emitted(87, 5) Source(148, 5) + SourceIndex(0) --2 >Emitted(87, 12) Source(148, 18) + SourceIndex(0) --3 >Emitted(87, 13) Source(148, 19) + SourceIndex(0) --4 >Emitted(87, 15) Source(148, 21) + SourceIndex(0) --5 >Emitted(87, 16) Source(148, 22) + SourceIndex(0) --6 >Emitted(87, 17) Source(148, 23) + SourceIndex(0) +-1->Emitted(89, 5) Source(148, 5) + SourceIndex(0) +-2 >Emitted(89, 12) Source(148, 18) + SourceIndex(0) +-3 >Emitted(89, 13) Source(148, 19) + SourceIndex(0) +-4 >Emitted(89, 15) Source(148, 21) + SourceIndex(0) +-5 >Emitted(89, 16) Source(148, 22) + SourceIndex(0) +-6 >Emitted(89, 17) Source(148, 23) + SourceIndex(0) +1 >Emitted(86, 5) Source(148, 5) + SourceIndex(0) +2 >Emitted(86, 12) Source(148, 18) + SourceIndex(0) +3 >Emitted(86, 13) Source(148, 19) + SourceIndex(0) @@ -2703,10 +2785,10 @@ + >} 3 > ) 4 > ; --1 >Emitted(88, 1) Source(149, 1) + SourceIndex(0) --2 >Emitted(88, 2) Source(149, 2) + SourceIndex(0) --3 >Emitted(88, 3) Source(149, 3) + SourceIndex(0) --4 >Emitted(88, 4) Source(149, 4) + SourceIndex(0) +-1 >Emitted(90, 1) Source(149, 1) + SourceIndex(0) +-2 >Emitted(90, 2) Source(149, 2) + SourceIndex(0) +-3 >Emitted(90, 3) Source(149, 3) + SourceIndex(0) +-4 >Emitted(90, 4) Source(149, 4) + SourceIndex(0) +1 >Emitted(87, 1) Source(148, 23) + SourceIndex(0) +2 >Emitted(87, 2) Source(149, 2) + SourceIndex(0) +3 >Emitted(87, 3) Source(149, 3) + SourceIndex(0) @@ -2718,8 +2800,8 @@ > > 2 >// CONTEXT: Return statement --1->Emitted(89, 1) Source(151, 1) + SourceIndex(0) --2 >Emitted(89, 29) Source(151, 29) + SourceIndex(0) +-1->Emitted(91, 1) Source(151, 1) + SourceIndex(0) +-2 >Emitted(91, 29) Source(151, 29) + SourceIndex(0) +1->Emitted(88, 1) Source(151, 1) + SourceIndex(0) +2 >Emitted(88, 29) Source(151, 29) + SourceIndex(0) --- @@ -2783,26 +2865,26 @@ -18> -19> } -20> ; --1->Emitted(90, 1) Source(152, 1) + SourceIndex(0) --2 >Emitted(90, 5) Source(152, 5) + SourceIndex(0) --3 >Emitted(90, 10) Source(152, 10) + SourceIndex(0) --4 >Emitted(90, 13) Source(152, 40) + SourceIndex(0) --5 >Emitted(90, 27) Source(152, 53) + SourceIndex(0) --6 >Emitted(90, 34) Source(152, 60) + SourceIndex(0) --7 >Emitted(90, 44) Source(152, 69) + SourceIndex(0) --8 >Emitted(90, 45) Source(152, 70) + SourceIndex(0) --9 >Emitted(90, 49) Source(152, 74) + SourceIndex(0) --10>Emitted(90, 56) Source(152, 87) + SourceIndex(0) --11>Emitted(90, 57) Source(152, 88) + SourceIndex(0) --12>Emitted(90, 59) Source(152, 90) + SourceIndex(0) --13>Emitted(90, 60) Source(152, 91) + SourceIndex(0) --14>Emitted(90, 61) Source(152, 91) + SourceIndex(0) --15>Emitted(90, 62) Source(152, 92) + SourceIndex(0) --16>Emitted(90, 63) Source(152, 93) + SourceIndex(0) --17>Emitted(90, 64) Source(152, 93) + SourceIndex(0) --18>Emitted(90, 65) Source(152, 94) + SourceIndex(0) --19>Emitted(90, 66) Source(152, 95) + SourceIndex(0) --20>Emitted(90, 67) Source(152, 96) + SourceIndex(0) +-1->Emitted(92, 1) Source(152, 1) + SourceIndex(0) +-2 >Emitted(92, 5) Source(152, 5) + SourceIndex(0) +-3 >Emitted(92, 10) Source(152, 10) + SourceIndex(0) +-4 >Emitted(92, 13) Source(152, 40) + SourceIndex(0) +-5 >Emitted(92, 27) Source(152, 53) + SourceIndex(0) +-6 >Emitted(92, 34) Source(152, 60) + SourceIndex(0) +-7 >Emitted(92, 44) Source(152, 69) + SourceIndex(0) +-8 >Emitted(92, 45) Source(152, 70) + SourceIndex(0) +-9 >Emitted(92, 49) Source(152, 74) + SourceIndex(0) +-10>Emitted(92, 56) Source(152, 87) + SourceIndex(0) +-11>Emitted(92, 57) Source(152, 88) + SourceIndex(0) +-12>Emitted(92, 59) Source(152, 90) + SourceIndex(0) +-13>Emitted(92, 60) Source(152, 91) + SourceIndex(0) +-14>Emitted(92, 61) Source(152, 91) + SourceIndex(0) +-15>Emitted(92, 62) Source(152, 92) + SourceIndex(0) +-16>Emitted(92, 63) Source(152, 93) + SourceIndex(0) +-17>Emitted(92, 64) Source(152, 93) + SourceIndex(0) +-18>Emitted(92, 65) Source(152, 94) + SourceIndex(0) +-19>Emitted(92, 66) Source(152, 95) + SourceIndex(0) +-20>Emitted(92, 67) Source(152, 96) + SourceIndex(0) +5 > function() +6 > { +7 > return @@ -2846,47 +2928,71 @@ --- >>>// CONTEXT: Newing a class 1 > -@@= skipped -73, +79 lines =@@ + 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^ +-3 > ^^^^^^^^^^^^^^^-> + 1 > > > 2 >// CONTEXT: Newing a class --1 >Emitted(91, 1) Source(154, 1) + SourceIndex(0) --2 >Emitted(91, 27) Source(154, 27) + SourceIndex(0) +-1 >Emitted(93, 1) Source(154, 1) + SourceIndex(0) +-2 >Emitted(93, 27) Source(154, 27) + SourceIndex(0) +1 >Emitted(90, 1) Source(154, 1) + SourceIndex(0) +2 >Emitted(90, 27) Source(154, 27) + SourceIndex(0) --- - >>>class C11t5 { - 1 > -@@= skipped -12, +12 lines =@@ +->>>var C11t5 = /** @class */ (function () { +-1-> +-2 >^^^^^^^^^^^^^^^^^^^^^^^^-> +-1-> ++>>>class C11t5 { ++1 > ++2 >^^^^^^ ++3 > ^^^^^ ++4 > ^^^^^^^^^^^^-> ++1 > > - 2 >class - 3 > C11t5 --1 >Emitted(92, 1) Source(155, 1) + SourceIndex(0) --2 >Emitted(92, 7) Source(155, 7) + SourceIndex(0) --3 >Emitted(92, 12) Source(155, 12) + SourceIndex(0) +-1->Emitted(94, 1) Source(155, 1) + SourceIndex(0) +---- +->>> function C11t5(f) { +-1->^^^^ +-2 > ^^^^^^^^^^^^^^^ +-3 > ^ +-1->class C11t5 { +-2 > constructor( +-3 > f: (n: number) => IFoo +-1->Emitted(95, 5) Source(155, 15) + SourceIndex(0) +-2 >Emitted(95, 20) Source(155, 27) + SourceIndex(0) +-3 >Emitted(95, 21) Source(155, 49) + SourceIndex(0) +---- +->>> } +-1 >^^^^ +-2 > ^ +-3 > ^^^^^^^^^^^^^-> +-1 >) { +-2 > } +-1 >Emitted(96, 5) Source(155, 53) + SourceIndex(0) +-2 >Emitted(96, 6) Source(155, 54) + SourceIndex(0) +---- +->>> return C11t5; ++2 >class ++3 > C11t5 +1 >Emitted(91, 1) Source(155, 1) + SourceIndex(0) +2 >Emitted(91, 7) Source(155, 7) + SourceIndex(0) +3 >Emitted(91, 12) Source(155, 12) + SourceIndex(0) - --- - >>> constructor(f) { } ++--- ++>>> constructor(f) { } 1->^^^^ 2 > ^^^^^^^^^^^^ - 3 > ^ --4 > ^^^^ --5 > ^ +-1-> +-2 > } +-1->Emitted(97, 5) Source(155, 55) + SourceIndex(0) +-2 >Emitted(97, 17) Source(155, 56) + SourceIndex(0) ++3 > ^ +4 > ^^ +5 > ^^ +6 > ^ - 1-> { - 2 > constructor( - 3 > f: (n: number) => IFoo --4 > ) { --5 > } --1->Emitted(93, 5) Source(155, 15) + SourceIndex(0) --2 >Emitted(93, 17) Source(155, 27) + SourceIndex(0) --3 >Emitted(93, 18) Source(155, 49) + SourceIndex(0) --4 >Emitted(93, 22) Source(155, 53) + SourceIndex(0) --5 >Emitted(93, 23) Source(155, 54) + SourceIndex(0) ++1-> { ++2 > constructor( ++3 > f: (n: number) => IFoo +4 > ) +5 > { +6 > } @@ -2897,27 +3003,41 @@ +5 >Emitted(92, 22) Source(155, 52) + SourceIndex(0) +6 >Emitted(92, 23) Source(155, 54) + SourceIndex(0) --- - >>>} - 1 >^ - 2 > ^-> - 1 > } --1 >Emitted(94, 2) Source(155, 56) + SourceIndex(0) +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-1 > +-2 >} +-3 > +-4 > class C11t5 { constructor(f: (n: number) => IFoo) { } } +-1 >Emitted(98, 1) Source(155, 55) + SourceIndex(0) +-2 >Emitted(98, 2) Source(155, 56) + SourceIndex(0) +-3 >Emitted(98, 2) Source(155, 1) + SourceIndex(0) +-4 >Emitted(98, 6) Source(155, 56) + SourceIndex(0) ++>>>} ++1 >^ ++2 > ^-> ++1 > } +1 >Emitted(93, 2) Source(155, 56) + SourceIndex(0) --- >>>; - 1-> -@@= skipped -33, +36 lines =@@ +-1 > ++1-> + 2 >^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1-> +-1 > ++1-> 2 >; --1->Emitted(95, 1) Source(155, 56) + SourceIndex(0) --2 >Emitted(95, 2) Source(155, 57) + SourceIndex(0) +-1 >Emitted(99, 1) Source(155, 56) + SourceIndex(0) +-2 >Emitted(99, 2) Source(155, 57) + SourceIndex(0) +1->Emitted(94, 1) Source(155, 56) + SourceIndex(0) +2 >Emitted(94, 2) Source(155, 57) + SourceIndex(0) --- >>>var i = new C11t5(function (n) { return ({}); }); 1-> -@@= skipped -13, +13 lines =@@ +@@= skipped -145, +140 lines =@@ 7 > ^ 8 > ^^^^^^^^^^ 9 > ^ @@ -2959,25 +3079,25 @@ -17> } -18> ) -19> ; --1->Emitted(96, 1) Source(156, 1) + SourceIndex(0) --2 >Emitted(96, 5) Source(156, 5) + SourceIndex(0) --3 >Emitted(96, 6) Source(156, 6) + SourceIndex(0) --4 >Emitted(96, 9) Source(156, 9) + SourceIndex(0) --5 >Emitted(96, 13) Source(156, 13) + SourceIndex(0) --6 >Emitted(96, 18) Source(156, 18) + SourceIndex(0) --7 >Emitted(96, 19) Source(156, 19) + SourceIndex(0) --8 >Emitted(96, 29) Source(156, 28) + SourceIndex(0) --9 >Emitted(96, 30) Source(156, 29) + SourceIndex(0) --10>Emitted(96, 34) Source(156, 33) + SourceIndex(0) --11>Emitted(96, 41) Source(156, 46) + SourceIndex(0) --12>Emitted(96, 42) Source(156, 47) + SourceIndex(0) --13>Emitted(96, 44) Source(156, 49) + SourceIndex(0) --14>Emitted(96, 45) Source(156, 50) + SourceIndex(0) --15>Emitted(96, 46) Source(156, 50) + SourceIndex(0) --16>Emitted(96, 47) Source(156, 51) + SourceIndex(0) --17>Emitted(96, 48) Source(156, 52) + SourceIndex(0) --18>Emitted(96, 49) Source(156, 53) + SourceIndex(0) --19>Emitted(96, 50) Source(156, 54) + SourceIndex(0) +-1->Emitted(100, 1) Source(156, 1) + SourceIndex(0) +-2 >Emitted(100, 5) Source(156, 5) + SourceIndex(0) +-3 >Emitted(100, 6) Source(156, 6) + SourceIndex(0) +-4 >Emitted(100, 9) Source(156, 9) + SourceIndex(0) +-5 >Emitted(100, 13) Source(156, 13) + SourceIndex(0) +-6 >Emitted(100, 18) Source(156, 18) + SourceIndex(0) +-7 >Emitted(100, 19) Source(156, 19) + SourceIndex(0) +-8 >Emitted(100, 29) Source(156, 28) + SourceIndex(0) +-9 >Emitted(100, 30) Source(156, 29) + SourceIndex(0) +-10>Emitted(100, 34) Source(156, 33) + SourceIndex(0) +-11>Emitted(100, 41) Source(156, 46) + SourceIndex(0) +-12>Emitted(100, 42) Source(156, 47) + SourceIndex(0) +-13>Emitted(100, 44) Source(156, 49) + SourceIndex(0) +-14>Emitted(100, 45) Source(156, 50) + SourceIndex(0) +-15>Emitted(100, 46) Source(156, 50) + SourceIndex(0) +-16>Emitted(100, 47) Source(156, 51) + SourceIndex(0) +-17>Emitted(100, 48) Source(156, 52) + SourceIndex(0) +-18>Emitted(100, 49) Source(156, 53) + SourceIndex(0) +-19>Emitted(100, 50) Source(156, 54) + SourceIndex(0) +10> ) +11> { +12> return @@ -3016,8 +3136,8 @@ > > 2 >// CONTEXT: Type annotated expression --1 >Emitted(97, 1) Source(158, 1) + SourceIndex(0) --2 >Emitted(97, 38) Source(158, 38) + SourceIndex(0) +-1 >Emitted(101, 1) Source(158, 1) + SourceIndex(0) +-2 >Emitted(101, 38) Source(158, 38) + SourceIndex(0) +1 >Emitted(96, 1) Source(158, 1) + SourceIndex(0) +2 >Emitted(96, 38) Source(158, 38) + SourceIndex(0) --- @@ -3059,21 +3179,21 @@ -13> } -14> ) -15> ; --1->Emitted(98, 1) Source(159, 1) + SourceIndex(0) --2 >Emitted(98, 5) Source(159, 5) + SourceIndex(0) --3 >Emitted(98, 10) Source(159, 10) + SourceIndex(0) --4 >Emitted(98, 13) Source(159, 37) + SourceIndex(0) --5 >Emitted(98, 14) Source(159, 38) + SourceIndex(0) --6 >Emitted(98, 24) Source(159, 47) + SourceIndex(0) --7 >Emitted(98, 25) Source(159, 48) + SourceIndex(0) --8 >Emitted(98, 29) Source(159, 52) + SourceIndex(0) --9 >Emitted(98, 36) Source(159, 59) + SourceIndex(0) --10>Emitted(98, 37) Source(159, 60) + SourceIndex(0) --11>Emitted(98, 38) Source(159, 60) + SourceIndex(0) --12>Emitted(98, 39) Source(159, 61) + SourceIndex(0) --13>Emitted(98, 40) Source(159, 62) + SourceIndex(0) --14>Emitted(98, 41) Source(159, 63) + SourceIndex(0) --15>Emitted(98, 42) Source(159, 64) + SourceIndex(0) +-1->Emitted(102, 1) Source(159, 1) + SourceIndex(0) +-2 >Emitted(102, 5) Source(159, 5) + SourceIndex(0) +-3 >Emitted(102, 10) Source(159, 10) + SourceIndex(0) +-4 >Emitted(102, 13) Source(159, 37) + SourceIndex(0) +-5 >Emitted(102, 14) Source(159, 38) + SourceIndex(0) +-6 >Emitted(102, 24) Source(159, 47) + SourceIndex(0) +-7 >Emitted(102, 25) Source(159, 48) + SourceIndex(0) +-8 >Emitted(102, 29) Source(159, 52) + SourceIndex(0) +-9 >Emitted(102, 36) Source(159, 59) + SourceIndex(0) +-10>Emitted(102, 37) Source(159, 60) + SourceIndex(0) +-11>Emitted(102, 38) Source(159, 60) + SourceIndex(0) +-12>Emitted(102, 39) Source(159, 61) + SourceIndex(0) +-13>Emitted(102, 40) Source(159, 62) + SourceIndex(0) +-14>Emitted(102, 41) Source(159, 63) + SourceIndex(0) +-15>Emitted(102, 42) Source(159, 64) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -3106,11 +3226,11 @@ 3 > c12t2 4 > = 5 > ( --1 >Emitted(99, 1) Source(160, 1) + SourceIndex(0) --2 >Emitted(99, 5) Source(160, 5) + SourceIndex(0) --3 >Emitted(99, 10) Source(160, 10) + SourceIndex(0) --4 >Emitted(99, 13) Source(160, 20) + SourceIndex(0) --5 >Emitted(99, 14) Source(160, 21) + SourceIndex(0) +-1 >Emitted(103, 1) Source(160, 1) + SourceIndex(0) +-2 >Emitted(103, 5) Source(160, 5) + SourceIndex(0) +-3 >Emitted(103, 10) Source(160, 10) + SourceIndex(0) +-4 >Emitted(103, 13) Source(160, 20) + SourceIndex(0) +-5 >Emitted(103, 14) Source(160, 21) + SourceIndex(0) +1 >Emitted(98, 1) Source(160, 1) + SourceIndex(0) +2 >Emitted(98, 5) Source(160, 5) + SourceIndex(0) +3 >Emitted(98, 10) Source(160, 10) + SourceIndex(0) @@ -3123,10 +3243,10 @@ 2 > n 3 > : 4 > 1 --1 >Emitted(100, 5) Source(161, 5) + SourceIndex(0) --2 >Emitted(100, 6) Source(161, 6) + SourceIndex(0) --3 >Emitted(100, 8) Source(161, 8) + SourceIndex(0) --4 >Emitted(100, 9) Source(161, 9) + SourceIndex(0) +-1 >Emitted(104, 5) Source(161, 5) + SourceIndex(0) +-2 >Emitted(104, 6) Source(161, 6) + SourceIndex(0) +-3 >Emitted(104, 8) Source(161, 8) + SourceIndex(0) +-4 >Emitted(104, 9) Source(161, 9) + SourceIndex(0) +1 >Emitted(99, 5) Source(161, 5) + SourceIndex(0) +2 >Emitted(99, 6) Source(161, 6) + SourceIndex(0) +3 >Emitted(99, 8) Source(161, 8) + SourceIndex(0) @@ -3138,9 +3258,9 @@ >} 2 > ) 3 > ; --1 >Emitted(101, 2) Source(162, 2) + SourceIndex(0) --2 >Emitted(101, 3) Source(162, 3) + SourceIndex(0) --3 >Emitted(101, 4) Source(162, 4) + SourceIndex(0) +-1 >Emitted(105, 2) Source(162, 2) + SourceIndex(0) +-2 >Emitted(105, 3) Source(162, 3) + SourceIndex(0) +-3 >Emitted(105, 4) Source(162, 4) + SourceIndex(0) +1 >Emitted(100, 2) Source(162, 2) + SourceIndex(0) +2 >Emitted(100, 3) Source(162, 3) + SourceIndex(0) +3 >Emitted(100, 4) Source(162, 4) + SourceIndex(0) @@ -3151,12 +3271,12 @@ 4 > = 5 > [] 6 > ; --1->Emitted(102, 1) Source(163, 1) + SourceIndex(0) --2 >Emitted(102, 5) Source(163, 5) + SourceIndex(0) --3 >Emitted(102, 10) Source(163, 10) + SourceIndex(0) --4 >Emitted(102, 13) Source(163, 24) + SourceIndex(0) --5 >Emitted(102, 15) Source(163, 26) + SourceIndex(0) --6 >Emitted(102, 16) Source(163, 27) + SourceIndex(0) +-1->Emitted(106, 1) Source(163, 1) + SourceIndex(0) +-2 >Emitted(106, 5) Source(163, 5) + SourceIndex(0) +-3 >Emitted(106, 10) Source(163, 10) + SourceIndex(0) +-4 >Emitted(106, 13) Source(163, 24) + SourceIndex(0) +-5 >Emitted(106, 15) Source(163, 26) + SourceIndex(0) +-6 >Emitted(106, 16) Source(163, 27) + SourceIndex(0) +1->Emitted(101, 1) Source(163, 1) + SourceIndex(0) +2 >Emitted(101, 5) Source(163, 5) + SourceIndex(0) +3 >Emitted(101, 10) Source(163, 10) + SourceIndex(0) @@ -3204,19 +3324,19 @@ -11> -12> } -13> ; --1->Emitted(103, 1) Source(164, 1) + SourceIndex(0) --2 >Emitted(103, 5) Source(164, 5) + SourceIndex(0) --3 >Emitted(103, 10) Source(164, 10) + SourceIndex(0) --4 >Emitted(103, 13) Source(164, 26) + SourceIndex(0) --5 >Emitted(103, 27) Source(164, 39) + SourceIndex(0) --6 >Emitted(103, 34) Source(164, 52) + SourceIndex(0) --7 >Emitted(103, 35) Source(164, 53) + SourceIndex(0) --8 >Emitted(103, 37) Source(164, 55) + SourceIndex(0) --9 >Emitted(103, 38) Source(164, 56) + SourceIndex(0) --10>Emitted(103, 39) Source(164, 56) + SourceIndex(0) --11>Emitted(103, 40) Source(164, 57) + SourceIndex(0) --12>Emitted(103, 41) Source(164, 58) + SourceIndex(0) --13>Emitted(103, 42) Source(164, 59) + SourceIndex(0) +-1->Emitted(107, 1) Source(164, 1) + SourceIndex(0) +-2 >Emitted(107, 5) Source(164, 5) + SourceIndex(0) +-3 >Emitted(107, 10) Source(164, 10) + SourceIndex(0) +-4 >Emitted(107, 13) Source(164, 26) + SourceIndex(0) +-5 >Emitted(107, 27) Source(164, 39) + SourceIndex(0) +-6 >Emitted(107, 34) Source(164, 52) + SourceIndex(0) +-7 >Emitted(107, 35) Source(164, 53) + SourceIndex(0) +-8 >Emitted(107, 37) Source(164, 55) + SourceIndex(0) +-9 >Emitted(107, 38) Source(164, 56) + SourceIndex(0) +-10>Emitted(107, 39) Source(164, 56) + SourceIndex(0) +-11>Emitted(107, 40) Source(164, 57) + SourceIndex(0) +-12>Emitted(107, 41) Source(164, 58) + SourceIndex(0) +-13>Emitted(107, 42) Source(164, 59) + SourceIndex(0) +5 > function() +6 > { +7 > return @@ -3285,21 +3405,21 @@ -13> -14> } -15> ; --1->Emitted(104, 1) Source(165, 1) + SourceIndex(0) --2 >Emitted(104, 5) Source(165, 5) + SourceIndex(0) --3 >Emitted(104, 10) Source(165, 10) + SourceIndex(0) --4 >Emitted(104, 13) Source(165, 35) + SourceIndex(0) --5 >Emitted(104, 23) Source(165, 44) + SourceIndex(0) --6 >Emitted(104, 24) Source(165, 45) + SourceIndex(0) --7 >Emitted(104, 28) Source(165, 49) + SourceIndex(0) --8 >Emitted(104, 35) Source(165, 62) + SourceIndex(0) --9 >Emitted(104, 36) Source(165, 63) + SourceIndex(0) --10>Emitted(104, 38) Source(165, 65) + SourceIndex(0) --11>Emitted(104, 39) Source(165, 66) + SourceIndex(0) --12>Emitted(104, 40) Source(165, 66) + SourceIndex(0) --13>Emitted(104, 41) Source(165, 67) + SourceIndex(0) --14>Emitted(104, 42) Source(165, 68) + SourceIndex(0) --15>Emitted(104, 43) Source(165, 69) + SourceIndex(0) +-1->Emitted(108, 1) Source(165, 1) + SourceIndex(0) +-2 >Emitted(108, 5) Source(165, 5) + SourceIndex(0) +-3 >Emitted(108, 10) Source(165, 10) + SourceIndex(0) +-4 >Emitted(108, 13) Source(165, 35) + SourceIndex(0) +-5 >Emitted(108, 23) Source(165, 44) + SourceIndex(0) +-6 >Emitted(108, 24) Source(165, 45) + SourceIndex(0) +-7 >Emitted(108, 28) Source(165, 49) + SourceIndex(0) +-8 >Emitted(108, 35) Source(165, 62) + SourceIndex(0) +-9 >Emitted(108, 36) Source(165, 63) + SourceIndex(0) +-10>Emitted(108, 38) Source(165, 65) + SourceIndex(0) +-11>Emitted(108, 39) Source(165, 66) + SourceIndex(0) +-12>Emitted(108, 40) Source(165, 66) + SourceIndex(0) +-13>Emitted(108, 41) Source(165, 67) + SourceIndex(0) +-14>Emitted(108, 42) Source(165, 68) + SourceIndex(0) +-15>Emitted(108, 43) Source(165, 69) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -3368,23 +3488,23 @@ -15> -16> } -17> ; --1->Emitted(105, 1) Source(166, 1) + SourceIndex(0) --2 >Emitted(105, 5) Source(166, 5) + SourceIndex(0) --3 >Emitted(105, 10) Source(166, 10) + SourceIndex(0) --4 >Emitted(105, 13) Source(166, 46) + SourceIndex(0) --5 >Emitted(105, 23) Source(166, 55) + SourceIndex(0) --6 >Emitted(105, 24) Source(166, 56) + SourceIndex(0) --7 >Emitted(105, 26) Source(166, 58) + SourceIndex(0) --8 >Emitted(105, 27) Source(166, 59) + SourceIndex(0) --9 >Emitted(105, 31) Source(166, 63) + SourceIndex(0) --10>Emitted(105, 38) Source(166, 76) + SourceIndex(0) --11>Emitted(105, 39) Source(166, 77) + SourceIndex(0) --12>Emitted(105, 41) Source(166, 79) + SourceIndex(0) --13>Emitted(105, 42) Source(166, 80) + SourceIndex(0) --14>Emitted(105, 43) Source(166, 80) + SourceIndex(0) --15>Emitted(105, 44) Source(166, 81) + SourceIndex(0) --16>Emitted(105, 45) Source(166, 82) + SourceIndex(0) --17>Emitted(105, 46) Source(166, 83) + SourceIndex(0) +-1->Emitted(109, 1) Source(166, 1) + SourceIndex(0) +-2 >Emitted(109, 5) Source(166, 5) + SourceIndex(0) +-3 >Emitted(109, 10) Source(166, 10) + SourceIndex(0) +-4 >Emitted(109, 13) Source(166, 46) + SourceIndex(0) +-5 >Emitted(109, 23) Source(166, 55) + SourceIndex(0) +-6 >Emitted(109, 24) Source(166, 56) + SourceIndex(0) +-7 >Emitted(109, 26) Source(166, 58) + SourceIndex(0) +-8 >Emitted(109, 27) Source(166, 59) + SourceIndex(0) +-9 >Emitted(109, 31) Source(166, 63) + SourceIndex(0) +-10>Emitted(109, 38) Source(166, 76) + SourceIndex(0) +-11>Emitted(109, 39) Source(166, 77) + SourceIndex(0) +-12>Emitted(109, 41) Source(166, 79) + SourceIndex(0) +-13>Emitted(109, 42) Source(166, 80) + SourceIndex(0) +-14>Emitted(109, 43) Source(166, 80) + SourceIndex(0) +-15>Emitted(109, 44) Source(166, 81) + SourceIndex(0) +-16>Emitted(109, 45) Source(166, 82) + SourceIndex(0) +-17>Emitted(109, 46) Source(166, 83) + SourceIndex(0) +9 > ) +10> { +11> return @@ -3451,19 +3571,19 @@ -11> -12> } -13> ; --1 >Emitted(106, 1) Source(167, 1) + SourceIndex(0) --2 >Emitted(106, 5) Source(167, 5) + SourceIndex(0) --3 >Emitted(106, 10) Source(167, 10) + SourceIndex(0) --4 >Emitted(106, 13) Source(170, 4) + SourceIndex(0) --5 >Emitted(106, 23) Source(170, 13) + SourceIndex(0) --6 >Emitted(106, 24) Source(170, 21) + SourceIndex(0) --7 >Emitted(106, 28) Source(170, 25) + SourceIndex(0) --8 >Emitted(106, 35) Source(170, 32) + SourceIndex(0) --9 >Emitted(106, 36) Source(170, 33) + SourceIndex(0) --10>Emitted(106, 37) Source(170, 33) + SourceIndex(0) --11>Emitted(106, 38) Source(170, 34) + SourceIndex(0) --12>Emitted(106, 39) Source(170, 35) + SourceIndex(0) --13>Emitted(106, 40) Source(170, 36) + SourceIndex(0) +-1 >Emitted(110, 1) Source(167, 1) + SourceIndex(0) +-2 >Emitted(110, 5) Source(167, 5) + SourceIndex(0) +-3 >Emitted(110, 10) Source(167, 10) + SourceIndex(0) +-4 >Emitted(110, 13) Source(170, 4) + SourceIndex(0) +-5 >Emitted(110, 23) Source(170, 13) + SourceIndex(0) +-6 >Emitted(110, 24) Source(170, 21) + SourceIndex(0) +-7 >Emitted(110, 28) Source(170, 25) + SourceIndex(0) +-8 >Emitted(110, 35) Source(170, 32) + SourceIndex(0) +-9 >Emitted(110, 36) Source(170, 33) + SourceIndex(0) +-10>Emitted(110, 37) Source(170, 33) + SourceIndex(0) +-11>Emitted(110, 38) Source(170, 34) + SourceIndex(0) +-12>Emitted(110, 39) Source(170, 35) + SourceIndex(0) +-13>Emitted(110, 40) Source(170, 36) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -3522,19 +3642,19 @@ -11> -12> } -13> ; --1->Emitted(107, 1) Source(172, 1) + SourceIndex(0) --2 >Emitted(107, 5) Source(172, 5) + SourceIndex(0) --3 >Emitted(107, 10) Source(172, 10) + SourceIndex(0) --4 >Emitted(107, 13) Source(172, 48) + SourceIndex(0) --5 >Emitted(107, 23) Source(172, 57) + SourceIndex(0) --6 >Emitted(107, 24) Source(172, 58) + SourceIndex(0) --7 >Emitted(107, 28) Source(172, 62) + SourceIndex(0) --8 >Emitted(107, 35) Source(172, 69) + SourceIndex(0) --9 >Emitted(107, 36) Source(172, 70) + SourceIndex(0) --10>Emitted(107, 37) Source(172, 71) + SourceIndex(0) --11>Emitted(107, 38) Source(172, 72) + SourceIndex(0) --12>Emitted(107, 39) Source(172, 73) + SourceIndex(0) --13>Emitted(107, 40) Source(172, 74) + SourceIndex(0) +-1->Emitted(111, 1) Source(172, 1) + SourceIndex(0) +-2 >Emitted(111, 5) Source(172, 5) + SourceIndex(0) +-3 >Emitted(111, 10) Source(172, 10) + SourceIndex(0) +-4 >Emitted(111, 13) Source(172, 48) + SourceIndex(0) +-5 >Emitted(111, 23) Source(172, 57) + SourceIndex(0) +-6 >Emitted(111, 24) Source(172, 58) + SourceIndex(0) +-7 >Emitted(111, 28) Source(172, 62) + SourceIndex(0) +-8 >Emitted(111, 35) Source(172, 69) + SourceIndex(0) +-9 >Emitted(111, 36) Source(172, 70) + SourceIndex(0) +-10>Emitted(111, 37) Source(172, 71) + SourceIndex(0) +-11>Emitted(111, 38) Source(172, 72) + SourceIndex(0) +-12>Emitted(111, 39) Source(172, 73) + SourceIndex(0) +-13>Emitted(111, 40) Source(172, 74) + SourceIndex(0) +7 > ) +8 > { +9 > return @@ -3564,16 +3684,16 @@ 8 > [] 9 > ] 10> ; --1 >Emitted(108, 1) Source(173, 1) + SourceIndex(0) --2 >Emitted(108, 5) Source(173, 5) + SourceIndex(0) --3 >Emitted(108, 10) Source(173, 10) + SourceIndex(0) --4 >Emitted(108, 13) Source(173, 26) + SourceIndex(0) --5 >Emitted(108, 14) Source(173, 27) + SourceIndex(0) --6 >Emitted(108, 16) Source(173, 29) + SourceIndex(0) --7 >Emitted(108, 18) Source(173, 30) + SourceIndex(0) --8 >Emitted(108, 20) Source(173, 32) + SourceIndex(0) --9 >Emitted(108, 21) Source(173, 33) + SourceIndex(0) --10>Emitted(108, 22) Source(173, 34) + SourceIndex(0) +-1 >Emitted(112, 1) Source(173, 1) + SourceIndex(0) +-2 >Emitted(112, 5) Source(173, 5) + SourceIndex(0) +-3 >Emitted(112, 10) Source(173, 10) + SourceIndex(0) +-4 >Emitted(112, 13) Source(173, 26) + SourceIndex(0) +-5 >Emitted(112, 14) Source(173, 27) + SourceIndex(0) +-6 >Emitted(112, 16) Source(173, 29) + SourceIndex(0) +-7 >Emitted(112, 18) Source(173, 30) + SourceIndex(0) +-8 >Emitted(112, 20) Source(173, 32) + SourceIndex(0) +-9 >Emitted(112, 21) Source(173, 33) + SourceIndex(0) +-10>Emitted(112, 22) Source(173, 34) + SourceIndex(0) +1 >Emitted(107, 1) Source(173, 1) + SourceIndex(0) +2 >Emitted(107, 5) Source(173, 5) + SourceIndex(0) +3 >Emitted(107, 10) Source(173, 10) + SourceIndex(0) @@ -3591,20 +3711,20 @@ 12> ) 13> ] 14> ; --1->Emitted(109, 1) Source(174, 1) + SourceIndex(0) --2 >Emitted(109, 5) Source(174, 5) + SourceIndex(0) --3 >Emitted(109, 11) Source(174, 11) + SourceIndex(0) --4 >Emitted(109, 14) Source(174, 23) + SourceIndex(0) --5 >Emitted(109, 15) Source(174, 30) + SourceIndex(0) --6 >Emitted(109, 16) Source(174, 31) + SourceIndex(0) --7 >Emitted(109, 18) Source(174, 33) + SourceIndex(0) --8 >Emitted(109, 19) Source(174, 34) + SourceIndex(0) --9 >Emitted(109, 21) Source(174, 41) + SourceIndex(0) --10>Emitted(109, 22) Source(174, 42) + SourceIndex(0) --11>Emitted(109, 24) Source(174, 44) + SourceIndex(0) --12>Emitted(109, 25) Source(174, 45) + SourceIndex(0) --13>Emitted(109, 26) Source(174, 46) + SourceIndex(0) --14>Emitted(109, 27) Source(174, 47) + SourceIndex(0) +-1->Emitted(113, 1) Source(174, 1) + SourceIndex(0) +-2 >Emitted(113, 5) Source(174, 5) + SourceIndex(0) +-3 >Emitted(113, 11) Source(174, 11) + SourceIndex(0) +-4 >Emitted(113, 14) Source(174, 23) + SourceIndex(0) +-5 >Emitted(113, 15) Source(174, 30) + SourceIndex(0) +-6 >Emitted(113, 16) Source(174, 31) + SourceIndex(0) +-7 >Emitted(113, 18) Source(174, 33) + SourceIndex(0) +-8 >Emitted(113, 19) Source(174, 34) + SourceIndex(0) +-9 >Emitted(113, 21) Source(174, 41) + SourceIndex(0) +-10>Emitted(113, 22) Source(174, 42) + SourceIndex(0) +-11>Emitted(113, 24) Source(174, 44) + SourceIndex(0) +-12>Emitted(113, 25) Source(174, 45) + SourceIndex(0) +-13>Emitted(113, 26) Source(174, 46) + SourceIndex(0) +-14>Emitted(113, 27) Source(174, 47) + SourceIndex(0) +1->Emitted(108, 1) Source(174, 1) + SourceIndex(0) +2 >Emitted(108, 5) Source(174, 5) + SourceIndex(0) +3 >Emitted(108, 11) Source(174, 11) + SourceIndex(0) @@ -3658,23 +3778,23 @@ -15> } -16> ] -17> ; --1->Emitted(110, 1) Source(175, 1) + SourceIndex(0) --2 >Emitted(110, 5) Source(175, 5) + SourceIndex(0) --3 >Emitted(110, 11) Source(175, 11) + SourceIndex(0) --4 >Emitted(110, 14) Source(175, 52) + SourceIndex(0) --5 >Emitted(110, 15) Source(175, 53) + SourceIndex(0) --6 >Emitted(110, 25) Source(175, 62) + SourceIndex(0) --7 >Emitted(110, 26) Source(175, 63) + SourceIndex(0) --8 >Emitted(110, 28) Source(175, 65) + SourceIndex(0) --9 >Emitted(110, 29) Source(175, 66) + SourceIndex(0) --10>Emitted(110, 33) Source(175, 70) + SourceIndex(0) --11>Emitted(110, 40) Source(175, 77) + SourceIndex(0) --12>Emitted(110, 41) Source(175, 78) + SourceIndex(0) --13>Emitted(110, 42) Source(175, 79) + SourceIndex(0) --14>Emitted(110, 43) Source(175, 80) + SourceIndex(0) --15>Emitted(110, 44) Source(175, 81) + SourceIndex(0) --16>Emitted(110, 45) Source(175, 82) + SourceIndex(0) --17>Emitted(110, 46) Source(175, 83) + SourceIndex(0) +-1->Emitted(114, 1) Source(175, 1) + SourceIndex(0) +-2 >Emitted(114, 5) Source(175, 5) + SourceIndex(0) +-3 >Emitted(114, 11) Source(175, 11) + SourceIndex(0) +-4 >Emitted(114, 14) Source(175, 52) + SourceIndex(0) +-5 >Emitted(114, 15) Source(175, 53) + SourceIndex(0) +-6 >Emitted(114, 25) Source(175, 62) + SourceIndex(0) +-7 >Emitted(114, 26) Source(175, 63) + SourceIndex(0) +-8 >Emitted(114, 28) Source(175, 65) + SourceIndex(0) +-9 >Emitted(114, 29) Source(175, 66) + SourceIndex(0) +-10>Emitted(114, 33) Source(175, 70) + SourceIndex(0) +-11>Emitted(114, 40) Source(175, 77) + SourceIndex(0) +-12>Emitted(114, 41) Source(175, 78) + SourceIndex(0) +-13>Emitted(114, 42) Source(175, 79) + SourceIndex(0) +-14>Emitted(114, 43) Source(175, 80) + SourceIndex(0) +-15>Emitted(114, 44) Source(175, 81) + SourceIndex(0) +-16>Emitted(114, 45) Source(175, 82) + SourceIndex(0) +-17>Emitted(114, 46) Source(175, 83) + SourceIndex(0) +10> ) +11> { +12> return @@ -3709,10 +3829,10 @@ 2 >var 3 > c12t12 4 > = --1 >Emitted(111, 1) Source(176, 1) + SourceIndex(0) --2 >Emitted(111, 5) Source(176, 5) + SourceIndex(0) --3 >Emitted(111, 11) Source(176, 11) + SourceIndex(0) --4 >Emitted(111, 14) Source(176, 21) + SourceIndex(0) +-1 >Emitted(115, 1) Source(176, 1) + SourceIndex(0) +-2 >Emitted(115, 5) Source(176, 5) + SourceIndex(0) +-3 >Emitted(115, 11) Source(176, 11) + SourceIndex(0) +-4 >Emitted(115, 14) Source(176, 21) + SourceIndex(0) +1 >Emitted(110, 1) Source(176, 1) + SourceIndex(0) +2 >Emitted(110, 5) Source(176, 5) + SourceIndex(0) +3 >Emitted(110, 11) Source(176, 11) + SourceIndex(0) @@ -3724,12 +3844,12 @@ 4 > ( 5 > {} 6 > ) --1->Emitted(112, 5) Source(177, 5) + SourceIndex(0) --2 >Emitted(112, 8) Source(177, 8) + SourceIndex(0) --3 >Emitted(112, 10) Source(177, 16) + SourceIndex(0) --4 >Emitted(112, 11) Source(177, 17) + SourceIndex(0) --5 >Emitted(112, 13) Source(177, 19) + SourceIndex(0) --6 >Emitted(112, 14) Source(177, 20) + SourceIndex(0) +-1->Emitted(116, 5) Source(177, 5) + SourceIndex(0) +-2 >Emitted(116, 8) Source(177, 8) + SourceIndex(0) +-3 >Emitted(116, 10) Source(177, 16) + SourceIndex(0) +-4 >Emitted(116, 11) Source(177, 17) + SourceIndex(0) +-5 >Emitted(116, 13) Source(177, 19) + SourceIndex(0) +-6 >Emitted(116, 14) Source(177, 20) + SourceIndex(0) +1->Emitted(111, 5) Source(177, 5) + SourceIndex(0) +2 >Emitted(111, 8) Source(177, 8) + SourceIndex(0) +3 >Emitted(111, 10) Source(177, 16) + SourceIndex(0) @@ -3743,8 +3863,8 @@ 1 > >} 2 > --1 >Emitted(113, 2) Source(178, 2) + SourceIndex(0) --2 >Emitted(113, 3) Source(178, 2) + SourceIndex(0) +-1 >Emitted(117, 2) Source(178, 2) + SourceIndex(0) +-2 >Emitted(117, 3) Source(178, 2) + SourceIndex(0) +1 >Emitted(112, 2) Source(178, 2) + SourceIndex(0) +2 >Emitted(112, 3) Source(178, 2) + SourceIndex(0) --- @@ -3754,11 +3874,11 @@ 3 > c12t13 4 > = 5 > ( --1->Emitted(114, 1) Source(179, 1) + SourceIndex(0) --2 >Emitted(114, 5) Source(179, 5) + SourceIndex(0) --3 >Emitted(114, 11) Source(179, 11) + SourceIndex(0) --4 >Emitted(114, 14) Source(179, 21) + SourceIndex(0) --5 >Emitted(114, 15) Source(179, 22) + SourceIndex(0) +-1->Emitted(118, 1) Source(179, 1) + SourceIndex(0) +-2 >Emitted(118, 5) Source(179, 5) + SourceIndex(0) +-3 >Emitted(118, 11) Source(179, 11) + SourceIndex(0) +-4 >Emitted(118, 14) Source(179, 21) + SourceIndex(0) +-5 >Emitted(118, 15) Source(179, 22) + SourceIndex(0) +1->Emitted(113, 1) Source(179, 1) + SourceIndex(0) +2 >Emitted(113, 5) Source(179, 5) + SourceIndex(0) +3 >Emitted(113, 11) Source(179, 11) + SourceIndex(0) @@ -3797,19 +3917,19 @@ -11> ; -12> -13> } --1->Emitted(115, 5) Source(180, 5) + SourceIndex(0) --2 >Emitted(115, 6) Source(180, 6) + SourceIndex(0) --3 >Emitted(115, 8) Source(180, 8) + SourceIndex(0) --4 >Emitted(115, 18) Source(180, 17) + SourceIndex(0) --5 >Emitted(115, 19) Source(180, 18) + SourceIndex(0) --6 >Emitted(115, 21) Source(180, 20) + SourceIndex(0) --7 >Emitted(115, 22) Source(180, 21) + SourceIndex(0) --8 >Emitted(115, 26) Source(180, 25) + SourceIndex(0) --9 >Emitted(115, 33) Source(180, 32) + SourceIndex(0) --10>Emitted(115, 34) Source(180, 33) + SourceIndex(0) --11>Emitted(115, 35) Source(180, 34) + SourceIndex(0) --12>Emitted(115, 36) Source(180, 35) + SourceIndex(0) --13>Emitted(115, 37) Source(180, 36) + SourceIndex(0) +-1->Emitted(119, 5) Source(180, 5) + SourceIndex(0) +-2 >Emitted(119, 6) Source(180, 6) + SourceIndex(0) +-3 >Emitted(119, 8) Source(180, 8) + SourceIndex(0) +-4 >Emitted(119, 18) Source(180, 17) + SourceIndex(0) +-5 >Emitted(119, 19) Source(180, 18) + SourceIndex(0) +-6 >Emitted(119, 21) Source(180, 20) + SourceIndex(0) +-7 >Emitted(119, 22) Source(180, 21) + SourceIndex(0) +-8 >Emitted(119, 26) Source(180, 25) + SourceIndex(0) +-9 >Emitted(119, 33) Source(180, 32) + SourceIndex(0) +-10>Emitted(119, 34) Source(180, 33) + SourceIndex(0) +-11>Emitted(119, 35) Source(180, 34) + SourceIndex(0) +-12>Emitted(119, 36) Source(180, 35) + SourceIndex(0) +-13>Emitted(119, 37) Source(180, 36) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -3838,9 +3958,9 @@ >} 2 > ) 3 > --1 >Emitted(116, 2) Source(181, 2) + SourceIndex(0) --2 >Emitted(116, 3) Source(181, 3) + SourceIndex(0) --3 >Emitted(116, 4) Source(181, 3) + SourceIndex(0) +-1 >Emitted(120, 2) Source(181, 2) + SourceIndex(0) +-2 >Emitted(120, 3) Source(181, 3) + SourceIndex(0) +-3 >Emitted(120, 4) Source(181, 3) + SourceIndex(0) +1 >Emitted(115, 2) Source(181, 2) + SourceIndex(0) +2 >Emitted(115, 3) Source(181, 3) + SourceIndex(0) +3 >Emitted(115, 4) Source(181, 3) + SourceIndex(0) @@ -3851,11 +3971,11 @@ 3 > c12t14 4 > = 5 > ( --1->Emitted(117, 1) Source(182, 1) + SourceIndex(0) --2 >Emitted(117, 5) Source(182, 5) + SourceIndex(0) --3 >Emitted(117, 11) Source(182, 11) + SourceIndex(0) --4 >Emitted(117, 14) Source(182, 21) + SourceIndex(0) --5 >Emitted(117, 15) Source(182, 22) + SourceIndex(0) +-1->Emitted(121, 1) Source(182, 1) + SourceIndex(0) +-2 >Emitted(121, 5) Source(182, 5) + SourceIndex(0) +-3 >Emitted(121, 11) Source(182, 11) + SourceIndex(0) +-4 >Emitted(121, 14) Source(182, 21) + SourceIndex(0) +-5 >Emitted(121, 15) Source(182, 22) + SourceIndex(0) +1->Emitted(116, 1) Source(182, 1) + SourceIndex(0) +2 >Emitted(116, 5) Source(182, 5) + SourceIndex(0) +3 >Emitted(116, 11) Source(182, 11) + SourceIndex(0) @@ -3868,10 +3988,10 @@ 2 > a 3 > : 4 > [] --1 >Emitted(118, 5) Source(183, 5) + SourceIndex(0) --2 >Emitted(118, 6) Source(183, 6) + SourceIndex(0) --3 >Emitted(118, 8) Source(183, 8) + SourceIndex(0) --4 >Emitted(118, 10) Source(183, 10) + SourceIndex(0) +-1 >Emitted(122, 5) Source(183, 5) + SourceIndex(0) +-2 >Emitted(122, 6) Source(183, 6) + SourceIndex(0) +-3 >Emitted(122, 8) Source(183, 8) + SourceIndex(0) +-4 >Emitted(122, 10) Source(183, 10) + SourceIndex(0) +1 >Emitted(117, 5) Source(183, 5) + SourceIndex(0) +2 >Emitted(117, 6) Source(183, 6) + SourceIndex(0) +3 >Emitted(117, 8) Source(183, 8) + SourceIndex(0) @@ -3883,9 +4003,9 @@ >} 2 > ) 3 > --1 >Emitted(119, 2) Source(184, 2) + SourceIndex(0) --2 >Emitted(119, 3) Source(184, 3) + SourceIndex(0) --3 >Emitted(119, 4) Source(184, 3) + SourceIndex(0) +-1 >Emitted(123, 2) Source(184, 2) + SourceIndex(0) +-2 >Emitted(123, 3) Source(184, 3) + SourceIndex(0) +-3 >Emitted(123, 4) Source(184, 3) + SourceIndex(0) +1 >Emitted(118, 2) Source(184, 2) + SourceIndex(0) +2 >Emitted(118, 3) Source(184, 3) + SourceIndex(0) +3 >Emitted(118, 4) Source(184, 3) + SourceIndex(0) @@ -3928,21 +4048,21 @@ -13> ; -14> -15> } --1->Emitted(120, 1) Source(191, 1) + SourceIndex(0) --2 >Emitted(120, 10) Source(191, 10) + SourceIndex(0) --3 >Emitted(120, 13) Source(191, 13) + SourceIndex(0) --4 >Emitted(120, 14) Source(191, 14) + SourceIndex(0) --5 >Emitted(120, 15) Source(191, 15) + SourceIndex(0) --6 >Emitted(120, 17) Source(191, 16) + SourceIndex(0) --7 >Emitted(120, 18) Source(191, 17) + SourceIndex(0) --8 >Emitted(120, 22) Source(191, 21) + SourceIndex(0) --9 >Emitted(120, 29) Source(191, 28) + SourceIndex(0) --10>Emitted(120, 30) Source(191, 29) + SourceIndex(0) --11>Emitted(120, 33) Source(191, 30) + SourceIndex(0) --12>Emitted(120, 34) Source(191, 31) + SourceIndex(0) --13>Emitted(120, 35) Source(191, 32) + SourceIndex(0) --14>Emitted(120, 36) Source(191, 33) + SourceIndex(0) --15>Emitted(120, 37) Source(191, 34) + SourceIndex(0) +-1->Emitted(124, 1) Source(191, 1) + SourceIndex(0) +-2 >Emitted(124, 10) Source(191, 10) + SourceIndex(0) +-3 >Emitted(124, 13) Source(191, 13) + SourceIndex(0) +-4 >Emitted(124, 14) Source(191, 14) + SourceIndex(0) +-5 >Emitted(124, 15) Source(191, 15) + SourceIndex(0) +-6 >Emitted(124, 17) Source(191, 16) + SourceIndex(0) +-7 >Emitted(124, 18) Source(191, 17) + SourceIndex(0) +-8 >Emitted(124, 22) Source(191, 21) + SourceIndex(0) +-9 >Emitted(124, 29) Source(191, 28) + SourceIndex(0) +-10>Emitted(124, 30) Source(191, 29) + SourceIndex(0) +-11>Emitted(124, 33) Source(191, 30) + SourceIndex(0) +-12>Emitted(124, 34) Source(191, 31) + SourceIndex(0) +-13>Emitted(124, 35) Source(191, 32) + SourceIndex(0) +-14>Emitted(124, 36) Source(191, 33) + SourceIndex(0) +-15>Emitted(124, 37) Source(191, 34) + SourceIndex(0) +8 > ) +9 > { +10> return @@ -3975,17 +4095,17 @@ 9 > 2 10> ) 11> ; --1 >Emitted(121, 1) Source(193, 1) + SourceIndex(0) --2 >Emitted(121, 5) Source(193, 5) + SourceIndex(0) --3 >Emitted(121, 8) Source(193, 8) + SourceIndex(0) --4 >Emitted(121, 11) Source(193, 11) + SourceIndex(0) --5 >Emitted(121, 14) Source(193, 14) + SourceIndex(0) --6 >Emitted(121, 15) Source(193, 15) + SourceIndex(0) --7 >Emitted(121, 16) Source(193, 16) + SourceIndex(0) --8 >Emitted(121, 18) Source(193, 17) + SourceIndex(0) --9 >Emitted(121, 19) Source(193, 18) + SourceIndex(0) --10>Emitted(121, 20) Source(193, 19) + SourceIndex(0) --11>Emitted(121, 21) Source(193, 20) + SourceIndex(0) +-1 >Emitted(125, 1) Source(193, 1) + SourceIndex(0) +-2 >Emitted(125, 5) Source(193, 5) + SourceIndex(0) +-3 >Emitted(125, 8) Source(193, 8) + SourceIndex(0) +-4 >Emitted(125, 11) Source(193, 11) + SourceIndex(0) +-5 >Emitted(125, 14) Source(193, 14) + SourceIndex(0) +-6 >Emitted(125, 15) Source(193, 15) + SourceIndex(0) +-7 >Emitted(125, 16) Source(193, 16) + SourceIndex(0) +-8 >Emitted(125, 18) Source(193, 17) + SourceIndex(0) +-9 >Emitted(125, 19) Source(193, 18) + SourceIndex(0) +-10>Emitted(125, 20) Source(193, 19) + SourceIndex(0) +-11>Emitted(125, 21) Source(193, 20) + SourceIndex(0) +1 >Emitted(120, 1) Source(193, 1) + SourceIndex(0) +2 >Emitted(120, 5) Source(193, 5) + SourceIndex(0) +3 >Emitted(120, 8) Source(193, 8) + SourceIndex(0) @@ -4004,19 +4124,19 @@ 11> 0 12> ) 13> ; --1->Emitted(122, 1) Source(207, 1) + SourceIndex(0) --2 >Emitted(122, 6) Source(207, 6) + SourceIndex(0) --3 >Emitted(122, 7) Source(207, 7) + SourceIndex(0) --4 >Emitted(122, 13) Source(207, 13) + SourceIndex(0) --5 >Emitted(122, 16) Source(207, 16) + SourceIndex(0) --6 >Emitted(122, 20) Source(207, 20) + SourceIndex(0) --7 >Emitted(122, 25) Source(207, 25) + SourceIndex(0) --8 >Emitted(122, 26) Source(207, 26) + SourceIndex(0) --9 >Emitted(122, 27) Source(207, 27) + SourceIndex(0) --10>Emitted(122, 29) Source(207, 29) + SourceIndex(0) --11>Emitted(122, 30) Source(207, 30) + SourceIndex(0) --12>Emitted(122, 31) Source(207, 31) + SourceIndex(0) --13>Emitted(122, 32) Source(207, 32) + SourceIndex(0) +-1->Emitted(126, 1) Source(207, 1) + SourceIndex(0) +-2 >Emitted(126, 6) Source(207, 6) + SourceIndex(0) +-3 >Emitted(126, 7) Source(207, 7) + SourceIndex(0) +-4 >Emitted(126, 13) Source(207, 13) + SourceIndex(0) +-5 >Emitted(126, 16) Source(207, 16) + SourceIndex(0) +-6 >Emitted(126, 20) Source(207, 20) + SourceIndex(0) +-7 >Emitted(126, 25) Source(207, 25) + SourceIndex(0) +-8 >Emitted(126, 26) Source(207, 26) + SourceIndex(0) +-9 >Emitted(126, 27) Source(207, 27) + SourceIndex(0) +-10>Emitted(126, 29) Source(207, 29) + SourceIndex(0) +-11>Emitted(126, 30) Source(207, 30) + SourceIndex(0) +-12>Emitted(126, 31) Source(207, 31) + SourceIndex(0) +-13>Emitted(126, 32) Source(207, 32) + SourceIndex(0) +1->Emitted(121, 1) Source(207, 1) + SourceIndex(0) +2 >Emitted(121, 6) Source(207, 6) + SourceIndex(0) +3 >Emitted(121, 7) Source(207, 7) + SourceIndex(0) @@ -4047,17 +4167,17 @@ 9 > dx 10> , 11> dy --1->Emitted(123, 1) Source(209, 1) + SourceIndex(0) --2 >Emitted(123, 6) Source(209, 6) + SourceIndex(0) --3 >Emitted(123, 7) Source(209, 7) + SourceIndex(0) --4 >Emitted(123, 16) Source(209, 16) + SourceIndex(0) --5 >Emitted(123, 17) Source(209, 17) + SourceIndex(0) --6 >Emitted(123, 20) Source(209, 20) + SourceIndex(0) --7 >Emitted(123, 23) Source(209, 23) + SourceIndex(0) --8 >Emitted(123, 33) Source(209, 32) + SourceIndex(0) --9 >Emitted(123, 35) Source(209, 34) + SourceIndex(0) --10>Emitted(123, 37) Source(209, 36) + SourceIndex(0) --11>Emitted(123, 39) Source(209, 38) + SourceIndex(0) +-1->Emitted(127, 1) Source(209, 1) + SourceIndex(0) +-2 >Emitted(127, 6) Source(209, 6) + SourceIndex(0) +-3 >Emitted(127, 7) Source(209, 7) + SourceIndex(0) +-4 >Emitted(127, 16) Source(209, 16) + SourceIndex(0) +-5 >Emitted(127, 17) Source(209, 17) + SourceIndex(0) +-6 >Emitted(127, 20) Source(209, 20) + SourceIndex(0) +-7 >Emitted(127, 23) Source(209, 23) + SourceIndex(0) +-8 >Emitted(127, 33) Source(209, 32) + SourceIndex(0) +-9 >Emitted(127, 35) Source(209, 34) + SourceIndex(0) +-10>Emitted(127, 37) Source(209, 36) + SourceIndex(0) +-11>Emitted(127, 39) Source(209, 38) + SourceIndex(0) +12> ) +1->Emitted(122, 1) Source(209, 1) + SourceIndex(0) +2 >Emitted(122, 6) Source(209, 6) + SourceIndex(0) @@ -4087,24 +4207,24 @@ 16> dy 17> ) 18> ; --1->Emitted(124, 5) Source(210, 5) + SourceIndex(0) --2 >Emitted(124, 12) Source(210, 12) + SourceIndex(0) --3 >Emitted(124, 16) Source(210, 16) + SourceIndex(0) --4 >Emitted(124, 21) Source(210, 21) + SourceIndex(0) --5 >Emitted(124, 22) Source(210, 22) + SourceIndex(0) --6 >Emitted(124, 26) Source(210, 26) + SourceIndex(0) --7 >Emitted(124, 27) Source(210, 27) + SourceIndex(0) --8 >Emitted(124, 28) Source(210, 28) + SourceIndex(0) --9 >Emitted(124, 31) Source(210, 31) + SourceIndex(0) --10>Emitted(124, 33) Source(210, 33) + SourceIndex(0) --11>Emitted(124, 35) Source(210, 35) + SourceIndex(0) --12>Emitted(124, 39) Source(210, 39) + SourceIndex(0) --13>Emitted(124, 40) Source(210, 40) + SourceIndex(0) --14>Emitted(124, 41) Source(210, 41) + SourceIndex(0) --15>Emitted(124, 44) Source(210, 44) + SourceIndex(0) --16>Emitted(124, 46) Source(210, 46) + SourceIndex(0) --17>Emitted(124, 47) Source(210, 47) + SourceIndex(0) --18>Emitted(124, 48) Source(210, 48) + SourceIndex(0) +-1->Emitted(128, 5) Source(210, 5) + SourceIndex(0) +-2 >Emitted(128, 12) Source(210, 12) + SourceIndex(0) +-3 >Emitted(128, 16) Source(210, 16) + SourceIndex(0) +-4 >Emitted(128, 21) Source(210, 21) + SourceIndex(0) +-5 >Emitted(128, 22) Source(210, 22) + SourceIndex(0) +-6 >Emitted(128, 26) Source(210, 26) + SourceIndex(0) +-7 >Emitted(128, 27) Source(210, 27) + SourceIndex(0) +-8 >Emitted(128, 28) Source(210, 28) + SourceIndex(0) +-9 >Emitted(128, 31) Source(210, 31) + SourceIndex(0) +-10>Emitted(128, 33) Source(210, 33) + SourceIndex(0) +-11>Emitted(128, 35) Source(210, 35) + SourceIndex(0) +-12>Emitted(128, 39) Source(210, 39) + SourceIndex(0) +-13>Emitted(128, 40) Source(210, 40) + SourceIndex(0) +-14>Emitted(128, 41) Source(210, 41) + SourceIndex(0) +-15>Emitted(128, 44) Source(210, 44) + SourceIndex(0) +-16>Emitted(128, 46) Source(210, 46) + SourceIndex(0) +-17>Emitted(128, 47) Source(210, 47) + SourceIndex(0) +-18>Emitted(128, 48) Source(210, 48) + SourceIndex(0) +1->Emitted(123, 5) Source(210, 5) + SourceIndex(0) +2 >Emitted(123, 12) Source(210, 12) + SourceIndex(0) +3 >Emitted(123, 16) Source(210, 16) + SourceIndex(0) @@ -4135,9 +4255,9 @@ +2 > + >} 3 > ; --1 >Emitted(125, 1) Source(211, 1) + SourceIndex(0) --2 >Emitted(125, 2) Source(211, 2) + SourceIndex(0) --3 >Emitted(125, 3) Source(211, 3) + SourceIndex(0) +-1 >Emitted(129, 1) Source(211, 1) + SourceIndex(0) +-2 >Emitted(129, 2) Source(211, 2) + SourceIndex(0) +-3 >Emitted(129, 3) Source(211, 3) + SourceIndex(0) +1 >Emitted(124, 1) Source(210, 48) + SourceIndex(0) +2 >Emitted(124, 2) Source(211, 2) + SourceIndex(0) +3 >Emitted(124, 3) Source(211, 3) + SourceIndex(0) @@ -4148,11 +4268,11 @@ 3 > . 4 > prototype 5 > = --1->Emitted(126, 1) Source(213, 1) + SourceIndex(0) --2 >Emitted(126, 6) Source(213, 6) + SourceIndex(0) --3 >Emitted(126, 7) Source(213, 7) + SourceIndex(0) --4 >Emitted(126, 16) Source(213, 16) + SourceIndex(0) --5 >Emitted(126, 19) Source(213, 19) + SourceIndex(0) +-1->Emitted(130, 1) Source(213, 1) + SourceIndex(0) +-2 >Emitted(130, 6) Source(213, 6) + SourceIndex(0) +-3 >Emitted(130, 7) Source(213, 7) + SourceIndex(0) +-4 >Emitted(130, 16) Source(213, 16) + SourceIndex(0) +-5 >Emitted(130, 19) Source(213, 19) + SourceIndex(0) +1->Emitted(125, 1) Source(213, 1) + SourceIndex(0) +2 >Emitted(125, 6) Source(213, 6) + SourceIndex(0) +3 >Emitted(125, 7) Source(213, 7) + SourceIndex(0) @@ -4165,10 +4285,10 @@ 2 > x 3 > : 4 > 0 --1 >Emitted(127, 5) Source(214, 5) + SourceIndex(0) --2 >Emitted(127, 6) Source(214, 6) + SourceIndex(0) --3 >Emitted(127, 8) Source(214, 8) + SourceIndex(0) --4 >Emitted(127, 9) Source(214, 9) + SourceIndex(0) +-1 >Emitted(131, 5) Source(214, 5) + SourceIndex(0) +-2 >Emitted(131, 6) Source(214, 6) + SourceIndex(0) +-3 >Emitted(131, 8) Source(214, 8) + SourceIndex(0) +-4 >Emitted(131, 9) Source(214, 9) + SourceIndex(0) +1 >Emitted(126, 5) Source(214, 5) + SourceIndex(0) +2 >Emitted(126, 6) Source(214, 6) + SourceIndex(0) +3 >Emitted(126, 8) Source(214, 8) + SourceIndex(0) @@ -4180,10 +4300,10 @@ 2 > y 3 > : 4 > 0 --1->Emitted(128, 5) Source(215, 5) + SourceIndex(0) --2 >Emitted(128, 6) Source(215, 6) + SourceIndex(0) --3 >Emitted(128, 8) Source(215, 8) + SourceIndex(0) --4 >Emitted(128, 9) Source(215, 9) + SourceIndex(0) +-1->Emitted(132, 5) Source(215, 5) + SourceIndex(0) +-2 >Emitted(132, 6) Source(215, 6) + SourceIndex(0) +-3 >Emitted(132, 8) Source(215, 8) + SourceIndex(0) +-4 >Emitted(132, 9) Source(215, 9) + SourceIndex(0) +1->Emitted(127, 5) Source(215, 5) + SourceIndex(0) +2 >Emitted(127, 6) Source(215, 6) + SourceIndex(0) +3 >Emitted(127, 8) Source(215, 8) + SourceIndex(0) @@ -4205,13 +4325,13 @@ 5 > dx 6 > , 7 > dy --1->Emitted(129, 5) Source(216, 5) + SourceIndex(0) --2 >Emitted(129, 8) Source(216, 8) + SourceIndex(0) --3 >Emitted(129, 10) Source(216, 10) + SourceIndex(0) --4 >Emitted(129, 20) Source(216, 19) + SourceIndex(0) --5 >Emitted(129, 22) Source(216, 21) + SourceIndex(0) --6 >Emitted(129, 24) Source(216, 23) + SourceIndex(0) --7 >Emitted(129, 26) Source(216, 25) + SourceIndex(0) +-1->Emitted(133, 5) Source(216, 5) + SourceIndex(0) +-2 >Emitted(133, 8) Source(216, 8) + SourceIndex(0) +-3 >Emitted(133, 10) Source(216, 10) + SourceIndex(0) +-4 >Emitted(133, 20) Source(216, 19) + SourceIndex(0) +-5 >Emitted(133, 22) Source(216, 21) + SourceIndex(0) +-6 >Emitted(133, 24) Source(216, 23) + SourceIndex(0) +-7 >Emitted(133, 26) Source(216, 25) + SourceIndex(0) +8 > ) +1->Emitted(128, 5) Source(216, 5) + SourceIndex(0) +2 >Emitted(128, 8) Source(216, 8) + SourceIndex(0) @@ -4237,24 +4357,24 @@ 16> dy 17> ) 18> ; --1->Emitted(130, 9) Source(217, 9) + SourceIndex(0) --2 >Emitted(130, 16) Source(217, 16) + SourceIndex(0) --3 >Emitted(130, 20) Source(217, 20) + SourceIndex(0) --4 >Emitted(130, 25) Source(217, 25) + SourceIndex(0) --5 >Emitted(130, 26) Source(217, 26) + SourceIndex(0) --6 >Emitted(130, 30) Source(217, 30) + SourceIndex(0) --7 >Emitted(130, 31) Source(217, 31) + SourceIndex(0) --8 >Emitted(130, 32) Source(217, 32) + SourceIndex(0) --9 >Emitted(130, 35) Source(217, 35) + SourceIndex(0) --10>Emitted(130, 37) Source(217, 37) + SourceIndex(0) --11>Emitted(130, 39) Source(217, 39) + SourceIndex(0) --12>Emitted(130, 43) Source(217, 43) + SourceIndex(0) --13>Emitted(130, 44) Source(217, 44) + SourceIndex(0) --14>Emitted(130, 45) Source(217, 45) + SourceIndex(0) --15>Emitted(130, 48) Source(217, 48) + SourceIndex(0) --16>Emitted(130, 50) Source(217, 50) + SourceIndex(0) --17>Emitted(130, 51) Source(217, 51) + SourceIndex(0) --18>Emitted(130, 52) Source(217, 52) + SourceIndex(0) +-1->Emitted(134, 9) Source(217, 9) + SourceIndex(0) +-2 >Emitted(134, 16) Source(217, 16) + SourceIndex(0) +-3 >Emitted(134, 20) Source(217, 20) + SourceIndex(0) +-4 >Emitted(134, 25) Source(217, 25) + SourceIndex(0) +-5 >Emitted(134, 26) Source(217, 26) + SourceIndex(0) +-6 >Emitted(134, 30) Source(217, 30) + SourceIndex(0) +-7 >Emitted(134, 31) Source(217, 31) + SourceIndex(0) +-8 >Emitted(134, 32) Source(217, 32) + SourceIndex(0) +-9 >Emitted(134, 35) Source(217, 35) + SourceIndex(0) +-10>Emitted(134, 37) Source(217, 37) + SourceIndex(0) +-11>Emitted(134, 39) Source(217, 39) + SourceIndex(0) +-12>Emitted(134, 43) Source(217, 43) + SourceIndex(0) +-13>Emitted(134, 44) Source(217, 44) + SourceIndex(0) +-14>Emitted(134, 45) Source(217, 45) + SourceIndex(0) +-15>Emitted(134, 48) Source(217, 48) + SourceIndex(0) +-16>Emitted(134, 50) Source(217, 50) + SourceIndex(0) +-17>Emitted(134, 51) Source(217, 51) + SourceIndex(0) +-18>Emitted(134, 52) Source(217, 52) + SourceIndex(0) +1->Emitted(129, 9) Source(217, 9) + SourceIndex(0) +2 >Emitted(129, 16) Source(217, 16) + SourceIndex(0) +3 >Emitted(129, 20) Source(217, 20) + SourceIndex(0) @@ -4280,8 +4400,8 @@ 1 > - > -2 > } --1 >Emitted(131, 5) Source(218, 5) + SourceIndex(0) --2 >Emitted(131, 6) Source(218, 6) + SourceIndex(0) +-1 >Emitted(135, 5) Source(218, 5) + SourceIndex(0) +-2 >Emitted(135, 6) Source(218, 6) + SourceIndex(0) +2 > + > } +1 >Emitted(130, 5) Source(217, 52) + SourceIndex(0) @@ -4293,8 +4413,8 @@ 1 > >} 2 > ; --1 >Emitted(132, 2) Source(219, 2) + SourceIndex(0) --2 >Emitted(132, 3) Source(219, 3) + SourceIndex(0) +-1 >Emitted(136, 2) Source(219, 2) + SourceIndex(0) +-2 >Emitted(136, 3) Source(219, 3) + SourceIndex(0) +1 >Emitted(131, 2) Source(219, 2) + SourceIndex(0) +2 >Emitted(131, 3) Source(219, 3) + SourceIndex(0) --- @@ -4304,12 +4424,12 @@ 4 > : B = 5 > { } 6 > ; --1->Emitted(133, 1) Source(223, 1) + SourceIndex(0) --2 >Emitted(133, 5) Source(223, 5) + SourceIndex(0) --3 >Emitted(133, 6) Source(223, 6) + SourceIndex(0) --4 >Emitted(133, 9) Source(223, 12) + SourceIndex(0) --5 >Emitted(133, 11) Source(223, 15) + SourceIndex(0) --6 >Emitted(133, 12) Source(223, 16) + SourceIndex(0) +-1->Emitted(137, 1) Source(223, 1) + SourceIndex(0) +-2 >Emitted(137, 5) Source(223, 5) + SourceIndex(0) +-3 >Emitted(137, 6) Source(223, 6) + SourceIndex(0) +-4 >Emitted(137, 9) Source(223, 12) + SourceIndex(0) +-5 >Emitted(137, 11) Source(223, 15) + SourceIndex(0) +-6 >Emitted(137, 12) Source(223, 16) + SourceIndex(0) +1->Emitted(132, 1) Source(223, 1) + SourceIndex(0) +2 >Emitted(132, 5) Source(223, 5) + SourceIndex(0) +3 >Emitted(132, 6) Source(223, 6) + SourceIndex(0) diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.symbols b/testdata/baselines/reference/submodule/compiler/contextualTyping.symbols index e334194c31..225a450bcd 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.symbols +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.symbols @@ -44,7 +44,7 @@ class C1T5 { } // CONTEXT: Module property declaration -module C2T5 { +namespace C2T5 { >C2T5 : Symbol(C2T5, Decl(contextualTyping.ts, 17, 1)) export var foo: (i: number, s: string) => number = function(i) { @@ -186,7 +186,7 @@ class C4T5 { } // CONTEXT: Module property assignment -module C5T5 { +namespace C5T5 { >C5T5 : Symbol(C5T5, Decl(contextualTyping.ts, 62, 1)) export var foo: (i: number, s: string) => string; diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping.types b/testdata/baselines/reference/submodule/compiler/contextualTyping.types index 435a3ccce2..ddc1791814 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping.types +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping.types @@ -40,7 +40,7 @@ class C1T5 { } // CONTEXT: Module property declaration -module C2T5 { +namespace C2T5 { >C2T5 : typeof C2T5 export var foo: (i: number, s: string) => number = function(i) { @@ -216,7 +216,7 @@ class C4T5 { } // CONTEXT: Module property assignment -module C5T5 { +namespace C5T5 { >C5T5 : typeof C5T5 export var foo: (i: number, s: string) => string; diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping10.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping10.js.diff index 9a16726e0b..cb15be248a 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping10.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping10.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping10.js +++ new.contextualTyping10.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;}[] = [{id:1}, {id:2}]; } //// [contextualTyping10.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = [{ id: 1 }, { id: 2 }]; - } +- return foo; +-}()); ++class foo { + bar = [{ id: 1 }, { id: 2 }]; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping11.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping11.js.diff index 1e77dfaf13..0a197ff653 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping11.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping11.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping11.js +++ new.contextualTyping11.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;}[] = [({})]; } //// [contextualTyping11.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = [({})]; - } +- return foo; +-}()); ++class foo { + bar = [({})]; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping12.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping12.js.diff index 4e86da878c..773d133b47 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping12.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping12.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping12.js +++ new.contextualTyping12.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;}[] = [{id:1}, {id:2, name:"foo"}]; } //// [contextualTyping12.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = [{ id: 1 }, { id: 2, name: "foo" }]; - } +- return foo; +-}()); ++class foo { + bar = [{ id: 1 }, { id: 2, name: "foo" }]; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping14.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping14.js.diff index 29d7924181..a3fed537ea 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping14.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping14.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping14.js +++ new.contextualTyping14.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:(a:number)=>number = function(a){return a}; } //// [contextualTyping14.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = function (a) { return a; }; - } +- return foo; +-}()); ++class foo { + bar = function (a) { return a; }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping15.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping15.js.diff index f9e1ef0439..231c34f518 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping15.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping15.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping15.js +++ new.contextualTyping15.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar: { (): number; (i: number): number; } = function() { return 1 }; } //// [contextualTyping15.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = function () { return 1; }; - } +- return foo; +-}()); ++class foo { + bar = function () { return 1; }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping3.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping3.js.diff index 3e23b8e5b4..6f8860a12a 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping3.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping3.js +++ new.contextualTyping3.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;} = {id:5}; } //// [contextualTyping3.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = { id: 5 }; - } +- return foo; +-}()); ++class foo { + bar = { id: 5 }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping4.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping4.js.diff index 86c9a15678..d09b9fac7c 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping4.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping4.js +++ new.contextualTyping4.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;} = {id:5, name:"foo"}; } //// [contextualTyping4.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = { id: 5, name: "foo" }; - } +- return foo; +-}()); ++class foo { + bar = { id: 5, name: "foo" }; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTyping5.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTyping5.js.diff index dc4df28bdf..070a6223b1 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTyping5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTyping5.js.diff @@ -1,11 +1,15 @@ --- old.contextualTyping5.js +++ new.contextualTyping5.js -@@= skipped -4, +4 lines =@@ +@@= skipped -3, +3 lines =@@ + class foo { public bar:{id:number;} = { }; } //// [contextualTyping5.js] - class foo { -- constructor() { +-var foo = /** @class */ (function () { +- function foo() { - this.bar = {}; - } +- return foo; +-}()); ++class foo { + bar = {}; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingArrayDestructuringWithDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingArrayDestructuringWithDefaults.js.diff new file mode 100644 index 0000000000..3e10b8ad5b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingArrayDestructuringWithDefaults.js.diff @@ -0,0 +1,18 @@ +--- old.contextualTypingArrayDestructuringWithDefaults.js ++++ new.contextualTypingArrayDestructuringWithDefaults.js +@@= skipped -13, +13 lines =@@ + + + //// [contextualTypingArrayDestructuringWithDefaults.js] +-var _a = [][0], c0 = _a === void 0 ? { a: "a" } : _a; +-var _b = [1], x1 = _b[0], _c = _b[1], c1 = _c === void 0 ? { a: "a" } : _c; +-var _d = [][0], c_ = _d === void 0 ? { a: "a" } : _d; ++let [c0 = { a: "a" }] = []; ++let [x1, c1 = { a: "a" }] = [1]; ++let [c_ = { a: "a" }] = []; + // not a great example, expect an error + function foo() { +- var _a = [1].length, length = _a === void 0 ? { a: 1 } : _a; ++ let { length = { a: 1 } } = [1]; + return length; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingArrayOfLambdas.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingArrayOfLambdas.js.diff index d678cc14fc..c1f4490e52 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypingArrayOfLambdas.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingArrayOfLambdas.js.diff @@ -1,15 +1,51 @@ --- old.contextualTypingArrayOfLambdas.js +++ new.contextualTypingArrayOfLambdas.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [contextualTypingArrayOfLambdas.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(A)); +-var xs = [function (x) { }, function (x) { }, function (x) { }]; ++class A { + foo; - } - class B extends A { ++} ++class B extends A { + bar; - } - class C extends A { ++} ++class C extends A { + baz; - } - var xs = [(x) => { }, (x) => { }, (x) => { }]; \ No newline at end of file ++} ++var xs = [(x) => { }, (x) => { }, (x) => { }]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction.js.diff new file mode 100644 index 0000000000..14aaef8e81 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypingFunctionReturningFunction.js ++++ new.contextualTypingFunctionReturningFunction.js +@@= skipped -15, +15 lines =@@ + + //// [contextualTypingFunctionReturningFunction.js] + f({ +- a: function (s) { }, +- b: function () { return function (n) { }; }, ++ a: s => { }, ++ b: () => n => { }, + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction2.js.diff new file mode 100644 index 0000000000..35135f3e26 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingFunctionReturningFunction2.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingFunctionReturningFunction2.js ++++ new.contextualTypingFunctionReturningFunction2.js +@@= skipped -7, +7 lines =@@ + + + //// [contextualTypingFunctionReturningFunction2.js] +-f(function () { return function (n) { return n; }; }); ++f(() => n => n); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfAccessors.js.diff new file mode 100644 index 0000000000..f3259d402d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfAccessors.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypingOfAccessors.js ++++ new.contextualTypingOfAccessors.js +@@= skipped -19, +19 lines =@@ + var x; + x = { + get foo() { +- return function (n) { return n; }; ++ return (n) => n; + }, + set foo(x) { } + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfArrayLiterals1.symbols.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfArrayLiterals1.symbols.diff new file mode 100644 index 0000000000..4a6b931bf7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfArrayLiterals1.symbols.diff @@ -0,0 +1,18 @@ +--- old.contextualTypingOfArrayLiterals1.symbols ++++ new.contextualTypingOfArrayLiterals1.symbols +@@= skipped -5, +5 lines =@@ + + [x: number]: Date; + >x : Symbol(x, Decl(contextualTypingOfArrayLiterals1.ts, 1, 4)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } + + var x3: I = [new Date(), 1]; + >x3 : Symbol(x3, Decl(contextualTypingOfArrayLiterals1.ts, 4, 3)) + >I : Symbol(I, Decl(contextualTypingOfArrayLiterals1.ts, 0, 0)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var r2 = x3[1]; + >r2 : Symbol(r2, Decl(contextualTypingOfArrayLiterals1.ts, 5, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression.js.diff index de1352b5a0..92e7c3672a 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression.js.diff @@ -1,15 +1,53 @@ --- old.contextualTypingOfConditionalExpression.js +++ new.contextualTypingOfConditionalExpression.js -@@= skipped -18, +18 lines =@@ +@@= skipped -16, +16 lines =@@ + + //// [contextualTypingOfConditionalExpression.js] - var x = true ? (a) => a.toExponential() : (b) => b.toFixed(); - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var x = true ? function (a) { return a.toExponential(); } : function (b) { return b.toFixed(); }; +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(A)); +-var x2 = true ? function (a) { return a.foo; } : function (b) { return b.foo; }; ++var x = true ? (a) => a.toExponential() : (b) => b.toFixed(); ++class A { + foo; - } - class B extends A { ++} ++class B extends A { + bar; - } - class C extends A { ++} ++class C extends A { + baz; - } - var x2 = true ? (a) => a.foo : (b) => b.foo; \ No newline at end of file ++} ++var x2 = true ? (a) => a.foo : (b) => b.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression2.js.diff index b1fc3da969..e58b26d41e 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfConditionalExpression2.js.diff @@ -1,15 +1,51 @@ --- old.contextualTypingOfConditionalExpression2.js +++ new.contextualTypingOfConditionalExpression2.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [contextualTypingOfConditionalExpression2.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(A)); +-var x2 = true ? function (a) { return a.foo; } : function (b) { }; ++class A { + foo; - } - class B extends A { ++} ++class B extends A { + bar; - } - class C extends A { ++} ++class C extends A { + baz; - } - var x2 = true ? (a) => a.foo : (b) => { }; \ No newline at end of file ++} ++var x2 = true ? (a) => a.foo : (b) => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.js.diff new file mode 100644 index 0000000000..bf746fc3c1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypingOfGenericFunctionTypedArguments1.js ++++ new.contextualTypingOfGenericFunctionTypedArguments1.js +@@= skipped -23, +23 lines =@@ + var c2; + var _; + // errors on all 3 lines, bug was that r5 was the only line with errors +-var f = function (x) { return x.toFixed(); }; ++var f = (x) => { return x.toFixed(); }; + var r5 = _.forEach(c2, f); +-var r6 = _.forEach(c2, function (x) { return x.toFixed(); }); ++var r6 = _.forEach(c2, (x) => { return x.toFixed(); }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.symbols.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.symbols.diff new file mode 100644 index 0000000000..ad9ba0c3d6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfGenericFunctionTypedArguments1.symbols.diff @@ -0,0 +1,11 @@ +--- old.contextualTypingOfGenericFunctionTypedArguments1.symbols ++++ new.contextualTypingOfGenericFunctionTypedArguments1.symbols +@@= skipped -30, +30 lines =@@ + >f : Symbol(f, Decl(contextualTypingOfGenericFunctionTypedArguments1.ts, 7, 32)) + >x : Symbol(x, Decl(contextualTypingOfGenericFunctionTypedArguments1.ts, 7, 37)) + >T : Symbol(T, Decl(contextualTypingOfGenericFunctionTypedArguments1.ts, 7, 12)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } + + var c2: Collection; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaReturnExpression.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaReturnExpression.js.diff new file mode 100644 index 0000000000..b8af392aeb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaReturnExpression.js.diff @@ -0,0 +1,10 @@ +--- old.contextualTypingOfLambdaReturnExpression.js ++++ new.contextualTypingOfLambdaReturnExpression.js +@@= skipped -9, +9 lines =@@ + + //// [contextualTypingOfLambdaReturnExpression.js] + function callb(a) { } +-callb(function (a) { return a.length; }); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type +-callb(function (a) { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body ++callb((a) => a.length); // Ok, we choose the second overload because the first one gave us an error when trying to resolve the lambda return type ++callb((a) => { a.length; }); // Error, we picked the first overload and errored when type checking the lambda body \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures.js.diff new file mode 100644 index 0000000000..9bf1f99c73 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingOfLambdaWithMultipleSignatures.js ++++ new.contextualTypingOfLambdaWithMultipleSignatures.js +@@= skipped -10, +10 lines =@@ + + //// [contextualTypingOfLambdaWithMultipleSignatures.js] + var foo; +-foo.getFoo = function (bar) { }; ++foo.getFoo = bar => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures2.js.diff new file mode 100644 index 0000000000..ed497757b6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfLambdaWithMultipleSignatures2.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingOfLambdaWithMultipleSignatures2.js ++++ new.contextualTypingOfLambdaWithMultipleSignatures2.js +@@= skipped -9, +9 lines =@@ + + //// [contextualTypingOfLambdaWithMultipleSignatures2.js] + var f; +-f = function (a) { return a.asdf; }; ++f = (a) => { return a.asdf; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfObjectLiterals2.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfObjectLiterals2.js.diff new file mode 100644 index 0000000000..ad996d1ced --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfObjectLiterals2.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingOfObjectLiterals2.js ++++ new.contextualTypingOfObjectLiterals2.js +@@= skipped -8, +8 lines =@@ + + //// [contextualTypingOfObjectLiterals2.js] + function f2(args) { } +-f2({ foo: function (s) { return s.hmm; } }); // 's' should be 'string', so this should be an error ++f2({ foo: s => s.hmm }); // 's' should be 'string', so this should be an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfOptionalMembers.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfOptionalMembers.js.diff new file mode 100644 index 0000000000..4dc9dff73b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfOptionalMembers.js.diff @@ -0,0 +1,38 @@ +--- old.contextualTypingOfOptionalMembers.js ++++ new.contextualTypingOfOptionalMembers.js +@@= skipped -79, +79 lines =@@ + app({ + state: 100, + actions: { +- foo: function (s) { return s; } // Should be typed number => number ++ foo: s => s // Should be typed number => number + }, +- view: function (s, a) { return undefined; }, ++ view: (s, a) => undefined, + }); +-var y = foo({ +- bar: function (x) { ++const y = foo({ ++ bar(x) { + } + }); + app2({ + state: 100, + actions: { +- foo: function (s) { return s; } // Should be typed number => number ++ foo: s => s // Should be typed number => number + }, +- view: function (s, a) { return undefined; }, ++ view: (s, a) => undefined, + }); + app3({ + state: 100, + actions: [ +- function (s) { return s; } // Should be typed number => number ++ s => s // Should be typed number => number + ], +- view: function (s, a) { return undefined; }, ++ view: (s, a) => undefined, + }); +-var a = ; // TODO: should be number => number, but JSX resolution is missing an inferential pass ++const a = s}/>; // TODO: should be number => number, but JSX resolution is missing an inferential pass \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingOfTooShortOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingOfTooShortOverloads.js.diff new file mode 100644 index 0000000000..70227f3597 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingOfTooShortOverloads.js.diff @@ -0,0 +1,13 @@ +--- old.contextualTypingOfTooShortOverloads.js ++++ new.contextualTypingOfTooShortOverloads.js +@@= skipped -54, +54 lines =@@ + //// [contextualTypingOfTooShortOverloads.js] + // small repro from #11875 + var use; +-use(function (req, res) { }); ++use((req, res) => { }); + // larger repro from #11875 +-var app; +-app.use(function (err, req, res, next) { return; }); ++let app; ++app.use((err, req, res, next) => { return; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingReturnStatementWithReturnTypeAnnotation.types.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingReturnStatementWithReturnTypeAnnotation.types.diff index 56f45193e8..f8b07c8328 100644 --- a/testdata/baselines/reference/submodule/compiler/contextualTypingReturnStatementWithReturnTypeAnnotation.types.diff +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingReturnStatementWithReturnTypeAnnotation.types.diff @@ -8,7 +8,11 @@ +>getPropFromRaw : (prop: "exclude" | "files" | "include" | "references", validateElement: (value: unknown) => boolean, elementTypeName: string) => PropOfRaw prop: "files" | "include" | "exclude" | "references", - >prop : "exclude" | "files" | "include" | "references" +->prop : "files" | "include" | "exclude" | "references" ++>prop : "exclude" | "files" | "include" | "references" + + validateElement: (value: unknown) => boolean, + >validateElement : (value: unknown) => boolean @@= skipped -15, +15 lines =@@ ): PropOfRaw; @@ -17,13 +21,16 @@ +>getSpecsFromRaw : (prop: "exclude" | "files" | "include") => PropOfRaw prop: "files" | "include" | "exclude" - >prop : "exclude" | "files" | "include" -@@= skipped -8, +8 lines =@@ +->prop : "files" | "include" | "exclude" ++>prop : "exclude" | "files" | "include" + ): PropOfRaw { return getPropFromRaw(prop, isString, "string"); >getPropFromRaw(prop, isString, "string") : PropOfRaw ->getPropFromRaw : (prop: "files" | "include" | "exclude" | "references", validateElement: (value: unknown) => boolean, elementTypeName: string) => PropOfRaw +->prop : "files" | "include" | "exclude" +>getPropFromRaw : (prop: "exclude" | "files" | "include" | "references", validateElement: (value: unknown) => boolean, elementTypeName: string) => PropOfRaw - >prop : "exclude" | "files" | "include" ++>prop : "exclude" | "files" | "include" >isString : (text: unknown) => text is string - >"string" : "string" \ No newline at end of file + >"string" : "string" + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingTwoInstancesOfSameTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingTwoInstancesOfSameTypeParameter.js.diff new file mode 100644 index 0000000000..320131ec1f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingTwoInstancesOfSameTypeParameter.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingTwoInstancesOfSameTypeParameter.js ++++ new.contextualTypingTwoInstancesOfSameTypeParameter.js +@@= skipped -9, +9 lines =@@ + function f6(x) { + return null; + } +-f6(function (x) { return f6(function (y) { return x = y; }); }); ++f6(x => f6(y => x = y)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingWithFixedTypeParameters1.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingWithFixedTypeParameters1.js.diff new file mode 100644 index 0000000000..c24026a713 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingWithFixedTypeParameters1.js.diff @@ -0,0 +1,10 @@ +--- old.contextualTypingWithFixedTypeParameters1.js ++++ new.contextualTypingWithFixedTypeParameters1.js +@@= skipped -6, +6 lines =@@ + + //// [contextualTypingWithFixedTypeParameters1.js] + var f10; +-f10('', function () { return function (a) { return a.foo; }; }, ''); // a is "" +-var r9 = f10('', function () { return (function (a) { return a.foo; }); }, 1); // error ++f10('', () => a => a.foo, ''); // a is "" ++var r9 = f10('', () => (a => a.foo), 1); // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericAndNonGenericSignature.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericAndNonGenericSignature.js.diff new file mode 100644 index 0000000000..28c6347ec2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericAndNonGenericSignature.js.diff @@ -0,0 +1,11 @@ +--- old.contextualTypingWithGenericAndNonGenericSignature.js ++++ new.contextualTypingWithGenericAndNonGenericSignature.js +@@= skipped -20, +20 lines =@@ + //// [contextualTypingWithGenericAndNonGenericSignature.js] + //• If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. + var f2; +-f2 = function (x, y) { return x; }; ++f2 = (x, y) => { return x; }; + var f3; +-f3 = function (x, y) { return x; }; ++f3 = (x, y) => { return x; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericSignature.js.diff b/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericSignature.js.diff new file mode 100644 index 0000000000..7326bd4e3e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextualTypingWithGenericSignature.js.diff @@ -0,0 +1,8 @@ +--- old.contextualTypingWithGenericSignature.js ++++ new.contextualTypingWithGenericSignature.js +@@= skipped -11, +11 lines =@@ + //// [contextualTypingWithGenericSignature.js] + // If e is a FunctionExpression or ArrowFunctionExpression with no type parameters and no parameter or return type annotations, and T is a function type with EXACTLY ONE non - generic call signature, then any inferences made for type parameters referenced by the parameters of T’s call signature are fixed(section 4.12.2) and e is processed with the contextual type T, as described in section 4.9.3. + var f2; +-f2 = function (x, y) { return x; }; ++f2 = (x, y) => { return x; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedBooleanLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedBooleanLiterals.js.diff index 65bad0af4d..e5662f1952 100644 --- a/testdata/baselines/reference/submodule/compiler/contextuallyTypedBooleanLiterals.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedBooleanLiterals.js.diff @@ -6,6 +6,16 @@ //// [contextuallyTypedBooleanLiterals.js] -"use strict"; -// Repro from #48363 - const bn1 = box(0); // Box - const bn2 = box(0); // Ok - const bb1 = box(false); // Box \ No newline at end of file +-var bn1 = box(0); // Box +-var bn2 = box(0); // Ok +-var bb1 = box(false); // Box +-var bb2 = box(false); // Error, box not assignable to Box +-var x = observable(false); ++const bn1 = box(0); // Box ++const bn2 = box(0); // Ok ++const bb1 = box(false); // Box ++const bb2 = box(false); // Error, box not assignable to Box ++const x = observable(false); + + + //// [contextuallyTypedBooleanLiterals.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedByDiscriminableUnion.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedByDiscriminableUnion.js.diff new file mode 100644 index 0000000000..61db49d6eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedByDiscriminableUnion.js.diff @@ -0,0 +1,21 @@ +--- old.contextuallyTypedByDiscriminableUnion.js ++++ new.contextuallyTypedByDiscriminableUnion.js +@@= skipped -45, +45 lines =@@ + } + invoke({ + kind: "a", +- method: function (a) { ++ method(a) { + return +a; + } + }); +-var kind = "a"; ++const kind = "a"; + invoke({ +- kind: kind, +- method: function (a) { ++ kind, ++ method(a) { + return +a; + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedGenericAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedGenericAssignment.js.diff new file mode 100644 index 0000000000..4ff773227d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedGenericAssignment.js.diff @@ -0,0 +1,8 @@ +--- old.contextuallyTypedGenericAssignment.js ++++ new.contextuallyTypedGenericAssignment.js +@@= skipped -8, +8 lines =@@ + + //// [contextuallyTypedGenericAssignment.js] + function foo(arg) { } +-foo(function (t, u) { return t.a; }); ++foo((t, u) => t.a); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedJsxAttribute.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedJsxAttribute.js.diff new file mode 100644 index 0000000000..5b212b0fc6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedJsxAttribute.js.diff @@ -0,0 +1,15 @@ +--- old.contextuallyTypedJsxAttribute.js ++++ new.contextuallyTypedJsxAttribute.js +@@= skipped -25, +25 lines =@@ + + + //// [index.jsx] +-; ++ { }}/>; + Test({ + as: "bar", +- callback: function (value) { }, ++ callback: (value) => { }, + }); +-; ++ { }}/>; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.js.diff new file mode 100644 index 0000000000..59b72d9c27 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.js.diff @@ -0,0 +1,192 @@ +--- old.contextuallyTypedParametersWithInitializers1.js ++++ new.contextuallyTypedParametersWithInitializers1.js +@@= skipped -89, +89 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.executeSomething = executeSomething; +-var f10 = function (_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}; +-var f11 = id1(function (_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}); +-var f12 = id2(function (_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}); +-var f13 = id3(function (_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}); +-var f14 = id4(function (_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}); +-var f20 = function (foo) { +- if (foo === void 0) { foo = 42; } +- return foo; +-}; +-var f21 = id1(function (foo) { +- if (foo === void 0) { foo = 42; } +- return foo; +-}); +-var f22 = id2(function (foo) { +- if (foo === void 0) { foo = 42; } +- return foo; +-}); +-var f25 = id5(function (foo) { +- if (foo === void 0) { foo = 42; } +- return foo; +-}); +-var f1 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // number +-var f2 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // number +-var f3 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // number +-var f4 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // number +-var f5 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // any +-var f6 = function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}; // number +-var f7 = function (x) { return 0; }; // Implicit any error +-var f8 = function () { +- var x = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- x[_i] = arguments[_i]; +- } +- return 0; +-}; // [] +-g1(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // number +-g2(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // number +-g3(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // number +-g4(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // number +-g5(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // any +-g6(function (x) { +- if (x === void 0) { x = 1; } +- return 0; +-}); // number +-g6(function (x) { return 0; }); // Implicit any error +-g6(function () { +- var x = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- x[_i] = arguments[_i]; +- } +- return 0; +-}); // [] ++const f10 = function ({ foo = 42 }) { return foo; }; ++const f11 = id1(function ({ foo = 42 }) { return foo; }); ++const f12 = id2(function ({ foo = 42 }) { return foo; }); ++const f13 = id3(function ({ foo = 42 }) { return foo; }); ++const f14 = id4(function ({ foo = 42 }) { return foo; }); ++const f20 = function (foo = 42) { return foo; }; ++const f21 = id1(function (foo = 42) { return foo; }); ++const f22 = id2(function (foo = 42) { return foo; }); ++const f25 = id5(function (foo = 42) { return foo; }); ++const f1 = (x = 1) => 0; // number ++const f2 = (x = 1) => 0; // number ++const f3 = (x = 1) => 0; // number ++const f4 = (x = 1) => 0; // number ++const f5 = (x = 1) => 0; // any ++const f6 = (x = 1) => 0; // number ++const f7 = (x) => 0; // Implicit any error ++const f8 = (...x) => 0; // [] ++g1((x = 1) => 0); // number ++g2((x = 1) => 0); // number ++g3((x = 1) => 0); // number ++g4((x = 1) => 0); // number ++g5((x = 1) => 0); // any ++g6((x = 1) => 0); // number ++g6((x) => 0); // Implicit any error ++g6((...x) => 0); // [] + // Repro from #28816 + function id(input) { return input; } +-function getFoo(_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-} +-var newGetFoo = id(getFoo); +-var newGetFoo2 = id(function getFoo(_a) { +- var _b = _a.foo, foo = _b === void 0 ? 42 : _b; +- return foo; +-}); +-function add(x, y) { +- if (y === void 0) { y = 0; } +- return x + y; +-} +-var memoizedAdd = memoize(add); +-var add2 = function (x, y) { +- if (y === void 0) { y = 0; } +- return x + y; +-}; +-var memoizedAdd2 = memoize(add2); +-var memoizedAdd3 = memoize(function (x, y) { +- if (y === void 0) { y = 0; } +- return x + y; +-}); ++function getFoo({ foo = 42 }) { ++ return foo; ++} ++const newGetFoo = id(getFoo); ++const newGetFoo2 = id(function getFoo({ foo = 42 }) { ++ return foo; ++}); ++function add(x, y = 0) { ++ return x + y; ++} ++const memoizedAdd = memoize(add); ++const add2 = (x, y = 0) => x + y; ++const memoizedAdd2 = memoize(add2); ++const memoizedAdd3 = memoize((x, y = 0) => x + y); + function executeSomething() { +- return execute(function (root, debug) { +- if (debug === void 0) { debug = true; } ++ return execute((root, debug = true) => { + if (debug) { + root.innerHTML = ''; + } + }); + } +-var fz1 = function (debug) { +- if (debug === void 0) { debug = true; } +- return false; +-}; +-var fz2 = function (debug) { +- if (debug === void 0) { debug = true; } +- return false; +-}; ++const fz1 = (debug = true) => false; ++const fz2 = (debug = true) => false; + + + //// [contextuallyTypedParametersWithInitializers1.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.symbols.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.symbols.diff new file mode 100644 index 0000000000..bc0011d2e3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypedParametersWithInitializers1.symbols.diff @@ -0,0 +1,47 @@ +--- old.contextuallyTypedParametersWithInitializers1.symbols ++++ new.contextuallyTypedParametersWithInitializers1.symbols +@@= skipped -107, +107 lines =@@ + + const f4: Function = (x = 1) => 0; // number + >f4 : Symbol(f4, Decl(contextuallyTypedParametersWithInitializers1.ts, 20, 5)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >x : Symbol(x, Decl(contextuallyTypedParametersWithInitializers1.ts, 20, 22)) + + const f5: (...args: any[]) => any = (x = 1) => 0; // any +@@= skipped -44, +44 lines =@@ + declare function g4(x: T): T; + >g4 : Symbol(g4, Decl(contextuallyTypedParametersWithInitializers1.ts, 28, 48)) + >T : Symbol(T, Decl(contextuallyTypedParametersWithInitializers1.ts, 29, 20)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >x : Symbol(x, Decl(contextuallyTypedParametersWithInitializers1.ts, 29, 40)) + >T : Symbol(T, Decl(contextuallyTypedParametersWithInitializers1.ts, 29, 20)) + >T : Symbol(T, Decl(contextuallyTypedParametersWithInitializers1.ts, 29, 20)) +@@= skipped -91, +91 lines =@@ + declare function memoize(func: F): F; + >memoize : Symbol(memoize, Decl(contextuallyTypedParametersWithInitializers1.ts, 53, 3)) + >F : Symbol(F, Decl(contextuallyTypedParametersWithInitializers1.ts, 57, 25)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >func : Symbol(func, Decl(contextuallyTypedParametersWithInitializers1.ts, 57, 45)) + >F : Symbol(F, Decl(contextuallyTypedParametersWithInitializers1.ts, 57, 25)) + >F : Symbol(F, Decl(contextuallyTypedParametersWithInitializers1.ts, 57, 25)) +@@= skipped -44, +44 lines =@@ + declare function execute(script: string | Function): Promise; + >execute : Symbol(execute, Decl(contextuallyTypedParametersWithInitializers1.ts, 67, 66)) + >script : Symbol(script, Decl(contextuallyTypedParametersWithInitializers1.ts, 71, 25)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + export function executeSomething() { + >executeSomething : Symbol(executeSomething, Decl(contextuallyTypedParametersWithInitializers1.ts, 71, 69)) +@@= skipped -29, +29 lines =@@ + + const fz2: Function = (debug = true) => false; + >fz2 : Symbol(fz2, Decl(contextuallyTypedParametersWithInitializers1.ts, 82, 5)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >debug : Symbol(debug, Decl(contextuallyTypedParametersWithInitializers1.ts, 82, 23)) diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator.js.diff new file mode 100644 index 0000000000..a7f5a991e4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator.js.diff @@ -0,0 +1,14 @@ +--- old.contextuallyTypingOrOperator.js ++++ new.contextuallyTypingOrOperator.js +@@= skipped -8, +8 lines =@@ + var v4 = (s: number) => 1 || function (s: string) { return s.length }; + + //// [contextuallyTypingOrOperator.js] +-var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; +-var v2 = function (s) { return s.length || function (s) { s.length; }; }; +-var v3 = function (s) { return s.length || function (s) { return 1; }; }; +-var v4 = function (s) { return 1 || function (s) { return s.length; }; }; ++var v = { a: s => s.length } || { a: s => 1 }; ++var v2 = (s) => s.length || function (s) { s.length; }; ++var v3 = (s) => s.length || function (s) { return 1; }; ++var v4 = (s) => 1 || function (s) { return s.length; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator2.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator2.js.diff new file mode 100644 index 0000000000..19909ec855 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypingOrOperator2.js.diff @@ -0,0 +1,10 @@ +--- old.contextuallyTypingOrOperator2.js ++++ new.contextuallyTypingOrOperator2.js +@@= skipped -5, +5 lines =@@ + var v2 = (s: string) => s.length || function (s) { s.aaa }; + + //// [contextuallyTypingOrOperator2.js] +-var v = { a: function (s) { return s.length; } } || { a: function (s) { return 1; } }; +-var v2 = function (s) { return s.length || function (s) { s.aaa; }; }; ++var v = { a: s => s.length } || { a: s => 1 }; ++var v2 = (s) => s.length || function (s) { s.aaa; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contextuallyTypingRestParameters.js.diff b/testdata/baselines/reference/submodule/compiler/contextuallyTypingRestParameters.js.diff new file mode 100644 index 0000000000..2d9e521d9c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/contextuallyTypingRestParameters.js.diff @@ -0,0 +1,15 @@ +--- old.contextuallyTypingRestParameters.js ++++ new.contextuallyTypingRestParameters.js +@@= skipped -9, +9 lines =@@ + }; + + //// [contextuallyTypingRestParameters.js] +-var x = function () { +- var y = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- y[_i] = arguments[_i]; +- } ++var x = function (... /*3*/y) { + var t = y; + var x2 = t; // This should be error + var x3 = t; // No error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/continueInLoopsWithCapturedBlockScopedBindings1.js.diff b/testdata/baselines/reference/submodule/compiler/continueInLoopsWithCapturedBlockScopedBindings1.js.diff new file mode 100644 index 0000000000..1d5879c6c3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/continueInLoopsWithCapturedBlockScopedBindings1.js.diff @@ -0,0 +1,23 @@ +--- old.continueInLoopsWithCapturedBlockScopedBindings1.js ++++ new.continueInLoopsWithCapturedBlockScopedBindings1.js +@@= skipped -15, +15 lines =@@ + + //// [continueInLoopsWithCapturedBlockScopedBindings1.js] + function foo() { +- var _loop_1 = function (i) { ++ for (const i of [0, 1]) { + if (i === 0) { +- return "continue"; ++ continue; + } + // Trigger non-simple-loop emit +- (function () { ++ (() => { + return i; + })(); +- }; +- for (var _i = 0, _a = [0, 1]; _i < _a.length; _i++) { +- var i = _a[_i]; +- _loop_1(i); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/continueNotInIterationStatement4.js.diff b/testdata/baselines/reference/submodule/compiler/continueNotInIterationStatement4.js.diff new file mode 100644 index 0000000000..78606dc109 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/continueNotInIterationStatement4.js.diff @@ -0,0 +1,11 @@ +--- old.continueNotInIterationStatement4.js ++++ new.continueNotInIterationStatement4.js +@@= skipped -10, +10 lines =@@ + + //// [continueNotInIterationStatement4.js] + TWO: while (true) { +- var x = function () { ++ var x = () => { + continue TWO; + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/contravariantInferenceAndTypeGuard.js.diff b/testdata/baselines/reference/submodule/compiler/contravariantInferenceAndTypeGuard.js.diff index 34ab385ad2..0e310ae4bc 100644 --- a/testdata/baselines/reference/submodule/compiler/contravariantInferenceAndTypeGuard.js.diff +++ b/testdata/baselines/reference/submodule/compiler/contravariantInferenceAndTypeGuard.js.diff @@ -5,6 +5,15 @@ //// [contravariantInferenceAndTypeGuard.js] -"use strict"; - const list2 = new List(); - const filter1 = list2.filter(function (item, node, list) { - this.b; // $ExpectType string \ No newline at end of file +-var list2 = new List(); +-var filter1 = list2.filter(function (item, node, list) { ++const list2 = new List(); ++const filter1 = list2.filter(function (item, node, list) { + this.b; // $ExpectType string + item; // $ExpectType Test | null + node; // $ExpectType ListItem + list; // $ExpectType List + return !!item; + }, { b: 'c' }); +-var x = filter1; // $ExpectType List ++const x = filter1; // $ExpectType List \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.js.diff index 0b0f8e4b9d..43e1c7b7be 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.js.diff @@ -7,4 +7,107 @@ -"use strict"; function useQuery() { return { - isSuccess: false, \ No newline at end of file + isSuccess: false, + data: undefined, + }; + } +-var _a = useQuery(), data1 = _a.data, isSuccess1 = _a.isSuccess; +-var _b = useQuery(), data2 = _b.data, isSuccess2 = _b.isSuccess; +-var _c = useQuery(), data3 = _c.data, isSuccess3 = _c.isSuccess; ++const { data: data1, isSuccess: isSuccess1 } = useQuery(); ++const { data: data2, isSuccess: isSuccess2 } = useQuery(); ++const { data: data3, isSuccess: isSuccess3 } = useQuery(); + if (isSuccess1 && isSuccess2 && isSuccess3) { + data1.toExponential(); // should ok + data2.toExponential(); // should ok + data3.toExponential(); // should ok + } +-var areSuccess = isSuccess1 && isSuccess2 && isSuccess3; ++const areSuccess = isSuccess1 && isSuccess2 && isSuccess3; + if (areSuccess) { + data1.toExponential(); // should ok + data2.toExponential(); // should ok + data3.toExponential(); // should ok + } + { +- var _d = useQuery(), data1_1 = _d.data, isSuccess1_1 = _d.isSuccess; +- var _e = useQuery(), data2_1 = _e.data, isSuccess2_1 = _e.isSuccess; +- var _f = useQuery(), data3_1 = _f.data, isSuccess3_1 = _f.isSuccess; +- var areSuccess_1 = isSuccess1_1 && isSuccess2_1 && isSuccess3_1; +- if (areSuccess_1) { +- data1_1.toExponential(); // should error +- data2_1.toExponential(); // should error +- data3_1.toExponential(); // should ok ++ let { data: data1, isSuccess: isSuccess1 } = useQuery(); ++ let { data: data2, isSuccess: isSuccess2 } = useQuery(); ++ const { data: data3, isSuccess: isSuccess3 } = useQuery(); ++ const areSuccess = isSuccess1 && isSuccess2 && isSuccess3; ++ if (areSuccess) { ++ data1.toExponential(); // should error ++ data2.toExponential(); // should error ++ data3.toExponential(); // should ok + } + } + { +- var _g = getArrayResult(), foo1 = _g[0], bar1 = _g[1]; +- var _h = getArrayResult(), foo2 = _h[0], bar2 = _h[1]; +- var _j = getArrayResult(), foo3 = _j[0], bar3 = _j[1]; +- var arrayAllSuccess = foo1 && foo2 && foo3; ++ const [foo1, bar1] = getArrayResult(); ++ const [foo2, bar2] = getArrayResult(); ++ const [foo3, bar3] = getArrayResult(); ++ const arrayAllSuccess = foo1 && foo2 && foo3; + if (arrayAllSuccess) { + bar1.toExponential(); // should ok + bar2.toExponential(); // should ok +@@= skipped -44, +43 lines =@@ + } + } + { +- var _k = getArrayResult(), foo1 = _k[0], bar1 = _k[1]; +- var _l = getArrayResult(), foo2 = _l[0], bar2 = _l[1]; +- var _m = getArrayResult(), foo3 = _m[0], bar3 = _m[1]; +- var arrayAllSuccess = foo1 && foo2 && foo3; ++ const [foo1, bar1] = getArrayResult(); ++ let [foo2, bar2] = getArrayResult(); ++ let [foo3, bar3] = getArrayResult(); ++ const arrayAllSuccess = foo1 && foo2 && foo3; + if (arrayAllSuccess) { + bar1.toExponential(); // should ok + bar2.toExponential(); // should error +@@= skipped -11, +11 lines =@@ + } + } + { +- var resp = void 0; +- var data = resp.resp.data, type = resp.type; ++ let resp; ++ const { resp: { data }, type } = resp; + if (type === 'string') { + data; + } +@@= skipped -10, +10 lines =@@ + } + } + { +- var resp = void 0; +- var dataAlias = resp.resp.data, type = resp.type; ++ let resp; ++ const { resp: { data: dataAlias }, type } = resp; + if (type === 'string') { + dataAlias; + } +@@= skipped -9, +9 lines =@@ + resp.resp.data; + } + } +-function bindingPatternInParameter(_a) { +- var data1 = _a.data, isSuccess1 = _a.isSuccess; +- var _b = useQuery(), data2 = _b.data, isSuccess2 = _b.isSuccess; +- var areSuccess = isSuccess1 && isSuccess2; ++function bindingPatternInParameter({ data: data1, isSuccess: isSuccess1 }) { ++ const { data: data2, isSuccess: isSuccess2 } = useQuery(); ++ const areSuccess = isSuccess1 && isSuccess2; + if (areSuccess) { + data1.toExponential(); + data2.toExponential(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.types.diff index ddd5b5a3bb..bc419753d9 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.types.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowAliasedDiscriminants.types.diff @@ -90,30 +90,33 @@ >true : true >false : false { -@@= skipped -27, +27 lines =@@ + const [foo1, bar1] = getArrayResult(); >foo1 : boolean >bar1 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] const [foo2, bar2] = getArrayResult(); >foo2 : boolean >bar2 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] const [foo3, bar3] = getArrayResult(); >foo3 : boolean >bar3 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] const arrayAllSuccess = foo1 && foo2 && foo3; >arrayAllSuccess : boolean -@@= skipped -27, +27 lines =@@ +@@= skipped -54, +54 lines =@@ bar1.toExponential(); // should ok >bar1.toExponential() : string @@ -141,30 +144,34 @@ } } -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + const [foo1, bar1] = getArrayResult(); >foo1 : boolean >bar1 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] let [foo2, bar2] = getArrayResult(); >foo2 : boolean >bar2 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] let [foo3, bar3] = getArrayResult(); >foo3 : boolean >bar3 : number | undefined - >getArrayResult() : [false, undefined] | [true, number] +->getArrayResult() : [true, number] | [false, undefined] ->getArrayResult : () => [true, number] | [false, undefined] ++>getArrayResult() : [false, undefined] | [true, number] +>getArrayResult : () => [false, undefined] | [true, number] const arrayAllSuccess = foo1 && foo2 && foo3; >arrayAllSuccess : boolean -@@= skipped -27, +27 lines =@@ +@@= skipped -28, +28 lines =@@ bar1.toExponential(); // should ok >bar1.toExponential() : string @@ -192,7 +199,61 @@ } } -@@= skipped -142, +142 lines =@@ +@@= skipped -49, +49 lines =@@ + const { resp: { data }, type } = resp; + >resp : any + >data : string | number +->type : "string" | "number" ++>type : "number" | "string" + >resp : Nested + + if (type === 'string') { + >type === 'string' : boolean +->type : "string" | "number" ++>type : "number" | "string" + >'string' : "string" + + data satisfies string; +@@= skipped -14, +14 lines =@@ + } + if (resp.type === 'string') { + >resp.type === 'string' : boolean +->resp.type : "string" | "number" ++>resp.type : "number" | "string" + >resp : Nested +->type : "string" | "number" ++>type : "number" | "string" + >'string' : "string" + + resp.resp.data satisfies string; +@@= skipped -24, +24 lines =@@ + >resp : any + >data : any + >dataAlias : string | number +->type : "string" | "number" ++>type : "number" | "string" + >resp : Nested + + if (type === 'string') { + >type === 'string' : boolean +->type : "string" | "number" ++>type : "number" | "string" + >'string' : "string" + + dataAlias satisfies string; +@@= skipped -14, +14 lines =@@ + } + if (resp.type === 'string') { + >resp.type === 'string' : boolean +->resp.type : "string" | "number" ++>resp.type : "number" | "string" + >resp : Nested +->type : "string" | "number" ++>type : "number" | "string" + >'string' : "string" + + resp.resp.data satisfies string; +@@= skipped -41, +41 lines =@@ data1.toExponential(); >data1.toExponential() : string diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.js.diff index 3f3cc51104..38ba521041 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.js.diff @@ -7,4 +7,12 @@ -"use strict"; function bigger() { if (isBig(this)) { - this.big; // Expect property to exist \ No newline at end of file + this.big; // Expect property to exist +@@= skipped -8, +7 lines =@@ + } + function bar() { + if (typeof this === "string") { +- var x = this; ++ const x = this; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.types.diff new file mode 100644 index 0000000000..10597e1a1d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowAnalysisOnBareThisKeyword.types.diff @@ -0,0 +1,10 @@ +--- old.controlFlowAnalysisOnBareThisKeyword.types ++++ new.controlFlowAnalysisOnBareThisKeyword.types +@@= skipped -28, +28 lines =@@ + + if (typeof this === "string") { + >typeof this === "string" : boolean +->typeof this : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof this : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >this : string | number + >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowArrayErrors.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowArrayErrors.js.diff new file mode 100644 index 0000000000..4c5be29539 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowArrayErrors.js.diff @@ -0,0 +1,67 @@ +--- old.controlFlowArrayErrors.js ++++ new.controlFlowArrayErrors.js +@@= skipped -68, +68 lines =@@ + + //// [controlFlowArrayErrors.js] + function f1() { +- var x = []; // Implicit any[] error in some locations +- var y = x; // Implicit any[] error ++ let x = []; // Implicit any[] error in some locations ++ let y = x; // Implicit any[] error + x.push(5); +- var z = x; ++ let z = x; + } + function f2() { +- var x; // Implicit any[] error in some locations ++ let x; // Implicit any[] error in some locations + x = []; +- var y = x; // Implicit any[] error ++ let y = x; // Implicit any[] error + x.push(5); +- var z = x; ++ let z = x; + } + function f3() { +- var x = []; // Implicit any[] error in some locations ++ let x = []; // Implicit any[] error in some locations + x.push(5); + function g() { + x; // Implicit any[] error + } + } + function f4() { +- var x; ++ let x; + x = [5, "hello"]; // Non-evolving array + x.push(true); // Error + } + function f5() { +- var x = [5, "hello"]; // Non-evolving array ++ let x = [5, "hello"]; // Non-evolving array + x.push(true); // Error + } + function f6() { +- var x; ++ let x; + if (cond()) { + x = []; + x.push(5); +@@= skipped -42, +42 lines =@@ + x.push(99); // Error + } + function f7() { +- var x = []; // x has evolving array value ++ let x = []; // x has evolving array value + x.push(5); +- var y = x; // y has non-evolving array value ++ let y = x; // y has non-evolving array value + x.push("hello"); // Ok + y.push("hello"); // Error + } + function f8() { +- var x = []; // Implicit any[] error in some locations ++ const x = []; // Implicit any[] error in some locations + x.push(5); + function g() { + x; // Implicit any[] error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowArrays.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowArrays.js.diff new file mode 100644 index 0000000000..63d64ac711 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowArrays.js.diff @@ -0,0 +1,155 @@ +--- old.controlFlowArrays.js ++++ new.controlFlowArrays.js +@@= skipped -190, +190 lines =@@ + + //// [controlFlowArrays.js] + function f1() { +- var x = []; ++ let x = []; + x[0] = 5; + x[1] = "hello"; + x[2] = true; + return x; // (string | number | boolean)[] + } + function f2() { +- var x = []; ++ let x = []; + x.push(5); + x.push("hello"); + x.push(true); + return x; // (string | number | boolean)[] + } + function f3() { +- var x; ++ let x; + x = []; + x.push(5, "hello"); + return x; // (string | number)[] + } + function f4() { +- var x = []; ++ let x = []; + if (cond()) { + x.push(5); + } +@@= skipped -30, +30 lines =@@ + return x; // (string | number)[] + } + function f5() { +- var x; ++ let x; + if (cond()) { + x = []; + x.push(5); +@@= skipped -12, +12 lines =@@ + return x; // (string | number)[] + } + function f6() { +- var x; ++ let x; + if (cond()) { + x = 5; + } +@@= skipped -11, +11 lines =@@ + return x; // number | string[] + } + function f7() { +- var x = null; ++ let x = null; + if (cond()) { + x = []; + while (cond()) { +@@= skipped -10, +10 lines =@@ + return x; // string[] | null + } + function f8() { +- var x = []; ++ let x = []; + x.push(5); + if (cond()) + return x; // number[] +@@= skipped -11, +11 lines =@@ + return x; // (string | number | boolean)[] + } + function f9() { +- var x = []; ++ let x = []; + if (cond()) { + x.push(5); + return x; // number[] +@@= skipped -11, +11 lines =@@ + } + } + function f10() { +- var x = []; ++ let x = []; + if (cond()) { + x.push(true); + x; // boolean[] +@@= skipped -17, +17 lines =@@ + return x; // (string | number | boolean)[] + } + function f11() { +- var x = []; ++ let x = []; + if (x.length === 0) { // x.length ok on implicit any[] + x.push("hello"); + } + return x; + } + function f12() { +- var x; ++ let x; + x = []; + if (x.length === 0) { // x.length ok on implicit any[] + x.push("hello"); +@@= skipped -22, +22 lines =@@ + return x; // (string | number | boolean)[] + } + function f14() { +- var x = []; ++ const x = []; + x.push(5); + x.push("hello"); + x.push(true); + return x; // (string | number | boolean)[] + } + function f15() { +- var x = []; ++ let x = []; + while (cond()) { + while (cond()) { } + x.push("hello"); +@@= skipped -15, +15 lines =@@ + return x; // string[] + } + function f16() { +- var x; +- var y; ++ let x; ++ let y; + (x = [], x).push(5); + (x.push("hello"), x).push(true); + ((x))[3] = { a: 1 }; + return x; // (string | number | boolean | { a: number })[] + } + function f17() { +- var x = []; ++ let x = []; + x.unshift(5); + x.unshift("hello"); + x.unshift(true); + return x; // (string | number | boolean)[] + } + function f18() { +- var x = []; ++ let x = []; + x.push(5); + x.unshift("hello"); + x[2] = true; + return x; // (string | number | boolean)[] + } +-var arr = []; ++let arr = []; + arr.push({ val: 1, bar: 2 }); + foo(arr); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowBreakContinueWithLabel.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowBreakContinueWithLabel.js.diff index c7f07f7901..35a7584815 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowBreakContinueWithLabel.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowBreakContinueWithLabel.js.diff @@ -7,4 +7,11 @@ -"use strict"; var User; (function (User) { - User[User["A"] = 0] = "A"; \ No newline at end of file + User[User["A"] = 0] = "A"; + User[User["B"] = 1] = "B"; + })(User || (User = {})); +-var user = User.A; ++let user = User.A; + label: while (true) { + switch (user) { + case User.A: \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowCaching.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.js.diff new file mode 100644 index 0000000000..ad90d780f5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.js.diff @@ -0,0 +1,9 @@ +--- old.controlFlowCaching.js ++++ new.controlFlowCaching.js +@@= skipped -116, +116 lines =@@ + labelOffset.y -= size; + break; + } +- var _ = rotation; ++ let _ = rotation; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowCaching.symbols.diff b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.symbols.diff new file mode 100644 index 0000000000..d6dfb21700 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.symbols.diff @@ -0,0 +1,45 @@ +--- old.controlFlowCaching.symbols ++++ new.controlFlowCaching.symbols +@@= skipped -113, +113 lines =@@ + cosr = Math.abs(Math.cos(rotation * Math.PI / 180)), + >cosr : Symbol(cosr, Decl(controlFlowCaching.ts, 20, 79)) + >Math.abs : Symbol(Math.abs, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >abs : Symbol(Math.abs, Decl(lib.es5.d.ts, --, --)) + >Math.cos : Symbol(Math.cos, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >cos : Symbol(Math.cos, Decl(lib.es5.d.ts, --, --)) + >rotation : Symbol(rotation, Decl(controlFlowCaching.ts, 6, 47)) + >Math.PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --)) + + sinr = Math.abs(Math.sin(rotation * Math.PI / 180)), + >sinr : Symbol(sinr, Decl(controlFlowCaching.ts, 21, 60)) + >Math.abs : Symbol(Math.abs, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >abs : Symbol(Math.abs, Decl(lib.es5.d.ts, --, --)) + >Math.sin : Symbol(Math.sin, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >sin : Symbol(Math.sin, Decl(lib.es5.d.ts, --, --)) + >rotation : Symbol(rotation, Decl(controlFlowCaching.ts, 6, 47)) + >Math.PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --)) + + tsize = taTitleFont ? g.normalizedLength(g.splitFontString(taTitleFont).size) : 0; +@@= skipped -52, +52 lines =@@ + >sinr : Symbol(sinr, Decl(controlFlowCaching.ts, 21, 60)) + >labelGap : Symbol(labelGap, Decl(controlFlowCaching.ts, 7, 125)) + >Math.max : Symbol(Math.max, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >max : Symbol(Math.max, Decl(lib.es5.d.ts, --, --)) + >taMajorTick : Symbol(taMajorTick, Decl(controlFlowCaching.ts, 14, 96)) + >taMajorTick : Symbol(taMajorTick, Decl(controlFlowCaching.ts, 14, 96)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowCaching.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.types.diff new file mode 100644 index 0000000000..50ef6e5656 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowCaching.types.diff @@ -0,0 +1,11 @@ +--- old.controlFlowCaching.types ++++ new.controlFlowCaching.types +@@= skipped -420, +420 lines =@@ + >axisVector : any + >{ x: isRtl ? -1 : 1, y: 0 } : { x: number; y: number; } + >x : number +->isRtl ? -1 : 1 : 1 | -1 ++>isRtl ? -1 : 1 : -1 | 1 + >isRtl : any + >-1 : -1 + >1 : 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionAssertionWithinTernary.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionAssertionWithinTernary.js.diff index 759213b84b..b025e4912d 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionAssertionWithinTernary.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionAssertionWithinTernary.js.diff @@ -6,5 +6,8 @@ //// [controlFlowCommaExpressionAssertionWithinTernary.js] -"use strict"; function foo2(param) { - const val = param !== undefined; - return val ? (assert(param !== undefined), param) : null; \ No newline at end of file +- var val = param !== undefined; ++ const val = param !== undefined; + return val ? (assert(param !== undefined), param) : null; + // ^^^^^ Still typed as number | null | undefined + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionFunctionCall.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionFunctionCall.js.diff new file mode 100644 index 0000000000..7214df0ded --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowCommaExpressionFunctionCall.js.diff @@ -0,0 +1,18 @@ +--- old.controlFlowCommaExpressionFunctionCall.js ++++ new.controlFlowCommaExpressionFunctionCall.js +@@= skipped -13, +13 lines =@@ + } + + //// [controlFlowCommaExpressionFunctionCall.js] +-var otherValue = function () { return true; }; +-var value = null; ++const otherValue = () => true; ++const value = null; + function isNumber(obj) { + return true; // method implementation irrelevant + } + // Bad case - fails + if (isNumber((otherValue(), value))) { +- var b = value; // string | number , but should be number ++ const b = value; // string | number , but should be number + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.js.diff index 69009d6440..a879f7416c 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.js.diff @@ -8,4 +8,19 @@ -// Repro from #28758 function isNumVal(x) { return typeof x.val === 'number'; - } \ No newline at end of file + } + function foo(things) { +- for (var _i = 0, things_1 = things; _i < things_1.length; _i++) { +- var thing = things_1[_i]; ++ for (const thing of things) { + if (isNumVal(thing)) { +- var val = thing.val; ++ const { val } = thing; + val.toFixed(2); + } + else { +- var val = thing.val; ++ const { val } = thing; + val.length; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.types.diff index af1565f7ab..98e75e3e74 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.types.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringLoop.types.diff @@ -1,6 +1,15 @@ --- old.controlFlowDestructuringLoop.types +++ new.controlFlowDestructuringLoop.types -@@= skipped -43, +43 lines =@@ +@@= skipped -17, +17 lines =@@ + + return typeof x.val === 'number'; + >typeof x.val === 'number' : boolean +->typeof x.val : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x.val : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x.val : string | number + >x : Val + >val : string | number +@@= skipped -26, +26 lines =@@ val.toFixed(2); >val.toFixed(2) : string diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringParameters.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringParameters.js.diff new file mode 100644 index 0000000000..6027fefa31 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringParameters.js.diff @@ -0,0 +1,11 @@ +--- old.controlFlowDestructuringParameters.js ++++ new.controlFlowDestructuringParameters.js +@@= skipped -10, +10 lines =@@ + + //// [controlFlowDestructuringParameters.js] + // Repro for #8376 +-[{ x: 1 }].map(function (_a) { +- var x = _a.x; +- return x; +-}); ++[{ x: 1 }].map(({ x }) => x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringVariablesInTryCatch.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringVariablesInTryCatch.js.diff index 21a1816de1..9e31c5382d 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringVariablesInTryCatch.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowDestructuringVariablesInTryCatch.js.diff @@ -7,4 +7,17 @@ -"use strict"; try { var a = f1(); - var [b] = f2(); \ No newline at end of file +- var b = f2()[0]; +- var c = f3().c; +- var _a = [][0], d = _a === void 0 ? 1 : _a; +- var _b = {}.e, e = _b === void 0 ? 1 : _b; ++ var [b] = f2(); ++ var { c } = f3(); ++ var [d = 1] = []; ++ var { e = 1 } = {}; + } +-catch (_c) { ++catch (_a) { + console.error("error"); + } + a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.js.diff index d7f5ee37b4..a509f19911 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.js.diff @@ -5,6 +5,11 @@ //// [controlFlowFinallyNoCatchAssignments.js] -"use strict"; - let x; +-var x; ++let x; x = Math.random(); - let a; \ No newline at end of file +-var a; ++let a; + try { + if (x) { + a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.symbols.diff b/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.symbols.diff new file mode 100644 index 0000000000..fb1d8e484b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowFinallyNoCatchAssignments.symbols.diff @@ -0,0 +1,11 @@ +--- old.controlFlowFinallyNoCatchAssignments.symbols ++++ new.controlFlowFinallyNoCatchAssignments.symbols +@@= skipped -6, +6 lines =@@ + x = Math.random(); + >x : Symbol(x, Decl(controlFlowFinallyNoCatchAssignments.ts, 0, 3)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + let a: number; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowForCatchAndFinally.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowForCatchAndFinally.js.diff index e59a5d6292..36620d75e5 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowForCatchAndFinally.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowForCatchAndFinally.js.diff @@ -14,24 +14,68 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; --function test() { -- return __awaiter(this, void 0, void 0, function* () { -- let browser = undefined; -- let page = undefined; -- try { -- browser = yield test1(); -- page = yield test2(browser); -- return yield page.content(); -- ; -- } -- finally { -- if (page) { -- yield page.close(); // ok +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; - } -- if (browser) { -- yield browser.close(); // ok +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-function test() { +- return __awaiter(this, void 0, void 0, function () { +- var browser, page; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- browser = undefined; +- page = undefined; +- _a.label = 1; +- case 1: +- _a.trys.push([1, , 5, 10]); +- return [4 /*yield*/, test1()]; +- case 2: +- browser = _a.sent(); +- return [4 /*yield*/, test2(browser)]; +- case 3: +- page = _a.sent(); +- return [4 /*yield*/, page.content()]; +- case 4: return [2 /*return*/, _a.sent()]; +- case 5: +- if (!page) return [3 /*break*/, 7]; +- return [4 /*yield*/, page.close()]; +- case 6: +- _a.sent(); // ok +- _a.label = 7; +- case 7: +- if (!browser) return [3 /*break*/, 9]; +- return [4 /*yield*/, browser.close()]; +- case 8: +- _a.sent(); // ok +- _a.label = 9; +- case 9: return [7 /*endfinally*/]; +- case 10: return [2 /*return*/]; - } -- } +- }); - }); +async function test() { + let browser = undefined; @@ -52,12 +96,10 @@ + } } ; - class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.abortController = undefined; -- } -- operation() { -- return __awaiter(this, void 0, void 0, function* () { ++class Foo { + abortController = undefined; + async operation() { + if (this.abortController !== undefined) { @@ -68,21 +110,30 @@ + this.abortController = new Aborter(); + } + catch (error) { - if (this.abortController !== undefined) { -- this.abortController.abort(); -- this.abortController = undefined; -- } -- try { -- this.abortController = new Aborter(); -- } -- catch (error) { -- if (this.abortController !== undefined) { -- this.abortController.abort(); // ok -- } -- } -- }); ++ if (this.abortController !== undefined) { + this.abortController.abort(); // ok + } + } } - } \ No newline at end of file +- Foo.prototype.operation = function () { +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- if (this.abortController !== undefined) { +- this.abortController.abort(); +- this.abortController = undefined; +- } +- try { +- this.abortController = new Aborter(); +- } +- catch (error) { +- if (this.abortController !== undefined) { +- this.abortController.abort(); // ok +- } +- } +- return [2 /*return*/]; +- }); +- }); +- }; +- return Foo; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowForCompoundAssignmentToThisMember.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowForCompoundAssignmentToThisMember.js.diff index 4073314dd8..83c4991c16 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowForCompoundAssignmentToThisMember.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowForCompoundAssignmentToThisMember.js.diff @@ -1,12 +1,23 @@ --- old.controlFlowForCompoundAssignmentToThisMember.js +++ new.controlFlowForCompoundAssignmentToThisMember.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + } //// [controlFlowForCompoundAssignmentToThisMember.js] - class DatasourceCommandWidgetElement { +-var DatasourceCommandWidgetElement = /** @class */ (function () { +- function DatasourceCommandWidgetElement(target) { ++class DatasourceCommandWidgetElement { + _commandBased; + _commandElement; + commandElement; - constructor(target) { ++ constructor(target) { if (target instanceof DatasourceCommandWidgetElement) { - this._commandBased = true; \ No newline at end of file + this._commandBased = true; + this._commandElement = target.commandElement; +@@= skipped -13, +16 lines =@@ + this._commandElement = target.commandElement; + } + } +- return DatasourceCommandWidgetElement; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.js.diff new file mode 100644 index 0000000000..01cdf514e6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.js.diff @@ -0,0 +1,27 @@ +--- old.controlFlowForIndexSignatures.js ++++ new.controlFlowForIndexSignatures.js +@@= skipped -24, +24 lines =@@ + + + //// [controlFlowForIndexSignatures.js] +-var boo = { bar: 'bar' }; ++const boo = { bar: 'bar' }; + function a(aboo1) { + if (!aboo1) + return; +- var aboo2 = boo; ++ const aboo2 = boo; + } + if (b) { +- var bboo_1 = boo; ++ const bboo = boo; + } + b = boo; +-var bboo = boo; ++const bboo = boo; + if (typeof c === 'string') { +- var boo1 = { bar: 'works' }; +- var boo2 = { bar: 1 }; // should error ++ const boo1 = { bar: 'works' }; ++ const boo2 = { bar: 1 }; // should error + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.types.diff index 6e622d60be..3014340131 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.types.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowForIndexSignatures.types.diff @@ -8,4 +8,12 @@ +>a : (aboo1?: Foo | undefined) => void >aboo1 : Foo | undefined - if (!aboo1) return; \ No newline at end of file + if (!aboo1) return; +@@= skipped -48, +48 lines =@@ + + if (typeof c === 'string') { + >typeof c === 'string' : boolean +->typeof c : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof c : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >c : string | number + >'string' : "string" diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowInitializedDestructuringVariables.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowInitializedDestructuringVariables.js.diff index 53de216b59..16a8d180a1 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowInitializedDestructuringVariables.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowInitializedDestructuringVariables.js.diff @@ -5,4 +5,5 @@ //// [controlFlowInitializedDestructuringVariables.js] -"use strict"; - const { a = "0", b = +a, } = obj; \ No newline at end of file +-var _a = obj.a, a = _a === void 0 ? "0" : _a, _b = obj.b, b = _b === void 0 ? +a : _b; ++const { a = "0", b = +a, } = obj; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowLoopAnalysis.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowLoopAnalysis.js.diff new file mode 100644 index 0000000000..42a026b71c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowLoopAnalysis.js.diff @@ -0,0 +1,37 @@ +--- old.controlFlowLoopAnalysis.js ++++ new.controlFlowLoopAnalysis.js +@@= skipped -52, +52 lines =@@ + + //// [controlFlowLoopAnalysis.js] + // Repro from #8418 +-var cond; ++let cond; + function foo(x) { return 1; } + function test1() { +- var x; ++ let x; + while (cond) { + while (cond) { + while (cond) { +@@= skipped -15, +15 lines =@@ + } + // Repro from #8418 + function test2() { +- var x; ++ let x; + x = 1; + while (cond) { + while (cond) { +@@= skipped -10, +10 lines =@@ + } + // Repro from #8511 + function mapUntilCant(values, canTake, mapping) { +- var result = []; +- for (var index = 0, length_1 = values.length; index < length_1; index++) { +- var value = values[index]; ++ let result = []; ++ for (let index = 0, length = values.length; index < length; index++) { ++ let value = values[index]; + if (canTake(value, index)) { + result.push(mapping(value, index)); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowManyCallExpressionStatementsPerf.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowManyCallExpressionStatementsPerf.js.diff index bd2f24bb1d..daa1a376a2 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowManyCallExpressionStatementsPerf.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowManyCallExpressionStatementsPerf.js.diff @@ -6,5 +6,8 @@ //// [controlFlowManyCallExpressionStatementsPerf.js] -"use strict"; function test(x) { return x; } - let state = true; - if (state) { \ No newline at end of file +-var state = true; ++let state = true; + if (state) { + test(state && state); + test(state && state); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowManyConsecutiveConditionsNoTimeout.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowManyConsecutiveConditionsNoTimeout.js.diff new file mode 100644 index 0000000000..225af35e2c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowManyConsecutiveConditionsNoTimeout.js.diff @@ -0,0 +1,13 @@ +--- old.controlFlowManyConsecutiveConditionsNoTimeout.js ++++ new.controlFlowManyConsecutiveConditionsNoTimeout.js +@@= skipped -142, +142 lines =@@ + Choice[Choice["One"] = 0] = "One"; + Choice[Choice["Two"] = 1] = "Two"; + })(Choice || (exports.Choice = Choice = {})); +-var choice = Choice.One; +-var choiceOne = Choice.One; ++const choice = Choice.One; ++const choiceOne = Choice.One; + if (choice === choiceOne) { } + if (choice === choiceOne) { } + if (choice === choiceOne) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowNoImplicitAny.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowNoImplicitAny.js.diff new file mode 100644 index 0000000000..1b4e39b310 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowNoImplicitAny.js.diff @@ -0,0 +1,127 @@ +--- old.controlFlowNoImplicitAny.js ++++ new.controlFlowNoImplicitAny.js +@@= skipped -131, +131 lines =@@ + //// [controlFlowNoImplicitAny.js] + // CFA for 'let' with no type annotation and initializer + function f1() { +- var x; ++ let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined ++ const y = x; // string | number | undefined + } + // CFA for 'let' with no type annotation and 'undefined' initializer + function f2() { +- var x = undefined; ++ let x = undefined; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined ++ const y = x; // string | number | undefined + } + // CFA for 'let' with no type annotation and 'null' initializer + function f3() { +- var x = null; ++ let x = null; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // string | number | null ++ const y = x; // string | number | null + } + // No CFA for 'let' with with type annotation + function f4() { +- var x; ++ let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // any ++ const y = x; // any + } + // CFA for 'var' with no type annotation and initializer + function f5() { +@@= skipped -51, +51 lines =@@ + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined ++ const y = x; // string | number | undefined + } + // CFA for 'var' with no type annotation and 'undefined' initializer + function f6() { +@@= skipped -11, +11 lines =@@ + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined ++ const y = x; // string | number | undefined + } + // CFA for 'var' with no type annotation and 'null' initializer + function f7() { +@@= skipped -11, +11 lines =@@ + if (cond) { + x = "hello"; + } +- var y = x; // string | number | null ++ const y = x; // string | number | null + } + // No CFA for 'var' with with type annotation + function f8() { +@@= skipped -11, +11 lines =@@ + if (cond) { + x = "hello"; + } +- var y = x; // any ++ const y = x; // any + } + // No CFA for captured outer variables + function f9() { +- var x; ++ let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined ++ const y = x; // string | number | undefined + function f() { +- var z = x; // any ++ const z = x; // any + } + } + // No CFA for captured outer variables + function f10() { +- var x; ++ let x; + if (cond) { + x = 1; + } + if (cond) { + x = "hello"; + } +- var y = x; // string | number | undefined +- var f = function () { +- var z = x; // any ++ const y = x; // string | number | undefined ++ const f = () => { ++ const z = x; // any + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowNullTypeAndLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowNullTypeAndLiteral.js.diff index 55ade78c08..72994815ba 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowNullTypeAndLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowNullTypeAndLiteral.js.diff @@ -6,5 +6,20 @@ //// [controlFlowNullTypeAndLiteral.js] -"use strict"; // Repros from #23771 - const myNull = null; - const objWithValMaybeNull = { val: 1 }; \ No newline at end of file +-var myNull = null; +-var objWithValMaybeNull = { val: 1 }; +-var addOne = function (num) { ++const myNull = null; ++const objWithValMaybeNull = { val: 1 }; ++const addOne = function (num) { + return num + 1; + }; + if (objWithValMaybeNull.val !== null) +@@= skipped -17, +16 lines =@@ + addOne(objWithValMaybeNull.val); // Error + function f(x) { + if (x === myNull) { +- var s = x; // Error ++ const s = x; // Error + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowOuterVariable.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowOuterVariable.js.diff new file mode 100644 index 0000000000..3a8a02e2db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/controlFlowOuterVariable.js.diff @@ -0,0 +1,17 @@ +--- old.controlFlowOuterVariable.js ++++ new.controlFlowOuterVariable.js +@@= skipped -15, +15 lines =@@ + + //// [controlFlowOuterVariable.js] + // Repros from #10641 +-var CONFIG = { ++const CONFIG = { + foo: '', + setFoo: function (foo) { + CONFIG.foo = foo; + } + }; +-var helper = function (t) { ++const helper = function (t) { + helper(t.slice(1)); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.js.diff index c0f009b46e..d64dcdda71 100644 --- a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.js.diff @@ -8,17 +8,19 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.StyleParser = exports.HTMLtoJSX = void 0; var HTMLDOMPropertyConfig = require('react/lib/HTMLDOMPropertyConfig'); -@@= skipped -87, +86 lines =@@ +@@= skipped -86, +85 lines =@@ + function isConvertiblePixelValue(value) { return /^\d+px$/.test(value); } - class HTMLtoJSX { -- constructor() { +-var HTMLtoJSX = /** @class */ (function () { +- function HTMLtoJSX() { +- var _this = this; - /** - * Handles processing of the specified text node - * - * @param {TextNode} node - */ -- this._visitText = (node) => { +- this._visitText = function (node) { - var parentTag = node.parentNode && node.parentNode.tagName.toLowerCase(); - if (parentTag === 'textarea' || parentTag === 'style') { - // Ignore text content of textareas and styles, as it will have already been moved @@ -26,7 +28,7 @@ - return; - } - var text = ''; -- if (this._inPreTag) { +- if (_this._inPreTag) { - // If this text is contained within a
, we need to ensure the JSX
 -                // whitespace coalescing rules don't eat the whitespace. This means
 -                // wrapping newlines and sequences of two or more spaces in variables.
@@ -41,9 +43,12 @@
 -                if (text.indexOf('\n') > -1) {
 -                }
 -            }
--            this.output += text;
+-            _this.output += text;
 -        };
 -    }
+-    return HTMLtoJSX;
+-}());
++class HTMLtoJSX {
 +    output;
 +    level;
 +    _inPreTag;
@@ -77,19 +82,21 @@
 +        }
 +        this.output += text;
 +    };
- }
++}
  exports.HTMLtoJSX = HTMLtoJSX;
  ;
-@@= skipped -39, +40 lines =@@
+ /**
   * Handles parsing of inline styles
   */
- class StyleParser {
--    constructor() {
+-var StyleParser = /** @class */ (function () {
+-    function StyleParser() {
+-        var _this = this;
 -        this.styles = {};
--        this.toJSXString = () => {
--            for (var key in this.styles) {
--                if (!this.styles.hasOwnProperty(key)) {
+-        this.toJSXString = function () {
+-            for (var key in _this.styles) {
+-                if (!_this.styles.hasOwnProperty(key)) {
 -                }
++class StyleParser {
 +    styles = {};
 +    toJSXString = () => {
 +        for (var key in this.styles) {
@@ -97,7 +104,9 @@
              }
 -        };
 -    }
+-    return StyleParser;
+-}());
 +        }
 +    };
- }
++}
  exports.StyleParser = StyleParser;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.symbols.diff b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.symbols.diff
new file mode 100644
index 0000000000..711ed4474c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.symbols.diff
@@ -0,0 +1,27 @@
+--- old.controlFlowPropertyDeclarations.symbols
++++ new.controlFlowPropertyDeclarations.symbols
+@@= skipped -221, +221 lines =@@
+       // wrapping newlines and sequences of two or more spaces in variables.
+       text = text
+ >text : Symbol(text, Decl(controlFlowPropertyDeclarations.ts, 113, 7))
+->text        .replace(/\r/g, '')        .replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->text        .replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>text        .replace(/\r/g, '')        .replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
++>text        .replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >text : Symbol(text, Decl(controlFlowPropertyDeclarations.ts, 113, 7))
+
+         .replace(/\r/g, '')
+->replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+         .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) {
+->replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>replace : Symbol(String.replace, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >whitespace : Symbol(whitespace, Decl(controlFlowPropertyDeclarations.ts, 121, 50))
+
+           return '{' + JSON.stringify(whitespace) + '}';
+ >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >whitespace : Symbol(whitespace, Decl(controlFlowPropertyDeclarations.ts, 121, 50))
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.types.diff
index cf81a5f781..64b6a28ada 100644
--- a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyDeclarations.types.diff
@@ -1,6 +1,29 @@
 --- old.controlFlowPropertyDeclarations.types
 +++ new.controlFlowPropertyDeclarations.types
-@@= skipped -317, +317 lines =@@
+@@= skipped -296, +296 lines =@@
+ >text = text        .replace(/\r/g, '')        .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) {          return '{' + JSON.stringify(whitespace) + '}';        }) : string
+ >text : string
+ >text        .replace(/\r/g, '')        .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) {          return '{' + JSON.stringify(whitespace) + '}';        }) : string
+->text        .replace(/\r/g, '')        .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }
++>text        .replace(/\r/g, '')        .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }
+ >text        .replace(/\r/g, '') : string
+->text        .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }
++>text        .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }
+ >text : string
+
+         .replace(/\r/g, '')
+->replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }
++>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }
+ >/\r/g : RegExp
+ >'' : ""
+
+         .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) {
+->replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }
++>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }
+ >/( {2,}|\n|\t|\{|\})/g : RegExp
+ >function(whitespace) {          return '{' + JSON.stringify(whitespace) + '}';        } : (whitespace: string) => string
+ >whitespace : string
+@@= skipped -21, +21 lines =@@
  >'{' + JSON.stringify(whitespace) : string
  >'{' : "{"
  >JSON.stringify(whitespace) : string
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyInitializer.js.diff
index b6175fb191..f71a427e71 100644
--- a/testdata/baselines/reference/submodule/compiler/controlFlowPropertyInitializer.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowPropertyInitializer.js.diff
@@ -1,11 +1,17 @@
 --- old.controlFlowPropertyInitializer.js
 +++ new.controlFlowPropertyInitializer.js
-@@= skipped -12, +12 lines =@@
+@@= skipped -10, +10 lines =@@
+
+ //// [controlFlowPropertyInitializer.js]
  // Repro from #8967
- const LANG = "Turbo Pascal";
- class BestLanguage {
--    constructor() {
+-var LANG = "Turbo Pascal";
+-var BestLanguage = /** @class */ (function () {
+-    function BestLanguage() {
 -        this.name = LANG;
 -    }
+-    return BestLanguage;
+-}());
++const LANG = "Turbo Pascal";
++class BestLanguage {
 +    name = LANG;
- }
\ No newline at end of file
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.js.diff
index 4015bfc679..406fc12a2e 100644
--- a/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.js.diff
@@ -9,4 +9,20 @@
 +// Repro from #12319
  function md5(string) {
      function FF(a, b, c, d, x, s, ac) {
-         return 0;
\ No newline at end of file
+         return 0;
+@@= skipped -106, +106 lines =@@
+     return {};
+ }
+ ;
+-(function () {
+-    var id = 'a';
++(() => {
++    let id = 'a';
+     while (1) {
+-        var data = getObject(id);
+-        var message = data.message;
++        const data = getObject(id);
++        const message = data.message;
+         id = message.id;
+     }
+ })();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.symbols.diff b/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.symbols.diff
new file mode 100644
index 0000000000..12e81fffd8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowSelfReferentialLoop.symbols.diff
@@ -0,0 +1,11 @@
+--- old.controlFlowSelfReferentialLoop.symbols
++++ new.controlFlowSelfReferentialLoop.symbols
+@@= skipped -60, +60 lines =@@
+
+     var x=Array();
+ >x : Symbol(x, Decl(controlFlowSelfReferentialLoop.ts, 20, 7))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+     var k,AA,BB,CC,DD,a,b,c,d;
+ >k : Symbol(k, Decl(controlFlowSelfReferentialLoop.ts, 21, 7))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowUnionContainingTypeParameter1.symbols.diff b/testdata/baselines/reference/submodule/compiler/controlFlowUnionContainingTypeParameter1.symbols.diff
new file mode 100644
index 0000000000..87404c1b55
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowUnionContainingTypeParameter1.symbols.diff
@@ -0,0 +1,11 @@
+--- old.controlFlowUnionContainingTypeParameter1.symbols
++++ new.controlFlowUnionContainingTypeParameter1.symbols
+@@= skipped -53, +53 lines =@@
+ class TestClass2 {
+ >TestClass2 : Symbol(TestClass2, Decl(controlFlowUnionContainingTypeParameter1.ts, 15, 1))
+ >T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 17))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+
+   typeguard(val: unknown): val is T {
+ >typeguard : Symbol(TestClass2.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 34))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.js.diff b/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.js.diff
index 6e1c290db9..93f1135af2 100644
--- a/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.js.diff
@@ -6,5 +6,17 @@
  //// [controlFlowWithIncompleteTypes.js]
 -// Repro from #11000
  function foo1() {
-     let x = 0;
-     while (cond) {
\ No newline at end of file
+-    var x = 0;
++    let x = 0;
+     while (cond) {
+         if (typeof x === "string") {
+             x = x.slice();
+@@= skipped -13, +12 lines =@@
+     }
+ }
+ function foo2() {
+-    var x = 0;
++    let x = 0;
+     while (cond) {
+         if (typeof x === "number") {
+             x = "abc";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.types.diff b/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.types.diff
new file mode 100644
index 0000000000..0a54c0a9d6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/controlFlowWithIncompleteTypes.types.diff
@@ -0,0 +1,19 @@
+--- old.controlFlowWithIncompleteTypes.types
++++ new.controlFlowWithIncompleteTypes.types
+@@= skipped -17, +17 lines =@@
+
+         if (typeof x === "string") {
+ >typeof x === "string" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >x : string | number
+ >"string" : "string"
+
+@@= skipped -33, +33 lines =@@
+
+         if (typeof x === "number") {
+ >typeof x === "number" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >x : string | number
+ >"number" : "number"
diff --git a/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty1.js.diff b/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty1.js.diff
new file mode 100644
index 0000000000..86ec6b4f23
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty1.js.diff
@@ -0,0 +1,634 @@
+--- old.convertClassExpressionToFunctionFromObjectProperty1.js
++++ new.convertClassExpressionToFunctionFromObjectProperty1.js
+@@= skipped -242, +242 lines =@@
+
+
+ //// [convertClassExpressionToFunctionFromObjectProperty1.js]
+-var foo = {};
++const foo = {};
+ // properties
+-foo.x = /** @class */ (function () {
+-    function x() {
+-    }
+-    return x;
+-}());
+-foo.y = /** @class */ (function () {
+-    function y() {
+-    }
+-    return y;
+-}());
++foo.x = class {
++    constructor() { }
++};
++foo.y = class {
++    constructor() { }
++};
+ // keywords
+-foo.break = /** @class */ (function () {
+-    function break_1() {
+-    }
+-    return break_1;
+-}());
+-foo.case = /** @class */ (function () {
+-    function case_1() {
+-    }
+-    return case_1;
+-}());
+-foo.catch = /** @class */ (function () {
+-    function catch_1() {
+-    }
+-    return catch_1;
+-}());
+-foo.class = /** @class */ (function () {
+-    function class_1() {
+-    }
+-    return class_1;
+-}());
+-foo.const = /** @class */ (function () {
+-    function const_1() {
+-    }
+-    return const_1;
+-}());
+-foo.continue = /** @class */ (function () {
+-    function continue_1() {
+-    }
+-    return continue_1;
+-}());
+-foo.debugger = /** @class */ (function () {
+-    function debugger_1() {
+-    }
+-    return debugger_1;
+-}());
+-foo.default = /** @class */ (function () {
+-    function default_1() {
+-    }
+-    return default_1;
+-}());
+-foo.delete = /** @class */ (function () {
+-    function delete_1() {
+-    }
+-    return delete_1;
+-}());
+-foo.do = /** @class */ (function () {
+-    function do_1() {
+-    }
+-    return do_1;
+-}());
+-foo.else = /** @class */ (function () {
+-    function else_1() {
+-    }
+-    return else_1;
+-}());
+-foo.enum = /** @class */ (function () {
+-    function enum_1() {
+-    }
+-    return enum_1;
+-}());
+-foo.export = /** @class */ (function () {
+-    function export_1() {
+-    }
+-    return export_1;
+-}());
+-foo.extends = /** @class */ (function () {
+-    function extends_1() {
+-    }
+-    return extends_1;
+-}());
+-foo.false = /** @class */ (function () {
+-    function false_1() {
+-    }
+-    return false_1;
+-}());
+-foo.finally = /** @class */ (function () {
+-    function finally_1() {
+-    }
+-    return finally_1;
+-}());
+-foo.for = /** @class */ (function () {
+-    function for_1() {
+-    }
+-    return for_1;
+-}());
+-foo.function = /** @class */ (function () {
+-    function function_1() {
+-    }
+-    return function_1;
+-}());
+-foo.if = /** @class */ (function () {
+-    function if_1() {
+-    }
+-    return if_1;
+-}());
+-foo.import = /** @class */ (function () {
+-    function import_1() {
+-    }
+-    return import_1;
+-}());
+-foo.in = /** @class */ (function () {
+-    function in_1() {
+-    }
+-    return in_1;
+-}());
+-foo.instanceof = /** @class */ (function () {
+-    function instanceof_1() {
+-    }
+-    return instanceof_1;
+-}());
+-foo.new = /** @class */ (function () {
+-    function new_1() {
+-    }
+-    return new_1;
+-}());
+-foo.null = /** @class */ (function () {
+-    function null_1() {
+-    }
+-    return null_1;
+-}());
+-foo.return = /** @class */ (function () {
+-    function return_1() {
+-    }
+-    return return_1;
+-}());
+-foo.super = /** @class */ (function () {
+-    function super_1() {
+-    }
+-    return super_1;
+-}());
+-foo.switch = /** @class */ (function () {
+-    function switch_1() {
+-    }
+-    return switch_1;
+-}());
+-foo.this = /** @class */ (function () {
+-    function this_1() {
+-    }
+-    return this_1;
+-}());
+-foo.throw = /** @class */ (function () {
+-    function throw_1() {
+-    }
+-    return throw_1;
+-}());
+-foo.true = /** @class */ (function () {
+-    function true_1() {
+-    }
+-    return true_1;
+-}());
+-foo.try = /** @class */ (function () {
+-    function try_1() {
+-    }
+-    return try_1;
+-}());
+-foo.typeof = /** @class */ (function () {
+-    function typeof_1() {
+-    }
+-    return typeof_1;
+-}());
+-foo.var = /** @class */ (function () {
+-    function var_1() {
+-    }
+-    return var_1;
+-}());
+-foo.void = /** @class */ (function () {
+-    function void_1() {
+-    }
+-    return void_1;
+-}());
+-foo.while = /** @class */ (function () {
+-    function while_1() {
+-    }
+-    return while_1;
+-}());
+-foo.with = /** @class */ (function () {
+-    function with_1() {
+-    }
+-    return with_1;
+-}());
+-foo.implements = /** @class */ (function () {
+-    function implements_1() {
+-    }
+-    return implements_1;
+-}());
+-foo.interface = /** @class */ (function () {
+-    function interface_1() {
+-    }
+-    return interface_1;
+-}());
+-foo.let = /** @class */ (function () {
+-    function let_1() {
+-    }
+-    return let_1;
+-}());
+-foo.package = /** @class */ (function () {
+-    function package_1() {
+-    }
+-    return package_1;
+-}());
+-foo.private = /** @class */ (function () {
+-    function private_1() {
+-    }
+-    return private_1;
+-}());
+-foo.protected = /** @class */ (function () {
+-    function protected_1() {
+-    }
+-    return protected_1;
+-}());
+-foo.public = /** @class */ (function () {
+-    function public_1() {
+-    }
+-    return public_1;
+-}());
+-foo.static = /** @class */ (function () {
+-    function static_1() {
+-    }
+-    return static_1;
+-}());
+-foo.yield = /** @class */ (function () {
+-    function yield_1() {
+-    }
+-    return yield_1;
+-}());
+-foo.abstract = /** @class */ (function () {
+-    function abstract() {
+-    }
+-    return abstract;
+-}());
+-foo.as = /** @class */ (function () {
+-    function as() {
+-    }
+-    return as;
+-}());
+-foo.asserts = /** @class */ (function () {
+-    function asserts() {
+-    }
+-    return asserts;
+-}());
+-foo.any = /** @class */ (function () {
+-    function any() {
+-    }
+-    return any;
+-}());
+-foo.async = /** @class */ (function () {
+-    function async() {
+-    }
+-    return async;
+-}());
+-foo.await = /** @class */ (function () {
+-    function await() {
+-    }
+-    return await;
+-}());
+-foo.boolean = /** @class */ (function () {
+-    function boolean() {
+-    }
+-    return boolean;
+-}());
+-foo.constructor = /** @class */ (function () {
+-    function constructor() {
+-    }
+-    return constructor;
+-}());
+-foo.declare = /** @class */ (function () {
+-    function declare() {
+-    }
+-    return declare;
+-}());
+-foo.get = /** @class */ (function () {
+-    function get() {
+-    }
+-    return get;
+-}());
+-foo.infer = /** @class */ (function () {
+-    function infer() {
+-    }
+-    return infer;
+-}());
+-foo.is = /** @class */ (function () {
+-    function is() {
+-    }
+-    return is;
+-}());
+-foo.keyof = /** @class */ (function () {
+-    function keyof() {
+-    }
+-    return keyof;
+-}());
+-foo.module = /** @class */ (function () {
+-    function module() {
+-    }
+-    return module;
+-}());
+-foo.namespace = /** @class */ (function () {
+-    function namespace() {
+-    }
+-    return namespace;
+-}());
+-foo.never = /** @class */ (function () {
+-    function never() {
+-    }
+-    return never;
+-}());
+-foo.readonly = /** @class */ (function () {
+-    function readonly() {
+-    }
+-    return readonly;
+-}());
+-foo.require = /** @class */ (function () {
+-    function require() {
+-    }
+-    return require;
+-}());
+-foo.number = /** @class */ (function () {
+-    function number() {
+-    }
+-    return number;
+-}());
+-foo.object = /** @class */ (function () {
+-    function object() {
+-    }
+-    return object;
+-}());
+-foo.set = /** @class */ (function () {
+-    function set() {
+-    }
+-    return set;
+-}());
+-foo.string = /** @class */ (function () {
+-    function string() {
+-    }
+-    return string;
+-}());
+-foo.symbol = /** @class */ (function () {
+-    function symbol() {
+-    }
+-    return symbol;
+-}());
+-foo.type = /** @class */ (function () {
+-    function type() {
+-    }
+-    return type;
+-}());
+-foo.undefined = /** @class */ (function () {
+-    function undefined() {
+-    }
+-    return undefined;
+-}());
+-foo.unique = /** @class */ (function () {
+-    function unique() {
+-    }
+-    return unique;
+-}());
+-foo.unknown = /** @class */ (function () {
+-    function unknown() {
+-    }
+-    return unknown;
+-}());
+-foo.from = /** @class */ (function () {
+-    function from() {
+-    }
+-    return from;
+-}());
+-foo.global = /** @class */ (function () {
+-    function global() {
+-    }
+-    return global;
+-}());
+-foo.bigint = /** @class */ (function () {
+-    function bigint() {
+-    }
+-    return bigint;
+-}());
+-foo.of = /** @class */ (function () {
+-    function of() {
+-    }
+-    return of;
+-}());
++foo.break = class {
++    constructor() { }
++};
++foo.case = class {
++    constructor() { }
++};
++foo.catch = class {
++    constructor() { }
++};
++foo.class = class {
++    constructor() { }
++};
++foo.const = class {
++    constructor() { }
++};
++foo.continue = class {
++    constructor() { }
++};
++foo.debugger = class {
++    constructor() { }
++};
++foo.default = class {
++    constructor() { }
++};
++foo.delete = class {
++    constructor() { }
++};
++foo.do = class {
++    constructor() { }
++};
++foo.else = class {
++    constructor() { }
++};
++foo.enum = class {
++    constructor() { }
++};
++foo.export = class {
++    constructor() { }
++};
++foo.extends = class {
++    constructor() { }
++};
++foo.false = class {
++    constructor() { }
++};
++foo.finally = class {
++    constructor() { }
++};
++foo.for = class {
++    constructor() { }
++};
++foo.function = class {
++    constructor() { }
++};
++foo.if = class {
++    constructor() { }
++};
++foo.import = class {
++    constructor() { }
++};
++foo.in = class {
++    constructor() { }
++};
++foo.instanceof = class {
++    constructor() { }
++};
++foo.new = class {
++    constructor() { }
++};
++foo.null = class {
++    constructor() { }
++};
++foo.return = class {
++    constructor() { }
++};
++foo.super = class {
++    constructor() { }
++};
++foo.switch = class {
++    constructor() { }
++};
++foo.this = class {
++    constructor() { }
++};
++foo.throw = class {
++    constructor() { }
++};
++foo.true = class {
++    constructor() { }
++};
++foo.try = class {
++    constructor() { }
++};
++foo.typeof = class {
++    constructor() { }
++};
++foo.var = class {
++    constructor() { }
++};
++foo.void = class {
++    constructor() { }
++};
++foo.while = class {
++    constructor() { }
++};
++foo.with = class {
++    constructor() { }
++};
++foo.implements = class {
++    constructor() { }
++};
++foo.interface = class {
++    constructor() { }
++};
++foo.let = class {
++    constructor() { }
++};
++foo.package = class {
++    constructor() { }
++};
++foo.private = class {
++    constructor() { }
++};
++foo.protected = class {
++    constructor() { }
++};
++foo.public = class {
++    constructor() { }
++};
++foo.static = class {
++    constructor() { }
++};
++foo.yield = class {
++    constructor() { }
++};
++foo.abstract = class {
++    constructor() { }
++};
++foo.as = class {
++    constructor() { }
++};
++foo.asserts = class {
++    constructor() { }
++};
++foo.any = class {
++    constructor() { }
++};
++foo.async = class {
++    constructor() { }
++};
++foo.await = class {
++    constructor() { }
++};
++foo.boolean = class {
++    constructor() { }
++};
++foo.constructor = class {
++    constructor() { }
++};
++foo.declare = class {
++    constructor() { }
++};
++foo.get = class {
++    constructor() { }
++};
++foo.infer = class {
++    constructor() { }
++};
++foo.is = class {
++    constructor() { }
++};
++foo.keyof = class {
++    constructor() { }
++};
++foo.module = class {
++    constructor() { }
++};
++foo.namespace = class {
++    constructor() { }
++};
++foo.never = class {
++    constructor() { }
++};
++foo.readonly = class {
++    constructor() { }
++};
++foo.require = class {
++    constructor() { }
++};
++foo.number = class {
++    constructor() { }
++};
++foo.object = class {
++    constructor() { }
++};
++foo.set = class {
++    constructor() { }
++};
++foo.string = class {
++    constructor() { }
++};
++foo.symbol = class {
++    constructor() { }
++};
++foo.type = class {
++    constructor() { }
++};
++foo.undefined = class {
++    constructor() { }
++};
++foo.unique = class {
++    constructor() { }
++};
++foo.unknown = class {
++    constructor() { }
++};
++foo.from = class {
++    constructor() { }
++};
++foo.global = class {
++    constructor() { }
++};
++foo.bigint = class {
++    constructor() { }
++};
++foo.of = class {
++    constructor() { }
++};
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty2.js.diff b/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty2.js.diff
new file mode 100644
index 0000000000..d4fca2a339
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/convertClassExpressionToFunctionFromObjectProperty2.js.diff
@@ -0,0 +1,632 @@
+--- old.convertClassExpressionToFunctionFromObjectProperty2.js
++++ new.convertClassExpressionToFunctionFromObjectProperty2.js
+@@= skipped -242, +242 lines =@@
+
+ //// [convertClassExpressionToFunctionFromObjectProperty2.js]
+ ({
+-    x: /** @class */ (function () {
+-        function x() {
+-        }
+-        return x;
+-    }()),
+-    y: /** @class */ (function () {
+-        function y() {
+-        }
+-        return y;
+-    }()),
++    x: class {
++        constructor() { }
++    },
++    y: class {
++        constructor() { }
++    },
+     // keywords
+-    break: /** @class */ (function () {
+-        function break_1() {
+-        }
+-        return break_1;
+-    }()),
+-    case: /** @class */ (function () {
+-        function case_1() {
+-        }
+-        return case_1;
+-    }()),
+-    catch: /** @class */ (function () {
+-        function catch_1() {
+-        }
+-        return catch_1;
+-    }()),
+-    class: /** @class */ (function () {
+-        function class_1() {
+-        }
+-        return class_1;
+-    }()),
+-    const: /** @class */ (function () {
+-        function const_1() {
+-        }
+-        return const_1;
+-    }()),
+-    continue: /** @class */ (function () {
+-        function continue_1() {
+-        }
+-        return continue_1;
+-    }()),
+-    debugger: /** @class */ (function () {
+-        function debugger_1() {
+-        }
+-        return debugger_1;
+-    }()),
+-    default: /** @class */ (function () {
+-        function default_1() {
+-        }
+-        return default_1;
+-    }()),
+-    delete: /** @class */ (function () {
+-        function delete_1() {
+-        }
+-        return delete_1;
+-    }()),
+-    do: /** @class */ (function () {
+-        function do_1() {
+-        }
+-        return do_1;
+-    }()),
+-    else: /** @class */ (function () {
+-        function else_1() {
+-        }
+-        return else_1;
+-    }()),
+-    enum: /** @class */ (function () {
+-        function enum_1() {
+-        }
+-        return enum_1;
+-    }()),
+-    export: /** @class */ (function () {
+-        function export_1() {
+-        }
+-        return export_1;
+-    }()),
+-    extends: /** @class */ (function () {
+-        function extends_1() {
+-        }
+-        return extends_1;
+-    }()),
+-    false: /** @class */ (function () {
+-        function false_1() {
+-        }
+-        return false_1;
+-    }()),
+-    finally: /** @class */ (function () {
+-        function finally_1() {
+-        }
+-        return finally_1;
+-    }()),
+-    for: /** @class */ (function () {
+-        function for_1() {
+-        }
+-        return for_1;
+-    }()),
+-    function: /** @class */ (function () {
+-        function function_1() {
+-        }
+-        return function_1;
+-    }()),
+-    if: /** @class */ (function () {
+-        function if_1() {
+-        }
+-        return if_1;
+-    }()),
+-    import: /** @class */ (function () {
+-        function import_1() {
+-        }
+-        return import_1;
+-    }()),
+-    in: /** @class */ (function () {
+-        function in_1() {
+-        }
+-        return in_1;
+-    }()),
+-    instanceof: /** @class */ (function () {
+-        function instanceof_1() {
+-        }
+-        return instanceof_1;
+-    }()),
+-    new: /** @class */ (function () {
+-        function new_1() {
+-        }
+-        return new_1;
+-    }()),
+-    null: /** @class */ (function () {
+-        function null_1() {
+-        }
+-        return null_1;
+-    }()),
+-    return: /** @class */ (function () {
+-        function return_1() {
+-        }
+-        return return_1;
+-    }()),
+-    super: /** @class */ (function () {
+-        function super_1() {
+-        }
+-        return super_1;
+-    }()),
+-    switch: /** @class */ (function () {
+-        function switch_1() {
+-        }
+-        return switch_1;
+-    }()),
+-    this: /** @class */ (function () {
+-        function this_1() {
+-        }
+-        return this_1;
+-    }()),
+-    throw: /** @class */ (function () {
+-        function throw_1() {
+-        }
+-        return throw_1;
+-    }()),
+-    true: /** @class */ (function () {
+-        function true_1() {
+-        }
+-        return true_1;
+-    }()),
+-    try: /** @class */ (function () {
+-        function try_1() {
+-        }
+-        return try_1;
+-    }()),
+-    typeof: /** @class */ (function () {
+-        function typeof_1() {
+-        }
+-        return typeof_1;
+-    }()),
+-    var: /** @class */ (function () {
+-        function var_1() {
+-        }
+-        return var_1;
+-    }()),
+-    void: /** @class */ (function () {
+-        function void_1() {
+-        }
+-        return void_1;
+-    }()),
+-    while: /** @class */ (function () {
+-        function while_1() {
+-        }
+-        return while_1;
+-    }()),
+-    with: /** @class */ (function () {
+-        function with_1() {
+-        }
+-        return with_1;
+-    }()),
+-    implements: /** @class */ (function () {
+-        function implements_1() {
+-        }
+-        return implements_1;
+-    }()),
+-    interface: /** @class */ (function () {
+-        function interface_1() {
+-        }
+-        return interface_1;
+-    }()),
+-    let: /** @class */ (function () {
+-        function let_1() {
+-        }
+-        return let_1;
+-    }()),
+-    package: /** @class */ (function () {
+-        function package_1() {
+-        }
+-        return package_1;
+-    }()),
+-    private: /** @class */ (function () {
+-        function private_1() {
+-        }
+-        return private_1;
+-    }()),
+-    protected: /** @class */ (function () {
+-        function protected_1() {
+-        }
+-        return protected_1;
+-    }()),
+-    public: /** @class */ (function () {
+-        function public_1() {
+-        }
+-        return public_1;
+-    }()),
+-    static: /** @class */ (function () {
+-        function static_1() {
+-        }
+-        return static_1;
+-    }()),
+-    yield: /** @class */ (function () {
+-        function yield_1() {
+-        }
+-        return yield_1;
+-    }()),
+-    abstract: /** @class */ (function () {
+-        function abstract() {
+-        }
+-        return abstract;
+-    }()),
+-    as: /** @class */ (function () {
+-        function as() {
+-        }
+-        return as;
+-    }()),
+-    asserts: /** @class */ (function () {
+-        function asserts() {
+-        }
+-        return asserts;
+-    }()),
+-    any: /** @class */ (function () {
+-        function any() {
+-        }
+-        return any;
+-    }()),
+-    async: /** @class */ (function () {
+-        function async() {
+-        }
+-        return async;
+-    }()),
+-    await: /** @class */ (function () {
+-        function await() {
+-        }
+-        return await;
+-    }()),
+-    boolean: /** @class */ (function () {
+-        function boolean() {
+-        }
+-        return boolean;
+-    }()),
+-    constructor: /** @class */ (function () {
+-        function constructor() {
+-        }
+-        return constructor;
+-    }()),
+-    declare: /** @class */ (function () {
+-        function declare() {
+-        }
+-        return declare;
+-    }()),
+-    get: /** @class */ (function () {
+-        function get() {
+-        }
+-        return get;
+-    }()),
+-    infer: /** @class */ (function () {
+-        function infer() {
+-        }
+-        return infer;
+-    }()),
+-    is: /** @class */ (function () {
+-        function is() {
+-        }
+-        return is;
+-    }()),
+-    keyof: /** @class */ (function () {
+-        function keyof() {
+-        }
+-        return keyof;
+-    }()),
+-    module: /** @class */ (function () {
+-        function module() {
+-        }
+-        return module;
+-    }()),
+-    namespace: /** @class */ (function () {
+-        function namespace() {
+-        }
+-        return namespace;
+-    }()),
+-    never: /** @class */ (function () {
+-        function never() {
+-        }
+-        return never;
+-    }()),
+-    readonly: /** @class */ (function () {
+-        function readonly() {
+-        }
+-        return readonly;
+-    }()),
+-    require: /** @class */ (function () {
+-        function require() {
+-        }
+-        return require;
+-    }()),
+-    number: /** @class */ (function () {
+-        function number() {
+-        }
+-        return number;
+-    }()),
+-    object: /** @class */ (function () {
+-        function object() {
+-        }
+-        return object;
+-    }()),
+-    set: /** @class */ (function () {
+-        function set() {
+-        }
+-        return set;
+-    }()),
+-    string: /** @class */ (function () {
+-        function string() {
+-        }
+-        return string;
+-    }()),
+-    symbol: /** @class */ (function () {
+-        function symbol() {
+-        }
+-        return symbol;
+-    }()),
+-    type: /** @class */ (function () {
+-        function type() {
+-        }
+-        return type;
+-    }()),
+-    undefined: /** @class */ (function () {
+-        function undefined() {
+-        }
+-        return undefined;
+-    }()),
+-    unique: /** @class */ (function () {
+-        function unique() {
+-        }
+-        return unique;
+-    }()),
+-    unknown: /** @class */ (function () {
+-        function unknown() {
+-        }
+-        return unknown;
+-    }()),
+-    from: /** @class */ (function () {
+-        function from() {
+-        }
+-        return from;
+-    }()),
+-    global: /** @class */ (function () {
+-        function global() {
+-        }
+-        return global;
+-    }()),
+-    bigint: /** @class */ (function () {
+-        function bigint() {
+-        }
+-        return bigint;
+-    }()),
+-    of: /** @class */ (function () {
+-        function of() {
+-        }
+-        return of;
+-    }())
++    break: class {
++        constructor() { }
++    },
++    case: class {
++        constructor() { }
++    },
++    catch: class {
++        constructor() { }
++    },
++    class: class {
++        constructor() { }
++    },
++    const: class {
++        constructor() { }
++    },
++    continue: class {
++        constructor() { }
++    },
++    debugger: class {
++        constructor() { }
++    },
++    default: class {
++        constructor() { }
++    },
++    delete: class {
++        constructor() { }
++    },
++    do: class {
++        constructor() { }
++    },
++    else: class {
++        constructor() { }
++    },
++    enum: class {
++        constructor() { }
++    },
++    export: class {
++        constructor() { }
++    },
++    extends: class {
++        constructor() { }
++    },
++    false: class {
++        constructor() { }
++    },
++    finally: class {
++        constructor() { }
++    },
++    for: class {
++        constructor() { }
++    },
++    function: class {
++        constructor() { }
++    },
++    if: class {
++        constructor() { }
++    },
++    import: class {
++        constructor() { }
++    },
++    in: class {
++        constructor() { }
++    },
++    instanceof: class {
++        constructor() { }
++    },
++    new: class {
++        constructor() { }
++    },
++    null: class {
++        constructor() { }
++    },
++    return: class {
++        constructor() { }
++    },
++    super: class {
++        constructor() { }
++    },
++    switch: class {
++        constructor() { }
++    },
++    this: class {
++        constructor() { }
++    },
++    throw: class {
++        constructor() { }
++    },
++    true: class {
++        constructor() { }
++    },
++    try: class {
++        constructor() { }
++    },
++    typeof: class {
++        constructor() { }
++    },
++    var: class {
++        constructor() { }
++    },
++    void: class {
++        constructor() { }
++    },
++    while: class {
++        constructor() { }
++    },
++    with: class {
++        constructor() { }
++    },
++    implements: class {
++        constructor() { }
++    },
++    interface: class {
++        constructor() { }
++    },
++    let: class {
++        constructor() { }
++    },
++    package: class {
++        constructor() { }
++    },
++    private: class {
++        constructor() { }
++    },
++    protected: class {
++        constructor() { }
++    },
++    public: class {
++        constructor() { }
++    },
++    static: class {
++        constructor() { }
++    },
++    yield: class {
++        constructor() { }
++    },
++    abstract: class {
++        constructor() { }
++    },
++    as: class {
++        constructor() { }
++    },
++    asserts: class {
++        constructor() { }
++    },
++    any: class {
++        constructor() { }
++    },
++    async: class {
++        constructor() { }
++    },
++    await: class {
++        constructor() { }
++    },
++    boolean: class {
++        constructor() { }
++    },
++    constructor: class {
++        constructor() { }
++    },
++    declare: class {
++        constructor() { }
++    },
++    get: class {
++        constructor() { }
++    },
++    infer: class {
++        constructor() { }
++    },
++    is: class {
++        constructor() { }
++    },
++    keyof: class {
++        constructor() { }
++    },
++    module: class {
++        constructor() { }
++    },
++    namespace: class {
++        constructor() { }
++    },
++    never: class {
++        constructor() { }
++    },
++    readonly: class {
++        constructor() { }
++    },
++    require: class {
++        constructor() { }
++    },
++    number: class {
++        constructor() { }
++    },
++    object: class {
++        constructor() { }
++    },
++    set: class {
++        constructor() { }
++    },
++    string: class {
++        constructor() { }
++    },
++    symbol: class {
++        constructor() { }
++    },
++    type: class {
++        constructor() { }
++    },
++    undefined: class {
++        constructor() { }
++    },
++    unique: class {
++        constructor() { }
++    },
++    unknown: class {
++        constructor() { }
++    },
++    from: class {
++        constructor() { }
++    },
++    global: class {
++        constructor() { }
++    },
++    bigint: class {
++        constructor() { }
++    },
++    of: class {
++        constructor() { }
++    }
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.errors.txt b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.errors.txt
index c88882db81..de9cad2cb2 100644
--- a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.errors.txt
@@ -302,7 +302,7 @@ convertKeywordsYes.ts(303,11): error TS1213: Identifier expected. 'yield' is a r
         with,
     }
     
-    module bigModule {
+    namespace bigModule {
         class constructor { }
         class implements { }
               ~~~~~~~~~~
diff --git a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js
index 9873640972..3bead856ff 100644
--- a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js
+++ b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js
@@ -290,7 +290,7 @@ enum bigEnum {
     with,
 }
 
-module bigModule {
+namespace bigModule {
     class constructor { }
     class implements { }
     class interface { }
diff --git a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js.diff b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js.diff
index 54277f9377..d8b143a4dd 100644
--- a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.js.diff
@@ -1,10 +1,11 @@
 --- old.convertKeywordsYes.js
 +++ new.convertKeywordsYes.js
-@@= skipped -384, +384 lines =@@
+@@= skipped -383, +383 lines =@@
+     while: 0,
      with: 0,
  };
- class bigClass {
--    constructor() {
+-var bigClass = /** @class */ (function () {
+-    function bigClass() {
 -        this["constructor"] = 0;
 -        this.any = 0;
 -        this.boolean = 0;
@@ -60,6 +61,9 @@
 -        this.while = 0;
 -        this.with = 0;
 -    }
+-    return bigClass;
+-}());
++class bigClass {
 +    "constructor" = 0;
 +    any = 0;
 +    boolean = 0;
@@ -114,6 +118,110 @@
 +    void = 0;
 +    while = 0;
 +    with = 0;
- }
++}
  var bigEnum;
- (function (bigEnum) {
\ No newline at end of file
+ (function (bigEnum) {
+     bigEnum[bigEnum["constructor"] = 0] = "constructor";
+@@= skipped -118, +115 lines =@@
+ })(bigEnum || (bigEnum = {}));
+ var bigModule;
+ (function (bigModule) {
+-    var constructor = /** @class */ (function () {
+-        function constructor() {
+-        }
+-        return constructor;
+-    }());
+-    var implements = /** @class */ (function () {
+-        function implements_1() {
+-        }
+-        return implements_1;
+-    }());
+-    var interface = /** @class */ (function () {
+-        function interface_1() {
+-        }
+-        return interface_1;
+-    }());
+-    var let = /** @class */ (function () {
+-        function let_1() {
+-        }
+-        return let_1;
+-    }());
+-    var module = /** @class */ (function () {
+-        function module() {
+-        }
+-        return module;
+-    }());
+-    var package = /** @class */ (function () {
+-        function package_1() {
+-        }
+-        return package_1;
+-    }());
+-    var private = /** @class */ (function () {
+-        function private_1() {
+-        }
+-        return private_1;
+-    }());
+-    var protected = /** @class */ (function () {
+-        function protected_1() {
+-        }
+-        return protected_1;
+-    }());
+-    var public = /** @class */ (function () {
+-        function public_1() {
+-        }
+-        return public_1;
+-    }());
+-    var set = /** @class */ (function () {
+-        function set() {
+-        }
+-        return set;
+-    }());
+-    var static = /** @class */ (function () {
+-        function static_1() {
+-        }
+-        return static_1;
+-    }());
+-    var get = /** @class */ (function () {
+-        function get() {
+-        }
+-        return get;
+-    }());
+-    var yield = /** @class */ (function () {
+-        function yield_1() {
+-        }
+-        return yield_1;
+-    }());
+-    var declare = /** @class */ (function () {
+-        function declare() {
+-        }
+-        return declare;
+-    }());
++    class constructor {
++    }
++    class implements {
++    }
++    class interface {
++    }
++    class let {
++    }
++    class module {
++    }
++    class package {
++    }
++    class private {
++    }
++    class protected {
++    }
++    class public {
++    }
++    class set {
++    }
++    class static {
++    }
++    class get {
++    }
++    class yield {
++    }
++    class declare {
++    }
+ })(bigModule || (bigModule = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.symbols b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.symbols
index 8acdd5e2c8..62d0a7f5df 100644
--- a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.symbols
+++ b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.symbols
@@ -835,11 +835,11 @@ enum bigEnum {
 >with : Symbol(bigEnum.with, Decl(convertKeywordsYes.ts, 285, 10))
 }
 
-module bigModule {
+namespace bigModule {
 >bigModule : Symbol(bigModule, Decl(convertKeywordsYes.ts, 287, 1))
 
     class constructor { }
->constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 289, 18))
+>constructor : Symbol(constructor, Decl(convertKeywordsYes.ts, 289, 21))
 
     class implements { }
 >implements : Symbol(implements, Decl(convertKeywordsYes.ts, 290, 25))
diff --git a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.types b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.types
index 53db986a6e..544c9c97de 100644
--- a/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.types
+++ b/testdata/baselines/reference/submodule/compiler/convertKeywordsYes.types
@@ -918,7 +918,7 @@ enum bigEnum {
 >with : bigEnum.with
 }
 
-module bigModule {
+namespace bigModule {
 >bigModule : typeof bigModule
 
     class constructor { }
diff --git a/testdata/baselines/reference/submodule/compiler/correctOrderOfPromiseMethod.js.diff b/testdata/baselines/reference/submodule/compiler/correctOrderOfPromiseMethod.js.diff
index 73b4602ef2..282987b271 100644
--- a/testdata/baselines/reference/submodule/compiler/correctOrderOfPromiseMethod.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/correctOrderOfPromiseMethod.js.diff
@@ -13,21 +13,31 @@
 -        step((generator = generator.apply(thisArg, _arguments || [])).next());
 -    });
 -};
--function countEverything() {
--    return __awaiter(this, void 0, void 0, function* () {
--        const providerA = () => __awaiter(this, void 0, void 0, function* () { return []; });
--        const providerB = () => __awaiter(this, void 0, void 0, function* () { return []; });
--        const [resultA, resultB] = yield Promise.all([
--            providerA(),
--            providerB(),
--        ]);
--        const dataA = resultA;
--        const dataB = resultB;
--        if (dataA && dataB) {
--            return dataA.length + dataB.length;
--        }
--        return 0;
--    });
+-var __generator = (this && this.__generator) || function (thisArg, body) {
+-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+-    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+-    function verb(n) { return function (v) { return step([n, v]); }; }
+-    function step(op) {
+-        if (f) throw new TypeError("Generator is already executing.");
+-        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+-            if (y = 0, t) op = [op[0] & 2, t.value];
+-            switch (op[0]) {
+-                case 0: case 1: t = op; break;
+-                case 4: _.label++; return { value: op[1], done: false };
+-                case 5: _.label++; y = op[1]; op = [0]; continue;
+-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+-                default:
+-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+-                    if (t[2]) _.ops.pop();
+-                    _.trys.pop(); continue;
+-            }
+-            op = body.call(thisArg, _);
+-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
 +async function countEverything() {
 +    const providerA = async () => { return []; };
 +    const providerB = async () => { return []; };
@@ -39,8 +49,38 @@
 +    const dataB = resultB;
 +    if (dataA && dataB) {
 +        return dataA.length + dataB.length;
-+    }
+     }
+-};
+-function countEverything() {
+-    return __awaiter(this, void 0, void 0, function () {
+-        var providerA, providerB, _a, resultA, resultB, dataA, dataB;
+-        var _this = this;
+-        return __generator(this, function (_b) {
+-            switch (_b.label) {
+-                case 0:
+-                    providerA = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
+-                        return [2 /*return*/, []];
+-                    }); }); };
+-                    providerB = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
+-                        return [2 /*return*/, []];
+-                    }); }); };
+-                    return [4 /*yield*/, Promise.all([
+-                            providerA(),
+-                            providerB(),
+-                        ])];
+-                case 1:
+-                    _a = _b.sent(), resultA = _a[0], resultB = _a[1];
+-                    dataA = resultA;
+-                    dataB = resultB;
+-                    if (dataA && dataB) {
+-                        return [2 /*return*/, dataA.length + dataB.length];
+-                    }
+-                    return [2 /*return*/, 0];
+-            }
+-        });
+-    });
 +    return 0;
  }
  // #31179
- const expected = Promise.all(undefined);
\ No newline at end of file
+-var expected = Promise.all(undefined);
++const expected = Promise.all(undefined);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.js.diff b/testdata/baselines/reference/submodule/compiler/correlatedUnions.js.diff
index 8e046ca39f..5efb4fbae5 100644
--- a/testdata/baselines/reference/submodule/compiler/correlatedUnions.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.js.diff
@@ -9,7 +9,165 @@
  function processRecord(rec) {
      rec.f(rec.v);
  }
-@@= skipped -214, +212 lines =@@
+ processRecord(r1);
+ processRecord(r2);
+-processRecord({ kind: 'n', v: 42, f: function (v) { return v.toExponential(); } });
++processRecord({ kind: 'n', v: 42, f: v => v.toExponential() });
+ function renderTextField(props) { }
+ function renderSelectField(props) { }
+-var renderFuncs = {
++const renderFuncs = {
+     text: renderTextField,
+     select: renderSelectField,
+ };
+ function renderField(field) {
+-    var renderFn = renderFuncs[field.type];
++    const renderFn = renderFuncs[field.type];
+     renderFn(field.data);
+ }
+-var handlers = {
+-    foo: function (s) { return s.length; },
+-    bar: function (n) { return n.toFixed(2); }
++const handlers = {
++    foo: s => s.length,
++    bar: n => n.toFixed(2)
+ };
+-var data = [
++const data = [
+     { type: 'foo', data: 'abc' },
+     { type: 'foo', data: 'def' },
+     { type: 'bar', data: 42 },
+ ];
+ function process(data) {
+-    data.forEach(function (block) {
++    data.forEach(block => {
+         if (block.type in handlers) {
+             handlers[block.type](block.data);
+         }
+@@= skipped -36, +34 lines =@@
+ }
+ process(data);
+ process([{ type: 'foo', data: 'abc' }]);
+-function call(_a) {
+-    var letter = _a.letter, caller = _a.caller;
++function call({ letter, caller }) {
+     caller(letter);
+ }
+ call(xx);
+ function processEvents(events) {
+-    var _loop_1 = function (event_1) {
+-        document.addEventListener(event_1.name, function (ev) { return event_1.callback(ev); }, { once: event_1.once });
+-    };
+-    for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
+-        var event_1 = events_1[_i];
+-        _loop_1(event_1);
++    for (const event of events) {
++        document.addEventListener(event.name, (ev) => event.callback(ev), { once: event.once });
+     }
+ }
+-function createEventListener(_a) {
+-    var name = _a.name, _b = _a.once, once = _b === void 0 ? false : _b, callback = _a.callback;
+-    return { name: name, once: once, callback: callback };
++function createEventListener({ name, once = false, callback }) {
++    return { name, once, callback };
+ }
+-var clickEvent = createEventListener({
++const clickEvent = createEventListener({
+     name: "click",
+-    callback: function (ev) { return console.log(ev); },
++    callback: ev => console.log(ev),
+ });
+-var scrollEvent = createEventListener({
++const scrollEvent = createEventListener({
+     name: "scroll",
+-    callback: function (ev) { return console.log(ev); },
++    callback: ev => console.log(ev),
+ });
+ processEvents([clickEvent, scrollEvent]);
+ processEvents([
+-    { name: "click", callback: function (ev) { return console.log(ev); } },
+-    { name: "scroll", callback: function (ev) { return console.log(ev); } },
++    { name: "click", callback: ev => console.log(ev) },
++    { name: "scroll", callback: ev => console.log(ev) },
+ ]);
+ // --------
+ function ff1() {
+-    var funs = {
+-        sum: function (a, b) { return a + b; },
+-        concat: function (a, b, c) { return a + b + c; }
++    const funs = {
++        sum: (a, b) => a + b,
++        concat: (a, b, c) => a + b + c
+     };
+-    function apply(funKey) {
+-        var args = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            args[_i - 1] = arguments[_i];
+-        }
+-        var fn = funs[funKey];
+-        fn.apply(void 0, args);
++    function apply(funKey, ...args) {
++        const fn = funs[funKey];
++        fn(...args);
+     }
+-    var x1 = apply('sum', 1, 2);
+-    var x2 = apply('concat', 'str1', 'str2', 'str3');
++    const x1 = apply('sum', 1, 2);
++    const x2 = apply('concat', 'str1', 'str2', 'str3');
+ }
+ function f1(funcs, key, arg) {
+     funcs[key](arg);
+ }
+ function f2(funcs, key, arg) {
+-    var func = funcs[key]; // Type Funcs[K]
++    const func = funcs[key]; // Type Funcs[K]
+     func(arg);
+ }
+ function f3(funcs, key, arg) {
+-    var func = funcs[key];
++    const func = funcs[key];
+     func(arg);
+ }
+ function f4(x, y) {
+     x = y;
+ }
+-var ref = {
++const ref = {
+     someKey: { name: "" },
+     someOtherKey: { name: 42 }
+ };
+ function func(k) {
+-    var myObj = ref[k];
++    const myObj = ref[k];
+     if (myObj) {
+         return myObj.name;
+     }
+-    var myObj2 = ref[k];
++    const myObj2 = ref[k];
+     if (myObj2) {
+         return myObj2.name;
+     }
+@@= skipped -80, +70 lines =@@
+ function foo(prop, f) {
+     bar(f[prop]);
+ }
+-var ALL_BARS = [{ name: 'a' }, { name: 'b' }];
+-var BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name');
+-var getStringAndNumberFromOriginalAndMapped = function (original, mappedFromOriginal, key, nestedKey) {
++const ALL_BARS = [{ name: 'a' }, { name: 'b' }];
++const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name');
++const getStringAndNumberFromOriginalAndMapped = (original, mappedFromOriginal, key, nestedKey) => {
+     return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]];
+ };
+ function getConfigOrDefault(userConfig, key, defaultValue) {
+-    var userValue = userConfig[key];
+-    var assertedCheck = userValue ? userValue : defaultValue;
++    const userValue = userConfig[key];
++    const assertedCheck = userValue ? userValue : defaultValue;
+     return assertedCheck;
+ }
+ function getValueConcrete(o, k) {
+@@= skipped -108, +108 lines =@@
  declare function createEventListener({ name, once, callback }: Ev): Ev;
  declare const clickEvent: {
      readonly name: "click";
diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.symbols.diff b/testdata/baselines/reference/submodule/compiler/correlatedUnions.symbols.diff
new file mode 100644
index 0000000000..620cb2b006
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.symbols.diff
@@ -0,0 +1,10 @@
+--- old.correlatedUnions.symbols
++++ new.correlatedUnions.symbols
+@@= skipped -788, +788 lines =@@
+ declare function makeCompleteLookupMapping, Attr extends keyof T[number]>(
+ >makeCompleteLookupMapping : Symbol(makeCompleteLookupMapping, Decl(correlatedUnions.ts, 221, 38))
+ >T : Symbol(T, Decl(correlatedUnions.ts, 225, 43))
+->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --))
+ >Attr : Symbol(Attr, Decl(correlatedUnions.ts, 225, 72))
+ >T : Symbol(T, Decl(correlatedUnions.ts, 225, 43))
diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff
index a66455f4f2..1928f8891d 100644
--- a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff
@@ -100,10 +100,18 @@
 
  function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) {
 ->f4 : (x: Funcs[keyof ArgMap], y: Funcs[K]) => void
+->x : Func<"b"> | Func<"a">
 +>f4 : (x: Func<"a"> | Func<"b">, y: Funcs[K]) => void
- >x : Func<"a"> | Func<"b">
++>x : Func<"a"> | Func<"b">
  >y : Funcs[K]
 
+     x = y;
+ >x = y : Funcs[K]
+->x : Func<"b"> | Func<"a">
++>x : Func<"a"> | Func<"b">
+ >y : Funcs[K]
+ }
+
 @@= skipped -89, +89 lines =@@
  }
 
diff --git a/testdata/baselines/reference/submodule/compiler/covariance1.js b/testdata/baselines/reference/submodule/compiler/covariance1.js
index 47e8379f28..7300b86599 100644
--- a/testdata/baselines/reference/submodule/compiler/covariance1.js
+++ b/testdata/baselines/reference/submodule/compiler/covariance1.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/covariance1.ts] ////
 
 //// [covariance1.ts]
-module M {
+namespace M {
 
     interface X { m1:number; }
     export class XX implements X { constructor(public m1:number) { } }
diff --git a/testdata/baselines/reference/submodule/compiler/covariance1.js.diff b/testdata/baselines/reference/submodule/compiler/covariance1.js.diff
index 7127e8cc70..73205e1ffb 100644
--- a/testdata/baselines/reference/submodule/compiler/covariance1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/covariance1.js.diff
@@ -1,10 +1,19 @@
 --- old.covariance1.js
 +++ new.covariance1.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -21, +21 lines =@@
+ //// [covariance1.js]
  var M;
  (function (M) {
-     class XX {
+-    var XX = /** @class */ (function () {
+-        function XX(m1) {
++    class XX {
 +        m1;
-         constructor(m1) {
++        constructor(m1) {
              this.m1 = m1;
-         }
\ No newline at end of file
+         }
+-        return XX;
+-    }());
++    }
+     M.XX = XX;
+     function f(y) { }
+     M.f = f;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/covariance1.symbols b/testdata/baselines/reference/submodule/compiler/covariance1.symbols
index 282e2d4f43..97beb9bc17 100644
--- a/testdata/baselines/reference/submodule/compiler/covariance1.symbols
+++ b/testdata/baselines/reference/submodule/compiler/covariance1.symbols
@@ -1,22 +1,22 @@
 //// [tests/cases/compiler/covariance1.ts] ////
 
 === covariance1.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(covariance1.ts, 0, 0))
 
     interface X { m1:number; }
->X : Symbol(X, Decl(covariance1.ts, 0, 10))
+>X : Symbol(X, Decl(covariance1.ts, 0, 13))
 >m1 : Symbol(X.m1, Decl(covariance1.ts, 2, 17))
 
     export class XX implements X { constructor(public m1:number) { } }
 >XX : Symbol(XX, Decl(covariance1.ts, 2, 30))
->X : Symbol(X, Decl(covariance1.ts, 0, 10))
+>X : Symbol(X, Decl(covariance1.ts, 0, 13))
 >m1 : Symbol(XX.m1, Decl(covariance1.ts, 3, 47))
 
     interface Y { x:X; }
 >Y : Symbol(Y, Decl(covariance1.ts, 3, 70))
 >x : Symbol(Y.x, Decl(covariance1.ts, 5, 17))
->X : Symbol(X, Decl(covariance1.ts, 0, 10))
+>X : Symbol(X, Decl(covariance1.ts, 0, 13))
 
     export function f(y:Y) { }
 >f : Symbol(f, Decl(covariance1.ts, 5, 24))
@@ -25,7 +25,7 @@ module M {
 
     var a:X;
 >a : Symbol(a, Decl(covariance1.ts, 9, 7))
->X : Symbol(X, Decl(covariance1.ts, 0, 10))
+>X : Symbol(X, Decl(covariance1.ts, 0, 13))
 
     f({x:a}); // ok
 >f : Symbol(f, Decl(covariance1.ts, 5, 24))
diff --git a/testdata/baselines/reference/submodule/compiler/covariance1.types b/testdata/baselines/reference/submodule/compiler/covariance1.types
index d5012697ce..bf5232dc97 100644
--- a/testdata/baselines/reference/submodule/compiler/covariance1.types
+++ b/testdata/baselines/reference/submodule/compiler/covariance1.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/covariance1.ts] ////
 
 === covariance1.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     interface X { m1:number; }
diff --git a/testdata/baselines/reference/submodule/compiler/crashInEmitTokenWithComment.js.diff b/testdata/baselines/reference/submodule/compiler/crashInEmitTokenWithComment.js.diff
new file mode 100644
index 0000000000..efa1cd0e11
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashInEmitTokenWithComment.js.diff
@@ -0,0 +1,15 @@
+--- old.crashInEmitTokenWithComment.js
++++ new.crashInEmitTokenWithComment.js
+@@= skipped -8, +8 lines =@@
+
+ //// [crashInEmitTokenWithComment.js]
+ // GH#32358
+-var fn = function (param) { return undefined; };
+-var foo = { bar: 'a' };
+-fn(function (_a) {
+-    var _b = foo.bar, c = _a[_b];
+-    return undefined;
+-});
++const fn = (param) => undefined;
++const foo = { bar: 'a' };
++fn(({ [foo.bar]: c }) => undefined);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.js.diff b/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.js.diff
new file mode 100644
index 0000000000..b8854a1bfa
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.js.diff
@@ -0,0 +1,24 @@
+--- old.crashInGetTextOfComputedPropertyName.js
++++ new.crashInGetTextOfComputedPropertyName.js
+@@= skipped -34, +34 lines =@@
+ //// [crashInGetTextOfComputedPropertyName.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var itemId = 'some-id';
++const itemId = 'some-id';
+ // --- test on first level ---
+-var items = {};
+-var _a = items, _b = itemId, itemOk1 = _a[_b];
++const items = {};
++const { [itemId]: itemOk1 } = items;
+ typeof itemOk1; // pass
+-var objWithItems = { items: {} };
+-var itemOk2 = objWithItems.items[itemId];
++const objWithItems = { items: {} };
++const itemOk2 = objWithItems.items[itemId];
+ typeof itemOk2; // pass
+-var _c = objWithItems, _d = _c.items /*happens when default value is provided*/, _e = _d === void 0 ? {} : _d /*happens when default value is provided*/, _f = itemId, itemWithTSError = _e[_f];
++const { items: { [itemId]: itemWithTSError } = {} /*happens when default value is provided*/ } = objWithItems;
+ // in order to re-produce the error, uncomment next line:
+ typeof itemWithTSError; // :(
+ // will result in:
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.types.diff b/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.types.diff
new file mode 100644
index 0000000000..41bcee6d2f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashInGetTextOfComputedPropertyName.types.diff
@@ -0,0 +1,29 @@
+--- old.crashInGetTextOfComputedPropertyName.types
++++ new.crashInGetTextOfComputedPropertyName.types
+@@= skipped -26, +26 lines =@@
+ >items : { [id: string]: AB; }
+
+ typeof itemOk1 // pass
+->typeof itemOk1 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof itemOk1 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >itemOk1 : AB
+
+ // --- test on second level ---
+@@= skipped -24, +24 lines =@@
+ >itemId : "some-id"
+
+ typeof itemOk2 // pass
+->typeof itemOk2 : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof itemOk2 : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >itemOk2 : AB
+
+ const {
+@@= skipped -15, +15 lines =@@
+
+ // in order to re-produce the error, uncomment next line:
+ typeof itemWithTSError // :(
+->typeof itemWithTSError : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof itemWithTSError : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >itemWithTSError : AB
+
+ // will result in:
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashInResolveInterface.js.diff b/testdata/baselines/reference/submodule/compiler/crashInResolveInterface.js.diff
new file mode 100644
index 0000000000..7277b00ae5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashInResolveInterface.js.diff
@@ -0,0 +1,10 @@
+--- old.crashInResolveInterface.js
++++ new.crashInResolveInterface.js
+@@= skipped -19, +19 lines =@@
+
+ //// [file1.js]
+ var q1;
+-var x = q1.each(function (x) { return c.log(x); });
++var x = q1.each(x => c.log(x));
+ //// [file2.js]
+ ///
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashInresolveReturnStatement.js.diff b/testdata/baselines/reference/submodule/compiler/crashInresolveReturnStatement.js.diff
new file mode 100644
index 0000000000..975372bce3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashInresolveReturnStatement.js.diff
@@ -0,0 +1,43 @@
+--- old.crashInresolveReturnStatement.js
++++ new.crashInresolveReturnStatement.js
+@@= skipped -20, +20 lines =@@
+
+
+ //// [crashInresolveReturnStatement.js]
+-var WorkItemToolbar = /** @class */ (function () {
+-    function WorkItemToolbar() {
+-    }
+-    WorkItemToolbar.prototype.onToolbarItemClick = function () {
++class WorkItemToolbar {
++    onToolbarItemClick() {
+         WITDialogs.createCopyOfWorkItem();
+-    };
+-    return WorkItemToolbar;
+-}());
+-var CreateCopyOfWorkItemDialog = /** @class */ (function () {
+-    function CreateCopyOfWorkItemDialog() {
+     }
+-    CreateCopyOfWorkItemDialog.prototype.getDialogResult = function () {
++}
++class CreateCopyOfWorkItemDialog {
++    getDialogResult() {
+         return null;
+-    };
+-    return CreateCopyOfWorkItemDialog;
+-}());
++    }
++}
+ function createWorkItemDialog(dialogType) {
+ }
+-var WITDialogs = /** @class */ (function () {
+-    function WITDialogs() {
+-    }
+-    WITDialogs.createCopyOfWorkItem = function () {
++class WITDialogs {
++    static createCopyOfWorkItem() {
+         createWorkItemDialog(CreateCopyOfWorkItemDialog);
+-    };
+-    return WITDialogs;
+-}());
++    }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashInsourcePropertyIsRelatableToTargetProperty.js.diff b/testdata/baselines/reference/submodule/compiler/crashInsourcePropertyIsRelatableToTargetProperty.js.diff
index db310f0560..b8a8a0754d 100644
--- a/testdata/baselines/reference/submodule/compiler/crashInsourcePropertyIsRelatableToTargetProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/crashInsourcePropertyIsRelatableToTargetProperty.js.diff
@@ -1,13 +1,42 @@
 --- old.crashInsourcePropertyIsRelatableToTargetProperty.js
 +++ new.crashInsourcePropertyIsRelatableToTargetProperty.js
-@@= skipped -13, +13 lines =@@
+@@= skipped -12, +12 lines =@@
+
 
  //// [crashInsourcePropertyIsRelatableToTargetProperty.js]
- class C {
--    constructor() {
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var C = /** @class */ (function () {
+-    function C() {
 -        this.x = 1;
 -    }
+-    return C;
+-}());
+-var D = /** @class */ (function (_super) {
+-    __extends(D, _super);
+-    function D() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return D;
+-}(C));
++class C {
 +    x = 1;
- }
- class D extends C {
++}
++class D extends C {
++}
+ function foo(x, items) {
+     return null;
  }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashOnMethodSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/crashOnMethodSignatures.js.diff
new file mode 100644
index 0000000000..fb9d26ff30
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/crashOnMethodSignatures.js.diff
@@ -0,0 +1,13 @@
+--- old.crashOnMethodSignatures.js
++++ new.crashOnMethodSignatures.js
+@@= skipped -6, +6 lines =@@
+
+
+ //// [crashOnMethodSignatures.js]
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    return A;
+-}());
++class A {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.errors.txt b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.errors.txt
index 57eef1da00..771d1ea21b 100644
--- a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.errors.txt
@@ -2,7 +2,7 @@ crashRegressionTest.ts(16,56): error TS2339: Property '_name' does not exist on
 
 
 ==== crashRegressionTest.ts (1 errors) ====
-    module MsPortal.Util.TemplateEngine {
+    namespace MsPortal.Util.TemplateEngine {
         "use strict";
      
         interface TemplateKeyValue {
diff --git a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js
index d8ce084ae8..ab323c92e5 100644
--- a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js
+++ b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/crashRegressionTest.ts] ////
 
 //// [crashRegressionTest.ts]
-module MsPortal.Util.TemplateEngine {
+namespace MsPortal.Util.TemplateEngine {
     "use strict";
  
     interface TemplateKeyValue {
diff --git a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js.diff b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js.diff
index 30ca59df4b..54e6ef871d 100644
--- a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.js.diff
@@ -11,22 +11,32 @@
 +        let TemplateEngine;
          (function (TemplateEngine) {
              "use strict";
+-            var StringTemplate = /** @class */ (function () {
+-                function StringTemplate(templateStorage) {
 +            "use strict";
-             class StringTemplate {
++            class StringTemplate {
 +                _templateStorage;
-                 constructor(templateStorage) {
++                constructor(templateStorage) {
                      this._templateStorage = templateStorage;
                  }
-@@= skipped -14, +16 lines =@@
-                 }
-             }
-             class TemplateStorage {
--                constructor() {
+-                StringTemplate.prototype.text = function (value) {
++                text(value) {
+                     this._templateStorage.templateSources[this._name] = value;
+-                };
+-                return StringTemplate;
+-            }());
+-            var TemplateStorage = /** @class */ (function () {
+-                function TemplateStorage() {
 -                    this.templateSources = {};
 -                    this.templateData = {};
--                }
+                 }
+-                return TemplateStorage;
+-            }());
++            }
++            class TemplateStorage {
 +                templateSources = {};
 +                templateData = {};
-             }
++            }
              TemplateEngine.TemplateStorage = TemplateStorage;
-         })(TemplateEngine = Util.TemplateEngine || (Util.TemplateEngine = {}));
\ No newline at end of file
+         })(TemplateEngine = Util.TemplateEngine || (Util.TemplateEngine = {}));
+     })(Util = MsPortal.Util || (MsPortal.Util = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.symbols b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.symbols
index fd06da713e..feff5a7465 100644
--- a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.symbols
+++ b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.symbols
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/crashRegressionTest.ts] ////
 
 === crashRegressionTest.ts ===
-module MsPortal.Util.TemplateEngine {
+namespace MsPortal.Util.TemplateEngine {
 >MsPortal : Symbol(MsPortal, Decl(crashRegressionTest.ts, 0, 0))
->Util : Symbol(Util, Decl(crashRegressionTest.ts, 0, 16))
->TemplateEngine : Symbol(TemplateEngine, Decl(crashRegressionTest.ts, 0, 21))
+>Util : Symbol(Util, Decl(crashRegressionTest.ts, 0, 19))
+>TemplateEngine : Symbol(TemplateEngine, Decl(crashRegressionTest.ts, 0, 24))
 
     "use strict";
  
diff --git a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.types b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.types
index 511da8f654..ae345e133e 100644
--- a/testdata/baselines/reference/submodule/compiler/crashRegressionTest.types
+++ b/testdata/baselines/reference/submodule/compiler/crashRegressionTest.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/crashRegressionTest.ts] ////
 
 === crashRegressionTest.ts ===
-module MsPortal.Util.TemplateEngine {
+namespace MsPortal.Util.TemplateEngine {
 >MsPortal : typeof MsPortal
 >Util : typeof Util
 >TemplateEngine : typeof TemplateEngine
diff --git a/testdata/baselines/reference/submodule/compiler/createArray.js.diff b/testdata/baselines/reference/submodule/compiler/createArray.js.diff
new file mode 100644
index 0000000000..d7005cfd57
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/createArray.js.diff
@@ -0,0 +1,16 @@
+--- old.createArray.js
++++ new.createArray.js
+@@= skipped -18, +18 lines =@@
+
+ //// [createArray.js]
+ var na = new number[];
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
++class C {
++}
+ new C[];
+ var ba = new boolean[];
+ var sa = new string[];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/ctsFileInEsnextHelpers.js.diff b/testdata/baselines/reference/submodule/compiler/ctsFileInEsnextHelpers.js.diff
index 9c35582427..e8be856624 100644
--- a/testdata/baselines/reference/submodule/compiler/ctsFileInEsnextHelpers.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/ctsFileInEsnextHelpers.js.diff
@@ -6,8 +6,15 @@
  exports.foo = foo;
 -var tslib_1 = require("tslib");
 -function foo() {
--    return tslib_1.__awaiter(this, void 0, void 0, function* () {
--        yield 0;
+-    return tslib_1.__awaiter(this, void 0, void 0, function () {
+-        return tslib_1.__generator(this, function (_a) {
+-            switch (_a.label) {
+-                case 0: return [4 /*yield*/, 0];
+-                case 1:
+-                    _a.sent();
+-                    return [2 /*return*/];
+-            }
+-        });
 -    });
 +async function foo() {
 +    await 0;
diff --git a/testdata/baselines/reference/submodule/compiler/dataViewConstructor.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/dataViewConstructor.errors.txt.diff
new file mode 100644
index 0000000000..55319106dc
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/dataViewConstructor.errors.txt.diff
@@ -0,0 +1,22 @@
+--- old.dataViewConstructor.errors.txt
++++ new.dataViewConstructor.errors.txt
+@@= skipped -0, +0 lines =@@
+ dataViewConstructor.ts(1,14): error TS2345: Argument of type 'Uint8Array' is not assignable to parameter of type 'ArrayBuffer & { BYTES_PER_ELEMENT?: never; }'.
+-  Type 'Uint8Array' is not assignable to type 'ArrayBuffer'.
+-    Types of property '[Symbol.toStringTag]' are incompatible.
+-      Type '"Uint8Array"' is not assignable to type '"ArrayBuffer"'.
++  Type 'Uint8Array' is not assignable to type '{ BYTES_PER_ELEMENT?: never; }'.
++    Types of property 'BYTES_PER_ELEMENT' are incompatible.
++      Type 'number' is not assignable to type 'never'.
+
+
+ ==== dataViewConstructor.ts (1 errors) ====
+     new DataView(new Uint8Array(32)); // should error
+                  ~~~~~~~~~~~~~~~~~~
+ !!! error TS2345: Argument of type 'Uint8Array' is not assignable to parameter of type 'ArrayBuffer & { BYTES_PER_ELEMENT?: never; }'.
+-!!! error TS2345:   Type 'Uint8Array' is not assignable to type 'ArrayBuffer'.
+-!!! error TS2345:     Types of property '[Symbol.toStringTag]' are incompatible.
+-!!! error TS2345:       Type '"Uint8Array"' is not assignable to type '"ArrayBuffer"'.
++!!! error TS2345:   Type 'Uint8Array' is not assignable to type '{ BYTES_PER_ELEMENT?: never; }'.
++!!! error TS2345:     Types of property 'BYTES_PER_ELEMENT' are incompatible.
++!!! error TS2345:       Type 'number' is not assignable to type 'never'.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/dataViewConstructor.symbols.diff b/testdata/baselines/reference/submodule/compiler/dataViewConstructor.symbols.diff
new file mode 100644
index 0000000000..f75baff871
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/dataViewConstructor.symbols.diff
@@ -0,0 +1,10 @@
+--- old.dataViewConstructor.symbols
++++ new.dataViewConstructor.symbols
+@@= skipped -1, +1 lines =@@
+
+ === dataViewConstructor.ts ===
+ new DataView(new Uint8Array(32)); // should error
+->DataView : Symbol(DataView, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>DataView : Symbol(DataView, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/declFileAccessors.js.diff
new file mode 100644
index 0000000000..3c17ee8a20
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileAccessors.js.diff
@@ -0,0 +1,262 @@
+--- old.declFileAccessors.js
++++ new.declFileAccessors.js
+@@= skipped -104, +104 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.c1 = void 0;
+ /** This is comment for c1*/
+-var c1 = /** @class */ (function () {
+-    function c1() {
+-    }
+-    Object.defineProperty(c1.prototype, "p3", {
+-        /** getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1.prototype, "pp3", {
+-        /** private getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** private setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1, "s3", {
+-        /** static getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1.prototype, "nc_p3", {
+-        get: function () {
+-            return 10;
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1.prototype, "nc_pp3", {
+-        get: function () {
+-            return 10;
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1, "nc_s3", {
+-        get: function () {
+-            return "";
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1.prototype, "onlyGetter", {
+-        // Only getter property
+-        get: function () {
+-            return 10;
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c1.prototype, "onlySetter", {
+-        // Only setter property
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return c1;
+-}());
++class c1 {
++    /** getter property*/
++    get p3() {
++        return 10;
++    }
++    /** setter property*/
++    set p3(/** this is value*/ value) {
++    }
++    /** private getter property*/
++    get pp3() {
++        return 10;
++    }
++    /** private setter property*/
++    set pp3(/** this is value*/ value) {
++    }
++    /** static getter property*/
++    static get s3() {
++        return 10;
++    }
++    /** setter property*/
++    static set s3(/** this is value*/ value) {
++    }
++    get nc_p3() {
++        return 10;
++    }
++    set nc_p3(value) {
++    }
++    get nc_pp3() {
++        return 10;
++    }
++    set nc_pp3(value) {
++    }
++    static get nc_s3() {
++        return "";
++    }
++    static set nc_s3(value) {
++    }
++    // Only getter property
++    get onlyGetter() {
++        return 10;
++    }
++    // Only setter property
++    set onlySetter(value) {
++    }
++}
+ exports.c1 = c1;
+ //// [declFileAccessors_1.js]
+ /** This is comment for c2 - the global class*/
+-var c2 = /** @class */ (function () {
+-    function c2() {
+-    }
+-    Object.defineProperty(c2.prototype, "p3", {
+-        /** getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2.prototype, "pp3", {
+-        /** private getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** private setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2, "s3", {
+-        /** static getter property*/
+-        get: function () {
+-            return 10;
+-        },
+-        /** setter property*/
+-        set: function (/** this is value*/ value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2.prototype, "nc_p3", {
+-        get: function () {
+-            return 10;
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2.prototype, "nc_pp3", {
+-        get: function () {
+-            return 10;
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2, "nc_s3", {
+-        get: function () {
+-            return "";
+-        },
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2.prototype, "onlyGetter", {
+-        // Only getter property
+-        get: function () {
+-            return 10;
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(c2.prototype, "onlySetter", {
+-        // Only setter property
+-        set: function (value) {
+-        },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return c2;
+-}());
++class c2 {
++    /** getter property*/
++    get p3() {
++        return 10;
++    }
++    /** setter property*/
++    set p3(/** this is value*/ value) {
++    }
++    /** private getter property*/
++    get pp3() {
++        return 10;
++    }
++    /** private setter property*/
++    set pp3(/** this is value*/ value) {
++    }
++    /** static getter property*/
++    static get s3() {
++        return 10;
++    }
++    /** setter property*/
++    static set s3(/** this is value*/ value) {
++    }
++    get nc_p3() {
++        return 10;
++    }
++    set nc_p3(value) {
++    }
++    get nc_pp3() {
++        return 10;
++    }
++    set nc_pp3(value) {
++    }
++    static get nc_s3() {
++        return "";
++    }
++    static set nc_s3(value) {
++    }
++    // Only getter property
++    get onlyGetter() {
++        return 10;
++    }
++    // Only setter property
++    set onlySetter(value) {
++    }
++}
+
+
+ //// [declFileAccessors_0.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration.js.diff
new file mode 100644
index 0000000000..ce04db935b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileAliasUseBeforeDeclaration.js
++++ new.declFileAliasUseBeforeDeclaration.js
+@@= skipped -10, +10 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
+ exports.Foo = Foo;
+ //// [declFileAliasUseBeforeDeclaration_test.js]
+ "use strict";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.js b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.js
index 2747dd997d..5853848f91 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.js
@@ -2,7 +2,7 @@
 
 //// [declFileAliasUseBeforeDeclaration2.ts]
 declare module "test" {
-    module A {
+    namespace A {
         class C {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.symbols b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.symbols
index 5c03ec2ea1..cc414b955a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.symbols
@@ -4,11 +4,11 @@
 declare module "test" {
 >"test" : Symbol("test", Decl(declFileAliasUseBeforeDeclaration2.ts, 0, 0))
 
-    module A {
+    namespace A {
 >A : Symbol(A, Decl(declFileAliasUseBeforeDeclaration2.ts, 0, 23))
 
         class C {
->C : Symbol(C, Decl(declFileAliasUseBeforeDeclaration2.ts, 1, 14))
+>C : Symbol(C, Decl(declFileAliasUseBeforeDeclaration2.ts, 1, 17))
         }
     }
     class B extends E {
@@ -18,5 +18,5 @@ declare module "test" {
     import E = A.C;
 >E : Symbol(E, Decl(declFileAliasUseBeforeDeclaration2.ts, 6, 5))
 >A : Symbol(A, Decl(declFileAliasUseBeforeDeclaration2.ts, 0, 23))
->C : Symbol(E, Decl(declFileAliasUseBeforeDeclaration2.ts, 1, 14))
+>C : Symbol(E, Decl(declFileAliasUseBeforeDeclaration2.ts, 1, 17))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.types b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.types
index 181ee20012..455d324ce7 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileAliasUseBeforeDeclaration2.types
@@ -4,7 +4,7 @@
 declare module "test" {
 >"test" : typeof import("test")
 
-    module A {
+    namespace A {
 >A : typeof A
 
         class C {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.js b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.js
index 93df52982b..267611214d 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.js
@@ -2,8 +2,8 @@
 
 //// [declFileAmbientExternalModuleWithSingleExportedModule_0.ts]
 declare module "SubModule" {
-    export module m {
-        export module m3 {
+    export namespace m {
+        export namespace m3 {
             interface c {
             }
         }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.symbols b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.symbols
index fd4567e0eb..81c1f69822 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.symbols
@@ -9,22 +9,22 @@ export var x: SubModule.m.m3.c;
 >x : Symbol(x, Decl(declFileAmbientExternalModuleWithSingleExportedModule_1.ts, 2, 10))
 >SubModule : Symbol(SubModule, Decl(declFileAmbientExternalModuleWithSingleExportedModule_1.ts, 0, 0))
 >m : Symbol(SubModule.m, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 0, 28))
->m3 : Symbol(SubModule.m.m3, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 1, 21))
->c : Symbol(SubModule.m.m3.c, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 2, 26))
+>m3 : Symbol(SubModule.m.m3, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 1, 24))
+>c : Symbol(SubModule.m.m3.c, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 2, 29))
 
 
 === declFileAmbientExternalModuleWithSingleExportedModule_0.ts ===
 declare module "SubModule" {
 >"SubModule" : Symbol("SubModule", Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 0, 0))
 
-    export module m {
+    export namespace m {
 >m : Symbol(m, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 0, 28))
 
-        export module m3 {
->m3 : Symbol(m3, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 1, 21))
+        export namespace m3 {
+>m3 : Symbol(m3, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 1, 24))
 
             interface c {
->c : Symbol(c, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 2, 26))
+>c : Symbol(c, Decl(declFileAmbientExternalModuleWithSingleExportedModule_0.ts, 2, 29))
             }
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.types b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.types
index bb2c1d2759..08c21b45e5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileAmbientExternalModuleWithSingleExportedModule.types
@@ -16,8 +16,8 @@ export var x: SubModule.m.m3.c;
 declare module "SubModule" {
 >"SubModule" : typeof import("SubModule")
 
-    export module m {
-        export module m3 {
+    export namespace m {
+        export namespace m3 {
             interface c {
             }
         }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileClassExtendsNull.js.diff b/testdata/baselines/reference/submodule/compiler/declFileClassExtendsNull.js.diff
new file mode 100644
index 0000000000..79ba7e372c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileClassExtendsNull.js.diff
@@ -0,0 +1,32 @@
+--- old.declFileClassExtendsNull.js
++++ new.declFileClassExtendsNull.js
+@@= skipped -4, +4 lines =@@
+ }
+
+ //// [declFileClassExtendsNull.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var ExtendsNull = /** @class */ (function (_super) {
+-    __extends(ExtendsNull, _super);
+-    function ExtendsNull() {
+-    }
+-    return ExtendsNull;
+-}(null));
++class ExtendsNull extends null {
++}
+
+
+ //// [declFileClassExtendsNull.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileClassWithIndexSignature.js.diff b/testdata/baselines/reference/submodule/compiler/declFileClassWithIndexSignature.js.diff
new file mode 100644
index 0000000000..e50a1a4aac
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileClassWithIndexSignature.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileClassWithIndexSignature.js
++++ new.declFileClassWithIndexSignature.js
+@@= skipped -5, +5 lines =@@
+ }
+
+ //// [declFileClassWithIndexSignature.js]
+-var BlockIntrinsics = /** @class */ (function () {
+-    function BlockIntrinsics() {
+-    }
+-    return BlockIntrinsics;
+-}());
++class BlockIntrinsics {
++}
+
+
+ //// [declFileClassWithIndexSignature.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileClassWithStaticMethodReturningConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/declFileClassWithStaticMethodReturningConstructor.js.diff
new file mode 100644
index 0000000000..66d5e3d1bb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileClassWithStaticMethodReturningConstructor.js.diff
@@ -0,0 +1,20 @@
+--- old.declFileClassWithStaticMethodReturningConstructor.js
++++ new.declFileClassWithStaticMethodReturningConstructor.js
+@@= skipped -10, +10 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Enhancement = void 0;
+-var Enhancement = /** @class */ (function () {
+-    function Enhancement() {
+-    }
+-    Enhancement.getType = function () {
++class Enhancement {
++    static getType() {
+         return this;
+-    };
+-    return Enhancement;
+-}());
++    }
++}
+ exports.Enhancement = Enhancement;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declFileConstructors.js.diff b/testdata/baselines/reference/submodule/compiler/declFileConstructors.js.diff
index 319013060e..0a0e5e5915 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileConstructors.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileConstructors.js.diff
@@ -1,57 +1,193 @@
 --- old.declFileConstructors.js
 +++ new.declFileConstructors.js
-@@= skipped -126, +126 lines =@@
- }
+@@= skipped -99, +99 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ConstructorWithParameterInitializer = exports.ConstructorWithOptionalParameterProperty = exports.ConstructorWithPrivateParameterProperty = exports.ConstructorWithPublicParameterProperty = exports.ConstructorWithOverloads = exports.ConstructorWithRestParamters = exports.ConstructorWithParameters = exports.SimpleConstructor = void 0;
+-var SimpleConstructor = /** @class */ (function () {
++class SimpleConstructor {
+     /** This comment should appear for foo*/
+-    function SimpleConstructor() {
++    constructor() {
+     }
+-    return SimpleConstructor;
+-}());
++}
+ exports.SimpleConstructor = SimpleConstructor;
+-var ConstructorWithParameters = /** @class */ (function () {
++class ConstructorWithParameters {
+     /** This is comment for function signature*/
+-    function ConstructorWithParameters(/** this is comment about a*/ a, 
++    constructor(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+     }
+-    return ConstructorWithParameters;
+-}());
++}
+ exports.ConstructorWithParameters = ConstructorWithParameters;
+-var ConstructorWithRestParamters = /** @class */ (function () {
+-    function ConstructorWithRestParamters(a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++class ConstructorWithRestParamters {
++    constructor(a, ...rests) {
+         return a + rests.join("");
+     }
+-    return ConstructorWithRestParamters;
+-}());
++}
+ exports.ConstructorWithRestParamters = ConstructorWithRestParamters;
+-var ConstructorWithOverloads = /** @class */ (function () {
+-    function ConstructorWithOverloads(a) {
++class ConstructorWithOverloads {
++    constructor(a) {
+     }
+-    return ConstructorWithOverloads;
+-}());
++}
  exports.ConstructorWithOverloads = ConstructorWithOverloads;
- class ConstructorWithPublicParameterProperty {
+-var ConstructorWithPublicParameterProperty = /** @class */ (function () {
+-    function ConstructorWithPublicParameterProperty(x) {
++class ConstructorWithPublicParameterProperty {
 +    x;
-     constructor(x) {
++    constructor(x) {
          this.x = x;
      }
- }
+-    return ConstructorWithPublicParameterProperty;
+-}());
++}
  exports.ConstructorWithPublicParameterProperty = ConstructorWithPublicParameterProperty;
- class ConstructorWithPrivateParameterProperty {
+-var ConstructorWithPrivateParameterProperty = /** @class */ (function () {
+-    function ConstructorWithPrivateParameterProperty(x) {
++class ConstructorWithPrivateParameterProperty {
 +    x;
-     constructor(x) {
++    constructor(x) {
          this.x = x;
      }
- }
+-    return ConstructorWithPrivateParameterProperty;
+-}());
++}
  exports.ConstructorWithPrivateParameterProperty = ConstructorWithPrivateParameterProperty;
- class ConstructorWithOptionalParameterProperty {
+-var ConstructorWithOptionalParameterProperty = /** @class */ (function () {
+-    function ConstructorWithOptionalParameterProperty(x) {
++class ConstructorWithOptionalParameterProperty {
 +    x;
-     constructor(x) {
++    constructor(x) {
          this.x = x;
      }
- }
+-    return ConstructorWithOptionalParameterProperty;
+-}());
++}
  exports.ConstructorWithOptionalParameterProperty = ConstructorWithOptionalParameterProperty;
- class ConstructorWithParameterInitializer {
+-var ConstructorWithParameterInitializer = /** @class */ (function () {
+-    function ConstructorWithParameterInitializer(x) {
+-        if (x === void 0) { x = "hello"; }
++class ConstructorWithParameterInitializer {
 +    x;
-     constructor(x = "hello") {
++    constructor(x = "hello") {
          this.x = x;
      }
-@@= skipped -47, +51 lines =@@
+-    return ConstructorWithParameterInitializer;
+-}());
++}
+ exports.ConstructorWithParameterInitializer = ConstructorWithParameterInitializer;
+ //// [declFileConstructors_1.js]
+-var GlobalSimpleConstructor = /** @class */ (function () {
++class GlobalSimpleConstructor {
+     /** This comment should appear for foo*/
+-    function GlobalSimpleConstructor() {
++    constructor() {
      }
- }
- class GlobalConstructorWithPublicParameterProperty {
-+    x;
-     constructor(x) {
-         this.x = x;
+-    return GlobalSimpleConstructor;
+-}());
+-var GlobalConstructorWithParameters = /** @class */ (function () {
++}
++class GlobalConstructorWithParameters {
+     /** This is comment for function signature*/
+-    function GlobalConstructorWithParameters(/** this is comment about a*/ a, 
++    constructor(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
      }
- }
- class GlobalConstructorWithPrivateParameterProperty {
-+    x;
-     constructor(x) {
-         this.x = x;
+-    return GlobalConstructorWithParameters;
+-}());
+-var GlobalConstructorWithRestParamters = /** @class */ (function () {
+-    function GlobalConstructorWithRestParamters(a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++}
++class GlobalConstructorWithRestParamters {
++    constructor(a, ...rests) {
+         return a + rests.join("");
      }
- }
- class GlobalConstructorWithOptionalParameterProperty {
+-    return GlobalConstructorWithRestParamters;
+-}());
+-var GlobalConstructorWithOverloads = /** @class */ (function () {
+-    function GlobalConstructorWithOverloads(a) {
+-    }
+-    return GlobalConstructorWithOverloads;
+-}());
+-var GlobalConstructorWithPublicParameterProperty = /** @class */ (function () {
+-    function GlobalConstructorWithPublicParameterProperty(x) {
+-        this.x = x;
+-    }
+-    return GlobalConstructorWithPublicParameterProperty;
+-}());
+-var GlobalConstructorWithPrivateParameterProperty = /** @class */ (function () {
+-    function GlobalConstructorWithPrivateParameterProperty(x) {
+-        this.x = x;
+-    }
+-    return GlobalConstructorWithPrivateParameterProperty;
+-}());
+-var GlobalConstructorWithOptionalParameterProperty = /** @class */ (function () {
+-    function GlobalConstructorWithOptionalParameterProperty(x) {
+-        this.x = x;
+-    }
+-    return GlobalConstructorWithOptionalParameterProperty;
+-}());
+-var GlobalConstructorWithParameterInitializer = /** @class */ (function () {
+-    function GlobalConstructorWithParameterInitializer(x) {
+-        if (x === void 0) { x = "hello"; }
+-        this.x = x;
+-    }
+-    return GlobalConstructorWithParameterInitializer;
+-}());
++}
++class GlobalConstructorWithOverloads {
++    constructor(a) {
++    }
++}
++class GlobalConstructorWithPublicParameterProperty {
 +    x;
-     constructor(x) {
-         this.x = x;
-     }
- }
- class GlobalConstructorWithParameterInitializer {
++    constructor(x) {
++        this.x = x;
++    }
++}
++class GlobalConstructorWithPrivateParameterProperty {
 +    x;
-     constructor(x = "hello") {
-         this.x = x;
-     }
\ No newline at end of file
++    constructor(x) {
++        this.x = x;
++    }
++}
++class GlobalConstructorWithOptionalParameterProperty {
++    x;
++    constructor(x) {
++        this.x = x;
++    }
++}
++class GlobalConstructorWithParameterInitializer {
++    x;
++    constructor(x = "hello") {
++        this.x = x;
++    }
++}
+
+
+ //// [declFileConstructors_0.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileEnums.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileEnums.symbols.diff
new file mode 100644
index 0000000000..ddaaa3435c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileEnums.symbols.diff
@@ -0,0 +1,11 @@
+--- old.declFileEnums.symbols
++++ new.declFileEnums.symbols
+@@= skipped -36, +36 lines =@@
+     b = Math.PI,
+ >b : Symbol(e3.b, Decl(declFileEnums.ts, 13, 11))
+ >Math.PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >PI : Symbol(Math.PI, Decl(lib.es5.d.ts, --, --))
+
+     c = a + 3
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
index 59c0faa816..577cd8b1f0 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
@@ -1,8 +1,8 @@
 //// [tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts] ////
 
 //// [declFileExportAssignmentImportInternalModule.ts]
-module m3 {
-    export module m2 {
+namespace m3 {
+    export namespace m2 {
         export interface connectModule {
             (res, req, next): void;
         }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.symbols b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.symbols
index 57761c692d..eff94912a7 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.symbols
@@ -1,14 +1,14 @@
 //// [tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts] ////
 
 === declFileExportAssignmentImportInternalModule.ts ===
-module m3 {
+namespace m3 {
 >m3 : Symbol(m3, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 0))
 
-    export module m2 {
->m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 11))
+    export namespace m2 {
+>m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 14))
 
         export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 22))
+>connectModule : Symbol(connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 25))
 
             (res, req, next): void;
 >res : Symbol(res, Decl(declFileExportAssignmentImportInternalModule.ts, 3, 13))
@@ -21,7 +21,7 @@ module m3 {
             use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declFileExportAssignmentImportInternalModule.ts, 5, 40))
 >mod : Symbol(mod, Decl(declFileExportAssignmentImportInternalModule.ts, 6, 18))
->connectModule : Symbol(connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 22))
+>connectModule : Symbol(connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 25))
 >connectExport : Symbol(connectExport, Decl(declFileExportAssignmentImportInternalModule.ts, 4, 9))
 
             listen: (port: number) => void;
@@ -35,18 +35,18 @@ module m3 {
 >server : Symbol(server, Decl(declFileExportAssignmentImportInternalModule.ts, 12, 14))
 
         (): m2.connectExport;
->m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 11))
+>m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 14))
 >connectExport : Symbol(m2.connectExport, Decl(declFileExportAssignmentImportInternalModule.ts, 4, 9))
 
         test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declFileExportAssignmentImportInternalModule.ts, 13, 29))
->m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 11))
->connectModule : Symbol(m2.connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 22))
+>m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 14))
+>connectModule : Symbol(m2.connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 25))
 
         test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declFileExportAssignmentImportInternalModule.ts, 14, 32))
->m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 11))
->connectModule : Symbol(m2.connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 22))
+>m2 : Symbol(m2, Decl(declFileExportAssignmentImportInternalModule.ts, 0, 14))
+>connectModule : Symbol(m2.connectModule, Decl(declFileExportAssignmentImportInternalModule.ts, 1, 25))
 
     };
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.types b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.types
index dc9c4ecf67..f794ebaab5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.types
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/declFileExportAssignmentImportInternalModule.ts] ////
 
 === declFileExportAssignmentImportInternalModule.ts ===
-module m3 {
+namespace m3 {
 >m3 : typeof m3
 
-    export module m2 {
+    export namespace m2 {
         export interface connectModule {
             (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForClassWithMultipleBaseClasses.js.diff b/testdata/baselines/reference/submodule/compiler/declFileForClassWithMultipleBaseClasses.js.diff
new file mode 100644
index 0000000000..00c7111330
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileForClassWithMultipleBaseClasses.js.diff
@@ -0,0 +1,42 @@
+--- old.declFileForClassWithMultipleBaseClasses.js
++++ new.declFileForClassWithMultipleBaseClasses.js
+@@= skipped -28, +28 lines =@@
+ }
+
+ //// [declFileForClassWithMultipleBaseClasses.js]
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    A.prototype.foo = function () { };
+-    return A;
+-}());
+-var B = /** @class */ (function () {
+-    function B() {
+-    }
+-    B.prototype.bar = function () { };
+-    return B;
+-}());
+-var D = /** @class */ (function () {
+-    function D() {
+-    }
+-    D.prototype.baz = function () { };
+-    D.prototype.bat = function () { };
+-    D.prototype.foo = function () { };
+-    D.prototype.bar = function () { };
+-    return D;
+-}());
++class A {
++    foo() { }
++}
++class B {
++    bar() { }
++}
++class D {
++    baz() { }
++    bat() { }
++    foo() { }
++    bar() { }
++}
+
+
+ //// [declFileForClassWithMultipleBaseClasses.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForClassWithPrivateOverloadedFunction.js.diff b/testdata/baselines/reference/submodule/compiler/declFileForClassWithPrivateOverloadedFunction.js.diff
new file mode 100644
index 0000000000..6be70d73dd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileForClassWithPrivateOverloadedFunction.js.diff
@@ -0,0 +1,18 @@
+--- old.declFileForClassWithPrivateOverloadedFunction.js
++++ new.declFileForClassWithPrivateOverloadedFunction.js
+@@= skipped -7, +7 lines =@@
+ }
+
+ //// [declFileForClassWithPrivateOverloadedFunction.js]
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype.foo = function (x) { };
+-    return C;
+-}());
++class C {
++    foo(x) { }
++}
+
+
+ //// [declFileForClassWithPrivateOverloadedFunction.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForFunctionTypeAsTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/declFileForFunctionTypeAsTypeParameter.js.diff
new file mode 100644
index 0000000000..40dba1585c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileForFunctionTypeAsTypeParameter.js.diff
@@ -0,0 +1,40 @@
+--- old.declFileForFunctionTypeAsTypeParameter.js
++++ new.declFileForFunctionTypeAsTypeParameter.js
+@@= skipped -10, +10 lines =@@
+
+
+ //// [declFileForFunctionTypeAsTypeParameter.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var X = /** @class */ (function () {
+-    function X() {
+-    }
+-    return X;
+-}());
+-var C = /** @class */ (function (_super) {
+-    __extends(C, _super);
+-    function C() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return C;
+-}(X));
++class X {
++}
++class C extends X {
++}
+
+
+ //// [declFileForFunctionTypeAsTypeParameter.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/declFileForTypeParameters.js.diff
index e8f8a807e2..0338de8031 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileForTypeParameters.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileForTypeParameters.js.diff
@@ -1,10 +1,22 @@
 --- old.declFileForTypeParameters.js
 +++ new.declFileForTypeParameters.js
-@@= skipped -9, +9 lines =@@
+@@= skipped -8, +8 lines =@@
+ }
 
  //// [declFileForTypeParameters.js]
- class C {
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype.foo = function (a) {
++class C {
 +    x;
-     foo(a) {
++    foo(a) {
          return this.x;
-     }
\ No newline at end of file
+-    };
+-    return C;
+-}());
++    }
++}
+
+
+ //// [declFileForTypeParameters.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/declFileFunctions.js.diff
new file mode 100644
index 0000000000..68eba1e7eb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileFunctions.js.diff
@@ -0,0 +1,54 @@
+--- old.declFileFunctions.js
++++ new.declFileFunctions.js
+@@= skipped -96, +96 lines =@@
+ b) {
+     var d = a;
+ }
+-function fooWithRestParameters(a) {
+-    var rests = [];
+-    for (var _i = 1; _i < arguments.length; _i++) {
+-        rests[_i - 1] = arguments[_i];
+-    }
++function fooWithRestParameters(a, ...rests) {
+     return a + rests.join("");
+ }
+ function fooWithOverloads(a) {
+@@= skipped -22, +18 lines =@@
+ function fooWithTypeTypePredicateAndGeneric(a) {
+     return true;
+ }
+-function fooWithTypeTypePredicateAndRestParam(a) {
+-    var rest = [];
+-    for (var _i = 1; _i < arguments.length; _i++) {
+-        rest[_i - 1] = arguments[_i];
+-    }
++function fooWithTypeTypePredicateAndRestParam(a, ...rest) {
+     return true;
+ }
+ /** This comment should appear for nonExportedFoo*/
+@@= skipped -16, +12 lines =@@
+ b) {
+     var d = a;
+ }
+-function nonExportedFooWithRestParameters(a) {
+-    var rests = [];
+-    for (var _i = 1; _i < arguments.length; _i++) {
+-        rests[_i - 1] = arguments[_i];
+-    }
++function nonExportedFooWithRestParameters(a, ...rests) {
+     return a + rests.join("");
+ }
+ function nonExportedFooWithOverloads(a) {
+@@= skipped -20, +16 lines =@@
+ b) {
+     var d = a;
+ }
+-function globalfooWithRestParameters(a) {
+-    var rests = [];
+-    for (var _i = 1; _i < arguments.length; _i++) {
+-        rests[_i - 1] = arguments[_i];
+-    }
++function globalfooWithRestParameters(a, ...rests) {
+     return a + rests.join("");
+ }
+ function globalfooWithOverloads(a) {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericClassWithGenericExtendedClass.js.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericClassWithGenericExtendedClass.js.diff
index ce38028e08..45173e1770 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericClassWithGenericExtendedClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericClassWithGenericExtendedClass.js.diff
@@ -1,9 +1,48 @@
 --- old.declFileGenericClassWithGenericExtendedClass.js
 +++ new.declFileGenericClassWithGenericExtendedClass.js
-@@= skipped -19, +19 lines =@@
- class Derived extends Base {
- }
- class Baz {
+@@= skipped -14, +14 lines =@@
+
+
+ //// [declFileGenericClassWithGenericExtendedClass.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var Base = /** @class */ (function () {
+-    function Base() {
+-    }
+-    return Base;
+-}());
+-var Derived = /** @class */ (function (_super) {
+-    __extends(Derived, _super);
+-    function Derived() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return Derived;
+-}(Base));
+-var Baz = /** @class */ (function () {
+-    function Baz() {
+-    }
+-    return Baz;
+-}());
++class Base {
++}
++class Derived extends Base {
++}
++class Baz {
 +    derived;
- }
++}
+
 
+ //// [declFileGenericClassWithGenericExtendedClass.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType.js b/testdata/baselines/reference/submodule/compiler/declFileGenericType.js
index c31e17bc17..5f3d6b9483 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileGenericType.ts] ////
 
 //// [declFileGenericType.ts]
-export module C {
+export namespace C {
     export class A{ }
     export class B { }
     
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType.js.diff
index 5af8f004ce..4430f0cab2 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType.js.diff
@@ -1,10 +1,76 @@
 --- old.declFileGenericType.js
 +++ new.declFileGenericType.js
-@@= skipped -66, +66 lines =@@
+@@= skipped -42, +42 lines =@@
+
+ //// [declFileGenericType.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.j = exports.h = exports.g = exports.x = exports.e = exports.d = exports.c = exports.b = exports.a = exports.C = void 0;
+ exports.f = f;
+ var C;
+ (function (C) {
+-    var A = /** @class */ (function () {
+-        function A() {
+-        }
+-        return A;
+-    }());
++    class A {
++    }
+     C.A = A;
+-    var B = /** @class */ (function () {
+-        function B() {
+-        }
+-        return B;
+-    }());
++    class B {
++    }
+     C.B = B;
+     function F(x) { return null; }
+     C.F = F;
+@@= skipped -44, +23 lines =@@
+     C.F5 = F5;
      function F6(x) { return null; }
      C.F6 = F6;
-     class D {
+-    var D = /** @class */ (function () {
+-        function D(val) {
++    class D {
 +        val;
-         constructor(val) {
++        constructor(val) {
              this.val = val;
-         }
\ No newline at end of file
+         }
+-        return D;
+-    }());
++    }
+     C.D = D;
+ })(C || (exports.C = C = {}));
+ exports.b = C.F;
+@@= skipped -15, +15 lines =@@
+ exports.x = (new C.D(new C.A())).val;
+ function f() { }
+ exports.g = C.F5();
+-var h = /** @class */ (function (_super) {
+-    __extends(h, _super);
+-    function h() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return h;
+-}(C.A));
++class h extends C.A {
++}
+ exports.h = h;
+ exports.j = C.F6;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols b/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols
index b770f41927..f27a51a28d 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileGenericType.ts] ////
 
 === declFileGenericType.ts ===
-export module C {
+export namespace C {
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 
     export class A{ }
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >T : Symbol(T, Decl(declFileGenericType.ts, 1, 19))
 
     export class B { }
@@ -16,7 +16,7 @@ export module C {
 >T : Symbol(T, Decl(declFileGenericType.ts, 4, 22))
 >x : Symbol(x, Decl(declFileGenericType.ts, 4, 25))
 >T : Symbol(T, Decl(declFileGenericType.ts, 4, 22))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 
     export function F2(x: T): C.A { return null; }
@@ -25,7 +25,7 @@ export module C {
 >x : Symbol(x, Decl(declFileGenericType.ts, 5, 26))
 >T : Symbol(T, Decl(declFileGenericType.ts, 5, 23))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 
@@ -35,20 +35,20 @@ export module C {
 >x : Symbol(x, Decl(declFileGenericType.ts, 6, 26))
 >T : Symbol(T, Decl(declFileGenericType.ts, 6, 23))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 
     export function F4>(x: T): Array> { return null; }
 >F4 : Symbol(F4, Decl(declFileGenericType.ts, 6, 60))
 >T : Symbol(T, Decl(declFileGenericType.ts, 7, 23))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 >x : Symbol(x, Decl(declFileGenericType.ts, 7, 39))
 >T : Symbol(T, Decl(declFileGenericType.ts, 7, 23))
 >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 
@@ -60,7 +60,7 @@ export module C {
     export function F6>(x: T): T { return null; }
 >F6 : Symbol(F6, Decl(declFileGenericType.ts, 9, 47))
 >T : Symbol(T, Decl(declFileGenericType.ts, 11, 23))
->A : Symbol(A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
 >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
 >x : Symbol(x, Decl(declFileGenericType.ts, 11, 39))
 >T : Symbol(T, Decl(declFileGenericType.ts, 11, 23))
@@ -80,7 +80,7 @@ export module C {
 export var a: C.A;
 >a : Symbol(a, Decl(declFileGenericType.ts, 20, 10))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 
@@ -115,12 +115,12 @@ export var x = (new C.D>(new C.A())).val;
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >D : Symbol(C.D, Decl(declFileGenericType.ts, 11, 64))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
->C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 >val : Symbol(C.D.val, Decl(declFileGenericType.ts, 15, 20))
@@ -129,7 +129,7 @@ export function f>() { }
 >f : Symbol(f, Decl(declFileGenericType.ts, 27, 55))
 >T : Symbol(T, Decl(declFileGenericType.ts, 29, 18))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 
@@ -139,23 +139,23 @@ export var g = C.F5>();
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >F5 : Symbol(C.F5, Decl(declFileGenericType.ts, 7, 78))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 
 export class h extends C.A{ }
 >h : Symbol(h, Decl(declFileGenericType.ts, 31, 32))
->C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 
 export interface i extends C.A { }
 >i : Symbol(i, Decl(declFileGenericType.ts, 33, 34))
->C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>C.A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
->A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 17))
+>A : Symbol(C.A, Decl(declFileGenericType.ts, 0, 20))
 >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
 >B : Symbol(C.B, Decl(declFileGenericType.ts, 1, 24))
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols.diff
new file mode 100644
index 0000000000..eda8434be3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType.symbols.diff
@@ -0,0 +1,11 @@
+--- old.declFileGenericType.symbols
++++ new.declFileGenericType.symbols
+@@= skipped -45, +45 lines =@@
+ >B : Symbol(B, Decl(declFileGenericType.ts, 1, 24))
+ >x : Symbol(x, Decl(declFileGenericType.ts, 7, 39))
+ >T : Symbol(T, Decl(declFileGenericType.ts, 7, 23))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
+ >A : Symbol(A, Decl(declFileGenericType.ts, 0, 20))
+ >C : Symbol(C, Decl(declFileGenericType.ts, 0, 0))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType.types b/testdata/baselines/reference/submodule/compiler/declFileGenericType.types
index 03f5f4e487..69edb54539 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileGenericType.ts] ////
 
 === declFileGenericType.ts ===
-export module C {
+export namespace C {
 >C : typeof C
 
     export class A{ }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js
index 3221a166b5..92acb31120 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js
@@ -1,29 +1,29 @@
 //// [tests/cases/compiler/declFileGenericType2.ts] ////
 
 //// [declFileGenericType2.ts]
-declare module templa.mvc {
+declare namespace templa.mvc {
     interface IModel {
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
     interface IController {
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
     class AbstractController implements mvc.IController {
     }
 }
-declare module templa.mvc.composite {
+declare namespace templa.mvc.composite {
     interface ICompositeControllerModel extends mvc.IModel {
         getControllers(): mvc.IController[];
     }
 }
-module templa.dom.mvc {
+namespace templa.dom.mvc {
     export interface IElementController extends templa.mvc.IController {
     }
 }
 // Module
-module templa.dom.mvc {
+namespace templa.dom.mvc {
 
     export class AbstractElementController extends templa.mvc.AbstractController implements IElementController {
         constructor() {
@@ -32,7 +32,7 @@ module templa.dom.mvc {
     }
 }
 // Module
-module templa.dom.mvc.composite {
+namespace templa.dom.mvc.composite {
     export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController {
         public _controllers: templa.mvc.IController[];
         constructor() {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js.diff b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js.diff
index 813f1d3628..3e772039fe 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.js.diff
@@ -1,6 +1,24 @@
 --- old.declFileGenericType2.js
 +++ new.declFileGenericType2.js
-@@= skipped -46, +46 lines =@@
+@@= skipped -43, +43 lines =@@
+
+
+ //// [declFileGenericType2.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  // Module
  var templa;
  (function (templa) {
@@ -10,9 +28,20 @@
 -        var mvc;
 +        let mvc;
          (function (mvc) {
-             class AbstractElementController extends templa.mvc.AbstractController {
-                 constructor() {
-@@= skipped -15, +15 lines =@@
+-            var AbstractElementController = /** @class */ (function (_super) {
+-                __extends(AbstractElementController, _super);
+-                function AbstractElementController() {
+-                    return _super.call(this) || this;
++            class AbstractElementController extends templa.mvc.AbstractController {
++                constructor() {
++                    super();
+                 }
+-                return AbstractElementController;
+-            }(templa.mvc.AbstractController));
++            }
+             mvc.AbstractElementController = AbstractElementController;
+         })(mvc = dom.mvc || (dom.mvc = {}));
+     })(dom = templa.dom || (templa.dom = {}));
  })(templa || (templa = {}));
  // Module
  (function (templa) {
@@ -25,8 +54,21 @@
 -            var composite;
 +            let composite;
              (function (composite) {
-                 class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController {
+-                var AbstractCompositeElementController = /** @class */ (function (_super) {
+-                    __extends(AbstractCompositeElementController, _super);
+-                    function AbstractCompositeElementController() {
+-                        var _this = _super.call(this) || this;
+-                        _this._controllers = [];
+-                        return _this;
++                class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController {
 +                    _controllers;
-                     constructor() {
-                         super();
-                         this._controllers = [];
\ No newline at end of file
++                    constructor() {
++                        super();
++                        this._controllers = [];
+                     }
+-                    return AbstractCompositeElementController;
+-                }(templa.dom.mvc.AbstractElementController));
++                }
+                 composite.AbstractCompositeElementController = AbstractCompositeElementController;
+             })(composite = mvc.composite || (mvc.composite = {}));
+         })(mvc = dom.mvc || (dom.mvc = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols
index b9e8819c18..acff562309 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.symbols
@@ -1,146 +1,146 @@
 //// [tests/cases/compiler/declFileGenericType2.ts] ////
 
 === declFileGenericType2.ts ===
-declare module templa.mvc {
+declare namespace templa.mvc {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
 
     interface IModel {
->IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
+>IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
 
     interface IController {
->IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 27))
+>IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 30))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 5, 26))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
 
     class AbstractController implements mvc.IController {
->AbstractController : Symbol(AbstractController, Decl(declFileGenericType2.ts, 8, 27))
+>AbstractController : Symbol(AbstractController, Decl(declFileGenericType2.ts, 8, 30))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 9, 29))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
->mvc.IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 27))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
+>mvc.IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 30))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 30))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 9, 29))
     }
 }
-declare module templa.mvc.composite {
+declare namespace templa.mvc.composite {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->composite : Symbol(composite, Decl(declFileGenericType2.ts, 12, 26))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>composite : Symbol(composite, Decl(declFileGenericType2.ts, 12, 29))
 
     interface ICompositeControllerModel extends mvc.IModel {
->ICompositeControllerModel : Symbol(ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 37))
->mvc.IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
+>ICompositeControllerModel : Symbol(ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 40))
+>mvc.IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
 
         getControllers(): mvc.IController[];
 >getControllers : Symbol(ICompositeControllerModel.getControllers, Decl(declFileGenericType2.ts, 13, 60))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 27))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IController : Symbol(IController, Decl(declFileGenericType2.ts, 4, 30))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(IModel, Decl(declFileGenericType2.ts, 0, 30))
     }
 }
-module templa.dom.mvc {
+namespace templa.dom.mvc {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18))
+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 17), Decl(declFileGenericType2.ts, 22, 17), Decl(declFileGenericType2.ts, 31, 17))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 21), Decl(declFileGenericType2.ts, 22, 21), Decl(declFileGenericType2.ts, 31, 21))
 
     export interface IElementController extends templa.mvc.IController {
->IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23))
+>IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 26))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 18, 40))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 27))
->templa.mvc.IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 27))
->templa.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 30))
+>templa.mvc.IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 30))
+>templa.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 30))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 18, 40))
     }
 }
 // Module
-module templa.dom.mvc {
+namespace templa.dom.mvc {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18))
+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 17), Decl(declFileGenericType2.ts, 22, 17), Decl(declFileGenericType2.ts, 31, 17))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 21), Decl(declFileGenericType2.ts, 22, 21), Decl(declFileGenericType2.ts, 31, 21))
 
     export class AbstractElementController extends templa.mvc.AbstractController implements IElementController {
->AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23))
+>AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 26))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 27))
->templa.mvc.AbstractController : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 27))
->templa.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 30))
+>templa.mvc.AbstractController : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 30))
+>templa.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->AbstractController : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>AbstractController : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 30))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43))
->IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 23))
+>IElementController : Symbol(IElementController, Decl(declFileGenericType2.ts, 17, 26))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 24, 43))
 
         constructor() {
             super();
->super : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 27))
+>super : Symbol(templa.mvc.AbstractController, Decl(declFileGenericType2.ts, 8, 30))
         }
     }
 }
 // Module
-module templa.dom.mvc.composite {
+namespace templa.dom.mvc.composite {
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18))
->composite : Symbol(composite, Decl(declFileGenericType2.ts, 31, 22))
+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 17), Decl(declFileGenericType2.ts, 22, 17), Decl(declFileGenericType2.ts, 31, 17))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 21), Decl(declFileGenericType2.ts, 22, 21), Decl(declFileGenericType2.ts, 31, 21))
+>composite : Symbol(composite, Decl(declFileGenericType2.ts, 31, 25))
 
     export class AbstractCompositeElementController extends templa.dom.mvc.AbstractElementController {
->AbstractCompositeElementController : Symbol(AbstractCompositeElementController, Decl(declFileGenericType2.ts, 31, 33))
+>AbstractCompositeElementController : Symbol(AbstractCompositeElementController, Decl(declFileGenericType2.ts, 31, 36))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 32, 52))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->composite : Symbol(templa.mvc.composite, Decl(declFileGenericType2.ts, 12, 26))
->ICompositeControllerModel : Symbol(templa.mvc.composite.ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 37))
->templa.dom.mvc.AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23))
->templa.dom.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18))
->templa.dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>composite : Symbol(templa.mvc.composite, Decl(declFileGenericType2.ts, 12, 29))
+>ICompositeControllerModel : Symbol(templa.mvc.composite.ICompositeControllerModel, Decl(declFileGenericType2.ts, 12, 40))
+>templa.dom.mvc.AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 26))
+>templa.dom.mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 21), Decl(declFileGenericType2.ts, 22, 21), Decl(declFileGenericType2.ts, 31, 21))
+>templa.dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 17), Decl(declFileGenericType2.ts, 22, 17), Decl(declFileGenericType2.ts, 31, 17))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 14), Decl(declFileGenericType2.ts, 22, 14), Decl(declFileGenericType2.ts, 31, 14))
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 18), Decl(declFileGenericType2.ts, 22, 18), Decl(declFileGenericType2.ts, 31, 18))
->AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23))
+>dom : Symbol(dom, Decl(declFileGenericType2.ts, 17, 17), Decl(declFileGenericType2.ts, 22, 17), Decl(declFileGenericType2.ts, 31, 17))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 17, 21), Decl(declFileGenericType2.ts, 22, 21), Decl(declFileGenericType2.ts, 31, 21))
+>AbstractElementController : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 26))
 >ModelType : Symbol(ModelType, Decl(declFileGenericType2.ts, 32, 52))
 
         public _controllers: templa.mvc.IController[];
 >_controllers : Symbol(AbstractCompositeElementController._controllers, Decl(declFileGenericType2.ts, 32, 179))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IController : Symbol(templa.mvc.IController, Decl(declFileGenericType2.ts, 4, 30))
 >templa : Symbol(templa, Decl(declFileGenericType2.ts, 0, 0), Decl(declFileGenericType2.ts, 3, 1), Decl(declFileGenericType2.ts, 7, 1), Decl(declFileGenericType2.ts, 11, 1), Decl(declFileGenericType2.ts, 16, 1) ... and 2 more)
->mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 22), Decl(declFileGenericType2.ts, 4, 22), Decl(declFileGenericType2.ts, 8, 22), Decl(declFileGenericType2.ts, 12, 22))
->IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 27))
+>mvc : Symbol(mvc, Decl(declFileGenericType2.ts, 0, 25), Decl(declFileGenericType2.ts, 4, 25), Decl(declFileGenericType2.ts, 8, 25), Decl(declFileGenericType2.ts, 12, 25))
+>IModel : Symbol(templa.mvc.IModel, Decl(declFileGenericType2.ts, 0, 30))
 
         constructor() {
             super();
->super : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 23))
+>super : Symbol(AbstractElementController, Decl(declFileGenericType2.ts, 22, 26))
 
             this._controllers = [];
 >this._controllers : Symbol(AbstractCompositeElementController._controllers, Decl(declFileGenericType2.ts, 32, 179))
->this : Symbol(AbstractCompositeElementController, Decl(declFileGenericType2.ts, 31, 33))
+>this : Symbol(AbstractCompositeElementController, Decl(declFileGenericType2.ts, 31, 36))
 >_controllers : Symbol(AbstractCompositeElementController._controllers, Decl(declFileGenericType2.ts, 32, 179))
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types
index b7fe565d5d..28d9ff377f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileGenericType2.types
@@ -1,17 +1,17 @@
 //// [tests/cases/compiler/declFileGenericType2.ts] ////
 
 === declFileGenericType2.ts ===
-declare module templa.mvc {
+declare namespace templa.mvc {
     interface IModel {
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
     interface IController {
 >templa : any
 >mvc : any
     }
 }
-declare module templa.mvc {
+declare namespace templa.mvc {
 >templa : typeof templa
 >mvc : typeof mvc
 
@@ -22,7 +22,7 @@ declare module templa.mvc {
 >mvc : typeof mvc
     }
 }
-declare module templa.mvc.composite {
+declare namespace templa.mvc.composite {
     interface ICompositeControllerModel extends mvc.IModel {
 >mvc : typeof mvc
 
@@ -32,7 +32,7 @@ declare module templa.mvc.composite {
 >mvc : any
     }
 }
-module templa.dom.mvc {
+namespace templa.dom.mvc {
     export interface IElementController extends templa.mvc.IController {
 >templa : any
 >mvc : any
@@ -42,7 +42,7 @@ module templa.dom.mvc {
     }
 }
 // Module
-module templa.dom.mvc {
+namespace templa.dom.mvc {
 >templa : typeof templa
 >dom : typeof dom
 >mvc : typeof mvc
@@ -65,7 +65,7 @@ module templa.dom.mvc {
     }
 }
 // Module
-module templa.dom.mvc.composite {
+namespace templa.dom.mvc.composite {
 >templa : typeof templa
 >dom : typeof dom
 >mvc : typeof mvc
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
index e49bcf83fd..9d5386d56c 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
@@ -1,8 +1,8 @@
 //// [tests/cases/compiler/declFileImportChainInExportAssignment.ts] ////
 
 //// [declFileImportChainInExportAssignment.ts]
-module m {
-    export module c {
+namespace m {
+    export namespace c {
         export class c {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
index 4a8556727c..416c2ec783 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
@@ -1,6 +1,19 @@
 --- old.declFileImportChainInExportAssignment.js
 +++ new.declFileImportChainInExportAssignment.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -14, +14 lines =@@
+ "use strict";
+ var m;
+ (function (m) {
+-    var c;
++    let c;
+     (function (c_1) {
+-        var c = /** @class */ (function () {
+-            function c() {
+-            }
+-            return c;
+-        }());
++        class c {
++        }
          c_1.c = c;
      })(c = m.c || (m.c = {}));
  })(m || (m = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.symbols b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.symbols
index e41e241c2a..b1b39b5dbe 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.symbols
@@ -1,21 +1,21 @@
 //// [tests/cases/compiler/declFileImportChainInExportAssignment.ts] ////
 
 === declFileImportChainInExportAssignment.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileImportChainInExportAssignment.ts, 0, 0))
 
-    export module c {
->c : Symbol(c, Decl(declFileImportChainInExportAssignment.ts, 0, 10))
+    export namespace c {
+>c : Symbol(c, Decl(declFileImportChainInExportAssignment.ts, 0, 13))
 
         export class c {
->c : Symbol(c, Decl(declFileImportChainInExportAssignment.ts, 1, 21))
+>c : Symbol(c, Decl(declFileImportChainInExportAssignment.ts, 1, 24))
         }
     }
 }
 import a = m.c;
 >a : Symbol(a, Decl(declFileImportChainInExportAssignment.ts, 5, 1))
 >m : Symbol(m, Decl(declFileImportChainInExportAssignment.ts, 0, 0))
->c : Symbol(a, Decl(declFileImportChainInExportAssignment.ts, 0, 10))
+>c : Symbol(a, Decl(declFileImportChainInExportAssignment.ts, 0, 13))
 
 import b = a;
 >b : Symbol(b, Decl(declFileImportChainInExportAssignment.ts, 6, 15))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types
index 62f257d751..3a98e3721f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/declFileImportChainInExportAssignment.ts] ////
 
 === declFileImportChainInExportAssignment.ts ===
-module m {
+namespace m {
 >m : typeof m
 
-    export module c {
+    export namespace c {
 >c : typeof import("declFileImportChainInExportAssignment")
 
         export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types.diff b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types.diff
index 3a558a1985..a3e5883163 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.types.diff
@@ -3,7 +3,7 @@
 @@= skipped -4, +4 lines =@@
  >m : typeof m
 
-     export module c {
+     export namespace c {
 ->c : typeof m.c
 +>c : typeof import("declFileImportChainInExportAssignment")
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.js b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.js
index e15b9b4150..e605d91f7f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileImportModuleWithExportAssignment.ts] ////
 
 //// [declFileImportModuleWithExportAssignment_0.ts]
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.symbols b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.symbols
index 22b9b303bf..046296332f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.symbols
@@ -15,11 +15,11 @@ a.test1(null, null, null);
 >test1 : Symbol(test1, Decl(declFileImportModuleWithExportAssignment_0.ts, 11, 25))
 
 === declFileImportModuleWithExportAssignment_0.ts ===
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 0), Decl(declFileImportModuleWithExportAssignment_0.ts, 10, 3))
 
     export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 14))
 
         (res, req, next): void;
 >res : Symbol(res, Decl(declFileImportModuleWithExportAssignment_0.ts, 2, 9))
@@ -32,7 +32,7 @@ module m2 {
         use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declFileImportModuleWithExportAssignment_0.ts, 4, 36))
 >mod : Symbol(mod, Decl(declFileImportModuleWithExportAssignment_0.ts, 5, 14))
->connectModule : Symbol(connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 14))
 >connectExport : Symbol(connectExport, Decl(declFileImportModuleWithExportAssignment_0.ts, 3, 5))
 
         listen: (port: number) => void;
@@ -51,12 +51,12 @@ var m2: {
     test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declFileImportModuleWithExportAssignment_0.ts, 11, 25))
 >m2 : Symbol(m2, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 0), Decl(declFileImportModuleWithExportAssignment_0.ts, 10, 3))
->connectModule : Symbol(m2.connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 14))
 
     test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declFileImportModuleWithExportAssignment_0.ts, 12, 28))
 >m2 : Symbol(m2, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 0), Decl(declFileImportModuleWithExportAssignment_0.ts, 10, 3))
->connectModule : Symbol(m2.connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declFileImportModuleWithExportAssignment_0.ts, 0, 14))
 
 };
 export = m2;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.types b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.types
index dba806afe0..3d84c9cd1e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportModuleWithExportAssignment.types
@@ -16,7 +16,7 @@ a.test1(null, null, null);
 >test1 : a1.connectModule
 
 === declFileImportModuleWithExportAssignment_0.ts ===
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportedTypeUseInTypeArgPosition.js.diff b/testdata/baselines/reference/submodule/compiler/declFileImportedTypeUseInTypeArgPosition.js.diff
new file mode 100644
index 0000000000..f01e229cf2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportedTypeUseInTypeArgPosition.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileImportedTypeUseInTypeArgPosition.js
++++ new.declFileImportedTypeUseInTypeArgPosition.js
+@@= skipped -15, +15 lines =@@
+
+
+ //// [declFileImportedTypeUseInTypeArgPosition.js]
+-var List = /** @class */ (function () {
+-    function List() {
+-    }
+-    return List;
+-}());
++class List {
++}
+
+
+ //// [declFileImportedTypeUseInTypeArgPosition.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js
index 758c478bcc..12dac56dd4 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declFileInternalAliases.ts] ////
 
 //// [declFileInternalAliases.ts]
-module m {
+namespace m {
     export class c {
     }
 }
-module m1 {
+namespace m1 {
     import x = m.c;
     export var d = new x(); // emit the type as m.c
 }
-module m2 {
+namespace m2 {
     export import x = m.c;
     export var d = new x(); // emit the type as x
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js.diff b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js.diff
new file mode 100644
index 0000000000..a4ab3533c4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileInternalAliases.js
++++ new.declFileInternalAliases.js
+@@= skipped -16, +16 lines =@@
+ //// [declFileInternalAliases.js]
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+ })(m || (m = {}));
+ var m1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.symbols b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.symbols
index 3adb75f95b..7fd795030a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.symbols
@@ -1,34 +1,34 @@
 //// [tests/cases/compiler/declFileInternalAliases.ts] ////
 
 === declFileInternalAliases.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileInternalAliases.ts, 0, 0))
 
     export class c {
->c : Symbol(c, Decl(declFileInternalAliases.ts, 0, 10))
+>c : Symbol(c, Decl(declFileInternalAliases.ts, 0, 13))
     }
 }
-module m1 {
+namespace m1 {
 >m1 : Symbol(m1, Decl(declFileInternalAliases.ts, 3, 1))
 
     import x = m.c;
->x : Symbol(x, Decl(declFileInternalAliases.ts, 4, 11))
+>x : Symbol(x, Decl(declFileInternalAliases.ts, 4, 14))
 >m : Symbol(m, Decl(declFileInternalAliases.ts, 0, 0))
->c : Symbol(x, Decl(declFileInternalAliases.ts, 0, 10))
+>c : Symbol(x, Decl(declFileInternalAliases.ts, 0, 13))
 
     export var d = new x(); // emit the type as m.c
 >d : Symbol(d, Decl(declFileInternalAliases.ts, 6, 14))
->x : Symbol(x, Decl(declFileInternalAliases.ts, 4, 11))
+>x : Symbol(x, Decl(declFileInternalAliases.ts, 4, 14))
 }
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declFileInternalAliases.ts, 7, 1))
 
     export import x = m.c;
->x : Symbol(x, Decl(declFileInternalAliases.ts, 8, 11))
+>x : Symbol(x, Decl(declFileInternalAliases.ts, 8, 14))
 >m : Symbol(m, Decl(declFileInternalAliases.ts, 0, 0))
->c : Symbol(x, Decl(declFileInternalAliases.ts, 0, 10))
+>c : Symbol(x, Decl(declFileInternalAliases.ts, 0, 13))
 
     export var d = new x(); // emit the type as x
 >d : Symbol(d, Decl(declFileInternalAliases.ts, 10, 14))
->x : Symbol(x, Decl(declFileInternalAliases.ts, 8, 11))
+>x : Symbol(x, Decl(declFileInternalAliases.ts, 8, 14))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.types b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.types
index 4e1248d5f2..03bfea5240 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileInternalAliases.types
@@ -1,14 +1,14 @@
 //// [tests/cases/compiler/declFileInternalAliases.ts] ////
 
 === declFileInternalAliases.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
 >c : c
     }
 }
-module m1 {
+namespace m1 {
 >m1 : typeof m1
 
     import x = m.c;
@@ -21,7 +21,7 @@ module m1 {
 >new x() : x
 >x : typeof x
 }
-module m2 {
+namespace m2 {
 >m2 : typeof m2
 
     export import x = m.c;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileMethods.js.diff b/testdata/baselines/reference/submodule/compiler/declFileMethods.js.diff
new file mode 100644
index 0000000000..e4e17c1645
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileMethods.js.diff
@@ -0,0 +1,241 @@
+--- old.declFileMethods.js
++++ new.declFileMethods.js
+@@= skipped -192, +192 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.c1 = void 0;
+-var c1 = /** @class */ (function () {
+-    function c1() {
+-    }
++class c1 {
+     /** This comment should appear for foo*/
+-    c1.prototype.foo = function () {
+-    };
++    foo() {
++    }
+     /** This is comment for function signature*/
+-    c1.prototype.fooWithParameters = function (/** this is comment about a*/ a, 
++    fooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c1.prototype.fooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    fooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c1.prototype.fooWithOverloads = function (a) {
++    }
++    fooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for privateFoo*/
+-    c1.prototype.privateFoo = function () {
+-    };
++    privateFoo() {
++    }
+     /** This is comment for function signature*/
+-    c1.prototype.privateFooWithParameters = function (/** this is comment about a*/ a, 
++    privateFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c1.prototype.privateFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    privateFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c1.prototype.privateFooWithOverloads = function (a) {
++    }
++    privateFooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for static foo*/
+-    c1.staticFoo = function () {
+-    };
++    static staticFoo() {
++    }
+     /** This is comment for function signature*/
+-    c1.staticFooWithParameters = function (/** this is comment about a*/ a, 
++    static staticFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c1.staticFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    static staticFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c1.staticFooWithOverloads = function (a) {
++    }
++    static staticFooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for privateStaticFoo*/
+-    c1.privateStaticFoo = function () {
+-    };
++    static privateStaticFoo() {
++    }
+     /** This is comment for function signature*/
+-    c1.privateStaticFooWithParameters = function (/** this is comment about a*/ a, 
++    static privateStaticFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c1.privateStaticFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    static privateStaticFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c1.privateStaticFooWithOverloads = function (a) {
++    }
++    static privateStaticFooWithOverloads(a) {
+         return a;
+-    };
+-    return c1;
+-}());
++    }
++}
+ exports.c1 = c1;
+ //// [declFileMethods_1.js]
+-var c2 = /** @class */ (function () {
+-    function c2() {
+-    }
++class c2 {
+     /** This comment should appear for foo*/
+-    c2.prototype.foo = function () {
+-    };
++    foo() {
++    }
+     /** This is comment for function signature*/
+-    c2.prototype.fooWithParameters = function (/** this is comment about a*/ a, 
++    fooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c2.prototype.fooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    fooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c2.prototype.fooWithOverloads = function (a) {
++    }
++    fooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for privateFoo*/
+-    c2.prototype.privateFoo = function () {
+-    };
++    privateFoo() {
++    }
+     /** This is comment for function signature*/
+-    c2.prototype.privateFooWithParameters = function (/** this is comment about a*/ a, 
++    privateFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c2.prototype.privateFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    privateFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c2.prototype.privateFooWithOverloads = function (a) {
++    }
++    privateFooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for static foo*/
+-    c2.staticFoo = function () {
+-    };
++    static staticFoo() {
++    }
+     /** This is comment for function signature*/
+-    c2.staticFooWithParameters = function (/** this is comment about a*/ a, 
++    static staticFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c2.staticFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    static staticFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c2.staticFooWithOverloads = function (a) {
++    }
++    static staticFooWithOverloads(a) {
+         return a;
+-    };
++    }
+     /** This comment should appear for privateStaticFoo*/
+-    c2.privateStaticFoo = function () {
+-    };
++    static privateStaticFoo() {
++    }
+     /** This is comment for function signature*/
+-    c2.privateStaticFooWithParameters = function (/** this is comment about a*/ a, 
++    static privateStaticFooWithParameters(/** this is comment about a*/ a, 
+     /** this is comment for b*/
+     b) {
+         var d = a;
+-    };
+-    c2.privateStaticFooWithRestParameters = function (a) {
+-        var rests = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            rests[_i - 1] = arguments[_i];
+-        }
++    }
++    static privateStaticFooWithRestParameters(a, ...rests) {
+         return a + rests.join("");
+-    };
+-    c2.privateStaticFooWithOverloads = function (a) {
++    }
++    static privateStaticFooWithOverloads(a) {
+         return a;
+-    };
+-    return c2;
+-}());
++    }
++}
+
+
+ //// [declFileMethods_0.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js
index a151c7b230..24bf209ea9 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts] ////
 
 //// [declFileModuleAssignmentInObjectLiteralProperty.ts]
-module m1 {
+namespace m1 {
     export class c {
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js.diff b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js.diff
new file mode 100644
index 0000000000..da1ad74bb7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileModuleAssignmentInObjectLiteralProperty.js
++++ new.declFileModuleAssignmentInObjectLiteralProperty.js
+@@= skipped -12, +12 lines =@@
+ //// [declFileModuleAssignmentInObjectLiteralProperty.js]
+ var m1;
+ (function (m1) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m1.c = c;
+ })(m1 || (m1 = {}));
+ var d = {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.symbols b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.symbols
index b850c172b1..f2b17a010b 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts] ////
 
 === declFileModuleAssignmentInObjectLiteralProperty.ts ===
-module m1 {
+namespace m1 {
 >m1 : Symbol(m1, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 0))
 
     export class c {
->c : Symbol(c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 11))
+>c : Symbol(c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 14))
     }
 }
 var d = {
@@ -19,8 +19,8 @@ var d = {
     m2: { c: m1.c },
 >m2 : Symbol(m2, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 5, 18))
 >c : Symbol(c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 6, 9))
->m1.c : Symbol(m1.c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 11))
+>m1.c : Symbol(m1.c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 14))
 >m1 : Symbol(m1, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 0))
->c : Symbol(m1.c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 11))
+>c : Symbol(m1.c, Decl(declFileModuleAssignmentInObjectLiteralProperty.ts, 0, 14))
 
 };
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.types b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.types
index 01754de72b..8326aedfb4 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleAssignmentInObjectLiteralProperty.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileModuleAssignmentInObjectLiteralProperty.ts] ////
 
 === declFileModuleAssignmentInObjectLiteralProperty.ts ===
-module m1 {
+namespace m1 {
 >m1 : typeof m1
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js
index f680b27539..66198aa384 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js
@@ -1,12 +1,12 @@
 //// [tests/cases/compiler/declFileModuleContinuation.ts] ////
 
 //// [declFileModuleContinuation.ts]
-module A.C {
+namespace A.C {
     export interface Z {
     }
 }
 
-module A.B.C {
+namespace A.B.C {
     export class W implements A.C.Z {
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js.diff b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js.diff
index 0180c73d9b..ec69d73ecf 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.js.diff
@@ -10,5 +10,13 @@
 -        var C;
 +        let C;
          (function (C) {
-             class W {
-             }
\ No newline at end of file
+-            var W = /** @class */ (function () {
+-                function W() {
+-                }
+-                return W;
+-            }());
++            class W {
++            }
+             C.W = W;
+         })(C = B.C || (B.C = {}));
+     })(B = A.B || (A.B = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols
index 31f793b229..7fbd49cbf8 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.symbols
@@ -1,26 +1,26 @@
 //// [tests/cases/compiler/declFileModuleContinuation.ts] ////
 
 === declFileModuleContinuation.ts ===
-module A.C {
+namespace A.C {
 >A : Symbol(A, Decl(declFileModuleContinuation.ts, 0, 0), Decl(declFileModuleContinuation.ts, 3, 1))
->C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9))
+>C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 12))
 
     export interface Z {
->Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 12))
+>Z : Symbol(Z, Decl(declFileModuleContinuation.ts, 0, 15))
     }
 }
 
-module A.B.C {
+namespace A.B.C {
 >A : Symbol(A, Decl(declFileModuleContinuation.ts, 0, 0), Decl(declFileModuleContinuation.ts, 3, 1))
->B : Symbol(B, Decl(declFileModuleContinuation.ts, 5, 9))
->C : Symbol(C, Decl(declFileModuleContinuation.ts, 5, 11))
+>B : Symbol(B, Decl(declFileModuleContinuation.ts, 5, 12))
+>C : Symbol(C, Decl(declFileModuleContinuation.ts, 5, 14))
 
     export class W implements A.C.Z {
->W : Symbol(W, Decl(declFileModuleContinuation.ts, 5, 14))
->A.C.Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 12))
->A.C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9))
+>W : Symbol(W, Decl(declFileModuleContinuation.ts, 5, 17))
+>A.C.Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 15))
+>A.C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 12))
 >A : Symbol(A, Decl(declFileModuleContinuation.ts, 0, 0), Decl(declFileModuleContinuation.ts, 3, 1))
->C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 9))
->Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 12))
+>C : Symbol(C, Decl(declFileModuleContinuation.ts, 0, 12))
+>Z : Symbol(A.C.Z, Decl(declFileModuleContinuation.ts, 0, 15))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.types b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.types
index 5d2797145d..39e04530d6 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleContinuation.types
@@ -1,12 +1,12 @@
 //// [tests/cases/compiler/declFileModuleContinuation.ts] ////
 
 === declFileModuleContinuation.ts ===
-module A.C {
+namespace A.C {
     export interface Z {
     }
 }
 
-module A.B.C {
+namespace A.B.C {
 >A : typeof A
 >B : typeof B
 >C : typeof C
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js
index 65e03d82b5..81a1829bce 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts] ////
 
 //// [declFileModuleWithPropertyOfTypeModule.ts]
-module m {
+namespace m {
     export class c {
     }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js.diff b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js.diff
new file mode 100644
index 0000000000..0c56557599
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.js.diff
@@ -0,0 +1,16 @@
+--- old.declFileModuleWithPropertyOfTypeModule.js
++++ new.declFileModuleWithPropertyOfTypeModule.js
+@@= skipped -10, +10 lines =@@
+ //// [declFileModuleWithPropertyOfTypeModule.js]
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+     m.a = m;
+ })(m || (m = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.symbols b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.symbols
index de5038b380..5fd1ccffc6 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts] ////
 
 === declFileModuleWithPropertyOfTypeModule.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileModuleWithPropertyOfTypeModule.ts, 0, 0))
 
     export class c {
->c : Symbol(c, Decl(declFileModuleWithPropertyOfTypeModule.ts, 0, 10))
+>c : Symbol(c, Decl(declFileModuleWithPropertyOfTypeModule.ts, 0, 13))
     }
 
     export var a = m;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.types b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.types
index 115711f4d8..fdc0db211a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileModuleWithPropertyOfTypeModule.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileModuleWithPropertyOfTypeModule.ts] ////
 
 === declFileModuleWithPropertyOfTypeModule.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.js.diff
new file mode 100644
index 0000000000..336be73c0c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.js.diff
@@ -0,0 +1,28 @@
+--- old.declFilePrivateMethodOverloads.js
++++ new.declFilePrivateMethodOverloads.js
+@@= skipped -24, +24 lines =@@
+ }
+
+ //// [declFilePrivateMethodOverloads.js]
+-var c1 = /** @class */ (function () {
+-    function c1() {
+-    }
+-    c1.prototype._forEachBindingContext = function (context, fn) {
+-        // Function here
+-    };
+-    c1.prototype.overloadWithArityDifference = function (context) {
+-        // Function here
+-    };
+-    return c1;
+-}());
++class c1 {
++    _forEachBindingContext(context, fn) {
++        // Function here
++    }
++    overloadWithArityDifference(context) {
++        // Function here
++    }
++}
+
+
+ //// [declFilePrivateMethodOverloads.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.symbols.diff b/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.symbols.diff
new file mode 100644
index 0000000000..6b05754797
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFilePrivateMethodOverloads.symbols.diff
@@ -0,0 +1,20 @@
+--- old.declFilePrivateMethodOverloads.symbols
++++ new.declFilePrivateMethodOverloads.symbols
+@@= skipped -20, +20 lines =@@
+     private _forEachBindingContext(bindingContextArray: Array, fn: (bindingContext: IContext) => void);
+ >_forEachBindingContext : Symbol(c1._forEachBindingContext, Decl(declFilePrivateMethodOverloads.ts, 3, 10), Decl(declFilePrivateMethodOverloads.ts, 4, 101), Decl(declFilePrivateMethodOverloads.ts, 5, 113))
+ >bindingContextArray : Symbol(bindingContextArray, Decl(declFilePrivateMethodOverloads.ts, 5, 35))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >IContext : Symbol(IContext, Decl(declFilePrivateMethodOverloads.ts, 0, 0))
+ >fn : Symbol(fn, Decl(declFilePrivateMethodOverloads.ts, 5, 72))
+ >bindingContext : Symbol(bindingContext, Decl(declFilePrivateMethodOverloads.ts, 5, 78))
+@@= skipped -24, +24 lines =@@
+     private overloadWithArityDifference(bindingContextArray: Array, fn: (bindingContext: IContext) => void);
+ >overloadWithArityDifference : Symbol(c1.overloadWithArityDifference, Decl(declFilePrivateMethodOverloads.ts, 8, 5), Decl(declFilePrivateMethodOverloads.ts, 10, 66), Decl(declFilePrivateMethodOverloads.ts, 11, 118))
+ >bindingContextArray : Symbol(bindingContextArray, Decl(declFilePrivateMethodOverloads.ts, 11, 40))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >IContext : Symbol(IContext, Decl(declFilePrivateMethodOverloads.ts, 0, 0))
+ >fn : Symbol(fn, Decl(declFilePrivateMethodOverloads.ts, 11, 77))
+ >bindingContext : Symbol(bindingContext, Decl(declFilePrivateMethodOverloads.ts, 11, 83))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFilePrivateStatic.js.diff b/testdata/baselines/reference/submodule/compiler/declFilePrivateStatic.js.diff
index 3a10a0258f..721ab2df37 100644
--- a/testdata/baselines/reference/submodule/compiler/declFilePrivateStatic.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFilePrivateStatic.js.diff
@@ -4,19 +4,35 @@
  }
 
  //// [declFilePrivateStatic.js]
--let C = (() => {
--    class C {
--        static a() { }
--        static b() { }
--        static get c() { return 1; }
--        static get d() { return 1; }
--        static set e(v) { }
--        static set f(v) { }
+-var C = /** @class */ (function () {
+-    function C() {
 -    }
+-    C.a = function () { };
+-    C.b = function () { };
+-    Object.defineProperty(C, "c", {
+-        get: function () { return 1; },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(C, "d", {
+-        get: function () { return 1; },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(C, "e", {
+-        set: function (v) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(C, "f", {
+-        set: function (v) { },
+-        enumerable: false,
+-        configurable: true
+-    });
 -    C.x = 1;
 -    C.y = 1;
 -    return C;
--})();
+-}());
 +class C {
 +    static x = 1;
 +    static y = 1;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileRegressionTests.js.diff b/testdata/baselines/reference/submodule/compiler/declFileRegressionTests.js.diff
new file mode 100644
index 0000000000..71f74d1c65
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileRegressionTests.js.diff
@@ -0,0 +1,11 @@
+--- old.declFileRegressionTests.js
++++ new.declFileRegressionTests.js
+@@= skipped -9, +9 lines =@@
+ //// [declFileRegressionTests.js]
+ // 'null' not converted to 'any' in d.ts
+ // function types not piped through correctly
+-var n = { w: null, x: '', y: function () { }, z: 32 };
++var n = { w: null, x: '', y: () => { }, z: 32 };
+
+
+ //// [declFileRegressionTests.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileRestParametersOfFunctionAndFunctionType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileRestParametersOfFunctionAndFunctionType.js.diff
new file mode 100644
index 0000000000..07cddb2f7e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileRestParametersOfFunctionAndFunctionType.js.diff
@@ -0,0 +1,22 @@
+--- old.declFileRestParametersOfFunctionAndFunctionType.js
++++ new.declFileRestParametersOfFunctionAndFunctionType.js
+@@= skipped -11, +11 lines =@@
+
+
+ //// [declFileRestParametersOfFunctionAndFunctionType.js]
+-function f1() {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
+-    }
+-}
++function f1(...args) { }
+ function f2(x) { }
+ function f3(x) { }
+ function f4() { }
+ function f5() { }
+-var f6 = function () { return [10]; };
++var f6 = () => { return [10]; };
+
+
+ //// [declFileRestParametersOfFunctionAndFunctionType.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js
index 98c48c1020..b2da1d3358 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js
@@ -3,7 +3,7 @@
 //// [declFileTypeAnnotationArrayType.ts]
 class c {
 }
-module m {
+namespace m {
     export class c {
     }
     export class g {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js.diff
new file mode 100644
index 0000000000..8af6bf8ad6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.js.diff
@@ -0,0 +1,54 @@
+--- old.declFileTypeAnnotationArrayType.js
++++ new.declFileTypeAnnotationArrayType.js
+@@= skipped -52, +52 lines =@@
+ }
+
+ //// [declFileTypeAnnotationArrayType.js]
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
++}
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+-    var g = /** @class */ (function () {
+-        function g() {
+-        }
+-        return g;
+-    }());
++    class g {
++    }
+     m.g = g;
+ })(m || (m = {}));
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class g {
++}
+ // Just the name
+ function foo() {
+     return [new c()];
+@@= skipped -55, +43 lines =@@
+ }
+ // Array of function types
+ function foo9() {
+-    return [function () { return new c(); }];
++    return [() => new c()];
+ }
+ function foo10() {
+-    return [function () { return new c(); }];
++    return [() => new c()];
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.symbols
index dfcaf6aa18..396b1e865a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.symbols
@@ -4,11 +4,11 @@
 class c {
 >c : Symbol(c, Decl(declFileTypeAnnotationArrayType.ts, 0, 0))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationArrayType.ts, 1, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
     }
     export class g {
 >g : Symbol(g, Decl(declFileTypeAnnotationArrayType.ts, 4, 5))
@@ -39,20 +39,20 @@ function foo2() {
 function foo3(): m.c[] {
 >foo3 : Symbol(foo3, Decl(declFileTypeAnnotationArrayType.ts, 17, 1))
 >m : Symbol(m, Decl(declFileTypeAnnotationArrayType.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
 
     return [new m.c()];
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationArrayType.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
 }
 function foo4() {
 >foo4 : Symbol(foo4, Decl(declFileTypeAnnotationArrayType.ts, 22, 1))
 
     return m.c;
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationArrayType.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationArrayType.ts, 2, 13))
 }
 
 // Just the name with type arguments
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.types
index 1c50ebe77c..e523d7dd9f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationArrayType.types
@@ -4,7 +4,7 @@
 class c {
 >c : c
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationParenType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationParenType.js.diff
index e7f4b1ba0d..079bee8a57 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationParenType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationParenType.js.diff
@@ -1,10 +1,25 @@
 --- old.declFileTypeAnnotationParenType.js
 +++ new.declFileTypeAnnotationParenType.js
-@@= skipped -12, +12 lines =@@
+@@= skipped -11, +11 lines =@@
+ var l = (() => new c()) || "";
 
  //// [declFileTypeAnnotationParenType.js]
- class c {
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
+-var x = [function () { return new c(); }];
+-var y = [function () { return new c(); }];
+-var k = (function () { return new c(); }) || "";
+-var l = (function () { return new c(); }) || "";
++class c {
 +    p;
- }
- var x = [() => new c()];
- var y = [() => new c()];
\ No newline at end of file
++}
++var x = [() => new c()];
++var y = [() => new c()];
++var k = (() => new c()) || "";
++var l = (() => new c()) || "";
+
+
+ //// [declFileTypeAnnotationParenType.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js
index f680c18a3f..e96c407cae 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js
@@ -3,7 +3,7 @@
 //// [declFileTypeAnnotationTupleType.ts]
 class c {
 }
-module m {
+namespace m {
     export class c {
     }
     export class g {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js.diff
new file mode 100644
index 0000000000..3fc8aaac8b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.js.diff
@@ -0,0 +1,46 @@
+--- old.declFileTypeAnnotationTupleType.js
++++ new.declFileTypeAnnotationTupleType.js
+@@= skipped -19, +19 lines =@@
+ var y = x;
+
+ //// [declFileTypeAnnotationTupleType.js]
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
++}
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+-    var g = /** @class */ (function () {
+-        function g() {
+-        }
+-        return g;
+-    }());
++    class g {
++    }
+     m.g = g;
+ })(m || (m = {}));
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class g {
++}
+ // Just the name
+ var k = [new c(), new m.c()];
+ var l = k;
+-var x = [new g(), new m.g(), function () { return new c(); }];
++var x = [new g(), new m.g(), () => new c()];
+ var y = x;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.symbols
index ede64cf3f1..0df1436e40 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.symbols
@@ -4,11 +4,11 @@
 class c {
 >c : Symbol(c, Decl(declFileTypeAnnotationTupleType.ts, 0, 0))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationTupleType.ts, 1, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationTupleType.ts, 2, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationTupleType.ts, 2, 13))
     }
     export class g {
 >g : Symbol(g, Decl(declFileTypeAnnotationTupleType.ts, 4, 5))
@@ -25,11 +25,11 @@ var k: [c, m.c] = [new c(), new m.c()];
 >k : Symbol(k, Decl(declFileTypeAnnotationTupleType.ts, 12, 3))
 >c : Symbol(c, Decl(declFileTypeAnnotationTupleType.ts, 0, 0))
 >m : Symbol(m, Decl(declFileTypeAnnotationTupleType.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 13))
 >c : Symbol(c, Decl(declFileTypeAnnotationTupleType.ts, 0, 0))
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTupleType.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTupleType.ts, 2, 13))
 
 var l = k;
 >l : Symbol(l, Decl(declFileTypeAnnotationTupleType.ts, 13, 3))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.types
index f90e222cc0..807b2f5c2e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTupleType.types
@@ -4,7 +4,7 @@
 class c {
 >c : c
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js
index 842994346f..e1707ccf65 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts] ////
 
 //// [declFileTypeAnnotationTypeAlias.ts]
-module M {
+namespace M {
     export type Value = string | number | boolean;
     export var x: Value;
 
@@ -10,7 +10,7 @@ module M {
 
     export type C = c;
 
-    export module m {
+    export namespace m {
         export class c {
         }
     }
@@ -24,9 +24,9 @@ interface Window {
     someMethod();
 }
 
-module M {
+namespace M {
     export type W = Window | string;
-    export module N {
+    export namespace N {
         export class Window { }
         export var p: W;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js.diff
new file mode 100644
index 0000000000..b5e6c87ae5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.js.diff
@@ -0,0 +1,41 @@
+--- old.declFileTypeAnnotationTypeAlias.js
++++ new.declFileTypeAnnotationTypeAlias.js
+@@= skipped -34, +34 lines =@@
+ //// [declFileTypeAnnotationTypeAlias.js]
+ var M;
+ (function (M) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     M.c = c;
+-    var m;
++    let m;
+     (function (m) {
+-        var c = /** @class */ (function () {
+-            function c() {
+-            }
+-            return c;
+-        }());
++        class c {
++        }
+         m.c = c;
+     })(m = M.m || (M.m = {}));
+ })(M || (M = {}));
+ (function (M) {
+-    var N;
++    let N;
+     (function (N) {
+-        var Window = /** @class */ (function () {
+-            function Window() {
+-            }
+-            return Window;
+-        }());
++        class Window {
++        }
+         N.Window = Window;
+     })(N = M.N || (M.N = {}));
+ })(M || (M = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.symbols
index 89a8dd34d0..c06ac34a37 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.symbols
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts] ////
 
 === declFileTypeAnnotationTypeAlias.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 0), Decl(declFileTypeAnnotationTypeAlias.ts, 21, 1))
 
     export type Value = string | number | boolean;
->Value : Symbol(Value, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 10))
+>Value : Symbol(Value, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 13))
 
     export var x: Value;
 >x : Symbol(x, Decl(declFileTypeAnnotationTypeAlias.ts, 2, 14))
->Value : Symbol(Value, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 10))
+>Value : Symbol(Value, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 13))
 
     export class c {
 >c : Symbol(c, Decl(declFileTypeAnnotationTypeAlias.ts, 2, 24))
@@ -19,18 +19,18 @@ module M {
 >C : Symbol(C, Decl(declFileTypeAnnotationTypeAlias.ts, 5, 5))
 >c : Symbol(c, Decl(declFileTypeAnnotationTypeAlias.ts, 2, 24))
 
-    export module m {
+    export namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeAlias.ts, 7, 22))
 
         export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 21))
+>c : Symbol(c, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 24))
         }
     }
 
     export type MC = m.c;
 >MC : Symbol(MC, Decl(declFileTypeAnnotationTypeAlias.ts, 12, 5))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeAlias.ts, 7, 22))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 21))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeAlias.ts, 9, 24))
 
     export type fc = () => c;
 >fc : Symbol(fc, Decl(declFileTypeAnnotationTypeAlias.ts, 14, 25))
@@ -44,21 +44,21 @@ interface Window {
 >someMethod : Symbol(Window.someMethod, Decl(declFileTypeAnnotationTypeAlias.ts, 19, 18))
 }
 
-module M {
+namespace M {
 >M : Symbol(M, Decl(declFileTypeAnnotationTypeAlias.ts, 0, 0), Decl(declFileTypeAnnotationTypeAlias.ts, 21, 1))
 
     export type W = Window | string;
->W : Symbol(W, Decl(declFileTypeAnnotationTypeAlias.ts, 23, 10))
+>W : Symbol(W, Decl(declFileTypeAnnotationTypeAlias.ts, 23, 13))
 >Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(declFileTypeAnnotationTypeAlias.ts, 17, 1))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declFileTypeAnnotationTypeAlias.ts, 24, 36))
 
         export class Window { }
->Window : Symbol(Window, Decl(declFileTypeAnnotationTypeAlias.ts, 25, 21))
+>Window : Symbol(Window, Decl(declFileTypeAnnotationTypeAlias.ts, 25, 24))
 
         export var p: W;
 >p : Symbol(p, Decl(declFileTypeAnnotationTypeAlias.ts, 27, 18))
->W : Symbol(W, Decl(declFileTypeAnnotationTypeAlias.ts, 23, 10))
+>W : Symbol(W, Decl(declFileTypeAnnotationTypeAlias.ts, 23, 13))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.types
index e86dbf0220..e7dc31dca4 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeAlias.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationTypeAlias.ts] ////
 
 === declFileTypeAnnotationTypeAlias.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     export type Value = string | number | boolean;
@@ -17,7 +17,7 @@ module M {
     export type C = c;
 >C : c
 
-    export module m {
+    export namespace m {
 >m : typeof m
 
         export class c {
@@ -38,13 +38,13 @@ interface Window {
 >someMethod : () => any
 }
 
-module M {
+namespace M {
 >M : typeof M
 
     export type W = Window | string;
 >W : W
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export class Window { }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js
index b4cc74a3cb..de83a774ca 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js
@@ -5,7 +5,7 @@ class c {
 }
 class g {
 }
-module m {
+namespace m {
     export class c {
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js.diff
new file mode 100644
index 0000000000..9de2b8a9cf
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.js.diff
@@ -0,0 +1,32 @@
+--- old.declFileTypeAnnotationTypeLiteral.js
++++ new.declFileTypeAnnotationTypeLiteral.js
+@@= skipped -40, +40 lines =@@
+ var z: new (a: string) => m.c;
+
+ //// [declFileTypeAnnotationTypeLiteral.js]
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class c {
++}
++class g {
++}
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+ })(m || (m = {}));
+ // Object literal with everything
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.symbols
index e7cba3a30d..ca57b6085e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.symbols
@@ -8,11 +8,11 @@ class g {
 >g : Symbol(g, Decl(declFileTypeAnnotationTypeLiteral.ts, 1, 1))
 >T : Symbol(T, Decl(declFileTypeAnnotationTypeLiteral.ts, 2, 8))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeLiteral.ts, 3, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 13))
     }
 }
 
@@ -37,7 +37,7 @@ var x: {
     new (a: string): m.c;
 >a : Symbol(a, Decl(declFileTypeAnnotationTypeLiteral.ts, 17, 9))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeLiteral.ts, 3, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 13))
 
     // Indexers
     [n: number]: c;
@@ -82,5 +82,5 @@ var z: new (a: string) => m.c;
 >z : Symbol(z, Decl(declFileTypeAnnotationTypeLiteral.ts, 37, 3))
 >a : Symbol(a, Decl(declFileTypeAnnotationTypeLiteral.ts, 37, 12))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeLiteral.ts, 3, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeLiteral.ts, 4, 13))
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.types
index 25c204ec10..1c309d19ac 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeLiteral.types
@@ -7,7 +7,7 @@ class c {
 class g {
 >g : g
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js
index 0cc55684cf..e21417d66d 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js
@@ -3,7 +3,7 @@
 //// [declFileTypeAnnotationTypeQuery.ts]
 class c {
 }
-module m {
+namespace m {
     export class c {
     }
     export class g {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js.diff
new file mode 100644
index 0000000000..a3dfc1f7bb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.js.diff
@@ -0,0 +1,42 @@
+--- old.declFileTypeAnnotationTypeQuery.js
++++ new.declFileTypeAnnotationTypeQuery.js
+@@= skipped -44, +44 lines =@@
+ }
+
+ //// [declFileTypeAnnotationTypeQuery.js]
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
++}
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+-    var g = /** @class */ (function () {
+-        function g() {
+-        }
+-        return g;
+-    }());
++    class g {
++    }
+     m.g = g;
+ })(m || (m = {}));
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class g {
++}
+ // Just the name
+ function foo() {
+     return c;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.symbols
index 98fd34a166..048f166238 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.symbols
@@ -4,11 +4,11 @@
 class c {
 >c : Symbol(c, Decl(declFileTypeAnnotationTypeQuery.ts, 0, 0))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeQuery.ts, 1, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
     }
     export class g {
 >g : Symbol(g, Decl(declFileTypeAnnotationTypeQuery.ts, 4, 5))
@@ -38,22 +38,22 @@ function foo2() {
 // Qualified name
 function foo3(): typeof m.c {
 >foo3 : Symbol(foo3, Decl(declFileTypeAnnotationTypeQuery.ts, 17, 1))
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeQuery.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 
     return m.c;
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeQuery.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 }
 function foo4() {
 >foo4 : Symbol(foo4, Decl(declFileTypeAnnotationTypeQuery.ts, 22, 1))
 
     return m.c;
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeQuery.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeQuery.ts, 2, 13))
 }
 
 // Just the name with type arguments
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.types
index ba31388624..d80d064c89 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeQuery.types
@@ -4,7 +4,7 @@
 class c {
 >c : c
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js
index 7c3c084efc..1f294bc805 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js
@@ -3,7 +3,7 @@
 //// [declFileTypeAnnotationTypeReference.ts]
 class c {
 }
-module m {
+namespace m {
     export class c {
     }
     export class g {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js.diff
new file mode 100644
index 0000000000..4debba282d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.js.diff
@@ -0,0 +1,42 @@
+--- old.declFileTypeAnnotationTypeReference.js
++++ new.declFileTypeAnnotationTypeReference.js
+@@= skipped -44, +44 lines =@@
+ }
+
+ //// [declFileTypeAnnotationTypeReference.js]
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
++}
+ var m;
+ (function (m) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m.c = c;
+-    var g = /** @class */ (function () {
+-        function g() {
+-        }
+-        return g;
+-    }());
++    class g {
++    }
+     m.g = g;
+ })(m || (m = {}));
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class g {
++}
+ // Just the name
+ function foo() {
+     return new c();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.symbols
index c407ae2174..90e999a3b4 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.symbols
@@ -4,11 +4,11 @@
 class c {
 >c : Symbol(c, Decl(declFileTypeAnnotationTypeReference.ts, 0, 0))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeReference.ts, 1, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
     }
     export class g {
 >g : Symbol(g, Decl(declFileTypeAnnotationTypeReference.ts, 4, 5))
@@ -39,20 +39,20 @@ function foo2() {
 function foo3(): m.c {
 >foo3 : Symbol(foo3, Decl(declFileTypeAnnotationTypeReference.ts, 17, 1))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeReference.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
 
     return new m.c();
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeReference.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
 }
 function foo4() {
 >foo4 : Symbol(foo4, Decl(declFileTypeAnnotationTypeReference.ts, 22, 1))
 
     return new m.c();
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationTypeReference.ts, 1, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationTypeReference.ts, 2, 13))
 }
 
 // Just the name with type arguments
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.types
index 8ee90196e8..91f74f937c 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationTypeReference.types
@@ -4,7 +4,7 @@
 class c {
 >c : c
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js
index 3878a65083..01141c0414 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js
@@ -4,7 +4,7 @@
 class c {
     private p: string;
 }
-module m {
+namespace m {
     export class c {
         private q: string;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js.diff
index 68f1148df7..6131c1b4f6 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.js.diff
@@ -1,24 +1,75 @@
 --- old.declFileTypeAnnotationUnionType.js
 +++ new.declFileTypeAnnotationUnionType.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -23, +23 lines =@@
+ var y = new g() || new m.g() || (() => new c());
 
  //// [declFileTypeAnnotationUnionType.js]
- class c {
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
 +    p;
- }
++}
  var m;
  (function (m) {
-     class c {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
 +        q;
-     }
++    }
      m.c = c;
-     class g {
+-    var g = /** @class */ (function () {
+-        function g() {
+-        }
+-        return g;
+-    }());
++    class g {
 +        r;
-     }
++    }
      m.g = g;
  })(m || (m = {}));
- class g {
+-var g = /** @class */ (function () {
+-    function g() {
+-    }
+-    return g;
+-}());
++class g {
 +    s;
- }
++}
  // Just the name
- var k = new c() || new m.c();
\ No newline at end of file
+ var k = new c() || new m.c();
+ var l = new c() || new m.c();
+-var x = new g() || new m.g() || (function () { return new c(); });
+-var y = new g() || new m.g() || (function () { return new c(); });
++var x = new g() || new m.g() || (() => new c());
++var y = new g() || new m.g() || (() => new c());
+
+
+ //// [declFileTypeAnnotationUnionType.d.ts]
+@@= skipped -50, +42 lines =@@
+ declare var k: c | m.c;
+ declare var l: c | m.c;
+ declare var x: g | m.g | (() => c);
+-declare var y: g | m.g | (() => c);
+-
+-
+-!!!! File declFileTypeAnnotationUnionType.d.ts differs from original emit in noCheck emit
+-//// [declFileTypeAnnotationUnionType.d.ts]
+-===================================================================
+---- Expected	The full check baseline
+-+++ Actual	with noCheck set
+-@@= skipped --62, +-54 lines =@@
+- declare class g {
+-     private s;
+- }
+- declare var k: c | m.c;
+--declare var l: c | m.c;
+-+declare var l: m.c | c;
+- declare var x: g | m.g | (() => c);
+- declare var y: g | m.g | (() => c);
++declare var y: m.g | g | (() => c);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.symbols
index 71cfa4fe17..0193e6bb7c 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.symbols
@@ -7,11 +7,11 @@ class c {
     private p: string;
 >p : Symbol(c.p, Decl(declFileTypeAnnotationUnionType.ts, 0, 9))
 }
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationUnionType.ts, 2, 1))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>c : Symbol(c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 
         private q: string;
 >q : Symbol(c.q, Decl(declFileTypeAnnotationUnionType.ts, 4, 20))
@@ -37,18 +37,18 @@ var k: c | m.c = new c() || new m.c();
 >k : Symbol(k, Decl(declFileTypeAnnotationUnionType.ts, 16, 3))
 >c : Symbol(c, Decl(declFileTypeAnnotationUnionType.ts, 0, 0))
 >m : Symbol(m, Decl(declFileTypeAnnotationUnionType.ts, 2, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 >c : Symbol(c, Decl(declFileTypeAnnotationUnionType.ts, 0, 0))
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationUnionType.ts, 2, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 
 var l = new c() || new m.c();
 >l : Symbol(l, Decl(declFileTypeAnnotationUnionType.ts, 17, 3))
 >c : Symbol(c, Decl(declFileTypeAnnotationUnionType.ts, 0, 0))
->m.c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>m.c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 >m : Symbol(m, Decl(declFileTypeAnnotationUnionType.ts, 2, 1))
->c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 10))
+>c : Symbol(m.c, Decl(declFileTypeAnnotationUnionType.ts, 3, 13))
 
 var x: g | m.g |  (() => c) = new g() ||  new m.g() || (() => new c());
 >x : Symbol(x, Decl(declFileTypeAnnotationUnionType.ts, 19, 3))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types
index 376fab4afa..1154e4a3f7 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types
@@ -7,7 +7,7 @@ class c {
     private p: string;
 >p : string
 }
-module m {
+namespace m {
 >m : typeof m
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types.diff
new file mode 100644
index 0000000000..bf4eb73cdc
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationUnionType.types.diff
@@ -0,0 +1,29 @@
+--- old.declFileTypeAnnotationUnionType.types
++++ new.declFileTypeAnnotationUnionType.types
+@@= skipped -52, +52 lines =@@
+ >c : typeof m.c
+
+ var x: g | m.g |  (() => c) = new g() ||  new m.g() || (() => new c());
+->x : g | m.g | (() => c)
++>x : m.g | g | (() => c)
+ >m : any
+->new g() ||  new m.g() || (() => new c()) : g | m.g | (() => c)
+->new g() ||  new m.g() : g | m.g
++>new g() ||  new m.g() || (() => new c()) : m.g | g | (() => c)
++>new g() ||  new m.g() : m.g | g
+ >new g() : g
+ >g : typeof g
+ >new m.g() : m.g
+@@= skipped -16, +16 lines =@@
+ >c : typeof c
+
+ var y = new g() || new m.g() || (() => new c());
+->y : g | m.g | (() => c)
+->new g() || new m.g() || (() => new c()) : g | m.g | (() => c)
+->new g() || new m.g() : g | m.g
++>y : m.g | g | (() => c)
++>new g() || new m.g() || (() => new c()) : m.g | g | (() => c)
++>new g() || new m.g() : m.g | g
+ >new g() : g
+ >g : typeof g
+ >new m.g() : m.g
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js
index afbb2ea8b8..a3eb5e61ff 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js
@@ -1,14 +1,14 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts] ////
 
 //// [declFileTypeAnnotationVisibilityErrorAccessors.ts]
-module m {
+namespace m {
     class private1 {
     }
 
     export class public1 {
     }
 
-    module m2 {
+    namespace m2 {
         export class public2 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js.diff
new file mode 100644
index 0000000000..e1f7d50840
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.js.diff
@@ -0,0 +1,240 @@
+--- old.declFileTypeAnnotationVisibilityErrorAccessors.js
++++ new.declFileTypeAnnotationVisibilityErrorAccessors.js
+@@= skipped -103, +103 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorAccessors.js]
+ var m;
+ (function (m) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var public1 = /** @class */ (function () {
+-        function public1() {
+-        }
+-        return public1;
+-    }());
++    class private1 {
++    }
++    class public1 {
++    }
+     m.public1 = public1;
+-    var m2;
++    let m2;
+     (function (m2) {
+-        var public2 = /** @class */ (function () {
+-            function public2() {
+-            }
+-            return public2;
+-        }());
++        class public2 {
++        }
+         m2.public2 = public2;
+     })(m2 || (m2 = {}));
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        Object.defineProperty(c.prototype, "foo1", {
+-            // getter with annotation
+-            get: function () {
+-                return;
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo2", {
+-            // getter without annotation
+-            get: function () {
+-                return new private1();
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo3", {
+-            // setter with annotation
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo4", {
+-            // Both - getter without annotation, setter with annotation
+-            get: function () {
+-                return new private1();
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo5", {
+-            // Both - with annotation
+-            get: function () {
+-                return;
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo11", {
+-            // getter with annotation
+-            get: function () {
+-                return;
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo12", {
+-            // getter without annotation
+-            get: function () {
+-                return new public1();
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo13", {
+-            // setter with annotation
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo14", {
+-            // Both - getter without annotation, setter with annotation
+-            get: function () {
+-                return new public1();
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo15", {
+-            // Both - with annotation
+-            get: function () {
+-                return;
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo111", {
+-            // getter with annotation
+-            get: function () {
+-                return;
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo112", {
+-            // getter without annotation
+-            get: function () {
+-                return new m2.public2();
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo113", {
+-            // setter with annotation
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo114", {
+-            // Both - getter without annotation, setter with annotation
+-            get: function () {
+-                return new m2.public2();
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        Object.defineProperty(c.prototype, "foo115", {
+-            // Both - with annotation
+-            get: function () {
+-                return;
+-            },
+-            set: function (param) {
+-            },
+-            enumerable: false,
+-            configurable: true
+-        });
+-        return c;
+-    }());
++    class c {
++        // getter with annotation
++        get foo1() {
++            return;
++        }
++        // getter without annotation
++        get foo2() {
++            return new private1();
++        }
++        // setter with annotation
++        set foo3(param) {
++        }
++        // Both - getter without annotation, setter with annotation
++        get foo4() {
++            return new private1();
++        }
++        set foo4(param) {
++        }
++        // Both - with annotation
++        get foo5() {
++            return;
++        }
++        set foo5(param) {
++        }
++        // getter with annotation
++        get foo11() {
++            return;
++        }
++        // getter without annotation
++        get foo12() {
++            return new public1();
++        }
++        // setter with annotation
++        set foo13(param) {
++        }
++        // Both - getter without annotation, setter with annotation
++        get foo14() {
++            return new public1();
++        }
++        set foo14(param) {
++        }
++        // Both - with annotation
++        get foo15() {
++            return;
++        }
++        set foo15(param) {
++        }
++        // getter with annotation
++        get foo111() {
++            return;
++        }
++        // getter without annotation
++        get foo112() {
++            return new m2.public2();
++        }
++        // setter with annotation
++        set foo113(param) {
++        }
++        // Both - getter without annotation, setter with annotation
++        get foo114() {
++            return new m2.public2();
++        }
++        set foo114(param) {
++        }
++        // Both - with annotation
++        get foo115() {
++            return;
++        }
++        set foo115(param) {
++        }
++    }
+     m.c = c;
+ })(m || (m = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.symbols
index 654a8a1fc0..113d7ab8de 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.symbols
@@ -1,22 +1,22 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorAccessors.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 0))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
     }
 
     export class public1 {
 >public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 2, 5))
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
 
         export class public2 {
->public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
     }
 
@@ -26,7 +26,7 @@ module m {
         // getter with annotation
         get foo1(): private1 {
 >foo1 : Symbol(c.foo1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 12, 20))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
 
             return;
         }
@@ -36,14 +36,14 @@ module m {
 >foo2 : Symbol(c.foo2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 16, 9))
 
             return new private1();
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
         }
 
         // setter with annotation
         set foo3(param: private1) {
 >foo3 : Symbol(c.foo3, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 21, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 24, 17))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
         }
 
         // Both - getter without annotation, setter with annotation
@@ -51,25 +51,25 @@ module m {
 >foo4 : Symbol(c.foo4, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 25, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 30, 9))
 
             return new private1();
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
         }
         set foo4(param: private1) {
 >foo4 : Symbol(c.foo4, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 25, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 30, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 31, 17))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
         }
 
         // Both - with annotation
         get foo5(): private1 {
 >foo5 : Symbol(c.foo5, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 32, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 37, 9))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
 
             return;
         }
         set foo5(param: private1) {
 >foo5 : Symbol(c.foo5, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 32, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 37, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 38, 17))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 0, 13))
         }
 
         // getter with annotation
@@ -125,7 +125,7 @@ module m {
         get foo111(): m2.public2 {
 >foo111 : Symbol(c.foo111, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 67, 9))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
 
             return;
         }
@@ -135,9 +135,9 @@ module m {
 >foo112 : Symbol(c.foo112, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 72, 9))
 
             return new m2.public2();
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
 
         // setter with annotation
@@ -145,7 +145,7 @@ module m {
 >foo113 : Symbol(c.foo113, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 77, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 80, 19))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
 
         // Both - getter without annotation, setter with annotation
@@ -153,22 +153,22 @@ module m {
 >foo114 : Symbol(c.foo114, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 81, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 86, 9))
 
             return new m2.public2();
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
         set foo114(param: m2.public2) {
 >foo114 : Symbol(c.foo114, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 81, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 86, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 87, 19))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
 
         // Both - with annotation
         get foo115(): m2.public2 {
 >foo115 : Symbol(c.foo115, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 88, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 93, 9))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
 
             return;
         }
@@ -176,7 +176,7 @@ module m {
 >foo115 : Symbol(c.foo115, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 88, 9), Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 93, 9))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 94, 19))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 5, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorAccessors.ts, 7, 18))
         }
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.types
index 70ec57fba7..d5c86ef5eb 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorAccessors.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorAccessors.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorAccessors.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class private1 {
@@ -12,7 +12,7 @@ module m {
 >public1 : public1
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : typeof m2
 
         export class public2 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js
index efd1633854..091906162d 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts] ////
 
 //// [declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts]
-module m {
+namespace m {
     class private1 {
     }
 
@@ -29,7 +29,7 @@ module m {
     export function foo14(param = new public1()) {
     }
 
-    module m2 {
+    namespace m2 {
         export class public2 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js.diff
new file mode 100644
index 0000000000..6239ceb95b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.js.diff
@@ -0,0 +1,77 @@
+--- old.declFileTypeAnnotationVisibilityErrorParameterOfFunction.js
++++ new.declFileTypeAnnotationVisibilityErrorParameterOfFunction.js
+@@= skipped -48, +48 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorParameterOfFunction.js]
+ var m;
+ (function (m) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var public1 = /** @class */ (function () {
+-        function public1() {
+-        }
+-        return public1;
+-    }());
++    class private1 {
++    }
++    class public1 {
++    }
+     m.public1 = public1;
+     // Directly using names from this module
+     function foo1(param) {
+     }
+-    function foo2(param) {
+-        if (param === void 0) { param = new private1(); }
++    function foo2(param = new private1()) {
+     }
+     function foo3(param) {
+     }
+     m.foo3 = foo3;
+-    function foo4(param) {
+-        if (param === void 0) { param = new private1(); }
++    function foo4(param = new private1()) {
+     }
+     m.foo4 = foo4;
+     function foo11(param) {
+     }
+-    function foo12(param) {
+-        if (param === void 0) { param = new public1(); }
++    function foo12(param = new public1()) {
+     }
+     function foo13(param) {
+     }
+     m.foo13 = foo13;
+-    function foo14(param) {
+-        if (param === void 0) { param = new public1(); }
++    function foo14(param = new public1()) {
+     }
+     m.foo14 = foo14;
+-    var m2;
++    let m2;
+     (function (m2) {
+-        var public2 = /** @class */ (function () {
+-            function public2() {
+-            }
+-            return public2;
+-        }());
++        class public2 {
++        }
+         m2.public2 = public2;
+     })(m2 || (m2 = {}));
+     function foo111(param) {
+     }
+-    function foo112(param) {
+-        if (param === void 0) { param = new m2.public2(); }
++    function foo112(param = new m2.public2()) {
+     }
+     function foo113(param) {
+     }
+     m.foo113 = foo113;
+-    function foo114(param) {
+-        if (param === void 0) { param = new m2.public2(); }
++    function foo114(param = new m2.public2()) {
+     }
+     m.foo114 = foo114;
+ })(m || (m = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.symbols
index 663f630c99..b1132430ac 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 0))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 13))
     }
 
     export class public1 {
@@ -16,23 +16,23 @@ module m {
     function foo1(param: private1) {
 >foo1 : Symbol(foo1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 5, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 8, 18))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 13))
     }
     function foo2(param = new private1()) {
 >foo2 : Symbol(foo2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 9, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 10, 18))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 13))
     }
 
     export function foo3(param : private1) {
 >foo3 : Symbol(foo3, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 11, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 13, 25))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 13))
     }
     export function foo4(param = new private1()) {
 >foo4 : Symbol(foo4, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 14, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 15, 25))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 0, 13))
     }
 
     function foo11(param: public1) {
@@ -57,11 +57,11 @@ module m {
 >public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 2, 5))
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 26, 5))
 
         export class public2 {
->public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
         }
     }
 
@@ -69,28 +69,28 @@ module m {
 >foo111 : Symbol(foo111, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 31, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 33, 20))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 26, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
     }
     function foo112(param = new m2.public2()) {
 >foo112 : Symbol(foo112, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 34, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 35, 20))
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 26, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
     }
 
     export function foo113(param: m2.public2) {
 >foo113 : Symbol(foo113, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 36, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 38, 27))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 26, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
     }
     export function foo114(param = new m2.public2()) {
 >foo114 : Symbol(foo114, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 39, 5))
 >param : Symbol(param, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 40, 27))
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 26, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts, 28, 18))
     }
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.types
index bd635996dc..3adaec9f5e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorParameterOfFunction.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class private1 {
@@ -57,7 +57,7 @@ module m {
 >public1 : typeof public1
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : typeof m2
 
         export class public2 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js
index 8e14f73743..7c706c4740 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts] ////
 
 //// [declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts]
-module m {
+namespace m {
     class private1 {
     }
 
@@ -37,7 +37,7 @@ module m {
         return new public1();
     }
 
-    module m2 {
+    namespace m2 {
         export class public2 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js.diff
new file mode 100644
index 0000000000..e2576da246
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js.diff
@@ -0,0 +1,40 @@
+--- old.declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js
++++ new.declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js
+@@= skipped -60, +60 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.js]
+ var m;
+ (function (m) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var public1 = /** @class */ (function () {
+-        function public1() {
+-        }
+-        return public1;
+-    }());
++    class private1 {
++    }
++    class public1 {
++    }
+     m.public1 = public1;
+     // Directly using names from this module
+     function foo1() {
+@@= skipped -40, +34 lines =@@
+         return new public1();
+     }
+     m.foo14 = foo14;
+-    var m2;
++    let m2;
+     (function (m2) {
+-        var public2 = /** @class */ (function () {
+-            function public2() {
+-            }
+-            return public2;
+-        }());
++        class public2 {
++        }
+         m2.public2 = public2;
+     })(m2 || (m2 = {}));
+     function foo111() {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.symbols
index 0c4da9c57c..86293aefe0 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 0))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 13))
     }
 
     export class public1 {
@@ -15,7 +15,7 @@ module m {
     // Directly using names from this module
     function foo1(): private1 {
 >foo1 : Symbol(foo1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 5, 5))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 13))
 
         return;
     }
@@ -23,12 +23,12 @@ module m {
 >foo2 : Symbol(foo2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 10, 5))
 
         return new private1();
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 13))
     }
 
     export function foo3(): private1 {
 >foo3 : Symbol(foo3, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 13, 5))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 13))
 
         return;
     }
@@ -36,7 +36,7 @@ module m {
 >foo4 : Symbol(foo4, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 17, 5))
 
         return new private1();
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 0, 13))
     }
 
     function foo11(): public1 {
@@ -65,18 +65,18 @@ module m {
 >public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 2, 5))
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 34, 5))
 
         export class public2 {
->public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
         }
     }
 
     function foo111(): m2.public2 {
 >foo111 : Symbol(foo111, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 39, 5))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 34, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
 
         return;
     }
@@ -84,15 +84,15 @@ module m {
 >foo112 : Symbol(foo112, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 43, 5))
 
         return new m2.public2();
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 34, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
     }
 
     export function foo113(): m2.public2 {
 >foo113 : Symbol(foo113, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 46, 5))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 34, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
 
         return;
     }
@@ -100,9 +100,9 @@ module m {
 >foo114 : Symbol(foo114, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 50, 5))
 
         return new m2.public2();
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 34, 5))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts, 36, 18))
     }
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.types
index 6be77a5be0..e234a6a8f5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorReturnTypeOfFunction.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class private1 {
@@ -65,7 +65,7 @@ module m {
 >public1 : typeof public1
     }
 
-    module m2 {
+    namespace m2 {
 >m2 : typeof m2
 
         export class public2 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js
index 8db4cacf8c..723db2c161 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js
@@ -5,28 +5,28 @@ interface Window {
     someMethod();
 }
 
-module M {
+namespace M {
     type W = Window | string;
-    export module N {
+    export namespace N {
         export class Window { }
         export var p: W; // Should report error that W is private
     }
 }
 
-module M1 {
+namespace M1 {
     export type W = Window | string;
-    export module N {
+    export namespace N {
         export class Window { }
         export var p: W; // No error
     }
 }
 
-module M2 {
+namespace M2 {
     class private1 {
     }
     class public1 {
     }
-    module m3 {
+    namespace m3 {
         export class public1 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js.diff
new file mode 100644
index 0000000000..4f141a2166
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.js.diff
@@ -0,0 +1,63 @@
+--- old.declFileTypeAnnotationVisibilityErrorTypeAlias.js
++++ new.declFileTypeAnnotationVisibilityErrorTypeAlias.js
+@@= skipped -44, +44 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorTypeAlias.js]
+ var M;
+ (function (M) {
+-    var N;
++    let N;
+     (function (N) {
+-        var Window = /** @class */ (function () {
+-            function Window() {
+-            }
+-            return Window;
+-        }());
++        class Window {
++        }
+         N.Window = Window;
+     })(N = M.N || (M.N = {}));
+ })(M || (M = {}));
+ var M1;
+ (function (M1) {
+-    var N;
++    let N;
+     (function (N) {
+-        var Window = /** @class */ (function () {
+-            function Window() {
+-            }
+-            return Window;
+-        }());
++        class Window {
++        }
+         N.Window = Window;
+     })(N = M1.N || (M1.N = {}));
+ })(M1 || (M1 = {}));
+ var M2;
+ (function (M2) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var public1 = /** @class */ (function () {
+-        function public1() {
+-        }
+-        return public1;
+-    }());
+-    var m3;
++    class private1 {
++    }
++    class public1 {
++    }
++    let m3;
+     (function (m3) {
+-        var public1 = /** @class */ (function () {
+-            function public1() {
+-            }
+-            return public1;
+-        }());
++        class public1 {
++        }
+         m3.public1 = public1;
+     })(m3 || (m3 = {}));
+ })(M2 || (M2 = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.symbols
index d025f39318..a1fe3ca169 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.symbols
@@ -8,68 +8,68 @@ interface Window {
 >someMethod : Symbol(Window.someMethod, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 0, 18))
 }
 
-module M {
+namespace M {
 >M : Symbol(M, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 2, 1))
 
     type W = Window | string;
->W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 4, 10))
+>W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 4, 13))
 >Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 0, 0))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 5, 29))
 
         export class Window { }
->Window : Symbol(Window, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 6, 21))
+>Window : Symbol(Window, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 6, 24))
 
         export var p: W; // Should report error that W is private
 >p : Symbol(p, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 8, 18))
->W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 4, 10))
+>W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 4, 13))
     }
 }
 
-module M1 {
+namespace M1 {
 >M1 : Symbol(M1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 10, 1))
 
     export type W = Window | string;
->W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 12, 11))
+>W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 12, 14))
 >Window : Symbol(Window, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 0, 0))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 13, 36))
 
         export class Window { }
->Window : Symbol(Window, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 14, 21))
+>Window : Symbol(Window, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 14, 24))
 
         export var p: W; // No error
 >p : Symbol(p, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 16, 18))
->W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 12, 11))
+>W : Symbol(W, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 12, 14))
     }
 }
 
-module M2 {
+namespace M2 {
 >M2 : Symbol(M2, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 18, 1))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 11))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 14))
     }
     class public1 {
 >public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 22, 5))
     }
-    module m3 {
+    namespace m3 {
 >m3 : Symbol(m3, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 24, 5))
 
         export class public1 {
->public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
+>public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 18))
         }
     }
 
     type t1 = private1;
 >t1 : Symbol(t1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 28, 5))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 11))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 14))
 
     export type t2 = private1; // error
 >t2 : Symbol(t2, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 30, 23))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 11))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 20, 14))
 
     type t11 = public1;
 >t11 : Symbol(t11, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 31, 30))
@@ -82,11 +82,11 @@ module M2 {
     type t111 = m3.public1;
 >t111 : Symbol(t111, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 34, 30))
 >m3 : Symbol(m3, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 24, 5))
->public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
+>public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 18))
 
     export type t112 = m3.public1; // error
 >t112 : Symbol(t112, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 36, 27))
 >m3 : Symbol(m3, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 24, 5))
->public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 15))
+>public1 : Symbol(m3.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeAlias.ts, 25, 18))
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.types
index 7df7003610..6b427e6a02 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeAlias.types
@@ -6,13 +6,13 @@ interface Window {
 >someMethod : () => any
 }
 
-module M {
+namespace M {
 >M : typeof M
 
     type W = Window | string;
 >W : W
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export class Window { }
@@ -23,13 +23,13 @@ module M {
     }
 }
 
-module M1 {
+namespace M1 {
 >M1 : typeof M1
 
     export type W = Window | string;
 >W : W
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export class Window { }
@@ -40,7 +40,7 @@ module M1 {
     }
 }
 
-module M2 {
+namespace M2 {
 >M2 : typeof M2
 
     class private1 {
@@ -49,7 +49,7 @@ module M2 {
     class public1 {
 >public1 : public1
     }
-    module m3 {
+    namespace m3 {
 >m3 : typeof m3
 
         export class public1 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js
index 5ca559de83..dc57bf6abd 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts] ////
 
 //// [declFileTypeAnnotationVisibilityErrorTypeLiteral.ts]
-module m {
+namespace m {
     class private1 {
     }
-    module m2 {
+    namespace m2 {
         export class public1 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js.diff
new file mode 100644
index 0000000000..d2e5b05f9d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.js.diff
@@ -0,0 +1,33 @@
+--- old.declFileTypeAnnotationVisibilityErrorTypeLiteral.js
++++ new.declFileTypeAnnotationVisibilityErrorTypeLiteral.js
+@@= skipped -37, +37 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorTypeLiteral.js]
+ var m;
+ (function (m) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var m2;
++    class private1 {
++    }
++    let m2;
+     (function (m2) {
+-        var public1 = /** @class */ (function () {
+-            function public1() {
+-            }
+-            return public1;
+-        }());
++        class public1 {
++        }
+         m2.public1 = public1;
+     })(m2 || (m2 = {}));
+     m.x2 = {
+         x: new private1(),
+         y: new m2.public1(),
+-        method: function () {
++        method() {
+             return new private1();
+         }
+     };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.symbols
index d9ba371acd..af402e9d08 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.symbols
@@ -1,17 +1,17 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorTypeLiteral.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 0))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
     }
-    module m2 {
+    namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
 
         export class public1 {
->public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
         }
     }
 
@@ -20,29 +20,29 @@ module m {
 
         x: private1;
 >x : Symbol(x, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 8, 19))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 
         y: m2.public1;
 >y : Symbol(y, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 9, 20))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
         (): m2.public1[];
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
         method(): private1;
 >method : Symbol(method, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 11, 25))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 
         [n: number]: private1;
 >n : Symbol(n, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 13, 9))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 
         [s: string]: m2.public1;
 >s : Symbol(s, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 14, 9))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
     };
     export var x2 = {
@@ -50,19 +50,19 @@ module m {
 
         x: new private1(),
 >x : Symbol(x, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 16, 21))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 
         y: new m2.public1(),
 >y : Symbol(y, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 17, 26))
->m2.public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>m2.public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
         method() {
 >method : Symbol(method, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 18, 28))
 
             return new private1();
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
         }
     };
     export var x3 = x;
@@ -73,9 +73,9 @@ module m {
     export var y: (a: private1) => m2.public1;
 >y : Symbol(y, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 26, 14))
 >a : Symbol(a, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 26, 19))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
     export var y2 = y;
 >y2 : Symbol(y2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 27, 14))
@@ -85,9 +85,9 @@ module m {
     export var z: new (a: private1) => m2.public1;
 >z : Symbol(z, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 30, 14))
 >a : Symbol(a, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 30, 23))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 0, 13))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 2, 5))
->public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 15))
+>public1 : Symbol(m2.public1, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 3, 18))
 
     export var z2 = z;
 >z2 : Symbol(z2, Decl(declFileTypeAnnotationVisibilityErrorTypeLiteral.ts, 31, 14))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.types
index 50a4de459e..e6a400e2fa 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.types
@@ -1,13 +1,13 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorTypeLiteral.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorTypeLiteral.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class private1 {
 >private1 : private1
     }
-    module m2 {
+    namespace m2 {
 >m2 : typeof m2
 
         export class public1 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js
index 68cf48a6f3..da28e0866e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts] ////
 
 //// [declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts]
-module m {
+namespace m {
     class private1 {
     }
 
@@ -21,7 +21,7 @@ module m {
     export var k2: public1;
     export var l2 = new public1();
 
-    module m2 {
+    namespace m2 {
         export class public2 {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js.diff
new file mode 100644
index 0000000000..4247fb3f16
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.js.diff
@@ -0,0 +1,40 @@
+--- old.declFileTypeAnnotationVisibilityErrorVariableDeclaration.js
++++ new.declFileTypeAnnotationVisibilityErrorVariableDeclaration.js
+@@= skipped -36, +36 lines =@@
+ //// [declFileTypeAnnotationVisibilityErrorVariableDeclaration.js]
+ var m;
+ (function (m) {
+-    var private1 = /** @class */ (function () {
+-        function private1() {
+-        }
+-        return private1;
+-    }());
+-    var public1 = /** @class */ (function () {
+-        function public1() {
+-        }
+-        return public1;
+-    }());
++    class private1 {
++    }
++    class public1 {
++    }
+     m.public1 = public1;
+     // Directly using names from this module
+     var x;
+@@= skipped -18, +12 lines =@@
+     var x2;
+     var y2 = new public1();
+     m.l2 = new public1();
+-    var m2;
++    let m2;
+     (function (m2) {
+-        var public2 = /** @class */ (function () {
+-            function public2() {
+-            }
+-            return public2;
+-        }());
++        class public2 {
++        }
+         m2.public2 = public2;
+     })(m2 || (m2 = {}));
+     var x3;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.symbols
index 542d3e3335..e36928749b 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 0))
 
     class private1 {
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 13))
     }
 
     export class public1 {
@@ -15,19 +15,19 @@ module m {
     // Directly using names from this module
     var x: private1;
 >x : Symbol(x, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 8, 7))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 13))
 
     var y = new private1();
 >y : Symbol(y, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 9, 7))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 13))
 
     export var k: private1;
 >k : Symbol(k, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 11, 14))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 13))
 
     export var l = new private1();
 >l : Symbol(l, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 12, 14))
->private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 10))
+>private1 : Symbol(private1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 0, 13))
 
     var x2: public1;
 >x2 : Symbol(x2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 14, 7))
@@ -45,34 +45,34 @@ module m {
 >l2 : Symbol(l2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 14))
 >public1 : Symbol(public1, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 2, 5))
 
-    module m2 {
+    namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 34))
 
         export class public2 {
->public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>public2 : Symbol(public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
         }
     }
 
     var x3: m2.public2;
 >x3 : Symbol(x3, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 25, 7))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 34))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 
     var y3 = new m2.public2();
 >y3 : Symbol(y3, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 26, 7))
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 34))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 
     export var k3: m2.public2;
 >k3 : Symbol(k3, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 28, 14))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 34))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 
     export var l3 = new m2.public2();
 >l3 : Symbol(l3, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 29, 14))
->m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>m2.public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 >m2 : Symbol(m2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 18, 34))
->public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 15))
+>public2 : Symbol(m2.public2, Decl(declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts, 20, 18))
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.types b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.types
index 50a89407b3..488fb44fa3 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts] ////
 
 === declFileTypeAnnotationVisibilityErrorVariableDeclaration.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class private1 {
@@ -45,7 +45,7 @@ module m {
 >new public1() : public1
 >public1 : typeof public1
 
-    module m2 {
+    namespace m2 {
 >m2 : typeof m2
 
         export class public2 {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofClass.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeofClass.js.diff
index c88b48dc66..877981e008 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofClass.js.diff
@@ -1,13 +1,29 @@
 --- old.declFileTypeofClass.js
 +++ new.declFileTypeofClass.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+
 
  //// [declFileTypeofClass.js]
- class c {
+-var c = /** @class */ (function () {
+-    function c() {
+-    }
+-    return c;
+-}());
++class c {
 +    static x;
 +    static y;
 +    x3;
 +    y3;
- }
++}
  var x;
- var y = c;
\ No newline at end of file
+ var y = c;
+ var z;
+-var genericC = /** @class */ (function () {
+-    function genericC() {
+-    }
+-    return genericC;
+-}());
++class genericC {
++}
+ var genericX = genericC;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofFunction.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeofFunction.js.diff
index dfb8724d16..44fd7af2a5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofFunction.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofFunction.js.diff
@@ -1,6 +1,15 @@
 --- old.declFileTypeofFunction.js
 +++ new.declFileTypeofFunction.js
-@@= skipped -69, +69 lines =@@
+@@= skipped -48, +48 lines =@@
+ var foo3 = function () {
+     return foo3;
+ };
+-var x = function () {
++var x = () => {
+     return x;
+ };
+ function foo5(x) {
+@@= skipped -21, +21 lines =@@
  declare function foo(): typeof foo;
  declare var foo1: typeof foo;
  declare var foo2: typeof foo;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js
index de31db5459..abe986bff5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeofInAnonymousType.ts] ////
 
 //// [declFileTypeofInAnonymousType.ts]
-module m1 {
+namespace m1 {
     export class c {
     }
     export enum e {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js.diff b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js.diff
new file mode 100644
index 0000000000..bbc98600f8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.js.diff
@@ -0,0 +1,19 @@
+--- old.declFileTypeofInAnonymousType.js
++++ new.declFileTypeofInAnonymousType.js
+@@= skipped -25, +25 lines =@@
+ //// [declFileTypeofInAnonymousType.js]
+ var m1;
+ (function (m1) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     m1.c = c;
+-    var e;
++    let e;
+     (function (e) {
+         e[e["weekday"] = 0] = "weekday";
+         e[e["weekend"] = 1] = "weekend";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.symbols
index 8e7979ad61..20c275e15a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileTypeofInAnonymousType.ts] ////
 
 === declFileTypeofInAnonymousType.ts ===
-module m1 {
+namespace m1 {
 >m1 : Symbol(m1, Decl(declFileTypeofInAnonymousType.ts, 0, 0))
 
     export class c {
->c : Symbol(c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>c : Symbol(c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
     }
     export enum e {
 >e : Symbol(e, Decl(declFileTypeofInAnonymousType.ts, 2, 5))
@@ -24,16 +24,16 @@ var a: { c: m1.c; };
 >a : Symbol(a, Decl(declFileTypeofInAnonymousType.ts, 9, 3))
 >c : Symbol(c, Decl(declFileTypeofInAnonymousType.ts, 9, 8))
 >m1 : Symbol(m1, Decl(declFileTypeofInAnonymousType.ts, 0, 0))
->c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
 
 var b = {
 >b : Symbol(b, Decl(declFileTypeofInAnonymousType.ts, 10, 3))
 
     c: m1.c,
 >c : Symbol(c, Decl(declFileTypeofInAnonymousType.ts, 10, 9))
->m1.c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>m1.c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
 >m1 : Symbol(m1, Decl(declFileTypeofInAnonymousType.ts, 0, 0))
->c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
 
     m1: m1
 >m1 : Symbol(m1, Decl(declFileTypeofInAnonymousType.ts, 11, 12))
@@ -56,9 +56,9 @@ var d = {
     mc: { cl: m1.c },
 >mc : Symbol(mc, Decl(declFileTypeofInAnonymousType.ts, 16, 19))
 >cl : Symbol(cl, Decl(declFileTypeofInAnonymousType.ts, 17, 9))
->m1.c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>m1.c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
 >m1 : Symbol(m1, Decl(declFileTypeofInAnonymousType.ts, 0, 0))
->c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 11))
+>c : Symbol(m1.c, Decl(declFileTypeofInAnonymousType.ts, 0, 14))
 
     me: { en: m1.e },
 >me : Symbol(me, Decl(declFileTypeofInAnonymousType.ts, 17, 21))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.types b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.types
index 06a177fd2a..79fa0652fa 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofInAnonymousType.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeofInAnonymousType.ts] ////
 
 === declFileTypeofInAnonymousType.ts ===
-module m1 {
+namespace m1 {
 >m1 : typeof m1
 
     export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.js b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.js
index 6afaf6d153..54927390c2 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.js
@@ -1,13 +1,13 @@
 //// [tests/cases/compiler/declFileTypeofModule.ts] ////
 
 //// [declFileTypeofModule.ts]
-module m1 {
+namespace m1 {
     export var c: string;
 }
 var m1_1 = m1;
 var m1_2: typeof m1;
 
-module m2 {
+namespace m2 {
     export var d: typeof m2;
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.symbols b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.symbols
index aa4599bd9b..b59790727a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.symbols
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeofModule.ts] ////
 
 === declFileTypeofModule.ts ===
-module m1 {
+namespace m1 {
 >m1 : Symbol(m1, Decl(declFileTypeofModule.ts, 0, 0))
 
     export var c: string;
@@ -15,7 +15,7 @@ var m1_2: typeof m1;
 >m1_2 : Symbol(m1_2, Decl(declFileTypeofModule.ts, 4, 3))
 >m1 : Symbol(m1, Decl(declFileTypeofModule.ts, 0, 0))
 
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declFileTypeofModule.ts, 4, 20))
 
     export var d: typeof m2;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.types b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.types
index 76e26425e1..9a87faaf58 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileTypeofModule.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileTypeofModule.ts] ////
 
 === declFileTypeofModule.ts ===
-module m1 {
+namespace m1 {
 >m1 : typeof m1
 
     export var c: string;
@@ -15,7 +15,7 @@ var m1_2: typeof m1;
 >m1_2 : typeof m1
 >m1 : typeof m1
 
-module m2 {
+namespace m2 {
 >m2 : typeof m2
 
     export var d: typeof m2;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
index 7f4b3f6221..cc82df98dc 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
@@ -1,19 +1,19 @@
 //// [tests/cases/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts] ////
 
 //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts]
-declare module A.B.Base {
+declare namespace A.B.Base {
     export class W {
         id: number;
     }
 }
-module X.Y.base {
+namespace X.Y.base {
 
     export class W extends A.B.Base.W {
         name: string;
     }
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
 
     export class W extends X.Y.base.W {
         value: boolean;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js.diff b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js.diff
index 18caf0a383..5c76efdd78 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.js.diff
@@ -1,7 +1,24 @@
 --- old.declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
 +++ new.declFileWithClassNameConflictingWithClassReferredByExtendsClause.js
-@@= skipped -23, +23 lines =@@
+@@= skipped -21, +21 lines =@@
+
+
  //// [declFileWithClassNameConflictingWithClassReferredByExtendsClause.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  var X;
  (function (X) {
 -    var Y;
@@ -10,9 +27,16 @@
 -        var base;
 +        let base;
          (function (base) {
-             class W extends A.B.Base.W {
+-            var W = /** @class */ (function (_super) {
+-                __extends(W, _super);
+-                function W() {
+-                    return _super !== null && _super.apply(this, arguments) || this;
+-                }
+-                return W;
+-            }(A.B.Base.W));
++            class W extends A.B.Base.W {
 +                name;
-             }
++            }
              base.W = W;
          })(base = Y.base || (Y.base = {}));
      })(Y = X.Y || (X.Y = {}));
@@ -27,8 +51,16 @@
 -            var Z;
 +            let Z;
              (function (Z) {
-                 class W extends X.Y.base.W {
+-                var W = /** @class */ (function (_super) {
+-                    __extends(W, _super);
+-                    function W() {
+-                        return _super !== null && _super.apply(this, arguments) || this;
+-                    }
+-                    return W;
+-                }(X.Y.base.W));
++                class W extends X.Y.base.W {
 +                    value;
-                 }
++                }
                  Z.W = W;
-             })(Z = base.Z || (base.Z = {}));
\ No newline at end of file
+             })(Z = base.Z || (base.Z = {}));
+         })(base = Y.base || (Y.base = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols
index 3b36e3b190..8d90e6c5fe 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.symbols
@@ -1,54 +1,54 @@
 //// [tests/cases/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts] ////
 
 === declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts ===
-declare module A.B.Base {
+declare namespace A.B.Base {
 >A : Symbol(A, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 0))
->B : Symbol(B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 17))
->Base : Symbol(Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 19))
+>B : Symbol(B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 20))
+>Base : Symbol(Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 22))
 
     export class W {
->W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 25))
+>W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 28))
 
         id: number;
 >id : Symbol(W.id, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 1, 20))
     }
 }
-module X.Y.base {
+namespace X.Y.base {
 >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1))
->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9))
->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11))
+>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 12), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 12))
+>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 14), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 14))
 
     export class W extends A.B.Base.W {
->W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17))
->A.B.Base.W : Symbol(A.B.Base.W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 25))
->A.B.Base : Symbol(A.B.Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 19))
->A.B : Symbol(A.B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 17))
+>W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 20))
+>A.B.Base.W : Symbol(A.B.Base.W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 28))
+>A.B.Base : Symbol(A.B.Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 22))
+>A.B : Symbol(A.B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 20))
 >A : Symbol(A, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 0))
->B : Symbol(A.B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 17))
->Base : Symbol(A.B.Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 19))
->W : Symbol(A.B.Base.W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 25))
+>B : Symbol(A.B, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 20))
+>Base : Symbol(A.B.Base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 22))
+>W : Symbol(A.B.Base.W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 0, 28))
 
         name: string;
 >name : Symbol(W.name, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 7, 39))
     }
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
 >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1))
->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9))
->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11))
->Z : Symbol(Z, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 16))
+>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 12), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 12))
+>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 14), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 14))
+>Z : Symbol(Z, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 19))
 
     export class W extends X.Y.base.W {
->W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 19))
+>W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 22))
 >TValue : Symbol(TValue, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 19))
->X.Y.base.W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17))
->X.Y.base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11))
->X.Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9))
+>X.Y.base.W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 20))
+>X.Y.base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 14), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 14))
+>X.Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 12), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 12))
 >X : Symbol(X, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 4, 1), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 10, 1))
->Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 9), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 9))
->base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 11), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 11))
->W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 17))
+>Y : Symbol(Y, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 12), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 12))
+>base : Symbol(base, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 14), Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 12, 14))
+>W : Symbol(W, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 5, 20))
 
         value: boolean;
 >value : Symbol(W.value, Decl(declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts, 14, 47))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types
index 2317aa4cfd..4cefc20ddf 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts] ////
 
 === declFileWithClassNameConflictingWithClassReferredByExtendsClause.ts ===
-declare module A.B.Base {
+declare namespace A.B.Base {
 >A : typeof A
 >B : typeof B
 >Base : typeof Base
@@ -13,7 +13,7 @@ declare module A.B.Base {
 >id : number
     }
 }
-module X.Y.base {
+namespace X.Y.base {
 >X : typeof X
 >Y : typeof Y
 >base : typeof base
@@ -33,7 +33,7 @@ module X.Y.base {
     }
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
 >X : typeof X
 >Y : typeof Y
 >base : typeof base
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.errors.txt
index 9d677e4bf7..dac66868a5 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.errors.txt
@@ -9,7 +9,7 @@ declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an alre
     var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
     
 ==== declFile.d.ts (4 errors) ====
-    declare module M {
+    declare namespace M {
         declare var x;
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
@@ -17,7 +17,7 @@ declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an alre
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
     
-        declare module N { }
+        declare namespace N { }
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
     
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.js b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.js
index 14dd0f1313..8efe2ad37a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.js
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileWithErrorsInInputDeclarationFile.ts] ////
 
 //// [declFile.d.ts]
-declare module M {
+declare namespace M {
     declare var x;
     declare function f();
 
-    declare module N { }
+    declare namespace N { }
 
     declare class C { }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.symbols
index 4ee76498fb..7042e03eea 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.symbols
@@ -4,12 +4,12 @@
 ///
 var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
 >x : Symbol(x, Decl(client.ts, 1, 3))
->M.C : Symbol(M.C, Decl(declFile.d.ts, 4, 24))
+>M.C : Symbol(M.C, Decl(declFile.d.ts, 4, 27))
 >M : Symbol(M, Decl(declFile.d.ts, 0, 0))
->C : Symbol(M.C, Decl(declFile.d.ts, 4, 24))
+>C : Symbol(M.C, Decl(declFile.d.ts, 4, 27))
 
 === declFile.d.ts ===
-declare module M {
+declare namespace M {
 >M : Symbol(M, Decl(declFile.d.ts, 0, 0))
 
     declare var x;
@@ -18,10 +18,10 @@ declare module M {
     declare function f();
 >f : Symbol(f, Decl(declFile.d.ts, 1, 18))
 
-    declare module N { }
+    declare namespace N { }
 >N : Symbol(N, Decl(declFile.d.ts, 2, 25))
 
     declare class C { }
->C : Symbol(C, Decl(declFile.d.ts, 4, 24))
+>C : Symbol(C, Decl(declFile.d.ts, 4, 27))
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.types b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.types
index c3d5ff39e4..0c9a28319e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFile.types
@@ -10,7 +10,7 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors
 >C : typeof M.C
 
 === declFile.d.ts ===
-declare module M {
+declare namespace M {
 >M : typeof M
 
     declare var x;
@@ -19,7 +19,7 @@ declare module M {
     declare function f();
 >f : () => any
 
-    declare module N { }
+    declare namespace N { }
 
     declare class C { }
 >C : C
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt
index 5e2e87f6f1..5224e62bae 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.errors.txt
@@ -11,7 +11,7 @@ declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an alre
     var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
     
 ==== declFile.d.ts (4 errors) ====
-    declare module M {
+    declare namespace M {
         declare var x;
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
@@ -19,7 +19,7 @@ declFile.d.ts(7,5): error TS1038: A 'declare' modifier cannot be used in an alre
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
     
-        declare module N { }
+        declare namespace N { }
         ~~~~~~~
 !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context.
     
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.symbols
index 1a473d9c37..f77dd680a4 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.symbols
@@ -4,12 +4,12 @@
 ///
 var x = new M.C(); // Declaration file wont get emitted because there are errors in declaration file
 >x : Symbol(x, Decl(client.ts, 1, 3))
->M.C : Symbol(M.C, Decl(declFile.d.ts, 4, 24))
+>M.C : Symbol(M.C, Decl(declFile.d.ts, 4, 27))
 >M : Symbol(M, Decl(declFile.d.ts, 0, 0))
->C : Symbol(M.C, Decl(declFile.d.ts, 4, 24))
+>C : Symbol(M.C, Decl(declFile.d.ts, 4, 27))
 
 === declFile.d.ts ===
-declare module M {
+declare namespace M {
 >M : Symbol(M, Decl(declFile.d.ts, 0, 0))
 
     declare var x;
@@ -18,10 +18,10 @@ declare module M {
     declare function f();
 >f : Symbol(f, Decl(declFile.d.ts, 1, 18))
 
-    declare module N { }
+    declare namespace N { }
 >N : Symbol(N, Decl(declFile.d.ts, 2, 25))
 
     declare class C { }
->C : Symbol(C, Decl(declFile.d.ts, 4, 24))
+>C : Symbol(C, Decl(declFile.d.ts, 4, 27))
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.types b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.types
index 6ac085b0bd..9a5f07f073 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithErrorsInInputDeclarationFileWithOut.types
@@ -10,7 +10,7 @@ var x = new M.C(); // Declaration file wont get emitted because there are errors
 >C : typeof M.C
 
 === declFile.d.ts ===
-declare module M {
+declare namespace M {
 >M : typeof M
 
     declare var x;
@@ -19,7 +19,7 @@ declare module M {
     declare function f();
 >f : () => any
 
-    declare module N { }
+    declare namespace N { }
 
     declare class C { }
 >C : C
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
index e89b874eba..506915934a 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js
@@ -1,19 +1,19 @@
 //// [tests/cases/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.ts] ////
 
 //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.ts]
-declare module A.B.C {
+declare namespace A.B.C {
     class B {
     }
 }
 
-module A.B {
+namespace A.B {
     export class EventManager {
         id: number;
 
     }
 }
 
-module A.B.C {
+namespace A.B.C {
     export class ContextMenu extends EventManager {
         name: string;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js.diff b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js.diff
index fbd9e70973..11171af194 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.js.diff
@@ -1,15 +1,37 @@
 --- old.declFileWithExtendsClauseThatHasItsContainerNameConflict.js
 +++ new.declFileWithExtendsClauseThatHasItsContainerNameConflict.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -19, +19 lines =@@
+ }
+
  //// [declFileWithExtendsClauseThatHasItsContainerNameConflict.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  var A;
  (function (A) {
 -    var B;
 +    let B;
      (function (B) {
-         class EventManager {
+-        var EventManager = /** @class */ (function () {
+-            function EventManager() {
+-            }
+-            return EventManager;
+-        }());
++        class EventManager {
 +            id;
-         }
++        }
          B.EventManager = EventManager;
      })(B = A.B || (A.B = {}));
  })(A || (A = {}));
@@ -20,9 +42,16 @@
 -        var C;
 +        let C;
          (function (C) {
--            class ContextMenu extends B.EventManager {
+-            var ContextMenu = /** @class */ (function (_super) {
+-                __extends(ContextMenu, _super);
+-                function ContextMenu() {
+-                    return _super !== null && _super.apply(this, arguments) || this;
+-                }
+-                return ContextMenu;
+-            }(B.EventManager));
 +            class ContextMenu extends EventManager {
 +                name;
-             }
++            }
              C.ContextMenu = ContextMenu;
-         })(C = B.C || (B.C = {}));
\ No newline at end of file
+         })(C = B.C || (B.C = {}));
+     })(B = A.B || (A.B = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols
index b97870d1e9..2da32ab179 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.symbols
@@ -1,22 +1,22 @@
 //// [tests/cases/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.ts] ////
 
 === declFileWithExtendsClauseThatHasItsContainerNameConflict.ts ===
-declare module A.B.C {
+declare namespace A.B.C {
 >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1))
->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9))
->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11))
+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 20), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 12))
+>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 22), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 14))
 
     class B {
->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 22))
+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 25))
     }
 }
 
-module A.B {
+namespace A.B {
 >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1))
->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9))
+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 20), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 12))
 
     export class EventManager {
->EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12))
+>EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 15))
 
         id: number;
 >id : Symbol(EventManager.id, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 6, 31))
@@ -24,14 +24,14 @@ module A.B {
     }
 }
 
-module A.B.C {
+namespace A.B.C {
 >A : Symbol(A, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 0), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 3, 1), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 10, 1))
->B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 17), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 9), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 9))
->C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 19), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 11))
+>B : Symbol(B, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 20), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 12))
+>C : Symbol(C, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 0, 22), Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 14))
 
     export class ContextMenu extends EventManager {
->ContextMenu : Symbol(ContextMenu, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 14))
->EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 12))
+>ContextMenu : Symbol(ContextMenu, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 12, 17))
+>EventManager : Symbol(EventManager, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 5, 15))
 
         name: string;
 >name : Symbol(ContextMenu.name, Decl(declFileWithExtendsClauseThatHasItsContainerNameConflict.ts, 13, 51))
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types
index 1ff5261705..9fdab90867 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declFileWithExtendsClauseThatHasItsContainerNameConflict.ts] ////
 
 === declFileWithExtendsClauseThatHasItsContainerNameConflict.ts ===
-declare module A.B.C {
+declare namespace A.B.C {
 >A : typeof A
 >B : typeof B
 >C : typeof C
@@ -11,7 +11,7 @@ declare module A.B.C {
     }
 }
 
-module A.B {
+namespace A.B {
 >A : typeof A
 >B : typeof B
 
@@ -24,7 +24,7 @@ module A.B {
     }
 }
 
-module A.B.C {
+namespace A.B.C {
 >A : typeof A
 >B : typeof B
 >C : typeof C
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js
index b8c4b29006..985b58db4f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js
@@ -1,12 +1,12 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts] ////
 
 //// [declFileWithInternalModuleNameConflictsInExtendsClause1.ts]
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
-    module A {
+namespace X.A.B.C {
+    namespace A {
     }
     export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js.diff
index 4a83580ae4..c779147f2e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.js.diff
@@ -13,5 +13,13 @@
 -            var C;
 +            let C;
              (function (C) {
-                 class W {
-                 }
\ No newline at end of file
+-                var W = /** @class */ (function () {
+-                    function W() {
+-                    }
+-                    return W;
+-                }());
++                class W {
++                }
+                 C.W = W;
+             })(C = B.C || (B.C = {}));
+         })(B = A.B || (A.B = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols
index 48daf1ce97..5bcf4fe00e 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.symbols
@@ -1,32 +1,32 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause1.ts ===
-module X.A.C {
+namespace X.A.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
 
     export interface Z {
->Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
+>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 17))
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9))
->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 11))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 13))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 12))
+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 14))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 16))
 
-    module A {
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 16))
+    namespace A {
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 19))
     }
     export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
 >W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 6, 5))
->X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
->X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11))
->X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9))
+>X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 17))
+>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
+>X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 12))
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 3, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 11))
->Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 4, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 14))
+>Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause1.ts, 0, 17))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types
index f76ff040c7..c1f27cf534 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.types
@@ -1,17 +1,17 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause1.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause1.ts ===
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : typeof X
 >A : typeof A
 >B : typeof B
 >C : typeof C
 
-    module A {
+    namespace A {
     }
     export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
 >W : W
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js
index f41c135d3d..37c21feac8 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js
@@ -1,17 +1,17 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts] ////
 
 //// [declFileWithInternalModuleNameConflictsInExtendsClause2.ts]
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
     export class W implements A.C.Z { // This can refer to it as A.C.Z
     }
 }
 
-module X.A.B.C {
-    module A {
+namespace X.A.B.C {
+    namespace A {
     }
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js.diff
index 9a2d8588b7..b17e73da36 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.js.diff
@@ -13,5 +13,13 @@
 -            var C;
 +            let C;
              (function (C) {
-                 class W {
-                 }
\ No newline at end of file
+-                var W = /** @class */ (function () {
+-                    function W() {
+-                    }
+-                    return W;
+-                }());
++                class W {
++                }
+                 C.W = W;
+             })(C = B.C || (B.C = {}));
+         })(B = A.B || (A.B = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols
index b607ff5cfb..7649ee2cc7 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.symbols
@@ -1,38 +1,38 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause2.ts ===
-module X.A.C {
+namespace X.A.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
 
     export interface Z {
->Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
+>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 17))
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9))
->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 12))
+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 14), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 14))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 16), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 16))
 
     export class W implements A.C.Z { // This can refer to it as A.C.Z
->W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 16))
->A.C.Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
->A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 11))
->Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
+>W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 19))
+>A.C.Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 17))
+>A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 14))
+>Z : Symbol(A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 17))
     }
 }
 
-module X.A.B.C {
+namespace X.A.B.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 9))
->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 11))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 13))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 12))
+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 14), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 14))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 4, 16), Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 16))
 
-    module A {
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 16))
+    namespace A {
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause2.ts, 9, 19))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types
index d346a8db7f..5f4c86d5e8 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.types
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause2.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause2.ts ===
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : typeof X
 >A : typeof A
 >B : typeof B
@@ -19,7 +19,7 @@ module X.A.B.C {
     }
 }
 
-module X.A.B.C {
-    module A {
+namespace X.A.B.C {
+    namespace A {
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js
index 8d531cb7c7..e19d5cee18 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js
@@ -1,17 +1,17 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.ts] ////
 
 //// [declFileWithInternalModuleNameConflictsInExtendsClause3.ts]
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
     export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
     }
 }
 
-module X.A.B.C {
-    export module A {
+namespace X.A.B.C {
+    export namespace A {
     }
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js.diff b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js.diff
index bc4ffc528e..e7ce203f70 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.js.diff
@@ -13,5 +13,13 @@
 -            var C;
 +            let C;
              (function (C) {
-                 class W {
-                 }
\ No newline at end of file
+-                var W = /** @class */ (function () {
+-                    function W() {
+-                    }
+-                    return W;
+-                }());
++                class W {
++                }
+                 C.W = W;
+             })(C = B.C || (B.C = {}));
+         })(B = A.B || (A.B = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols
index 855a667da0..e0e188f425 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.symbols
@@ -1,40 +1,40 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause3.ts ===
-module X.A.C {
+namespace X.A.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
 
     export interface Z {
->Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
+>Z : Symbol(Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 17))
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9))
->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 12))
+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 14), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 14))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 16))
 
     export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict
->W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16))
->X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
->X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11))
->X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9))
+>W : Symbol(W, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 19))
+>X.A.C.Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 17))
+>X.A.C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
+>X.A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 12))
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 11))
->Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 12))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 14))
+>Z : Symbol(X.A.C.Z, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 17))
     }
 }
 
-module X.A.B.C {
+namespace X.A.B.C {
 >X : Symbol(X, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 0), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 3, 1), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 7, 1))
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 9), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 9))
->B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 11), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 11))
->C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 13), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 13))
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 0, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 12), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 12))
+>B : Symbol(B, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 14), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 14))
+>C : Symbol(C, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 4, 16), Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 16))
 
-    export module A {
->A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 16))
+    export namespace A {
+>A : Symbol(A, Decl(declFileWithInternalModuleNameConflictsInExtendsClause3.ts, 9, 19))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types
index 17be9cdba0..94a5fa187f 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types
+++ b/testdata/baselines/reference/submodule/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.types
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declFileWithInternalModuleNameConflictsInExtendsClause3.ts] ////
 
 === declFileWithInternalModuleNameConflictsInExtendsClause3.ts ===
-module X.A.C {
+namespace X.A.C {
     export interface Z {
     }
 }
-module X.A.B.C {
+namespace X.A.B.C {
 >X : typeof X
 >A : typeof A
 >B : typeof B
@@ -21,7 +21,7 @@ module X.A.B.C {
     }
 }
 
-module X.A.B.C {
-    export module A {
+namespace X.A.B.C {
+    export namespace A {
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declInput-2.js b/testdata/baselines/reference/submodule/compiler/declInput-2.js
index a8b42eeaf0..11ca11f646 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput-2.js
+++ b/testdata/baselines/reference/submodule/compiler/declInput-2.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declInput-2.ts] ////
 
 //// [declInput-2.ts]
-module M {
+namespace M {
     class C { }
     export class E {}
     export interface I1 {}
diff --git a/testdata/baselines/reference/submodule/compiler/declInput-2.js.diff b/testdata/baselines/reference/submodule/compiler/declInput-2.js.diff
index d654e9f0a7..c48c43ee3f 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput-2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declInput-2.js.diff
@@ -1,9 +1,36 @@
 --- old.declInput-2.js
 +++ new.declInput-2.js
-@@= skipped -31, +31 lines =@@
-     }
+@@= skipped -25, +25 lines =@@
+ //// [declInput-2.js]
+ var M;
+ (function (M) {
+-    var C = /** @class */ (function () {
+-        function C() {
+-        }
+-        return C;
+-    }());
+-    var E = /** @class */ (function () {
+-        function E() {
+-        }
+-        return E;
+-    }());
++    class C {
++    }
++    class E {
++    }
      M.E = E;
-     class D {
+-    var D = /** @class */ (function () {
+-        function D() {
+-        }
+-        D.prototype.m232 = function () { return null; };
+-        D.prototype.m242 = function () { return null; };
+-        D.prototype.m252 = function () { return null; }; // don't generate
+-        D.prototype.m26 = function (i) { };
+-        D.prototype.m262 = function (i) { };
+-        D.prototype.m3 = function () { return new C(); };
+-        return D;
+-    }());
++    class D {
 +        c; // don't generate
 +        m1;
 +        m2;
@@ -11,6 +38,12 @@
 +        m23;
 +        m24;
 +        m25; // don't generate
-         m232() { return null; }
-         m242() { return null; }
-         m252() { return null; } // don't generate
\ No newline at end of file
++        m232() { return null; }
++        m242() { return null; }
++        m252() { return null; } // don't generate
++        m26(i) { }
++        m262(i) { }
++        m3() { return new C(); }
++    }
+     M.D = D;
+ })(M || (M = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/declInput-2.symbols b/testdata/baselines/reference/submodule/compiler/declInput-2.symbols
index df9224b31a..975f06d920 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput-2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declInput-2.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declInput-2.ts] ////
 
 === declInput-2.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declInput-2.ts, 0, 0))
 
     class C { }
->C : Symbol(C, Decl(declInput-2.ts, 0, 10))
+>C : Symbol(C, Decl(declInput-2.ts, 0, 13))
 
     export class E {}
 >E : Symbol(E, Decl(declInput-2.ts, 1, 15))
@@ -21,7 +21,7 @@ module M {
 
         private c: C; // don't generate
 >c : Symbol(D.c, Decl(declInput-2.ts, 5, 20))
->C : Symbol(C, Decl(declInput-2.ts, 0, 10))
+>C : Symbol(C, Decl(declInput-2.ts, 0, 13))
 
         public m1: number;
 >m1 : Symbol(D.m1, Decl(declInput-2.ts, 6, 21))
@@ -31,7 +31,7 @@ module M {
 
         public m22: C; // don't generate
 >m22 : Symbol(D.m22, Decl(declInput-2.ts, 8, 26))
->C : Symbol(C, Decl(declInput-2.ts, 0, 10))
+>C : Symbol(C, Decl(declInput-2.ts, 0, 13))
 
         public m23: E;
 >m23 : Symbol(D.m23, Decl(declInput-2.ts, 9, 22))
@@ -69,7 +69,7 @@ module M {
 
         public m3():C { return new C(); }
 >m3 : Symbol(D.m3, Decl(declInput-2.ts, 17, 28))
->C : Symbol(C, Decl(declInput-2.ts, 0, 10))
->C : Symbol(C, Decl(declInput-2.ts, 0, 10))
+>C : Symbol(C, Decl(declInput-2.ts, 0, 13))
+>C : Symbol(C, Decl(declInput-2.ts, 0, 13))
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declInput-2.types b/testdata/baselines/reference/submodule/compiler/declInput-2.types
index 7366c8b65a..356af3bd39 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput-2.types
+++ b/testdata/baselines/reference/submodule/compiler/declInput-2.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declInput-2.ts] ////
 
 === declInput-2.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     class C { }
diff --git a/testdata/baselines/reference/submodule/compiler/declInput.js.diff b/testdata/baselines/reference/submodule/compiler/declInput.js.diff
new file mode 100644
index 0000000000..ccb67ae7bd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declInput.js.diff
@@ -0,0 +1,27 @@
+--- old.declInput.js
++++ new.declInput.js
+@@= skipped -12, +12 lines =@@
+
+
+ //// [declInput.js]
+-var bar = /** @class */ (function () {
+-    function bar() {
+-    }
+-    bar.prototype.f = function () { return ''; };
+-    bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; };
+-    bar.prototype.h = function (x, y, z) {
+-        if (x === void 0) { x = 4; }
+-        if (y === void 0) { y = null; }
+-        if (z === void 0) { z = ''; }
+-        x++;
+-    };
+-    return bar;
+-}());
++class bar {
++    f() { return ''; }
++    g() { return { a: null, b: undefined, c: void 4 }; }
++    h(x = 4, y = null, z = '') { x++; }
++}
+
+
+ //// [declInput.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declInput3.js.diff b/testdata/baselines/reference/submodule/compiler/declInput3.js.diff
new file mode 100644
index 0000000000..b40b90cd5b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declInput3.js.diff
@@ -0,0 +1,27 @@
+--- old.declInput3.js
++++ new.declInput3.js
+@@= skipped -12, +12 lines =@@
+
+
+ //// [declInput3.js]
+-var bar = /** @class */ (function () {
+-    function bar() {
+-    }
+-    bar.prototype.f = function () { return ''; };
+-    bar.prototype.g = function () { return { a: null, b: undefined, c: void 4 }; };
+-    bar.prototype.h = function (x, y, z) {
+-        if (x === void 0) { x = 4; }
+-        if (y === void 0) { y = null; }
+-        if (z === void 0) { z = ''; }
+-        x++;
+-    };
+-    return bar;
+-}());
++class bar {
++    f() { return ''; }
++    g() { return { a: null, b: undefined, c: void 4 }; }
++    h(x = 4, y = null, z = '') { x++; }
++}
+
+
+ //// [declInput3.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declInput4.js b/testdata/baselines/reference/submodule/compiler/declInput4.js
index 31f1cccd93..525ab8fad1 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput4.js
+++ b/testdata/baselines/reference/submodule/compiler/declInput4.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declInput4.ts] ////
 
 //// [declInput4.ts]
-module M {
+namespace M {
     class C { }
     export class E {}
     export interface I1 {}
diff --git a/testdata/baselines/reference/submodule/compiler/declInput4.js.diff b/testdata/baselines/reference/submodule/compiler/declInput4.js.diff
index 97a15b3f71..c25e991072 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput4.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declInput4.js.diff
@@ -1,13 +1,40 @@
 --- old.declInput4.js
 +++ new.declInput4.js
-@@= skipped -25, +25 lines =@@
-     }
+@@= skipped -19, +19 lines =@@
+ //// [declInput4.js]
+ var M;
+ (function (M) {
+-    var C = /** @class */ (function () {
+-        function C() {
+-        }
+-        return C;
+-    }());
+-    var E = /** @class */ (function () {
+-        function E() {
+-        }
+-        return E;
+-    }());
++    class C {
++    }
++    class E {
++    }
      M.E = E;
-     class D {
+-    var D = /** @class */ (function () {
+-        function D() {
+-        }
+-        D.prototype.m232 = function () { return null; };
+-        D.prototype.m242 = function () { return null; };
+-        D.prototype.m26 = function (i) { };
+-        return D;
+-    }());
++    class D {
 +        m1;
 +        m2;
 +        m23;
 +        m24;
-         m232() { return null; }
-         m242() { return null; }
-         m26(i) { }
\ No newline at end of file
++        m232() { return null; }
++        m242() { return null; }
++        m26(i) { }
++    }
+     M.D = D;
+ })(M || (M = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/declInput4.symbols b/testdata/baselines/reference/submodule/compiler/declInput4.symbols
index be7952acca..ab3e9cee94 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput4.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declInput4.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declInput4.ts] ////
 
 === declInput4.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declInput4.ts, 0, 0))
 
     class C { }
->C : Symbol(C, Decl(declInput4.ts, 0, 10))
+>C : Symbol(C, Decl(declInput4.ts, 0, 13))
 
     export class E {}
 >E : Symbol(E, Decl(declInput4.ts, 1, 15))
diff --git a/testdata/baselines/reference/submodule/compiler/declInput4.types b/testdata/baselines/reference/submodule/compiler/declInput4.types
index 2cad16a0ce..d03d738a80 100644
--- a/testdata/baselines/reference/submodule/compiler/declInput4.types
+++ b/testdata/baselines/reference/submodule/compiler/declInput4.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declInput4.ts] ////
 
 === declInput4.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     class C { }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitAliasExportStar.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasExportStar.js.diff
new file mode 100644
index 0000000000..e0689bd91a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasExportStar.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitAliasExportStar.js
++++ new.declarationEmitAliasExportStar.js
+@@= skipped -33, +33 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.thing2 = void 0;
+-var thing2 = function (param) { return null; };
++const thing2 = (param) => null;
+ exports.thing2 = thing2;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitAliasFromIndirectFile.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasFromIndirectFile.js.diff
new file mode 100644
index 0000000000..b1770d23af
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasFromIndirectFile.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitAliasFromIndirectFile.js
++++ new.declarationEmitAliasFromIndirectFile.js
+@@= skipped -29, +29 lines =@@
+ //// [app.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var fp = { l10ns: {} };
++const fp = { l10ns: {} };
+ exports.default = fp.l10ns;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitAliasInlineing.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasInlineing.js.diff
index 4e8d8abc1b..a8e73bf368 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitAliasInlineing.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitAliasInlineing.js.diff
@@ -1,6 +1,20 @@
 --- old.declarationEmitAliasInlineing.js
 +++ new.declarationEmitAliasInlineing.js
-@@= skipped -45, +45 lines =@@
+@@= skipped -33, +33 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fn = void 0;
+-var fn = function (v, p, key, p2) { };
++const fn = (v, p, key, p2) => { };
+ exports.fn = fn;
+ //// [aExp.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fnExp = void 0;
+-var fnExp = function (v, p, key, p2) { };
++const fnExp = (v, p, key, p2) => { };
+ exports.fnExp = fnExp;
+ //// [b.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.fExp = exports.f = void 0;
@@ -11,7 +25,7 @@
  exports.f = a_1.fn;
  exports.fExp = aExp_1.fnExp;
 
-@@= skipped -11, +11 lines =@@
+@@= skipped -23, +23 lines =@@
      prop: string;
      prop2: string;
  };
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitAnyComputedPropertyInClass.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitAnyComputedPropertyInClass.js.diff
index 709671dfb3..fbaa4c0c8d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitAnyComputedPropertyInClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitAnyComputedPropertyInClass.js.diff
@@ -5,7 +5,16 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.C = void 0;
 -var abcdefgh_1 = require("abcdefgh");
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype[abcdefgh_1.default.someKey] = function () { };
 +const abcdefgh_1 = require("abcdefgh");
- class C {
-     [abcdefgh_1.default.someKey]() { }
-     ;
\ No newline at end of file
++class C {
++    [abcdefgh_1.default.someKey]() { }
+     ;
+-    return C;
+-}());
++}
+ exports.C = C;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitArrayTypesFromGenericArrayUsage.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitArrayTypesFromGenericArrayUsage.symbols.diff
new file mode 100644
index 0000000000..90b4b14e82
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitArrayTypesFromGenericArrayUsage.symbols.diff
@@ -0,0 +1,8 @@
+--- old.declarationEmitArrayTypesFromGenericArrayUsage.symbols
++++ new.declarationEmitArrayTypesFromGenericArrayUsage.symbols
+@@= skipped -2, +2 lines =@@
+ === declarationEmitArrayTypesFromGenericArrayUsage.ts ===
+ interface A extends Array { }
+ >A : Symbol(A, Decl(declarationEmitArrayTypesFromGenericArrayUsage.ts, 0, 0))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitArrowFunctionNoRenaming.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitArrowFunctionNoRenaming.js.diff
index f93a15d7d2..3970a82d67 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitArrowFunctionNoRenaming.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitArrowFunctionNoRenaming.js.diff
@@ -4,10 +4,14 @@
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.toBoundedInteger = void 0;
--const toBoundedInteger = (bounds) => (n) => 
+-var toBoundedInteger = function (bounds) {
+-    return function (n) {
+-        // Implementation doesn't matter here
+-        return ({});
+-    };
+-};
 +const toBoundedInteger = (bounds) => (n) => (
- // Implementation doesn't matter here
--({});
++// Implementation doesn't matter here
 +({}));
  exports.toBoundedInteger = toBoundedInteger;
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff
new file mode 100644
index 0000000000..cf293bad19
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatternWithReservedWord.js.diff
@@ -0,0 +1,12 @@
+--- old.declarationEmitBindingPatternWithReservedWord.js
++++ new.declarationEmitBindingPatternWithReservedWord.js
+@@= skipped -28, +28 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getLocales = void 0;
+-var getLocales = function (_a) {
+-    var app = _a.app, name = _a.name, defaultLocalesConfig = _a.default, _b = _a.config, userLocalesConfig = _b === void 0 ? {} : _b;
++const getLocales = ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig = {}, }) => {
+     return defaultLocalesConfig;
+ };
+ exports.getLocales = getLocales;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff
new file mode 100644
index 0000000000..0d2fca96bd
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitBindingPatterns.js.diff
@@ -0,0 +1,18 @@
+--- old.declarationEmitBindingPatterns.js
++++ new.declarationEmitBindingPatterns.js
+@@= skipped -7, +7 lines =@@
+ }
+
+ //// [declarationEmitBindingPatterns.js]
+-var k = function (_a) {
+-    var _b = _a.x, z = _b === void 0 ? 'y' : _b;
+-};
++const k = ({ x: z = 'y' }) => { };
+ var a;
+-function f(_a, _b, _c) {
+-    _a = a;
+-    _b = a;
+-    var _d = _c === void 0 ? a : _c, _e = _d.p, _f = _e === void 0 ? a : _e, _g = _f;
++function f({} = a, [] = a, { p: {} = a } = a) {
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassInherritsAny.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassInherritsAny.js.diff
new file mode 100644
index 0000000000..375bff0966
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassInherritsAny.js.diff
@@ -0,0 +1,41 @@
+--- old.declarationEmitClassInherritsAny.js
++++ new.declarationEmitClassInherritsAny.js
+@@= skipped -5, +5 lines =@@
+
+ //// [declarationEmitClassInherritsAny.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var anyThing = /** @class */ (function () {
+-    function class_1() {
+-    }
+-    return class_1;
+-}());
+-var Foo = /** @class */ (function (_super) {
+-    __extends(Foo, _super);
+-    function Foo() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return Foo;
+-}(anyThing));
++const anyThing = class {
++};
++class Foo extends anyThing {
++}
+ exports.Foo = Foo;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict.js.diff
index 49ed2c0ba7..24312b8686 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict.js.diff
@@ -1,10 +1,80 @@
 --- old.declarationEmitClassMemberNameConflict.js
 +++ new.declarationEmitClassMemberNameConflict.js
-@@= skipped -49, +49 lines =@@
- }
+@@= skipped -40, +40 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.C4 = exports.C3 = exports.C2 = exports.C1 = void 0;
+-var C1 = /** @class */ (function () {
+-    function C1() {
+-    }
+-    C1.prototype.C1 = function () { }; // has to be the same as the class name
+-    C1.prototype.bar = function () {
++class C1 {
++    C1() { } // has to be the same as the class name
++    bar() {
+         return function (t) {
+         };
+-    };
+-    return C1;
+-}());
++    }
++}
  exports.C1 = C1;
- class C2 {
+-var C2 = /** @class */ (function () {
+-    function C2() {
+-    }
+-    C2.prototype.bar = function () {
++class C2 {
 +    C2; // has to be the same as the class name
-     bar() {
++    bar() {
+         return function (t) {
+         };
+-    };
+-    return C2;
+-}());
++    }
++}
+ exports.C2 = C2;
+-var C3 = /** @class */ (function () {
+-    function C3() {
+-    }
+-    Object.defineProperty(C3.prototype, "C3", {
+-        get: function () { return 0; } // has to be the same as the class name
+-        ,
+-        enumerable: false,
+-        configurable: true
+-    });
+-    C3.prototype.bar = function () {
++class C3 {
++    get C3() { return 0; } // has to be the same as the class name
++    bar() {
+         return function (t) {
+         };
+-    };
+-    return C3;
+-}());
++    }
++}
+ exports.C3 = C3;
+-var C4 = /** @class */ (function () {
+-    function C4() {
+-    }
+-    Object.defineProperty(C4.prototype, "C4", {
+-        set: function (v) { } // has to be the same as the class name
+-        ,
+-        enumerable: false,
+-        configurable: true
+-    });
+-    C4.prototype.bar = function () {
++class C4 {
++    set C4(v) { } // has to be the same as the class name
++    bar() {
          return function (t) {
-         };
\ No newline at end of file
+         };
+-    };
+-    return C4;
+-}());
++    }
++}
+ exports.C4 = C4;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.js.diff
index ad64fad17e..47180cc456 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMemberNameConflict2.js.diff
@@ -1,10 +1,20 @@
 --- old.declarationEmitClassMemberNameConflict2.js
 +++ new.declarationEmitClassMemberNameConflict2.js
-@@= skipped -32, +32 lines =@@
+@@= skipped -22, +22 lines =@@
+ }
+
+ //// [declarationEmitClassMemberNameConflict2.js]
+-var Bar = 'bar';
++const Bar = 'bar';
+ var Hello;
+ (function (Hello) {
+     Hello[Hello["World"] = 0] = "World";
+@@= skipped -9, +9 lines =@@
+ (function (Hello1) {
      Hello1[Hello1["World1"] = 0] = "World1";
  })(Hello1 || (Hello1 = {}));
- class Foo {
--    constructor() {
+-var Foo = /** @class */ (function () {
+-    function Foo() {
 -        // Same names + string => OK
 -        this.Bar = Bar;
 -        // Same names + enum => OK
@@ -12,11 +22,16 @@
 -        // Different names + enum => OK
 -        this.Hello2 = Hello1;
 -    }
+-    return Foo;
+-}());
++class Foo {
 +    // Same names + string => OK
 +    Bar = Bar;
 +    // Same names + enum => OK
 +    Hello = Hello;
 +    // Different names + enum => OK
 +    Hello2 = Hello1;
- }
++}
+
 
+ //// [declarationEmitClassMemberNameConflict2.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMixinLocalClassDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMixinLocalClassDeclaration.js.diff
index a38ca9abd2..173e2f6250 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassMixinLocalClassDeclaration.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassMixinLocalClassDeclaration.js.diff
@@ -1,14 +1,57 @@
 --- old.declarationEmitClassMixinLocalClassDeclaration.js
 +++ new.declarationEmitClassMixinLocalClassDeclaration.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -27, +27 lines =@@
+
+ //// [declarationEmitClassMixinLocalClassDeclaration.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.XmlElement2 = exports.Base = exports.Mixin = void 0;
+ exports.Mixin = null;
+-var Base = /** @class */ (function () {
+-    function Base() {
+-    }
+-    return Base;
+-}());
++class Base {
++}
  exports.Base = Base;
- class XmlElement2 extends (0, exports.Mixin)([Base], (base) => {
-     class XmlElement2 extends base {
--        constructor() {
--            super(...arguments);
--            this.num = 0;
--        }
+-var XmlElement2 = /** @class */ (function (_super) {
+-    __extends(XmlElement2, _super);
+-    function XmlElement2() {
+-        return _super !== null && _super.apply(this, arguments) || this;
++class XmlElement2 extends (0, exports.Mixin)([Base], (base) => {
++    class XmlElement2 extends base {
 +        num = 0;
      }
      return XmlElement2;
- }) {
\ No newline at end of file
+-}((0, exports.Mixin)([Base], function (base) {
+-    var XmlElement2 = /** @class */ (function (_super) {
+-        __extends(XmlElement2, _super);
+-        function XmlElement2() {
+-            var _this = _super !== null && _super.apply(this, arguments) || this;
+-            _this.num = 0;
+-            return _this;
+-        }
+-        return XmlElement2;
+-    }(base));
+-    return XmlElement2;
+-})));
++}) {
++}
+ exports.XmlElement2 = XmlElement2;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor.js.diff
index 032569b442..b3c8e49d4d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor.js.diff
@@ -1,27 +1,53 @@
 --- old.declarationEmitClassPrivateConstructor.js
 +++ new.declarationEmitClassPrivateConstructor.js
-@@= skipped -28, +28 lines =@@
- }
+@@= skipped -23, +23 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ExportedClass4 = exports.ExportedClass3 = exports.ExportedClass2 = exports.ExportedClass1 = void 0;
+-var ExportedClass1 = /** @class */ (function () {
+-    function ExportedClass1(data) {
+-    }
+-    return ExportedClass1;
+-}());
++class ExportedClass1 {
++    constructor(data) { }
++}
  exports.ExportedClass1 = ExportedClass1;
- class ExportedClass2 {
+-var ExportedClass2 = /** @class */ (function () {
+-    function ExportedClass2(data) {
++class ExportedClass2 {
 +    data;
-     constructor(data) {
++    constructor(data) {
          this.data = data;
      }
- }
+-    return ExportedClass2;
+-}());
++}
  exports.ExportedClass2 = ExportedClass2;
- class ExportedClass3 {
+-var ExportedClass3 = /** @class */ (function () {
+-    function ExportedClass3(data, n) {
++class ExportedClass3 {
 +    data;
 +    n;
-     constructor(data, n) {
++    constructor(data, n) {
          this.data = data;
          this.n = n;
-@@= skipped -13, +16 lines =@@
- }
+     }
+-    return ExportedClass3;
+-}());
++}
  exports.ExportedClass3 = ExportedClass3;
- class ExportedClass4 {
+-var ExportedClass4 = /** @class */ (function () {
+-    function ExportedClass4(data, n) {
++class ExportedClass4 {
 +    data;
 +    n;
-     constructor(data, n) {
++    constructor(data, n) {
          this.data = data;
-         this.n = n;
\ No newline at end of file
+         this.n = n;
+     }
+-    return ExportedClass4;
+-}());
++}
+ exports.ExportedClass4 = ExportedClass4;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor2.js.diff
index ee4c17ba8b..4bb8ddab5b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitClassPrivateConstructor2.js.diff
@@ -1,10 +1,27 @@
 --- old.declarationEmitClassPrivateConstructor2.js
 +++ new.declarationEmitClassPrivateConstructor2.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -16, +16 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ExportedClass2 = exports.ExportedClass1 = void 0;
- class ExportedClass1 {
+-var ExportedClass1 = /** @class */ (function () {
+-    function ExportedClass1(data) {
++class ExportedClass1 {
 +    data;
-     constructor(data) {
++    constructor(data) {
          this.data = data;
-     }
\ No newline at end of file
+     }
+-    return ExportedClass1;
+-}());
++}
+ exports.ExportedClass1 = ExportedClass1;
+-var ExportedClass2 = /** @class */ (function () {
+-    function ExportedClass2(data) {
+-    }
+-    return ExportedClass2;
+-}());
++class ExportedClass2 {
++    constructor(data) { }
++}
+ exports.ExportedClass2 = ExportedClass2;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff
index 8133ac4d0b..2a4cebe4b8 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameCausesImportToBePainted.js.diff
@@ -1,11 +1,23 @@
 --- old.declarationEmitComputedNameCausesImportToBePainted.js
 +++ new.declarationEmitComputedNameCausesImportToBePainted.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -20, +20 lines =@@
+ exports.Key = Symbol();
+ //// [index.js]
  "use strict";
+-var _a;
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.withContext = exports.context = void 0;
 -var context_1 = require("./context");
+-exports.context = (_a = {},
+-    _a[context_1.Key] = 'bar',
+-    _a);
+-var withContext = function (_a) {
+-    var _b = context_1.Key, value = _a[_b];
+-    return value;
 +const context_1 = require("./context");
- exports.context = {
-     [context_1.Key]: 'bar',
- };
\ No newline at end of file
++exports.context = {
++    [context_1.Key]: 'bar',
+ };
++const withContext = ({ [context_1.Key]: value }) => value;
+ exports.withContext = withContext;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.js.diff
index 74e921c071..5fda078763 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameConstEnumAlias.js.diff
@@ -1,11 +1,19 @@
 --- old.declarationEmitComputedNameConstEnumAlias.js
 +++ new.declarationEmitComputedNameConstEnumAlias.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -23, +23 lines =@@
+ exports.default = EnumExample;
  //// [index.js]
  "use strict";
+-var _a;
  Object.defineProperty(exports, "__esModule", { value: true });
 -var EnumExample_1 = require("./EnumExample");
+-exports.default = (_a = {},
+-    _a[EnumExample_1.default.TEST] = {},
+-    _a);
 +const EnumExample_1 = require("./EnumExample");
- exports.default = {
-     [EnumExample_1.default.TEST]: {},
- };
\ No newline at end of file
++exports.default = {
++    [EnumExample_1.default.TEST]: {},
++};
+
+
+ //// [EnumExample.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameWithQuestionToken.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameWithQuestionToken.js.diff
new file mode 100644
index 0000000000..89fed235f1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNameWithQuestionToken.js.diff
@@ -0,0 +1,22 @@
+--- old.declarationEmitComputedNameWithQuestionToken.js
++++ new.declarationEmitComputedNameWithQuestionToken.js
+@@= skipped -15, +15 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.a = exports.WithData = exports.dataSomething = void 0;
+-exports.dataSomething = "data-".concat(something);
+-var WithData = /** @class */ (function () {
+-    function WithData() {
+-    }
+-    WithData.prototype[exports.dataSomething] = function () {
++exports.dataSomething = `data-${something}`;
++class WithData {
++    [exports.dataSomething]() {
+         return "something";
+-    };
+-    return WithData;
+-}());
++    }
++}
+ exports.WithData = WithData;
+ exports.a = (new WithData())["ahahahaahah"]();
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.js.diff
new file mode 100644
index 0000000000..582dada825
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.js.diff
@@ -0,0 +1,41 @@
+--- old.declarationEmitComputedNamesInaccessible.js
++++ new.declarationEmitComputedNamesInaccessible.js
+@@= skipped -25, +25 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.f1 = f1;
+ function f1() {
+-    var localClassFieldName = Math.random() > 0.5 ? "g1" : "g2";
+-    var localOtherField = localClassFieldName === "g1" ? "g2" : "g1";
+-    var localStaticField = Math.random() > 0.5 ? "s1" : "s2";
+-    return /** @class */ (function () {
+-        function ParameterizedHolder() {
+-        }
+-        ParameterizedHolder.prototype[localClassFieldName] = function () {
++    const localClassFieldName = Math.random() > 0.5 ? "g1" : "g2";
++    const localOtherField = localClassFieldName === "g1" ? "g2" : "g1";
++    const localStaticField = Math.random() > 0.5 ? "s1" : "s2";
++    return class ParameterizedHolder {
++        [localClassFieldName]() {
+             return "value";
+-        };
+-        ParameterizedHolder.prototype[localOtherField] = function () {
++        }
++        [localOtherField]() {
+             return 42;
+-        };
+-        ParameterizedHolder[localStaticField] = function () {
++        }
++        static [localStaticField]() {
+             return { static: true };
+-        };
+-        ParameterizedHolder[localStaticField] = function () {
++        }
++        static [localStaticField]() {
+             return { static: "sometimes" };
+-        };
+-        return ParameterizedHolder;
+-    }());
++        }
++    };
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.symbols.diff
new file mode 100644
index 0000000000..95d2c6fbda
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitComputedNamesInaccessible.symbols.diff
@@ -0,0 +1,20 @@
+--- old.declarationEmitComputedNamesInaccessible.symbols
++++ new.declarationEmitComputedNamesInaccessible.symbols
+@@= skipped -6, +6 lines =@@
+     const localClassFieldName = Math.random() > 0.5 ? "g1" : "g2";
+ >localClassFieldName : Symbol(localClassFieldName, Decl(declarationEmitComputedNamesInaccessible.ts, 1, 9))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+     const localOtherField = localClassFieldName === "g1" ? "g2" : "g1";
+@@= skipped -10, +10 lines =@@
+     const localStaticField = Math.random() > 0.5 ? "s1" : "s2";
+ >localStaticField : Symbol(localStaticField, Decl(declarationEmitComputedNamesInaccessible.ts, 3, 9))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+     return class ParameterizedHolder {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitConstantNoWidening.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitConstantNoWidening.js.diff
index d1cae2cb33..58d26a071e 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitConstantNoWidening.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitConstantNoWidening.js.diff
@@ -1,17 +1,21 @@
 --- old.declarationEmitConstantNoWidening.js
 +++ new.declarationEmitConstantNoWidening.js
-@@= skipped -11, +11 lines =@@
+@@= skipped -10, +10 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
  exports.Bar = exports.FOO = void 0;
  exports.FOO = 'FOO';
- class Bar {
--    constructor() {
+-var Bar = /** @class */ (function () {
+-    function Bar() {
 -        this.type = exports.FOO; // Should be widening literal "FOO" - so either `typeof "FOO"` or = "FOO"
 -    }
+-    return Bar;
+-}());
++class Bar {
 +    type = exports.FOO; // Should be widening literal "FOO" - so either `typeof "FOO"` or = "FOO"
- }
++}
  exports.Bar = Bar;
 
-@@= skipped -10, +8 lines =@@
+
  //// [declarationEmitConstantNoWidening.d.ts]
  export declare const FOO = "FOO";
  export declare class Bar {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js.diff
index ff4abd456f..f95589f768 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js.diff
@@ -1,6 +1,18 @@
 --- old.declarationEmitDefaultExportWithStaticAssignment.js
 +++ new.declarationEmitDefaultExportWithStaticAssignment.js
-@@= skipped -42, +42 lines =@@
+@@= skipped -35, +35 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
+ exports.Foo = Foo;
+ //// [index1.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.default = Example;
@@ -9,7 +21,7 @@
  function Example() { }
  Example.Foo = foo_1.Foo;
  //// [index2.js]
-@@= skipped -8, +8 lines =@@
+@@= skipped -18, +15 lines =@@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Foo = void 0;
  exports.default = Example;
@@ -18,7 +30,21 @@
  Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return foo_1.Foo; } });
  function Example() { }
  Example.Foo = foo_1.Foo;
-@@= skipped -31, +31 lines =@@
+@@= skipped -9, +9 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Bar = void 0;
+ exports.default = Example;
+-var Bar = /** @class */ (function () {
+-    function Bar() {
+-    }
+-    return Bar;
+-}());
++class Bar {
++}
+ exports.Bar = Bar;
+ function Example() { }
+ Example.Bar = Bar;
+@@= skipped -25, +22 lines =@@
  export declare class Foo {
  }
  //// [index1.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring1.js.diff
new file mode 100644
index 0000000000..99bad8ae5d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring1.js.diff
@@ -0,0 +1,25 @@
+--- old.declarationEmitDestructuring1.js
++++ new.declarationEmitDestructuring1.js
+@@= skipped -7, +7 lines =@@
+
+
+ //// [declarationEmitDestructuring1.js]
+-function foo(_a) {
+-    var a = _a[0], b = _a[1], c = _a[2];
+-}
+-function far(_a) {
+-    var a = _a[0], b = _a[1][0], c = _a[2][0][0];
+-}
+-function bar(_a) {
+-    var a1 = _a.a1, b1 = _a.b1, c1 = _a.c1;
+-}
+-function baz(_a) {
+-    var a2 = _a.a2, _b = _a.b2, b1 = _b.b1, c1 = _b.c1;
+-}
++function foo([a, b, c]) { }
++function far([a, [b], [[c]]]) { }
++function bar({ a1, b1, c1 }) { }
++function baz({ a2, b2: { b1, c1 } }) { }
+
+
+ //// [declarationEmitDestructuring1.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.js.diff
new file mode 100644
index 0000000000..e3b34f579f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring2.js.diff
@@ -0,0 +1,25 @@
+--- old.declarationEmitDestructuring2.js
++++ new.declarationEmitDestructuring2.js
+@@= skipped -6, +6 lines =@@
+ function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ }
+
+ //// [declarationEmitDestructuring2.js]
+-function f(_a) {
+-    var _b = _a === void 0 ? { x: 10, y: [2, 4, 6, 8] } : _a, _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, _e = _d === void 0 ? [1, 2, 3, 4] : _d, a = _e[0], b = _e[1], c = _e[2], d = _e[3];
+-}
+-function g(_a) {
+-    var _b = _a === void 0 ? [1, 2, 3, 4] : _a, a = _b[0], b = _b[1], c = _b[2], d = _b[3];
+-}
+-function h(_a) {
+-    var a = _a[0], b = _a[1][0], c = _a[2][0][0], _b = _a[3], _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, a = _d[0], b = _d[1], c = _d[2], _e = _b.z, a1 = _e.a1, b1 = _e.b1;
+-}
+-function h1(_a) {
+-    var a = _a[0], b = _a[1][0], c = _a[2][0][0], _b = _a[3], _c = _b.x, x = _c === void 0 ? 10 : _c, _d = _b.y, y = _d === void 0 ? [1, 2, 3] : _d, _e = _b.z, a1 = _e.a1, b1 = _e.b1;
+-}
++function f({ x = 10, y: [a, b, c, d] = [1, 2, 3, 4] } = { x: 10, y: [2, 4, 6, 8] }) { }
++function g([a, b, c, d] = [1, 2, 3, 4]) { }
++function h([a, [b], [[c]], { x = 10, y: [a, b, c], z: { a1, b1 } }]) { }
++function h1([a, [b], [[c]], { x = 10, y = [1, 2, 3], z: { a1, b1 } }]) { }
+
+
+ //// [declarationEmitDestructuring2.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring3.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring3.js.diff
new file mode 100644
index 0000000000..bbdaf5a375
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring3.js.diff
@@ -0,0 +1,17 @@
+--- old.declarationEmitDestructuring3.js
++++ new.declarationEmitDestructuring3.js
+@@= skipped -6, +6 lines =@@
+
+
+ //// [declarationEmitDestructuring3.js]
+-function bar(_a) {
+-    var x = _a[0], z = _a[1], w = _a.slice(2);
+-}
+-function foo(_a) {
+-    var _b = _a === void 0 ? [1, "string", true] : _a, x = _b[0], y = _b.slice(1);
+-}
++function bar([x, z, ...w]) { }
++function foo([x, ...y] = [1, "string", true]) { }
+
+
+ //// [declarationEmitDestructuring3.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring4.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring4.js.diff
new file mode 100644
index 0000000000..38126ed82e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring4.js.diff
@@ -0,0 +1,25 @@
+--- old.declarationEmitDestructuring4.js
++++ new.declarationEmitDestructuring4.js
+@@= skipped -16, +16 lines =@@
+ // For an array binding pattern with empty elements,
+ // we will not make any modification and will emit
+ // the similar binding pattern users' have written
+-function baz(_a) { }
+-function baz1(_a) {
+-    _a = [1, 2, 3];
+-}
+-function baz2(_a) {
+-    var _b = _a === void 0 ? [[1, 2, 3]] : _a, _c = _b[0];
+-}
+-function baz3(_a) { }
+-function baz4(_a) {
+-    _a = { x: 10 };
+-}
++function baz([]) { }
++function baz1([] = [1, 2, 3]) { }
++function baz2([[]] = [[1, 2, 3]]) { }
++function baz3({}) { }
++function baz4({} = { x: 10 }) { }
+
+
+ //// [declarationEmitDestructuring4.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.js.diff
index 2199400a79..e9e2d2b600 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.js.diff
@@ -1,6 +1,29 @@
 --- old.declarationEmitDestructuring5.js
 +++ new.declarationEmitDestructuring5.js
-@@= skipped -15, +15 lines =@@
+@@= skipped -7, +7 lines =@@
+ function bar2([,,z, , , ]) { }
+
+ //// [declarationEmitDestructuring5.js]
+-function baz(_a) {
+-    var z = _a[1];
+-}
+-function foo(_a) {
+-    var b = _a[1];
+-}
+-function bar(_a) {
+-    var z = _a[0];
+-}
+-function bar1(_a) {
+-    var _b = _a === void 0 ? [1, 3, 4, 6, 7] : _a, z = _b[0];
+-}
+-function bar2(_a) {
+-    var z = _a[2];
+-}
++function baz([, z, ,]) { }
++function foo([, b,]) { }
++function bar([z, , ,]) { }
++function bar1([z, , ,] = [1, 3, 4, 6, 7]) { }
++function bar2([, , z, , ,]) { }
 
 
  //// [declarationEmitDestructuring5.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.types.diff
new file mode 100644
index 0000000000..4362b9851f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuring5.types.diff
@@ -0,0 +1,38 @@
+--- old.declarationEmitDestructuring5.types
++++ new.declarationEmitDestructuring5.types
+@@= skipped -2, +2 lines =@@
+ === declarationEmitDestructuring5.ts ===
+ function baz([, z, , ]) { }
+ >baz : ([, z, ,]: [any, any, any?]) => void
+-> : undefined
+ >z : any
+-> : undefined
+
+ function foo([, b, ]: [any, any]): void { }
+ >foo : ([, b,]: [any, any]) => void
+-> : undefined
+ >b : any
+
+ function bar([z, , , ]) { }
+ >bar : ([z, , ,]: [any, any?, any?]) => void
+ >z : any
+-> : undefined
+-> : undefined
+
+ function bar1([z, , , ] = [1, 3, 4, 6, 7]) { }
+ >bar1 : ([z, , ,]?: [number, number, number, number, number]) => void
+ >z : number
+-> : undefined
+-> : undefined
+ >[1, 3, 4, 6, 7] : [number, number, number, number, number]
+ >1 : 1
+ >3 : 3
+@@= skipped -29, +22 lines =@@
+
+ function bar2([,,z, , , ]) { }
+ >bar2 : ([, , z, , ,]: [any, any, any, any?, any?]) => void
+-> : undefined
+-> : undefined
+ >z : any
+-> : undefined
+-> : undefined
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.js.diff
new file mode 100644
index 0000000000..9155a2a643
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.js.diff
@@ -0,0 +1,22 @@
+--- old.declarationEmitDestructuringArrayPattern1.js
++++ new.declarationEmitDestructuringArrayPattern1.js
+@@= skipped -10, +10 lines =@@
+ var [x3, y3, z3] = a;  // emit x3, y3, z3 
+
+ //// [declarationEmitDestructuringArrayPattern1.js]
+-var _a = [1, "hello"]; // Dont emit anything
+-var x = [1, "hello"][0]; // emit x: number
+-var _b = [1, "hello"], x1 = _b[0], y1 = _b[1]; // emit x1: number, y1: string
+-var _c = [0, 1, 2], z1 = _c[2]; // emit z1: number
++var [] = [1, "hello"]; // Dont emit anything
++var [x] = [1, "hello"]; // emit x: number
++var [x1, y1] = [1, "hello"]; // emit x1: number, y1: string
++var [, , z1] = [0, 1, 2]; // emit z1: number
+ var a = [1, "hello"];
+-var x2 = a[0]; // emit x2: number | string
+-var x3 = a[0], y3 = a[1], z3 = a[2]; // emit x3, y3, z3 
++var [x2] = a; // emit x2: number | string
++var [x3, y3, z3] = a; // emit x3, y3, z3 
+
+
+ //// [declarationEmitDestructuringArrayPattern1.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.types.diff
new file mode 100644
index 0000000000..0735b713bf
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern1.types.diff
@@ -0,0 +1,11 @@
+--- old.declarationEmitDestructuringArrayPattern1.types
++++ new.declarationEmitDestructuringArrayPattern1.types
+@@= skipped -19, +19 lines =@@
+ >"hello" : "hello"
+
+ var [, , z1] = [0, 1, 2]; // emit z1: number
+-> : undefined
+-> : undefined
+ >z1 : number
+ >[0, 1, 2] : [number, number, number]
+ >0 : 0
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern2.js.diff
new file mode 100644
index 0000000000..ff720bd3db
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern2.js.diff
@@ -0,0 +1,21 @@
+--- old.declarationEmitDestructuringArrayPattern2.js
++++ new.declarationEmitDestructuringArrayPattern2.js
+@@= skipped -12, +12 lines =@@
+
+
+ //// [declarationEmitDestructuringArrayPattern2.js]
+-var _a = [1, ["hello", [true]]], x10 = _a[0], _b = _a[1], y10 = _b[0], z10 = _b[1][0];
+-var _c = [1, "hello"], _d = _c[0], x11 = _d === void 0 ? 0 : _d, _e = _c[1], y11 = _e === void 0 ? "" : _e;
+-var _f = [], a11 = _f[0], b11 = _f[1], c11 = _f[2];
+-var _g = [1, ["hello", { x12: 5, y12: true }]], a2 = _g[0], _h = _g[1], _j = _h === void 0 ? ["abc", { x12: 10, y12: false }] : _h, b2 = _j[0], _k = _j[1], x12 = _k.x12, c2 = _k.y12;
+-var _l = [1, "hello"], x13 = _l[0], y13 = _l[1];
+-var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1];
++var [x10, [y10, [z10]]] = [1, ["hello", [true]]];
++var [x11 = 0, y11 = ""] = [1, "hello"];
++var [a11, b11, c11] = [];
++var [a2, [b2, { x12, y12: c2 }] = ["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
++var [x13, y13] = [1, "hello"];
++var [a3, b3] = [[x13, y13], { x: x13, y: y13 }];
+
+
+ //// [declarationEmitDestructuringArrayPattern2.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.js b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.js
index 29fa37234c..e4d47c3c0a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts] ////
 
 //// [declarationEmitDestructuringArrayPattern3.ts]
-module M {
+namespace M {
     export var [a, b] = [1, 2];
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.symbols
index fac50c293e..32f28da9c5 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.symbols
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts] ////
 
 === declarationEmitDestructuringArrayPattern3.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declarationEmitDestructuringArrayPattern3.ts, 0, 0))
 
     export var [a, b] = [1, 2];
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.types b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.types
index 95cc766a1b..eeefc51240 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern3.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitDestructuringArrayPattern3.ts] ////
 
 === declarationEmitDestructuringArrayPattern3.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     export var [a, b] = [1, 2];
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern4.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern4.js.diff
new file mode 100644
index 0000000000..2d2a0adba0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern4.js.diff
@@ -0,0 +1,25 @@
+--- old.declarationEmitDestructuringArrayPattern4.js
++++ new.declarationEmitDestructuringArrayPattern4.js
+@@= skipped -11, +11 lines =@@
+ var [x19, y19, z19, ...a13] = [1, "hello", true];
+
+ //// [declarationEmitDestructuringArrayPattern4.js]
+-var a5 = [1, 2, 3].slice(0);
+-var _a = [1, 2, 3], x14 = _a[0], a6 = _a.slice(1);
+-var _b = [1, 2, 3], x15 = _b[0], y15 = _b[1], a7 = _b.slice(2);
+-var _c = [1, 2, 3], x16 = _c[0], y16 = _c[1], z16 = _c[2], a8 = _c.slice(3);
+-var a9 = [1, "hello", true].slice(0);
+-var _d = [1, "hello", true], x17 = _d[0], a10 = _d.slice(1);
+-var _e = [1, "hello", true], x18 = _e[0], y18 = _e[1], a12 = _e.slice(2);
+-var _f = [1, "hello", true], x19 = _f[0], y19 = _f[1], z19 = _f[2], a13 = _f.slice(3);
++var [...a5] = [1, 2, 3];
++var [x14, ...a6] = [1, 2, 3];
++var [x15, y15, ...a7] = [1, 2, 3];
++var [x16, y16, z16, ...a8] = [1, 2, 3];
++var [...a9] = [1, "hello", true];
++var [x17, ...a10] = [1, "hello", true];
++var [x18, y18, ...a12] = [1, "hello", true];
++var [x19, y19, z19, ...a13] = [1, "hello", true];
+
+
+ //// [declarationEmitDestructuringArrayPattern4.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.js.diff
new file mode 100644
index 0000000000..f3c39b1c0d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.js.diff
@@ -0,0 +1,15 @@
+--- old.declarationEmitDestructuringArrayPattern5.js
++++ new.declarationEmitDestructuringArrayPattern5.js
+@@= skipped -5, +5 lines =@@
+ var [, , [, b, ]] = [3,5,[0, 1]];
+
+ //// [declarationEmitDestructuringArrayPattern5.js]
+-var _a = [1, 2, 4], z = _a[2];
+-var _b = [3, 4, 5], a = _b[1];
+-var _c = [3, 5, [0, 1]], _d = _c[2], b = _d[1];
++var [, , z] = [1, 2, 4];
++var [, a, ,] = [3, 4, 5];
++var [, , [, b,]] = [3, 5, [0, 1]];
+
+
+ //// [declarationEmitDestructuringArrayPattern5.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.types.diff
new file mode 100644
index 0000000000..07a44008d1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringArrayPattern5.types.diff
@@ -0,0 +1,30 @@
+--- old.declarationEmitDestructuringArrayPattern5.types
++++ new.declarationEmitDestructuringArrayPattern5.types
+@@= skipped -1, +1 lines =@@
+
+ === declarationEmitDestructuringArrayPattern5.ts ===
+ var [, , z] = [1, 2, 4];
+-> : undefined
+-> : undefined
+ >z : number
+ >[1, 2, 4] : [number, number, number]
+ >1 : 1
+@@= skipped -9, +7 lines =@@
+ >4 : 4
+
+ var [, a, , ] = [3, 4, 5];
+-> : undefined
+ >a : number
+-> : undefined
+ >[3, 4, 5] : [number, number, number]
+ >3 : 3
+ >4 : 4
+ >5 : 5
+
+ var [, , [, b, ]] = [3,5,[0, 1]];
+-> : undefined
+-> : undefined
+-> : undefined
+ >b : number
+ >[3,5,[0, 1]] : [number, number, [number, number]]
+ >3 : 3
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.errors.txt
index 0a47f24e6e..aaff71b7f3 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.errors.txt
@@ -31,6 +31,6 @@ declarationEmitDestructuringObjectLiteralPattern.ts(6,20): error TS2353: Object
     }
     var { a4, b4, c4 } = f15();
     
-    module m {
+    namespace m {
         export var { a4, b4, c4 } = f15();
     }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js
index c9aa75f445..bc1d3db8eb 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js
@@ -19,7 +19,7 @@ function f15() {
 }
 var { a4, b4, c4 } = f15();
 
-module m {
+namespace m {
     export var { a4, b4, c4 } = f15();
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js.diff
index 767d574033..54c3ab646d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.js.diff
@@ -1,7 +1,34 @@
 --- old.declarationEmitDestructuringObjectLiteralPattern.js
 +++ new.declarationEmitDestructuringObjectLiteralPattern.js
-@@= skipped -40, +40 lines =@@
- var { a4, b4, c4 } = f15();
+@@= skipped -23, +23 lines =@@
+ }
+
+ //// [declarationEmitDestructuringObjectLiteralPattern.js]
+-var _a = { x: 5, y: "hello" };
+-var x4 = { x4: 5, y4: "hello" }.x4;
+-var y5 = { x5: 5, y5: "hello" }.y5;
+-var _b = { x6: 5, y6: "hello" }, x6 = _b.x6, y6 = _b.y6;
+-var a1 = { x7: 5, y7: "hello" }.x7;
+-var b1 = { x8: 5, y8: "hello" }.y8;
+-var _c = { x9: 5, y9: "hello" }, a2 = _c.x9, b2 = _c.y9;
+-var _d = { a: 1, b: { a: "hello", b: { a: true } } }, x11 = _d.a, _e = _d.b, y11 = _e.a, z11 = _e.b.a;
++var {} = { x: 5, y: "hello" };
++var { x4 } = { x4: 5, y4: "hello" };
++var { y5 } = { x5: 5, y5: "hello" };
++var { x6, y6 } = { x6: 5, y6: "hello" };
++var { x7: a1 } = { x7: 5, y7: "hello" };
++var { y8: b1 } = { x8: 5, y8: "hello" };
++var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };
++var { a: x11, b: { a: y11, b: { a: z11 } } } = { a: 1, b: { a: "hello", b: { a: true } } };
+ function f15() {
+     var a4 = "hello";
+     var b4 = 1;
+     var c4 = true;
+-    return { a4: a4, b4: b4, c4: c4 };
++    return { a4, b4, c4 };
+ }
+-var _f = f15(), a4 = _f.a4, b4 = _f.b4, c4 = _f.c4;
++var { a4, b4, c4 } = f15();
  var m;
  (function (m) {
 -    var _a;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.symbols
index 3c0162787e..c91475b23d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.symbols
@@ -79,7 +79,7 @@ var { a4, b4, c4 } = f15();
 >c4 : Symbol(c4, Decl(declarationEmitDestructuringObjectLiteralPattern.ts, 16, 13))
 >f15 : Symbol(f15, Decl(declarationEmitDestructuringObjectLiteralPattern.ts, 8, 89))
 
-module m {
+namespace m {
 >m : Symbol(m, Decl(declarationEmitDestructuringObjectLiteralPattern.ts, 16, 27))
 
     export var { a4, b4, c4 } = f15();
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.types b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.types
index 14a907c150..314e37cf8a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern.types
@@ -111,7 +111,7 @@ var { a4, b4, c4 } = f15();
 >f15() : { a4: string; b4: number; c4: boolean; }
 >f15 : () => { a4: string; b4: number; c4: boolean; }
 
-module m {
+namespace m {
 >m : typeof m
 
     export var { a4, b4, c4 } = f15();
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern1.js.diff
new file mode 100644
index 0000000000..b7f5a4c793
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern1.js.diff
@@ -0,0 +1,23 @@
+--- old.declarationEmitDestructuringObjectLiteralPattern1.js
++++ new.declarationEmitDestructuringObjectLiteralPattern1.js
+@@= skipped -9, +9 lines =@@
+ var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };
+
+ //// [declarationEmitDestructuringObjectLiteralPattern1.js]
+-var _a = { x: 5, y: "hello" };
+-var x4 = { x4: 5, y4: "hello" }.x4;
+-var y5 = { x5: 5, y5: "hello" }.y5;
+-var _b = { x6: 5, y6: "hello" }, x6 = _b.x6, y6 = _b.y6;
+-var a1 = { x7: 5, y7: "hello" }.x7;
+-var b1 = { x8: 5, y8: "hello" }.y8;
+-var _c = { x9: 5, y9: "hello" }, a2 = _c.x9, b2 = _c.y9;
++var {} = { x: 5, y: "hello" };
++var { x4 } = { x4: 5, y4: "hello" };
++var { y5 } = { x5: 5, y5: "hello" };
++var { x6, y6 } = { x6: 5, y6: "hello" };
++var { x7: a1 } = { x7: 5, y7: "hello" };
++var { y8: b1 } = { x8: 5, y8: "hello" };
++var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };
+
+
+ //// [declarationEmitDestructuringObjectLiteralPattern1.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js
index 647975c887..c9f03ff48f 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js
@@ -11,7 +11,7 @@ function f15() {
 }
 var { a4, b4, c4 } = f15();
 
-module m {
+namespace m {
     export var { a4, b4, c4 } = f15();
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js.diff
index bb58f50c11..945ed907ab 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.js.diff
@@ -1,7 +1,20 @@
 --- old.declarationEmitDestructuringObjectLiteralPattern2.js
 +++ new.declarationEmitDestructuringObjectLiteralPattern2.js
-@@= skipped -25, +25 lines =@@
- var { a4, b4, c4 } = f15();
+@@= skipped -15, +15 lines =@@
+ }
+
+ //// [declarationEmitDestructuringObjectLiteralPattern2.js]
+-var _a = { a: 1, b: { a: "hello", b: { a: true } } }, x11 = _a.a, _b = _a.b, y11 = _b.a, z11 = _b.b.a;
++var { a: x11, b: { a: y11, b: { a: z11 } } } = { a: 1, b: { a: "hello", b: { a: true } } };
+ function f15() {
+     var a4 = "hello";
+     var b4 = 1;
+     var c4 = true;
+-    return { a4: a4, b4: b4, c4: c4 };
++    return { a4, b4, c4 };
+ }
+-var _c = f15(), a4 = _c.a4, b4 = _c.b4, c4 = _c.c4;
++var { a4, b4, c4 } = f15();
  var m;
  (function (m) {
 -    var _a;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.symbols
index a2e1e460f7..6761f139ee 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.symbols
@@ -39,7 +39,7 @@ var { a4, b4, c4 } = f15();
 >c4 : Symbol(c4, Decl(declarationEmitDestructuringObjectLiteralPattern2.ts, 8, 13))
 >f15 : Symbol(f15, Decl(declarationEmitDestructuringObjectLiteralPattern2.ts, 0, 89))
 
-module m {
+namespace m {
 >m : Symbol(m, Decl(declarationEmitDestructuringObjectLiteralPattern2.ts, 8, 27))
 
     export var { a4, b4, c4 } = f15();
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.types
index b527329628..539ce1f4c7 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringObjectLiteralPattern2.types
@@ -50,7 +50,7 @@ var { a4, b4, c4 } = f15();
 >f15() : { a4: string; b4: number; c4: boolean; }
 >f15 : () => { a4: string; b4: number; c4: boolean; }
 
-module m {
+namespace m {
 >m : typeof m
 
     export var { a4, b4, c4 } = f15();
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.js.diff
new file mode 100644
index 0000000000..61181a5698
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.js.diff
@@ -0,0 +1,21 @@
+--- old.declarationEmitDestructuringOptionalBindingParametersInOverloads.js
++++ new.declarationEmitDestructuringOptionalBindingParametersInOverloads.js
+@@= skipped -10, +10 lines =@@
+ }
+
+ //// [declarationEmitDestructuringOptionalBindingParametersInOverloads.js]
+-function foo() {
+-    var rest = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        rest[_i] = arguments[_i];
+-    }
++function foo(...rest) {
+ }
+-function foo2() {
+-    var rest = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        rest[_i] = arguments[_i];
+-    }
++function foo2(...rest) {
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringParameterProperties.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringParameterProperties.js.diff
index e315a6b433..5cb55c42e4 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringParameterProperties.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringParameterProperties.js.diff
@@ -1,6 +1,40 @@
 --- old.declarationEmitDestructuringParameterProperties.js
 +++ new.declarationEmitDestructuringParameterProperties.js
-@@= skipped -34, +34 lines =@@
+@@= skipped -18, +18 lines =@@
+ }
+
+ //// [declarationEmitDestructuringParameterProperties.js]
+-var C1 = /** @class */ (function () {
+-    function C1(_a) {
+-        var x = _a[0], y = _a[1], z = _a[2];
+-    }
+-    return C1;
+-}());
+-var C2 = /** @class */ (function () {
+-    function C2(_a) {
+-        var x = _a[0], y = _a[1], z = _a[2];
+-    }
+-    return C2;
+-}());
+-var C3 = /** @class */ (function () {
+-    function C3(_a) {
+-        var x = _a.x, y = _a.y, z = _a.z;
+-    }
+-    return C3;
+-}());
++class C1 {
++    constructor([x, y, z]) {
++    }
++}
++class C2 {
++    constructor([x, y, z]) {
++    }
++}
++class C3 {
++    constructor({ x, y, z }) {
++    }
++}
+
 
  //// [declarationEmitDestructuringParameterProperties.d.ts]
  declare class C1 {
@@ -17,7 +51,7 @@
      constructor([x, y, z]: TupleType1);
  }
  type ObjType1 = {
-@@= skipped -18, +12 lines =@@
+@@= skipped -40, +28 lines =@@
      z: boolean;
  };
  declare class C3 {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js
index 585a533c02..ffb773aed4 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts] ////
 
 //// [declarationEmitDestructuringPrivacyError.ts]
-module m {
+namespace m {
     class c {
     }
     export var [x, y, z] = [10, new c(), 30];
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js.diff
index 77994f23c2..72f1f701f1 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.js.diff
@@ -5,9 +5,14 @@
  var m;
  (function (m) {
 -    var _a;
-     class c {
-     }
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
 -    _a = [10, new c(), 30], m.x = _a[0], m.y = _a[1], m.z = _a[2];
++    class c {
++    }
 +    [m.x, m.y, m.z] = [10, new c(), 30];
  })(m || (m = {}));
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.symbols
index aaef63f424..496aab51e3 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.symbols
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts] ////
 
 === declarationEmitDestructuringPrivacyError.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declarationEmitDestructuringPrivacyError.ts, 0, 0))
 
     class c {
->c : Symbol(c, Decl(declarationEmitDestructuringPrivacyError.ts, 0, 10))
+>c : Symbol(c, Decl(declarationEmitDestructuringPrivacyError.ts, 0, 13))
     }
     export var [x, y, z] = [10, new c(), 30];
 >x : Symbol(x, Decl(declarationEmitDestructuringPrivacyError.ts, 3, 16))
 >y : Symbol(y, Decl(declarationEmitDestructuringPrivacyError.ts, 3, 18))
 >z : Symbol(z, Decl(declarationEmitDestructuringPrivacyError.ts, 3, 21))
->c : Symbol(c, Decl(declarationEmitDestructuringPrivacyError.ts, 0, 10))
+>c : Symbol(c, Decl(declarationEmitDestructuringPrivacyError.ts, 0, 13))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.types b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.types
index ce1536adf1..af22fddefb 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringPrivacyError.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitDestructuringPrivacyError.ts] ////
 
 === declarationEmitDestructuringPrivacyError.ts ===
-module m {
+namespace m {
 >m : typeof m
 
     class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringWithOptionalBindingParameters.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringWithOptionalBindingParameters.js.diff
new file mode 100644
index 0000000000..e9f6b11cd5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDestructuringWithOptionalBindingParameters.js.diff
@@ -0,0 +1,15 @@
+--- old.declarationEmitDestructuringWithOptionalBindingParameters.js
++++ new.declarationEmitDestructuringWithOptionalBindingParameters.js
+@@= skipped -6, +6 lines =@@
+ }
+
+ //// [declarationEmitDestructuringWithOptionalBindingParameters.js]
+-function foo(_a) {
+-    var x = _a[0], y = _a[1], z = _a[2];
++function foo([x, y, z]) {
+ }
+-function foo1(_a) {
+-    var x = _a.x, y = _a.y, z = _a.z;
++function foo1({ x, y, z }) {
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment1.js.diff
new file mode 100644
index 0000000000..0cb88e10fb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment1.js.diff
@@ -0,0 +1,40 @@
+--- old.declarationEmitDetachedComment1.js
++++ new.declarationEmitDetachedComment1.js
+@@= skipped -35, +35 lines =@@
+ /**
+  * Hello class
+  */
+-var Hello = /** @class */ (function () {
+-    function Hello() {
+-    }
+-    return Hello;
+-}());
++class Hello {
++}
+ //// [test2.js]
+ /* A comment at the top of the file. */
+ /**
+  * Hi class
+  */
+-var Hi = /** @class */ (function () {
+-    function Hi() {
+-    }
+-    return Hi;
+-}());
++class Hi {
++}
+ //// [test3.js]
+ // A one-line comment at the top of the file.
+ /**
+  * Hola class
+  */
+-var Hola = /** @class */ (function () {
+-    function Hola() {
+-    }
+-    return Hola;
+-}());
++class Hola {
++}
+
+
+ //// [test1.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment2.js.diff
index 702fedbaa6..2e80d0fd90 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDetachedComment2.js.diff
@@ -5,10 +5,29 @@
 
  //// [test1.js]
 -/*! Copyright 2015 MyCompany Inc. */
- class Hello {
- }
+-var Hello = (function () {
+-    function Hello() {
+-    }
+-    return Hello;
+-}());
++class Hello {
++}
  //// [test2.js]
-@@= skipped -12, +11 lines =@@
+-var Hi = (function () {
+-    function Hi() {
+-    }
+-    return Hi;
+-}());
++class Hi {
++}
+ //// [test3.js]
+-var Hola = (function () {
+-    function Hola() {
+-    }
+-    return Hola;
+-}());
++class Hola {
++}
 
 
  //// [test1.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitDistributiveConditionalWithInfer.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitDistributiveConditionalWithInfer.js.diff
index 62dde4562b..2fb6849d11 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitDistributiveConditionalWithInfer.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitDistributiveConditionalWithInfer.js.diff
@@ -1,6 +1,12 @@
 --- old.declarationEmitDistributiveConditionalWithInfer.js
 +++ new.declarationEmitDistributiveConditionalWithInfer.js
-@@= skipped -16, +16 lines =@@
+@@= skipped -11, +11 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fun = void 0;
+ // This function's type is changed on declaration
+-var fun = function (subFun) { };
++const fun = (subFun) => { };
+ exports.fun = fun;
 
 
  //// [declarationEmitDistributiveConditionalWithInfer.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReadonlyProperty.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReadonlyProperty.js.diff
index 1f78ab5775..13e07eab20 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReadonlyProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReadonlyProperty.js.diff
@@ -1,17 +1,24 @@
 --- old.declarationEmitEnumReadonlyProperty.js
 +++ new.declarationEmitEnumReadonlyProperty.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+     E["A"] = "a";
      E["B"] = "b";
  })(E || (E = {}));
- class C {
--    constructor() {
+-var C = /** @class */ (function () {
+-    function C() {
 -        this.type = E.A;
 -    }
+-    return C;
+-}());
+-var x = new C().type;
++class C {
 +    type = E.A;
- }
- let x = new C().type;
++}
++let x = new C().type;
+
 
-@@= skipped -13, +11 lines =@@
+ //// [declarationEmitEnumReadonlyProperty.d.ts]
+@@= skipped -15, +12 lines =@@
      B = "b"
  }
  declare class C {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
index fb4b2e41db..7a854cdeb8 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
@@ -6,16 +6,22 @@
  exports.Test = void 0;
 -var translation_1 = require("./translation");
 -var TranslationKeyEnum = translation_1.Translation.TranslationKeyEnum;
-+const translation_1 = require("./translation");
- class Test {
--    constructor() {
+-var Test = /** @class */ (function () {
+-    function Test() {
 -        this.TranslationKeyEnum = TranslationKeyEnum;
 -    }
+-    Test.prototype.print = function () {
++const translation_1 = require("./translation");
++class Test {
 +    TranslationKeyEnum = TranslationKeyEnum;
-     print() {
++    print() {
          console.log(TranslationKeyEnum.Translation1);
-     }
-@@= skipped -14, +11 lines =@@
+-    };
+-    return Test;
+-}());
++    }
++}
+ exports.Test = Test;
  //// [index.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js.diff
new file mode 100644
index 0000000000..290e55f34e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js
++++ new.declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=false).js
+@@= skipped -25, +25 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.baddts = void 0;
+-var foo = function () { return function (x) { return null; }; };
++const foo = () => (x) => null;
+ exports.baddts = foo();
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js.diff
new file mode 100644
index 0000000000..d4275e2ac4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js
++++ new.declarationEmitExactOptionalPropertyTypesNodeNotReused(exactoptionalpropertytypes=true).js
+@@= skipped -25, +25 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.baddts = void 0;
+-var foo = function () { return function (x) { return null; }; };
++const foo = () => (x) => null;
+ exports.baddts = foo();
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpandoWithGenericConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpandoWithGenericConstraint.js.diff
index 6b591946c6..c78ad0fcd5 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExpandoWithGenericConstraint.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpandoWithGenericConstraint.js.diff
@@ -1,6 +1,21 @@
 --- old.declarationEmitExpandoWithGenericConstraint.js
 +++ new.declarationEmitExpandoWithGenericConstraint.js
-@@= skipped -37, +37 lines =@@
+@@= skipped -19, +19 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Rect = exports.Point = void 0;
+-var Point = function (x, y) { return ({ x: x, y: y }); };
++const Point = (x, y) => ({ x, y });
+ exports.Point = Point;
+-var Rect = function (a, b) { return ({ a: a, b: b }); };
++const Rect = (a, b) => ({ a, b });
+ exports.Rect = Rect;
+-exports.Point.zero = function () { return (0, exports.Point)(0, 0); };
++exports.Point.zero = () => (0, exports.Point)(0, 0);
+
+
+ //// [declarationEmitExpandoWithGenericConstraint.d.ts]
+@@= skipped -18, +18 lines =@@
  }
  export declare const Point: {
      (x: number, y: number): Point;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExportAliasVisibiilityMarking.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExportAliasVisibiilityMarking.js.diff
index ef7750cdf7..db314eb025 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExportAliasVisibiilityMarking.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExportAliasVisibiilityMarking.js.diff
@@ -1,10 +1,16 @@
 --- old.declarationEmitExportAliasVisibiilityMarking.js
 +++ new.declarationEmitExportAliasVisibiilityMarking.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -19, +19 lines =@@
+ //// [Card.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-exports.default = (function (suit, rank) { return ({ suit: suit, rank: rank }); });
++exports.default = (suit, rank) => ({ suit, rank });
+ //// [index.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.lazyCard = void 0;
--let lazyCard = () => Promise.resolve().then(function () { return require('./Card'); }).then(a => a.default);
+-var lazyCard = function () { return Promise.resolve().then(function () { return require('./Card'); }).then(function (a) { return a.default; }); };
 +let lazyCard = () => Promise.resolve().then(() => require('./Card')).then(a => a.default);
  exports.lazyCard = lazyCard;
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExportDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExportDeclaration.js.diff
index 9446b6ee50..fb3b57953b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExportDeclaration.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExportDeclaration.js.diff
@@ -8,4 +8,8 @@
 +const utils_1 = require("./utils");
  Object.defineProperty(exports, "bar", { enumerable: true, get: function () { return utils_1.bar; } });
  (0, utils_1.foo)();
- let obj;
\ No newline at end of file
+-var obj;
++let obj;
+
+
+ //// [utils.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends.js.diff
index c6070eece7..bbe646420a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends.js.diff
@@ -1,10 +1,41 @@
 --- old.declarationEmitExpressionInExtends.js
 +++ new.declarationEmitExpressionInExtends.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -15, +15 lines =@@
+ q.s;
+
  //// [declarationEmitExpressionInExtends.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  var x;
- class Q {
+-var Q = /** @class */ (function () {
+-    function Q() {
+-    }
+-    return Q;
+-}());
+-var B = /** @class */ (function (_super) {
+-    __extends(B, _super);
+-    function B() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return B;
+-}(x));
++class Q {
 +    s;
- }
- class B extends x {
- }
\ No newline at end of file
++}
++class B extends x {
++}
+ var q;
+ q.s;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends2.js.diff
index 072daee101..80aa9c515d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends2.js.diff
@@ -1,11 +1,45 @@
 --- old.declarationEmitExpressionInExtends2.js
 +++ new.declarationEmitExpressionInExtends2.js
-@@= skipped -14, +14 lines =@@
+@@= skipped -13, +13 lines =@@
+ }
 
  //// [declarationEmitExpressionInExtends2.js]
- class C {
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
++class C {
 +    x;
 +    y;
- }
++}
  function getClass(c) {
-     return C;
\ No newline at end of file
+     return C;
+ }
+-var MyClass = /** @class */ (function (_super) {
+-    __extends(MyClass, _super);
+-    function MyClass() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyClass;
+-}(getClass(2)));
++class MyClass extends getClass(2) {
++}
+
+
+ //// [declarationEmitExpressionInExtends2.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends3.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends3.js.diff
index 1163f7d4b5..2a7d9d7099 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends3.js.diff
@@ -1,15 +1,88 @@
 --- old.declarationEmitExpressionInExtends3.js
 +++ new.declarationEmitExpressionInExtends3.js
-@@= skipped -48, +48 lines =@@
+@@= skipped -45, +45 lines =@@
+
+ //// [declarationEmitExpressionInExtends3.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass4 = exports.MyClass3 = exports.MyClass2 = exports.MyClass = exports.ExportedClass = void 0;
- class ExportedClass {
+-var ExportedClass = /** @class */ (function () {
+-    function ExportedClass() {
+-    }
+-    return ExportedClass;
+-}());
++class ExportedClass {
 +    x;
- }
++}
  exports.ExportedClass = ExportedClass;
- class LocalClass {
+-var LocalClass = /** @class */ (function () {
+-    function LocalClass() {
+-    }
+-    return LocalClass;
+-}());
++class LocalClass {
 +    x;
 +    y;
- }
++}
  function getLocalClass(c) {
-     return LocalClass;
\ No newline at end of file
+     return LocalClass;
+ }
+ function getExportedClass(c) {
+     return ExportedClass;
+ }
+-var MyClass = /** @class */ (function (_super) {
+-    __extends(MyClass, _super);
+-    function MyClass() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyClass;
+-}(getLocalClass(undefined)));
++class MyClass extends getLocalClass(undefined) {
++}
+ exports.MyClass = MyClass;
+-var MyClass2 = /** @class */ (function (_super) {
+-    __extends(MyClass2, _super);
+-    function MyClass2() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyClass2;
+-}(getExportedClass(undefined)));
++class MyClass2 extends getExportedClass(undefined) {
++}
+ exports.MyClass2 = MyClass2;
+-var MyClass3 = /** @class */ (function (_super) {
+-    __extends(MyClass3, _super);
+-    function MyClass3() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyClass3;
+-}(getExportedClass(undefined)));
++class MyClass3 extends getExportedClass(undefined) {
++}
+ exports.MyClass3 = MyClass3;
+-var MyClass4 = /** @class */ (function (_super) {
+-    __extends(MyClass4, _super);
+-    function MyClass4() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyClass4;
+-}(getExportedClass(undefined)));
++class MyClass4 extends getExportedClass(undefined) {
++}
+ exports.MyClass4 = MyClass4;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends4.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends4.js.diff
new file mode 100644
index 0000000000..8c46a6cd69
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends4.js.diff
@@ -0,0 +1,61 @@
+--- old.declarationEmitExpressionInExtends4.js
++++ new.declarationEmitExpressionInExtends4.js
+@@= skipped -18, +18 lines =@@
+ }
+
+ //// [declarationEmitExpressionInExtends4.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ function getSomething() {
+-    return /** @class */ (function () {
+-        function D() {
+-        }
+-        return D;
+-    }());
+-}
+-var C = /** @class */ (function (_super) {
+-    __extends(C, _super);
+-    function C() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return C;
+-}(getSomething()));
+-var C2 = /** @class */ (function (_super) {
+-    __extends(C2, _super);
+-    function C2() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return C2;
+-}(SomeUndefinedFunction()));
+-var C3 = /** @class */ (function (_super) {
+-    __extends(C3, _super);
+-    function C3() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return C3;
+-}(SomeUndefinedFunction));
++    return class D {
++    };
++}
++class C extends getSomething() {
++}
++class C2 extends SomeUndefinedFunction() {
++}
++class C3 extends SomeUndefinedFunction {
++}
+
+
+ //// [declarationEmitExpressionInExtends4.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends5.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends5.js.diff
new file mode 100644
index 0000000000..e811a77293
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends5.js.diff
@@ -0,0 +1,43 @@
+--- old.declarationEmitExpressionInExtends5.js
++++ new.declarationEmitExpressionInExtends5.js
+@@= skipped -22, +22 lines =@@
+
+
+ //// [declarationEmitExpressionInExtends5.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ var Test;
+ (function (Test) {
+-    var SomeClass = /** @class */ (function () {
+-        function SomeClass() {
+-        }
+-        return SomeClass;
+-    }());
++    class SomeClass {
++    }
+     Test.SomeClass = SomeClass;
+-    var Derived = /** @class */ (function (_super) {
+-        __extends(Derived, _super);
+-        function Derived() {
+-            return _super !== null && _super.apply(this, arguments) || this;
+-        }
+-        return Derived;
+-    }(getClass()));
++    class Derived extends getClass() {
++    }
+     Test.Derived = Derived;
+     function getClass() {
+         return SomeClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends6.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends6.js.diff
index 9419006abe..dc8e877d67 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends6.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends6.js.diff
@@ -1,11 +1,47 @@
 --- old.declarationEmitExpressionInExtends6.js
 +++ new.declarationEmitExpressionInExtends6.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -15, +15 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
+ exports.Foo = Foo;
  //// [b.js]
  "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  Object.defineProperty(exports, "__esModule", { value: true });
 -var A = require("./a");
+-var Foo = A.Foo;
+-var default_1 = /** @class */ (function (_super) {
+-    __extends(default_1, _super);
+-    function default_1() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return default_1;
+-}(Foo));
 +const A = require("./a");
- const { Foo } = A;
- class default_1 extends Foo {
- }
\ No newline at end of file
++const { Foo } = A;
++class default_1 extends Foo {
++}
+ exports.default = default_1;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends7.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends7.js.diff
new file mode 100644
index 0000000000..226b0181c5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitExpressionInExtends7.js.diff
@@ -0,0 +1,33 @@
+--- old.declarationEmitExpressionInExtends7.js
++++ new.declarationEmitExpressionInExtends7.js
+@@= skipped -5, +5 lines =@@
+
+ //// [declarationEmitExpressionInExtends7.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var default_1 = /** @class */ (function (_super) {
+-    __extends(default_1, _super);
+-    function default_1() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return default_1;
+-}(SomeUndefinedFunction));
++class default_1 extends SomeUndefinedFunction {
++}
+ exports.default = default_1;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForDefaultExportClassExtendingExpression01.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitForDefaultExportClassExtendingExpression01.js.diff
new file mode 100644
index 0000000000..b9dada06ad
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForDefaultExportClassExtendingExpression01.js.diff
@@ -0,0 +1,46 @@
+--- old.declarationEmitForDefaultExportClassExtendingExpression01.js
++++ new.declarationEmitForDefaultExportClassExtendingExpression01.js
+@@= skipped -23, +23 lines =@@
+
+ //// [declarationEmitForDefaultExportClassExtendingExpression01.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    A.prototype.getGreeting = function () {
++class A {
++    getGreeting() {
+         return 'hello';
+-    };
+-    return A;
+-}());
+-var getGreeterBase = function () { return A; };
+-var default_1 = /** @class */ (function (_super) {
+-    __extends(default_1, _super);
+-    function default_1() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+     }
+-    return default_1;
+-}(getGreeterBase()));
++}
++const getGreeterBase = () => A;
++class default_1 extends getGreeterBase() {
++}
+ exports.default = default_1;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.js.diff
index b76d77ddb0..4380c71c14 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.js.diff
@@ -5,7 +5,22 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.ParentThing = void 0;
 -var child1_1 = require("./child1"); // this import should still exist in some form in the output, since it augments this module
+-var ParentThing = /** @class */ (function () {
+-    function ParentThing() {
+-    }
+-    return ParentThing;
+-}());
 +const child1_1 = require("./child1"); // this import should still exist in some form in the output, since it augments this module
- class ParentThing {
++class ParentThing {
++}
+ exports.ParentThing = ParentThing;
+ (0, child1_1.child1)(ParentThing.prototype);
+ //// [child1.js]
+@@= skipped -13, +10 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.child1 = child1;
+ function child1(prototype) {
+-    prototype.add = function (a, b) { return a + b; };
++    prototype.add = (a, b) => a + b;
  }
- exports.ParentThing = ParentThing;
\ No newline at end of file
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization.js.diff
new file mode 100644
index 0000000000..0ef748b9a3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization.js.diff
@@ -0,0 +1,11 @@
+--- old.declarationEmitGenericTypeParamerSerialization.js
++++ new.declarationEmitGenericTypeParamerSerialization.js
+@@= skipped -16, +16 lines =@@
+ exports.w = void 0;
+ function wrapper(value) {
+     return {
+-        m: function () { return value; },
++        m() { return value; },
+         get g() { return value; },
+     };
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization2.js.diff
index acebc36bc2..95c04e9076 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitGenericTypeParamerSerialization2.js.diff
@@ -1,6 +1,15 @@
 --- old.declarationEmitGenericTypeParamerSerialization2.js
 +++ new.declarationEmitGenericTypeParamerSerialization2.js
-@@= skipped -65, +65 lines =@@
+@@= skipped -41, +41 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = exports.x = void 0;
+-exports.x = (function () { return null; })();
++exports.x = (() => null)();
+ function makeV() {
+     return null;
+ }
+@@= skipped -24, +24 lines =@@
      fnField: (p: number) => number;
      writeOnlyProperty: number;
      property: number;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.js.diff
new file mode 100644
index 0000000000..885f6c1925
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitHasTypesRefOnNamespaceUse.js.diff
@@ -0,0 +1,16 @@
+--- old.declarationEmitHasTypesRefOnNamespaceUse.js
++++ new.declarationEmitHasTypesRefOnNamespaceUse.js
+@@= skipped -13, +13 lines =@@
+
+
+ //// [index.js]
+-var Src = /** @class */ (function () {
+-    function Src() {
+-    }
+-    return Src;
+-}());
++class Src {
++}
+
+
+ //// [index.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitHigherOrderRetainedGenerics.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitHigherOrderRetainedGenerics.types.diff
index bbb0c92db6..c1ee48765a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitHigherOrderRetainedGenerics.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitHigherOrderRetainedGenerics.types.diff
@@ -62,11 +62,13 @@
  >2 : 2
  >(        self: Kind,        that: Kind    ): Kind => zipWith(F)(self, that, SK) : (self: Kind, that: Kind) => Kind
 
-@@= skipped -14, +14 lines =@@
+@@= skipped -13, +13 lines =@@
+
      ): Kind => zipWith(F)(self, that, SK));
  >zipWith(F)(self, that, SK) : Kind
- >zipWith(F) : { (that: Kind, f: (a: A, b: B_1) => C): (self: Kind) => Kind; (self: Kind, that: Kind, f: (a: A, b: B_1) => C): Kind; }
+->zipWith(F) : { (that: Kind, f: (a: A, b: B_1) => C): (self: Kind) => Kind; (self: Kind, that: Kind, f: (a: A, b: B_1) => C): Kind; }
 ->zipWith : (F: SemiApplicative) => { (that: Kind, f: (a: A, b: B_1) => C): (self: Kind) => Kind; (self: Kind, that: Kind, f: (a: A_1, b: B_2) => C_1): Kind; }
++>zipWith(F) : { (that: Kind, f: (a: A, b: B_1) => C): (self: Kind) => Kind; (self: Kind, that: Kind, f: (a: A, b: B_1) => C): Kind; }
 +>zipWith : (F: SemiApplicative) => { (that: Kind, f: (a: A, b: B_1) => C): (self: Kind) => Kind; (self: Kind, that: Kind, f: (a: A, b: B_1) => C): Kind; }
  >F : SemiApplicative
  >self : Kind
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js
index 178684b077..0ff83b5f56 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js
@@ -1,8 +1,8 @@
 //// [tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts] ////
 
 //// [declarationEmitImportInExportAssignmentModule.ts]
-module m {
-    export module c {
+namespace m {
+    export namespace c {
         export class c {
         }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js.diff
index 68535f85e9..fb666928eb 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.js.diff
@@ -1,7 +1,19 @@
 --- old.declarationEmitImportInExportAssignmentModule.js
 +++ new.declarationEmitImportInExportAssignmentModule.js
-@@= skipped -20, +20 lines =@@
-         }
+@@= skipped -14, +14 lines =@@
+ "use strict";
+ var m;
+ (function (m) {
+-    var c;
++    let c;
+     (function (c_1) {
+-        var c = /** @class */ (function () {
+-            function c() {
+-            }
+-            return c;
+-        }());
++        class c {
++        }
          c_1.c = c;
      })(c = m.c || (m.c = {}));
 +    var x = c;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.symbols
index e8b3331bcf..7e019d7d53 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.symbols
@@ -1,19 +1,19 @@
 //// [tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts] ////
 
 === declarationEmitImportInExportAssignmentModule.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(declarationEmitImportInExportAssignmentModule.ts, 0, 0))
 
-    export module c {
->c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 0, 10))
+    export namespace c {
+>c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 0, 13))
 
         export class c {
->c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 1, 21))
+>c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 1, 24))
         }
     }
     import x = c;
 >x : Symbol(x, Decl(declarationEmitImportInExportAssignmentModule.ts, 4, 5))
->c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 0, 10))
+>c : Symbol(c, Decl(declarationEmitImportInExportAssignmentModule.ts, 0, 13))
 
     export var a: typeof x;
 >a : Symbol(a, Decl(declarationEmitImportInExportAssignmentModule.ts, 6, 14))
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types
index 70d4e8d8c4..fa7793a5c1 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/declarationEmitImportInExportAssignmentModule.ts] ////
 
 === declarationEmitImportInExportAssignmentModule.ts ===
-module m {
+namespace m {
 >m : typeof m
 
-    export module c {
+    export namespace c {
 >c : typeof import("declarationEmitImportInExportAssignmentModule").c
 
         export class c {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types.diff
index badc009b57..049a7fef1a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitImportInExportAssignmentModule.types.diff
@@ -3,7 +3,7 @@
 @@= skipped -4, +4 lines =@@
  >m : typeof m
 
-     export module c {
+     export namespace c {
 ->c : typeof m.c
 +>c : typeof import("declarationEmitImportInExportAssignmentModule").c
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitIndexTypeArray.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitIndexTypeArray.js.diff
new file mode 100644
index 0000000000..36b8f6cff5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitIndexTypeArray.js.diff
@@ -0,0 +1,19 @@
+--- old.declarationEmitIndexTypeArray.js
++++ new.declarationEmitIndexTypeArray.js
+@@= skipped -8, +8 lines =@@
+
+
+ //// [declarationEmitIndexTypeArray.js]
+-function doSomethingWithKeys() {
+-    var keys = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        keys[_i] = arguments[_i];
+-    }
+-}
+-var utilityFunctions = {
+-    doSomethingWithKeys: doSomethingWithKeys
++function doSomethingWithKeys(...keys) { }
++const utilityFunctions = {
++    doSomethingWithKeys
+ };
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.js.diff
new file mode 100644
index 0000000000..a8389244e5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.js.diff
@@ -0,0 +1,17 @@
+--- old.declarationEmitInferredTypeAlias1.js
++++ new.declarationEmitInferredTypeAlias1.js
+@@= skipped -14, +14 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ {
+-    var obj = true;
++    let obj = true;
+ }
+ //// [1.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = void 0;
+-var v = "str" || true;
++let v = "str" || true;
+ exports.v = v;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.types.diff
new file mode 100644
index 0000000000..197f2232e0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias1.types.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitInferredTypeAlias1.types
++++ new.declarationEmitInferredTypeAlias1.types
+@@= skipped -13, +13 lines =@@
+ === 1.ts ===
+ let v = "str" || true;
+ >v : string | boolean
+->"str" || true : true | "str"
++>"str" || true : "str" | true
+ >"str" : "str"
+ >true : true
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.js.diff
new file mode 100644
index 0000000000..8d3b06c7dc
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.js.diff
@@ -0,0 +1,19 @@
+--- old.declarationEmitInferredTypeAlias2.js
++++ new.declarationEmitInferredTypeAlias2.js
+@@= skipped -17, +17 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ {
+-    var obj = true;
++    let obj = true;
+ }
+ //// [1.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = void 0;
+ exports.bar = bar;
+-var v = "str" || true;
++let v = "str" || true;
+ exports.v = v;
+ function bar() {
+     return v;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.types.diff
new file mode 100644
index 0000000000..8e11828464
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias2.types.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitInferredTypeAlias2.types
++++ new.declarationEmitInferredTypeAlias2.types
+@@= skipped -13, +13 lines =@@
+ === 1.ts ===
+ let v = "str" || true;
+ >v : string | boolean
+->"str" || true : true | "str"
++>"str" || true : "str" | true
+ >"str" : "str"
+ >true : true
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias3.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias3.js.diff
new file mode 100644
index 0000000000..ad4d11ee07
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias3.js.diff
@@ -0,0 +1,11 @@
+--- old.declarationEmitInferredTypeAlias3.js
++++ new.declarationEmitInferredTypeAlias3.js
+@@= skipped -14, +14 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ {
+-    var obj = true;
++    let obj = true;
+ }
+ //// [1.js]
+ "use strict";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.js.diff
new file mode 100644
index 0000000000..e3d6a5bcc1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.js.diff
@@ -0,0 +1,17 @@
+--- old.declarationEmitInferredTypeAlias5.js
++++ new.declarationEmitInferredTypeAlias5.js
+@@= skipped -12, +12 lines =@@
+ //// [0.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var obj = true;
++let obj = true;
+ //// [1.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = void 0;
+ //let v2: Z.Data;
+-var v = "str" || true;
++let v = "str" || true;
+ exports.v = v;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.types.diff
new file mode 100644
index 0000000000..66b35eedb2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias5.types.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitInferredTypeAlias5.types
++++ new.declarationEmitInferredTypeAlias5.types
+@@= skipped -14, +14 lines =@@
+ //let v2: Z.Data;
+ let v = "str" || true;
+ >v : string | boolean
+->"str" || true : true | "str"
++>"str" || true : "str" | true
+ >"str" : "str"
+ >true : true
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.js.diff
new file mode 100644
index 0000000000..377c610e30
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.js.diff
@@ -0,0 +1,17 @@
+--- old.declarationEmitInferredTypeAlias6.js
++++ new.declarationEmitInferredTypeAlias6.js
+@@= skipped -14, +14 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ {
+-    var obj = true;
++    let obj = true;
+ }
+ //// [1.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = void 0;
+-var v = "str" || true;
++let v = "str" || true;
+ exports.v = v;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.types.diff
new file mode 100644
index 0000000000..4f54b4e0f1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias6.types.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitInferredTypeAlias6.types
++++ new.declarationEmitInferredTypeAlias6.types
+@@= skipped -13, +13 lines =@@
+ === 1.ts ===
+ let v = "str" || true;
+ >v : string | boolean
+->"str" || true : true | "str"
++>"str" || true : "str" | true
+ >"str" : "str"
+ >true : true
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.js.diff
new file mode 100644
index 0000000000..4d854d20be
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.js.diff
@@ -0,0 +1,16 @@
+--- old.declarationEmitInferredTypeAlias7.js
++++ new.declarationEmitInferredTypeAlias7.js
+@@= skipped -10, +10 lines =@@
+ //// [0.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var obj = true;
++let obj = true;
+ //// [1.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.v = void 0;
+-var v = "str" || true;
++let v = "str" || true;
+ exports.v = v;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.types.diff
new file mode 100644
index 0000000000..654aac6a8c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredTypeAlias7.types.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitInferredTypeAlias7.types
++++ new.declarationEmitInferredTypeAlias7.types
+@@= skipped -10, +10 lines =@@
+ === 1.ts ===
+ let v = "str" || true;
+ >v : string | boolean
+->"str" || true : true | "str"
++>"str" || true : "str" | true
+ >"str" : "str"
+ >true : true
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.js.diff
index 7d4aec176a..d96dd64e8b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.js.diff
@@ -7,6 +7,18 @@
 -// repro from https://github.com/microsoft/TypeScript/issues/53914
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.b = void 0;
+-exports.b = [{ foo: 0, m: function () { } }, { bar: 1 }];
 +// repro from https://github.com/microsoft/TypeScript/issues/53914
- exports.b = [{ foo: 0, m() { } }, { bar: 1 }];
++exports.b = [{ foo: 0, m() { } }, { bar: 1 }];
 
+
+ //// [declarationEmitInferredUndefinedPropFromFunctionInArray.d.ts]
+@@= skipped -12, +12 lines =@@
+     m(): void;
+     bar?: undefined;
+ } | {
+-    bar: number;
+     foo?: undefined;
+     m?: undefined;
++    bar: number;
+ })[];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.types.diff
new file mode 100644
index 0000000000..1e3124cb96
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInferredUndefinedPropFromFunctionInArray.types.diff
@@ -0,0 +1,11 @@
+--- old.declarationEmitInferredUndefinedPropFromFunctionInArray.types
++++ new.declarationEmitInferredUndefinedPropFromFunctionInArray.types
+@@= skipped -3, +3 lines =@@
+ // repro from https://github.com/microsoft/TypeScript/issues/53914
+
+ export let b = [{ foo: 0, m() {} }, { bar: 1 }];
+->b : ({ foo: number; m(): void; bar?: undefined; } | { bar: number; foo?: undefined; m?: undefined; })[]
++>b : ({ foo: number; m(): void; bar?: undefined; } | { foo?: undefined; m?: undefined; bar: number; })[]
+ >[{ foo: 0, m() {} }, { bar: 1 }] : ({ foo: number; m(): void; } | { bar: number; })[]
+ >{ foo: 0, m() {} } : { foo: number; m(): void; }
+ >foo : number
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInlinedDistributiveConditional.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInlinedDistributiveConditional.js.diff
index d6791facc1..7811716676 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitInlinedDistributiveConditional.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInlinedDistributiveConditional.js.diff
@@ -5,16 +5,22 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.dropPrivateProps2 = exports.dropPrivateProps1 = void 0;
 -var internal_1 = require("./internal");
+-var dropPrivateProps1 = function (obj) { return (0, internal_1.excludePrivateKeys1)(obj); };
 +const internal_1 = require("./internal");
- const dropPrivateProps1 = (obj) => (0, internal_1.excludePrivateKeys1)(obj);
++const dropPrivateProps1 = (obj) => (0, internal_1.excludePrivateKeys1)(obj);
  exports.dropPrivateProps1 = dropPrivateProps1;
- const dropPrivateProps2 = (obj) => (0, internal_1.excludePrivateKeys2)(obj);
-@@= skipped -8, +8 lines =@@
+-var dropPrivateProps2 = function (obj) { return (0, internal_1.excludePrivateKeys2)(obj); };
++const dropPrivateProps2 = (obj) => (0, internal_1.excludePrivateKeys2)(obj);
+ exports.dropPrivateProps2 = dropPrivateProps2;
  //// [test.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
 -var api_1 = require("./api");
+-var a = (0, api_1.dropPrivateProps1)({ foo: 42, _bar: 'secret' }); // type is {foo: number}
 +const api_1 = require("./api");
- const a = (0, api_1.dropPrivateProps1)({ foo: 42, _bar: 'secret' }); // type is {foo: number}
++const a = (0, api_1.dropPrivateProps1)({ foo: 42, _bar: 'secret' }); // type is {foo: number}
  //a._bar                                                // error: _bar does not exist           <===== as expected
- const b = (0, api_1.dropPrivateProps2)({ foo: 42, _bar: 'secret' }); // type is {foo: number, _bar: string}
\ No newline at end of file
+-var b = (0, api_1.dropPrivateProps2)({ foo: 42, _bar: 'secret' }); // type is {foo: number, _bar: string}
++const b = (0, api_1.dropPrivateProps2)({ foo: 42, _bar: 'secret' }); // type is {foo: number, _bar: string}
+ //b._bar                                                // no error, type of b._bar is string   <===== NOT expected
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js.diff
new file mode 100644
index 0000000000..0785bbfa98
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js.diff
@@ -0,0 +1,16 @@
+--- old.declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js
++++ new.declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js
+@@= skipped -4, +4 lines =@@
+ interface Class extends (typeof A) { }
+
+ //// [declarationEmitInterfaceWithNonEntityNameExpressionHeritage.js]
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    return A;
+-}());
++class A {
++}
+
+
+ //// [declarationEmitInterfaceWithNonEntityNameExpressionHeritage.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types.diff
new file mode 100644
index 0000000000..1b612e1295
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types.diff
@@ -0,0 +1,11 @@
+--- old.declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types
++++ new.declarationEmitInterfaceWithNonEntityNameExpressionHeritage.types
+@@= skipped -4, +4 lines =@@
+ >A : A
+
+ interface Class extends (typeof A) { }
+->(typeof A) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+->typeof A : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>(typeof A) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
++>typeof A : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >A : typeof A
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitIsolatedDeclarationErrorNotEmittedForNonEmittedFile.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitIsolatedDeclarationErrorNotEmittedForNonEmittedFile.js.diff
index acd616e574..a0725837e8 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitIsolatedDeclarationErrorNotEmittedForNonEmittedFile.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitIsolatedDeclarationErrorNotEmittedForNonEmittedFile.js.diff
@@ -5,8 +5,9 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.publicProcedure = exports.router = exports.middleware = void 0;
 -var server_1 = require("@trpc/server");
+-var trpc = server_1.initTRPC.create();
 +const server_1 = require("@trpc/server");
- const trpc = server_1.initTRPC.create();
++const trpc = server_1.initTRPC.create();
  exports.middleware = trpc.middleware;
  exports.router = trpc.router;
  exports.publicProcedure = trpc.procedure;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitKeywordDestructuring.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitKeywordDestructuring.js.diff
new file mode 100644
index 0000000000..12fecd3a3f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitKeywordDestructuring.js.diff
@@ -0,0 +1,30 @@
+--- old.declarationEmitKeywordDestructuring.js
++++ new.declarationEmitKeywordDestructuring.js
+@@= skipped -43, +43 lines =@@
+     return t;
+ };
+ function f1(_a) {
+-    var _enum = _a.enum, rest = __rest(_a, ["enum"]);
++    var { enum: _enum } = _a, rest = __rest(_a, ["enum"]);
+     return rest;
+ }
+ function f2(_a) {
+-    var _function = _a.function, rest = __rest(_a, ["function"]);
++    var { function: _function } = _a, rest = __rest(_a, ["function"]);
+     return rest;
+ }
+ function f3(_a) {
+-    var _abstract = _a.abstract, rest = __rest(_a, ["abstract"]);
++    var { abstract: _abstract } = _a, rest = __rest(_a, ["abstract"]);
+     return rest;
+ }
+ function f4(_a) {
+-    var _async = _a.async, rest = __rest(_a, ["async"]);
++    var { async: _async } = _a, rest = __rest(_a, ["async"]);
+     return rest;
+ }
+ function f5(_a) {
+-    var _await = _a.await, rest = __rest(_a, ["await"]);
++    var { await: _await } = _a, rest = __rest(_a, ["await"]);
+     return rest;
+ }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassDeclarationMixin.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassDeclarationMixin.js.diff
index 54f41f7b66..4e122c857a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassDeclarationMixin.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassDeclarationMixin.js.diff
@@ -1,34 +1,82 @@
 --- old.declarationEmitLocalClassDeclarationMixin.js
 +++ new.declarationEmitLocalClassDeclarationMixin.js
-@@= skipped -37, +37 lines =@@
+@@= skipped -33, +33 lines =@@
+
+ //// [declarationEmitLocalClassDeclarationMixin.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
  exports.FilteredThing = exports.Mixed = exports.Unmixed = void 0;
  function mixin(Base) {
-     class PrivateMixed extends Base {
--        constructor() {
--            super(...arguments);
--            this.bar = 2;
+-    var PrivateMixed = /** @class */ (function (_super) {
+-        __extends(PrivateMixed, _super);
+-        function PrivateMixed() {
+-            var _this = _super !== null && _super.apply(this, arguments) || this;
+-            _this.bar = 2;
+-            return _this;
 -        }
+-        return PrivateMixed;
+-    }(Base));
++    class PrivateMixed extends Base {
 +        bar = 2;
-     }
++    }
      return PrivateMixed;
  }
- class Unmixed {
--    constructor() {
+-var Unmixed = /** @class */ (function () {
+-    function Unmixed() {
 -        this.foo = 1;
 -    }
+-    return Unmixed;
+-}());
++class Unmixed {
 +    foo = 1;
- }
++}
  exports.Unmixed = Unmixed;
  exports.Mixed = mixin(Unmixed);
  function Filter(ctor) {
-     class FilterMixin extends ctor {
--        constructor() {
--            super(...arguments);
+-    var FilterMixin = /** @class */ (function (_super) {
+-        __extends(FilterMixin, _super);
+-        function FilterMixin() {
+-            var _this = _super !== null && _super.apply(this, arguments) || this;
 -            // other concrete methods, fields, constructor
--            this.thing = 12;
+-            _this.thing = 12;
+-            return _this;
 -        }
+-        return FilterMixin;
+-    }(ctor));
++    class FilterMixin extends ctor {
 +        // other concrete methods, fields, constructor
 +        thing = 12;
-     }
++    }
      return FilterMixin;
- }
\ No newline at end of file
+ }
+-var FilteredThing = /** @class */ (function (_super) {
+-    __extends(FilteredThing, _super);
+-    function FilteredThing() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    FilteredThing.prototype.match = function (path) {
++class FilteredThing extends Filter(Unmixed) {
++    match(path) {
+         return false;
+-    };
+-    return FilteredThing;
+-}(Filter(Unmixed)));
++    }
++}
+ exports.FilteredThing = FilteredThing;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassHasRequiredDeclare.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassHasRequiredDeclare.js.diff
index e5e32cc2f0..7886ce309c 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassHasRequiredDeclare.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitLocalClassHasRequiredDeclare.js.diff
@@ -1,18 +1,32 @@
 --- old.declarationEmitLocalClassHasRequiredDeclare.js
 +++ new.declarationEmitLocalClassHasRequiredDeclare.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -20, +20 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
  exports.Y = exports.A = void 0;
- class X {
- }
--let A = (() => {
--    class A {
+-var X = /** @class */ (function () {
+-    function X() {
+-    }
+-    return X;
+-}());
+-var A = /** @class */ (function () {
+-    function A() {
 -    }
 -    A.X = X;
 -    return A;
--})();
+-}());
++class X {
++}
 +class A {
 +    static X = X;
 +}
  exports.A = A;
- class Y {
- }
\ No newline at end of file
+-var Y = /** @class */ (function () {
+-    function Y() {
+-    }
+-    return Y;
+-}());
++class Y {
++}
+ exports.Y = Y;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypeDistributivityPreservesConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypeDistributivityPreservesConstraints.js.diff
index 42e8128dfa..318e9bc04d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypeDistributivityPreservesConstraints.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypeDistributivityPreservesConstraints.js.diff
@@ -1,6 +1,11 @@
 --- old.declarationEmitMappedTypeDistributivityPreservesConstraints.js
 +++ new.declarationEmitMappedTypeDistributivityPreservesConstraints.js
-@@= skipped -26, +26 lines =@@
+@@= skipped -22, +22 lines =@@
+ function fn(sliceIndex) {
+     return null;
+ }
+-exports.default = { fn: fn };
++exports.default = { fn };
  //// [reexport.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,7 +14,7 @@
  exports.default = { test: types_1.default };
 
 
-@@= skipped -28, +28 lines =@@
+@@= skipped -32, +32 lines =@@
              } ? { [K in keyof T_1]: T_1[K]; } : never;
          }>(sliceIndex: T) => T["x"] extends infer T_2 extends {
              [x: string]: (...params: unknown[]) => unknown;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff
index 90819e98d3..b47a71f7fa 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePreservesTypeParameterConstraint.js.diff
@@ -7,12 +7,17 @@
 -// repro from https://github.com/microsoft/TypeScript/issues/54560
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.entriesOf = exports.buildSchema = void 0;
--const buildSchema = (version) => ({});
+-var buildSchema = function (version) { return ({}); };
 +const buildSchema = (version) => (({}));
  exports.buildSchema = buildSchema;
- const entriesOf = (o) => Object.entries(o);
+-var entriesOf = function (o) {
+-    return Object.entries(o);
+-};
++const entriesOf = (o) => Object.entries(o);
  exports.entriesOf = entriesOf;
-@@= skipped -31, +30 lines =@@
+
+
+@@= skipped -33, +30 lines =@@
  export declare type ZodRawShape = {
      [k: string]: ZodTypeAny;
  };
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePropertyFromNumericStringKey.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePropertyFromNumericStringKey.js.diff
index 3d865db89d..d0ba040cbf 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePropertyFromNumericStringKey.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMappedTypePropertyFromNumericStringKey.js.diff
@@ -1,6 +1,12 @@
 --- old.declarationEmitMappedTypePropertyFromNumericStringKey.js
 +++ new.declarationEmitMappedTypePropertyFromNumericStringKey.js
-@@= skipped -11, +11 lines =@@
+@@= skipped -6, +6 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.f = void 0;
+-exports.f = (function (arg) { return arg; })({ '0': 0 }); // Original prop uses string syntax
++exports.f = ((arg) => arg)({ '0': 0 }); // Original prop uses string syntax
+
 
  //// [declarationEmitMappedTypePropertyFromNumericStringKey.d.ts]
  export declare const f: {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMixinPrivateProtected.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMixinPrivateProtected.js.diff
index 241fa752fa..2fb070c5df 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitMixinPrivateProtected.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMixinPrivateProtected.js.diff
@@ -1,8 +1,104 @@
 --- old.declarationEmitMixinPrivateProtected.js
 +++ new.declarationEmitMixinPrivateProtected.js
-@@= skipped -66, +66 lines =@@
+@@= skipped -35, +35 lines =@@
+
+ //// [first.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Monitor = void 0;
+-var DisposableMixin = /** @class */ (function () {
+-    function class_1() {
+-    }
+-    class_1.prototype._onDispose = function () {
++const DisposableMixin = class {
++    _onDispose() {
+         this._assertIsStripped();
+-    };
+-    class_1.prototype._assertIsStripped = function () {
+-    };
+-    return class_1;
+-}());
++    }
++    _assertIsStripped() {
++    }
++};
+ // No error, but definition is wrong. 
+ exports.default = mix(DisposableMixin);
+-var Monitor = /** @class */ (function (_super) {
+-    __extends(Monitor, _super);
+-    function Monitor() {
+-        return _super !== null && _super.apply(this, arguments) || this;
++class Monitor extends mix(DisposableMixin) {
++    _onDispose() {
      }
- }
+-    Monitor.prototype._onDispose = function () {
+-    };
+-    return Monitor;
+-}(mix(DisposableMixin)));
++}
+ exports.Monitor = Monitor;
+ //// [another.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var DisposableMixin = /** @class */ (function () {
+-    function class_1() {
+-    }
+-    class_1.prototype._onDispose = function () {
++const DisposableMixin = class {
++    _onDispose() {
+         this._assertIsStripped();
+-    };
+-    class_1.prototype._assertIsStripped = function () {
+-    };
+-    return class_1;
+-}());
+-var default_1 = /** @class */ (function (_super) {
+-    __extends(default_1, _super);
+-    function default_1() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    default_1.prototype._onDispose = function () {
+-    };
+-    return default_1;
+-}(mix(DisposableMixin)));
++    }
++    _assertIsStripped() {
++    }
++};
++class default_1 extends mix(DisposableMixin) {
++    _onDispose() {
++    }
++}
  exports.default = default_1;
 +
 +
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.js.diff
index cb0e618742..564179d6fe 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitMultipleComputedNamesSameDomain.js.diff
@@ -7,14 +7,17 @@
 -var _a, _b;
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Test = void 0;
- class Test {
--    constructor() {
+-var Test = /** @class */ (function () {
+-    function Test() {
 -        this[_a] = 10;
 -        this[_b] = 10;
 -    }
+-    return Test;
+-}());
++class Test {
 +    [x] = 10;
 +    [y] = 10;
- }
++}
  exports.Test = Test;
 -_a = x, _b = y;
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js
index 988539dae1..275355af82 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts.ts] ////
 
 //// [declarationEmit_nameConflicts_1.ts]
-module f { export class c { } }
+namespace f { export class c { } }
 export = f;
 
 //// [declarationEmit_nameConflicts_0.ts]
 import im = require('./declarationEmit_nameConflicts_1');
-export module M {
+export namespace M {
     export function f() { }
     export class C { }
-    export module N {
+    export namespace N {
         export function g() { };
         export interface I { }
     }
@@ -20,10 +20,10 @@ export module M {
     export import d = im;
 }
 
-export module M.P {
+export namespace M.P {
     export function f() { }
     export class C { }
-    export module N {
+    export namespace N {
         export function g() { };
         export interface I { }
     }
@@ -35,16 +35,16 @@ export module M.P {
     export var d = M.d; // emitted incorrectly as typeof im
 }
 
-export module M.Q {
+export namespace M.Q {
     export function f() { }
     export class C { }
-    export module N {
+    export namespace N {
         export function g() { };
         export interface I { }
     }
     export interface b extends M.b { } // ok
     export interface I extends M.c.I { } // ok
-    export module c {
+    export namespace c {
         export interface I extends M.c.I { } // ok
     }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js.diff
index aa67cad6dd..97c22f25b9 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.js.diff
@@ -1,6 +1,20 @@
 --- old.declarationEmitNameConflicts.js
 +++ new.declarationEmitNameConflicts.js
-@@= skipped -61, +61 lines =@@
+@@= skipped -52, +52 lines =@@
+ "use strict";
+ var f;
+ (function (f) {
+-    var c = /** @class */ (function () {
+-        function c() {
+-        }
+-        return c;
+-    }());
++    class c {
++    }
+     f.c = c;
+ })(f || (f = {}));
+ module.exports = f;
+@@= skipped -12, +9 lines =@@
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.M = void 0;
@@ -9,7 +23,21 @@
  var M;
  (function (M) {
      function f() { }
-@@= skipped -20, +20 lines =@@
+     M.f = f;
+-    var C = /** @class */ (function () {
+-        function C() {
+-        }
+-        return C;
+-    }());
++    class C {
++    }
+     M.C = C;
+-    var N;
++    let N;
+     (function (N) {
+         function g() { }
+         N.g = g;
+@@= skipped -23, +20 lines =@@
      M.d = im;
  })(M || (exports.M = M = {}));
  (function (M) {
@@ -18,7 +46,20 @@
      (function (P) {
          function f() { }
          P.f = f;
-@@= skipped -22, +22 lines =@@
+-        var C = /** @class */ (function () {
+-            function C() {
+-            }
+-            return C;
+-        }());
++        class C {
++        }
+         P.C = C;
+-        var N;
++        let N;
+         (function (N) {
+             function g() { }
+             N.g = g;
+@@= skipped -25, +22 lines =@@
      })(P = M.P || (M.P = {}));
  })(M || (exports.M = M = {}));
  (function (M) {
@@ -27,7 +68,20 @@
      (function (Q) {
          function f() { }
          Q.f = f;
-@@= skipped -52, +52 lines =@@
+-        var C = /** @class */ (function () {
+-            function C() {
+-            }
+-            return C;
+-        }());
++        class C {
++        }
+         Q.C = C;
+-        var N;
++        let N;
+         (function (N) {
+             function g() { }
+             N.g = g;
+@@= skipped -55, +52 lines =@@
      var a: typeof M.f;
      var b: typeof M.C;
      var c: typeof M.N;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols
index 6bf133c0d9..e9319c4503 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.symbols
@@ -4,20 +4,20 @@
 import im = require('./declarationEmit_nameConflicts_1');
 >im : Symbol(im, Decl(declarationEmit_nameConflicts_0.ts, 0, 0))
 
-export module M {
+export namespace M {
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
 
     export function f() { }
->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 1, 17))
+>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 1, 20))
 
     export class C { }
 >C : Symbol(C, Decl(declarationEmit_nameConflicts_0.ts, 2, 27))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declarationEmit_nameConflicts_0.ts, 3, 22))
 
         export function g() { };
->g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 4, 21))
+>g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 4, 24))
 
         export interface I { }
 >I : Symbol(I, Decl(declarationEmit_nameConflicts_0.ts, 5, 32))
@@ -26,7 +26,7 @@ export module M {
     export import a = M.f;
 >a : Symbol(a, Decl(declarationEmit_nameConflicts_0.ts, 7, 5))
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 1, 17))
+>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 1, 20))
 
     export import b = M.C;
 >b : Symbol(b, Decl(declarationEmit_nameConflicts_0.ts, 9, 26))
@@ -42,21 +42,21 @@ export module M {
 >im : Symbol(im, Decl(declarationEmit_nameConflicts_0.ts, 0, 0))
 }
 
-export module M.P {
+export namespace M.P {
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
->P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 16))
+>P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 19))
 
     export function f() { }
->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 19))
+>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 22))
 
     export class C { }
 >C : Symbol(C, Decl(declarationEmit_nameConflicts_0.ts, 16, 27))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declarationEmit_nameConflicts_0.ts, 17, 22))
 
         export function g() { };
->g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 18, 21))
+>g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 18, 24))
 
         export interface I { }
 >I : Symbol(I, Decl(declarationEmit_nameConflicts_0.ts, 19, 32))
@@ -64,8 +64,8 @@ export module M.P {
     export import im = M.P.f;
 >im : Symbol(im, Decl(declarationEmit_nameConflicts_0.ts, 21, 5))
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
->P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 16))
->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 19))
+>P : Symbol(P, Decl(declarationEmit_nameConflicts_0.ts, 15, 19))
+>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 15, 22))
 
     export var a = M.a; // emitted incorrectly as typeof f
 >a : Symbol(a, Decl(declarationEmit_nameConflicts_0.ts, 23, 14))
@@ -87,11 +87,11 @@ export module M.P {
 
     export var g = M.c.g; // ok
 >g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 26, 14))
->M.c.g : Symbol(c.g, Decl(declarationEmit_nameConflicts_0.ts, 4, 21))
+>M.c.g : Symbol(c.g, Decl(declarationEmit_nameConflicts_0.ts, 4, 24))
 >M.c : Symbol(c, Decl(declarationEmit_nameConflicts_0.ts, 10, 26))
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
 >c : Symbol(c, Decl(declarationEmit_nameConflicts_0.ts, 10, 26))
->g : Symbol(c.g, Decl(declarationEmit_nameConflicts_0.ts, 4, 21))
+>g : Symbol(c.g, Decl(declarationEmit_nameConflicts_0.ts, 4, 24))
 
     export var d = M.d; // emitted incorrectly as typeof im
 >d : Symbol(d, Decl(declarationEmit_nameConflicts_0.ts, 27, 14))
@@ -100,21 +100,21 @@ export module M.P {
 >d : Symbol(d, Decl(declarationEmit_nameConflicts_0.ts, 11, 24))
 }
 
-export module M.Q {
+export namespace M.Q {
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
->Q : Symbol(Q, Decl(declarationEmit_nameConflicts_0.ts, 30, 16))
+>Q : Symbol(Q, Decl(declarationEmit_nameConflicts_0.ts, 30, 19))
 
     export function f() { }
->f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 30, 19))
+>f : Symbol(f, Decl(declarationEmit_nameConflicts_0.ts, 30, 22))
 
     export class C { }
 >C : Symbol(C, Decl(declarationEmit_nameConflicts_0.ts, 31, 27))
 
-    export module N {
+    export namespace N {
 >N : Symbol(N, Decl(declarationEmit_nameConflicts_0.ts, 32, 22))
 
         export function g() { };
->g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 33, 21))
+>g : Symbol(g, Decl(declarationEmit_nameConflicts_0.ts, 33, 24))
 
         export interface I { }
 >I : Symbol(I, Decl(declarationEmit_nameConflicts_0.ts, 34, 32))
@@ -133,11 +133,11 @@ export module M.Q {
 >c : Symbol(c, Decl(declarationEmit_nameConflicts_0.ts, 10, 26))
 >I : Symbol(M.c.I, Decl(declarationEmit_nameConflicts_0.ts, 5, 32))
 
-    export module c {
+    export namespace c {
 >c : Symbol(c, Decl(declarationEmit_nameConflicts_0.ts, 38, 40))
 
         export interface I extends M.c.I { } // ok
->I : Symbol(I, Decl(declarationEmit_nameConflicts_0.ts, 39, 21))
+>I : Symbol(I, Decl(declarationEmit_nameConflicts_0.ts, 39, 24))
 >M.c.I : Symbol(M.c.I, Decl(declarationEmit_nameConflicts_0.ts, 5, 32))
 >M.c : Symbol(c, Decl(declarationEmit_nameConflicts_0.ts, 10, 26))
 >M : Symbol(M, Decl(declarationEmit_nameConflicts_0.ts, 0, 57), Decl(declarationEmit_nameConflicts_0.ts, 13, 1), Decl(declarationEmit_nameConflicts_0.ts, 28, 1))
@@ -146,9 +146,9 @@ export module M.Q {
     }
 }
 === declarationEmit_nameConflicts_1.ts ===
-module f { export class c { } }
+namespace f { export class c { } }
 >f : Symbol(f, Decl(declarationEmit_nameConflicts_1.ts, 0, 0))
->c : Symbol(c, Decl(declarationEmit_nameConflicts_1.ts, 0, 10))
+>c : Symbol(c, Decl(declarationEmit_nameConflicts_1.ts, 0, 13))
 
 export = f;
 >f : Symbol(f, Decl(declarationEmit_nameConflicts_1.ts, 0, 0))
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types
index 12fe57cd35..6674113df5 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types
@@ -4,7 +4,7 @@
 import im = require('./declarationEmit_nameConflicts_1');
 >im : typeof im
 
-export module M {
+export namespace M {
 >M : typeof M
 
     export function f() { }
@@ -13,7 +13,7 @@ export module M {
     export class C { }
 >C : C
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export function g() { };
@@ -41,7 +41,7 @@ export module M {
 >im : typeof d
 }
 
-export module M.P {
+export namespace M.P {
 >M : typeof M
 >P : typeof P
 
@@ -51,7 +51,7 @@ export module M.P {
     export class C { }
 >C : C
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export function g() { };
@@ -98,7 +98,7 @@ export module M.P {
 >d : typeof import("declarationEmit_nameConflicts_1")
 }
 
-export module M.Q {
+export namespace M.Q {
 >M : typeof M
 >Q : typeof Q
 
@@ -108,7 +108,7 @@ export module M.Q {
     export class C { }
 >C : C
 
-    export module N {
+    export namespace N {
 >N : typeof N
 
         export function g() { };
@@ -124,7 +124,7 @@ export module M.Q {
 >M : typeof M
 >c : typeof M.N
 
-    export module c {
+    export namespace c {
         export interface I extends M.c.I { } // ok
 >M.c : typeof M.N
 >M : typeof M
@@ -132,7 +132,7 @@ export module M.Q {
     }
 }
 === declarationEmit_nameConflicts_1.ts ===
-module f { export class c { } }
+namespace f { export class c { } }
 >f : typeof f
 >c : c
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff
index ac75876f19..7781ef20ef 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts.types.diff
@@ -13,4 +13,4 @@
 +>d : typeof import("declarationEmit_nameConflicts_1")
  }
 
- export module M.Q {
\ No newline at end of file
+ export namespace M.Q {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js
index b8e74b6031..a70e000a0b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js
@@ -1,16 +1,16 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts2.ts] ////
 
 //// [declarationEmitNameConflicts2.ts]
-module X.Y.base {
+namespace X.Y.base {
     export function f() { }
     export class C { }
-    export module M {
+    export namespace M {
         export var v;
     }
     export enum E { }
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
     export var f = X.Y.base.f; // Should be base.f
     export var C = X.Y.base.C; // Should be base.C
     export var M = X.Y.base.M; // Should be base.M
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js.diff
index 4d68409c3e..af3dc25933 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.js.diff
@@ -12,7 +12,23 @@
          (function (base) {
              function f() { }
              base.f = f;
-@@= skipped -19, +19 lines =@@
+-            var C = /** @class */ (function () {
+-                function C() {
+-                }
+-                return C;
+-            }());
++            class C {
++            }
+             base.C = C;
+-            var M;
++            let M;
+             (function (M) {
+             })(M = base.M || (base.M = {}));
+-            var E;
++            let E;
+             (function (E) {
+             })(E = base.E || (base.E = {}));
+         })(base = Y.base || (Y.base = {}));
      })(Y = X.Y || (X.Y = {}));
  })(X || (X = {}));
  (function (X) {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols
index 68def2e797..3d8e343402 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.symbols
@@ -1,18 +1,18 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts2.ts] ////
 
 === declarationEmitNameConflicts2.ts ===
-module X.Y.base {
+namespace X.Y.base {
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
 
     export function f() { }
->f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17))
+>f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 20))
 
     export class C { }
 >C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27))
 
-    export module M {
+    export namespace M {
 >M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22))
 
         export var v;
@@ -22,49 +22,49 @@ module X.Y.base {
 >E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5))
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->Z : Symbol(Z, Decl(declarationEmitNameConflicts2.ts, 9, 16))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>Z : Symbol(Z, Decl(declarationEmitNameConflicts2.ts, 9, 19))
 
     export var f = X.Y.base.f; // Should be base.f
 >f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 10, 14))
->X.Y.base.f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17))
->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
+>X.Y.base.f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 20))
+>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 17))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>f : Symbol(f, Decl(declarationEmitNameConflicts2.ts, 0, 20))
 
     export var C = X.Y.base.C; // Should be base.C
 >C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 11, 14))
 >X.Y.base.C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27))
->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
+>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
 >C : Symbol(C, Decl(declarationEmitNameConflicts2.ts, 1, 27))
 
     export var M = X.Y.base.M; // Should be base.M
 >M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 12, 14))
 >X.Y.base.M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22))
->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
+>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
 >M : Symbol(M, Decl(declarationEmitNameConflicts2.ts, 2, 22))
 
     export var E = X.Y.base.E; // Should be base.E
 >E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 13, 14))
 >X.Y.base.E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5))
->X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
->X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
+>X.Y.base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
+>X.Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
 >X : Symbol(X, Decl(declarationEmitNameConflicts2.ts, 0, 0), Decl(declarationEmitNameConflicts2.ts, 7, 1))
->Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 9), Decl(declarationEmitNameConflicts2.ts, 9, 9))
->base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 11), Decl(declarationEmitNameConflicts2.ts, 9, 11))
+>Y : Symbol(Y, Decl(declarationEmitNameConflicts2.ts, 0, 12), Decl(declarationEmitNameConflicts2.ts, 9, 12))
+>base : Symbol(base, Decl(declarationEmitNameConflicts2.ts, 0, 14), Decl(declarationEmitNameConflicts2.ts, 9, 14))
 >E : Symbol(E, Decl(declarationEmitNameConflicts2.ts, 5, 5))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types
index 6f2b0a6f14..f9fbbb532a 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts2.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts2.ts] ////
 
 === declarationEmitNameConflicts2.ts ===
-module X.Y.base {
+namespace X.Y.base {
 >X : typeof X
 >Y : typeof Y
 >base : typeof base
@@ -12,7 +12,7 @@ module X.Y.base {
     export class C { }
 >C : C
 
-    export module M {
+    export namespace M {
 >M : typeof M
 
         export var v;
@@ -22,7 +22,7 @@ module X.Y.base {
 >E : E
 }
 
-module X.Y.base.Z {
+namespace X.Y.base.Z {
 >X : typeof X
 >Y : typeof Y
 >base : typeof base
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js
index d434ff7371..8c37058aac 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js
@@ -1,20 +1,20 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts3.ts] ////
 
 //// [declarationEmitNameConflicts3.ts]
-module M {
+namespace M {
     export interface D { }
-    export module D {
+    export namespace D {
         export function f() { }
     }
-    export module C {
+    export namespace C {
         export function f() { }
     }
-    export module E {
+    export namespace E {
         export function f() { }
     }
 }
 
-module M.P {
+namespace M.P {
     export class C {
         static f() { }
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js.diff
index 85cffdb5db..4faec1349d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.js.diff
@@ -1,11 +1,71 @@
 --- old.declarationEmitNameConflicts3.js
 +++ new.declarationEmitNameConflicts3.js
-@@= skipped -47, +47 lines =@@
+@@= skipped -28, +28 lines =@@
+ }
+
+ //// [declarationEmitNameConflicts3.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ var M;
+ (function (M) {
+-    var D;
++    let D;
+     (function (D) {
+         function f() { }
+         D.f = f;
+     })(D = M.D || (M.D = {}));
+-    var C;
++    let C;
+     (function (C) {
+         function f() { }
+         C.f = f;
+     })(C = M.C || (M.C = {}));
+-    var E;
++    let E;
+     (function (E) {
+         function f() { }
+         E.f = f;
      })(E = M.E || (M.E = {}));
  })(M || (M = {}));
  (function (M) {
 -    var P;
 +    let P;
      (function (P) {
-         class C {
-             static f() { }
\ No newline at end of file
+-        var C = /** @class */ (function () {
+-            function C() {
+-            }
+-            C.f = function () { };
+-            return C;
+-        }());
++        class C {
++            static f() { }
++        }
+         P.C = C;
+-        var E = /** @class */ (function (_super) {
+-            __extends(E, _super);
+-            function E() {
+-                return _super !== null && _super.apply(this, arguments) || this;
+-            }
+-            return E;
+-        }(C));
++        class E extends C {
++        }
+         P.E = E;
+-        var D;
++        let D;
+         (function (D) {
+             D[D["f"] = 0] = "f";
+         })(D = P.D || (P.D = {}));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.symbols
index 7ac2416b91..58c3bdf40b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.symbols
@@ -1,45 +1,45 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts3.ts] ////
 
 === declarationEmitNameConflicts3.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
 
     export interface D { }
->D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 10), Decl(declarationEmitNameConflicts3.ts, 1, 26))
+>D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 13), Decl(declarationEmitNameConflicts3.ts, 1, 26))
 
-    export module D {
->D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 10), Decl(declarationEmitNameConflicts3.ts, 1, 26))
+    export namespace D {
+>D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 13), Decl(declarationEmitNameConflicts3.ts, 1, 26))
 
         export function f() { }
->f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 2, 21))
+>f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 2, 24))
     }
-    export module C {
+    export namespace C {
 >C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 4, 5))
 
         export function f() { }
->f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 5, 21))
+>f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 5, 24))
     }
-    export module E {
+    export namespace E {
 >E : Symbol(E, Decl(declarationEmitNameConflicts3.ts, 7, 5))
 
         export function f() { }
->f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 8, 21))
+>f : Symbol(f, Decl(declarationEmitNameConflicts3.ts, 8, 24))
     }
 }
 
-module M.P {
+namespace M.P {
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
->P : Symbol(P, Decl(declarationEmitNameConflicts3.ts, 13, 9))
+>P : Symbol(P, Decl(declarationEmitNameConflicts3.ts, 13, 12))
 
     export class C {
->C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 13, 12))
+>C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 13, 15))
 
         static f() { }
 >f : Symbol(C.f, Decl(declarationEmitNameConflicts3.ts, 14, 20))
     }
     export class E extends C { }
 >E : Symbol(E, Decl(declarationEmitNameConflicts3.ts, 16, 5))
->C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 13, 12))
+>C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 13, 15))
 
     export enum D {
 >D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 17, 32))
@@ -50,29 +50,29 @@ module M.P {
     export var v: M.D; // ok
 >v : Symbol(v, Decl(declarationEmitNameConflicts3.ts, 21, 14))
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
->D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 10), Decl(declarationEmitNameConflicts3.ts, 1, 26))
+>D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 13), Decl(declarationEmitNameConflicts3.ts, 1, 26))
 
     export var w = M.D.f; // error, should be typeof M.D.f
 >w : Symbol(w, Decl(declarationEmitNameConflicts3.ts, 22, 14))
->M.D.f : Symbol(M.D.f, Decl(declarationEmitNameConflicts3.ts, 2, 21))
->M.D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 10), Decl(declarationEmitNameConflicts3.ts, 1, 26))
+>M.D.f : Symbol(M.D.f, Decl(declarationEmitNameConflicts3.ts, 2, 24))
+>M.D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 13), Decl(declarationEmitNameConflicts3.ts, 1, 26))
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
->D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 10), Decl(declarationEmitNameConflicts3.ts, 1, 26))
->f : Symbol(M.D.f, Decl(declarationEmitNameConflicts3.ts, 2, 21))
+>D : Symbol(D, Decl(declarationEmitNameConflicts3.ts, 0, 13), Decl(declarationEmitNameConflicts3.ts, 1, 26))
+>f : Symbol(M.D.f, Decl(declarationEmitNameConflicts3.ts, 2, 24))
 
     export var x = M.C.f; // error, should be typeof M.C.f
 >x : Symbol(x, Decl(declarationEmitNameConflicts3.ts, 23, 14), Decl(declarationEmitNameConflicts3.ts, 24, 14))
->M.C.f : Symbol(C.f, Decl(declarationEmitNameConflicts3.ts, 5, 21))
+>M.C.f : Symbol(C.f, Decl(declarationEmitNameConflicts3.ts, 5, 24))
 >M.C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 4, 5))
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
 >C : Symbol(C, Decl(declarationEmitNameConflicts3.ts, 4, 5))
->f : Symbol(C.f, Decl(declarationEmitNameConflicts3.ts, 5, 21))
+>f : Symbol(C.f, Decl(declarationEmitNameConflicts3.ts, 5, 24))
 
     export var x = M.E.f; // error, should be typeof M.E.f
 >x : Symbol(x, Decl(declarationEmitNameConflicts3.ts, 23, 14), Decl(declarationEmitNameConflicts3.ts, 24, 14))
->M.E.f : Symbol(E.f, Decl(declarationEmitNameConflicts3.ts, 8, 21))
+>M.E.f : Symbol(E.f, Decl(declarationEmitNameConflicts3.ts, 8, 24))
 >M.E : Symbol(E, Decl(declarationEmitNameConflicts3.ts, 7, 5))
 >M : Symbol(M, Decl(declarationEmitNameConflicts3.ts, 0, 0), Decl(declarationEmitNameConflicts3.ts, 11, 1))
 >E : Symbol(E, Decl(declarationEmitNameConflicts3.ts, 7, 5))
->f : Symbol(E.f, Decl(declarationEmitNameConflicts3.ts, 8, 21))
+>f : Symbol(E.f, Decl(declarationEmitNameConflicts3.ts, 8, 24))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types
index 61d3e90633..b10e9f6ac4 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflicts3.types
@@ -1,23 +1,23 @@
 //// [tests/cases/compiler/declarationEmitNameConflicts3.ts] ////
 
 === declarationEmitNameConflicts3.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     export interface D { }
-    export module D {
+    export namespace D {
 >D : typeof D
 
         export function f() { }
 >f : () => void
     }
-    export module C {
+    export namespace C {
 >C : typeof C
 
         export function f() { }
 >f : () => void
     }
-    export module E {
+    export namespace E {
 >E : typeof E
 
         export function f() { }
@@ -25,7 +25,7 @@ module M {
     }
 }
 
-module M.P {
+namespace M.P {
 >M : typeof M
 >P : typeof P
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.js b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.js
index 608174fbd1..7f187bf3ab 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.js
@@ -1,10 +1,10 @@
 //// [tests/cases/compiler/declarationEmitNameConflictsWithAlias.ts] ////
 
 //// [declarationEmitNameConflictsWithAlias.ts]
-export module C { export interface I { } }
+export namespace C { export interface I { } }
 export import v = C;
-export module M {
-    export module C { export interface I { } }
+export namespace M {
+    export namespace C { export interface I { } }
     export var w: v.I; // Gets emitted as C.I, which is the wrong interface
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.symbols b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.symbols
index bdaa554b96..b5b9ff078c 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.symbols
@@ -1,23 +1,23 @@
 //// [tests/cases/compiler/declarationEmitNameConflictsWithAlias.ts] ////
 
 === declarationEmitNameConflictsWithAlias.ts ===
-export module C { export interface I { } }
+export namespace C { export interface I { } }
 >C : Symbol(C, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 0))
->I : Symbol(I, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 17))
+>I : Symbol(I, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 20))
 
 export import v = C;
->v : Symbol(v, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 42))
+>v : Symbol(v, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 45))
 >C : Symbol(C, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 0))
 
-export module M {
+export namespace M {
 >M : Symbol(M, Decl(declarationEmitNameConflictsWithAlias.ts, 1, 20))
 
-    export module C { export interface I { } }
->C : Symbol(C, Decl(declarationEmitNameConflictsWithAlias.ts, 2, 17))
->I : Symbol(I, Decl(declarationEmitNameConflictsWithAlias.ts, 3, 21))
+    export namespace C { export interface I { } }
+>C : Symbol(C, Decl(declarationEmitNameConflictsWithAlias.ts, 2, 20))
+>I : Symbol(I, Decl(declarationEmitNameConflictsWithAlias.ts, 3, 24))
 
     export var w: v.I; // Gets emitted as C.I, which is the wrong interface
 >w : Symbol(w, Decl(declarationEmitNameConflictsWithAlias.ts, 4, 14))
->v : Symbol(v, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 42))
->I : Symbol(v.I, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 17))
+>v : Symbol(v, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 45))
+>I : Symbol(v.I, Decl(declarationEmitNameConflictsWithAlias.ts, 0, 20))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types
index 2b6e0693a8..7fbcd6aab0 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declarationEmitNameConflictsWithAlias.ts] ////
 
 === declarationEmitNameConflictsWithAlias.ts ===
-export module C { export interface I { } }
+export namespace C { export interface I { } }
 export import v = C;
 >v : any
 >C : any
 
-export module M {
+export namespace M {
 >M : typeof M
 
-    export module C { export interface I { } }
+    export namespace C { export interface I { } }
     export var w: v.I; // Gets emitted as C.I, which is the wrong interface
 >w : v.I
 >v : any
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types.diff
index 565be848fb..97376a1b10 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNameConflictsWithAlias.types.diff
@@ -1,11 +1,11 @@
 --- old.declarationEmitNameConflictsWithAlias.types
 +++ new.declarationEmitNameConflictsWithAlias.types
 @@= skipped -3, +3 lines =@@
- export module C { export interface I { } }
+ export namespace C { export interface I { } }
  export import v = C;
  >v : any
 ->C : error
 +>C : any
 
- export module M {
+ export namespace M {
  >M : typeof M
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNestedGenerics.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNestedGenerics.js.diff
index 464bae7869..578ab6f98d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitNestedGenerics.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNestedGenerics.js.diff
@@ -1,6 +1,18 @@
 --- old.declarationEmitNestedGenerics.js
 +++ new.declarationEmitNestedGenerics.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -12, +12 lines =@@
+
+ //// [declarationEmitNestedGenerics.js]
+ function f(p) {
+-    var g = null;
++    let g = null;
+     return g;
+ }
+ function g(x) {
+-    var y = null;
++    let y = null;
+     return y;
+ }
 
 
  //// [declarationEmitNestedGenerics.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitNonExportedBindingPattern.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitNonExportedBindingPattern.js.diff
new file mode 100644
index 0000000000..1a6fc736f9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitNonExportedBindingPattern.js.diff
@@ -0,0 +1,18 @@
+--- old.declarationEmitNonExportedBindingPattern.js
++++ new.declarationEmitNonExportedBindingPattern.js
+@@= skipped -27, +27 lines =@@
+ function getFoo() {
+     return { foo: { test: 42 } };
+ }
+-var foo = getFoo().foo;
+-var renamed = getFoo().foo;
++const { foo } = getFoo();
++const { foo: renamed } = getFoo();
+ function getNested() {
+     return { a: { b: { c: 'd' } } };
+ }
+-var c = getNested().a.b.c;
++const { a: { b: { c } } } = getNested();
+
+
+ //// [test.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitOfTypeofAliasedExport.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitOfTypeofAliasedExport.js.diff
index dcd3d7f9df..42066c7613 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitOfTypeofAliasedExport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitOfTypeofAliasedExport.js.diff
@@ -1,6 +1,17 @@
 --- old.declarationEmitOfTypeofAliasedExport.js
 +++ new.declarationEmitOfTypeofAliasedExport.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -12, +12 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.D = void 0;
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
++class C {
++}
+ exports.D = C;
  //// [b.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitOptionalMethod.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitOptionalMethod.js.diff
index be0420e6f4..62adb3cad8 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitOptionalMethod.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitOptionalMethod.js.diff
@@ -1,6 +1,14 @@
 --- old.declarationEmitOptionalMethod.js
 +++ new.declarationEmitOptionalMethod.js
-@@= skipped -19, +19 lines =@@
+@@= skipped -12, +12 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = function (opts) { return ({}); };
++const Foo = (opts) => ({});
+ exports.Foo = Foo;
+
+
  //// [declarationEmitOptionalMethod.d.ts]
  export declare const Foo: (opts: {
      a?(): void;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitOverloadedPrivateInference.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitOverloadedPrivateInference.js.diff
index 4f5feec929..e0d10d5821 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitOverloadedPrivateInference.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitOverloadedPrivateInference.js.diff
@@ -1,21 +1,27 @@
 --- old.declarationEmitOverloadedPrivateInference.js
 +++ new.declarationEmitOverloadedPrivateInference.js
-@@= skipped -33, +33 lines =@@
+@@= skipped -32, +32 lines =@@
+ function oneArg(input) {
      return null;
  }
- class Wrapper {
--    constructor() {
+-var Wrapper = /** @class */ (function () {
+-    function Wrapper() {
 -        this.Proxies = {
 -            Failure: this.proxy(noArgs, true),
 -            Success: this.proxy(oneArg),
 -        };
 -    }
-     proxy(fn) {
+-    Wrapper.prototype.proxy = function (fn) {
++class Wrapper {
++    proxy(fn) {
          return null;
-     }
++    }
 +    Proxies = {
 +        Failure: this.proxy(noArgs, true),
 +        Success: this.proxy(oneArg),
-+    };
- }
+     };
+-    return Wrapper;
+-}());
++}
  exports.Wrapper = Wrapper;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitParameterProperty.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitParameterProperty.js.diff
index fcd6301fc8..8d80dd48ef 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitParameterProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitParameterProperty.js.diff
@@ -1,10 +1,18 @@
 --- old.declarationEmitParameterProperty.js
 +++ new.declarationEmitParameterProperty.js
-@@= skipped -11, +11 lines =@@
+@@= skipped -10, +10 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Foo = void 0;
- class Foo {
+-var Foo = /** @class */ (function () {
+-    function Foo(bar) {
++class Foo {
 +    bar;
-     constructor(bar) {
++    constructor(bar) {
          this.bar = bar;
-     }
\ No newline at end of file
+     }
+-    return Foo;
+-}());
++}
+ exports.Foo = Foo;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPartialReuseComputedProperty.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPartialReuseComputedProperty.types.diff
index e1de1c5826..546cf49e73 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPartialReuseComputedProperty.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPartialReuseComputedProperty.types.diff
@@ -6,8 +6,10 @@
  export const o = () => null! as { [n]: string, foo: string, [poz]: number, [neg]: number }
 ->o : () => { [n]: string; foo: string; [poz]: number; [neg]: number; }
 ->() => null! as { [n]: string, foo: string, [poz]: number, [neg]: number } : () => { [n]: string; foo: string; [poz]: number; [neg]: number; }
+->null! as { [n]: string, foo: string, [poz]: number, [neg]: number } : { foo: string; A: string; 1: number; [-1]: number; }
 +>o : () => { A: string; foo: string; 1: number; [-1]: number; }
 +>() => null! as { [n]: string, foo: string, [poz]: number, [neg]: number } : () => { A: string; foo: string; 1: number; [-1]: number; }
- >null! as { [n]: string, foo: string, [poz]: number, [neg]: number } : { A: string; foo: string; 1: number; [-1]: number; }
++>null! as { [n]: string, foo: string, [poz]: number, [neg]: number } : { A: string; foo: string; 1: number; [-1]: number; }
  >null! : never
- >[n] : string
\ No newline at end of file
+ >[n] : string
+ >n : "A"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPreserveReferencedImports.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPreserveReferencedImports.js.diff
index 83b706aaeb..d5aeff23e7 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPreserveReferencedImports.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPreserveReferencedImports.js.diff
@@ -1,6 +1,13 @@
 --- old.declarationEmitPreserveReferencedImports.js
 +++ new.declarationEmitPreserveReferencedImports.js
-@@= skipped -26, +26 lines =@@
+@@= skipped -20, +20 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.o = void 0;
+-var o = function (o) { return function () { return null; }; };
++const o = (o) => () => null;
+ exports.o = o;
+ //// [main.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.f = void 0;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateAsync.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateAsync.js.diff
index eee3c30796..f927b16875 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateAsync.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateAsync.js.diff
@@ -12,16 +12,51 @@
 -        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
 -        step((generator = generator.apply(thisArg, _arguments || [])).next());
 -    });
+-};
+-var __generator = (this && this.__generator) || function (thisArg, body) {
+-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+-    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+-    function verb(n) { return function (v) { return step([n, v]); }; }
+-    function step(op) {
+-        if (f) throw new TypeError("Generator is already executing.");
+-        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+-            if (y = 0, t) op = [op[0] & 2, t.value];
+-            switch (op[0]) {
+-                case 0: case 1: t = op; break;
+-                case 4: _.label++; return { value: op[1], done: false };
+-                case 5: _.label++; y = op[1]; op = [0]; continue;
+-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+-                default:
+-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+-                    if (t[2]) _.ops.pop();
+-                    _.trys.pop(); continue;
+-            }
+-            op = body.call(thisArg, _);
+-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+-    }
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Foo = void 0;
- class Foo {
--    baz() {
--        return __awaiter(this, void 0, void 0, function* () {
--            return;
--        });
+-var Foo = /** @class */ (function () {
+-    function Foo() {
++class Foo {
 +    async baz() {
 +        return;
      }
- }
- exports.Foo = Foo;
\ No newline at end of file
+-    Foo.prototype.baz = function () {
+-        return __awaiter(this, void 0, void 0, function () {
+-            return __generator(this, function (_a) {
+-                return [2 /*return*/];
+-            });
+-        });
+-    };
+-    return Foo;
+-}());
++}
+ exports.Foo = Foo;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateNameCausesError.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateNameCausesError.js.diff
index 52d5dbe616..e757896dfc 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateNameCausesError.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateNameCausesError.js.diff
@@ -1,16 +1,40 @@
 --- old.declarationEmitPrivateNameCausesError.js
 +++ new.declarationEmitPrivateNameCausesError.js
-@@= skipped -16, +16 lines =@@
- const IGNORE_EXTRA_VARIABLES = Symbol(); //Notice how this is unexported
+@@= skipped -11, +11 lines =@@
+
+ //// [file.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ignoreExtraVariables = ignoreExtraVariables;
+-var IGNORE_EXTRA_VARIABLES = Symbol(); //Notice how this is unexported
++const IGNORE_EXTRA_VARIABLES = Symbol(); //Notice how this is unexported
  //This is exported
  function ignoreExtraVariables(ctor) {
 -    var _a, _b;
--    return _b = class extends ctor {
--            constructor() {
--                super(...arguments);
--                this[_a] = true; //An unexported constant is used
+-    return _b = /** @class */ (function (_super) {
+-            __extends(class_1, _super);
+-            function class_1() {
+-                var _this = _super !== null && _super.apply(this, arguments) || this;
+-                _this[_a] = true; //An unexported constant is used
+-                return _this;
 -            }
--        },
+-            return class_1;
+-        }(ctor)),
 -        _a = IGNORE_EXTRA_VARIABLES,
 -        _b;
 +    return class extends ctor {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivatePromiseLikeInterface.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivatePromiseLikeInterface.js.diff
index f7a0a40a93..28c1c13828 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivatePromiseLikeInterface.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivatePromiseLikeInterface.js.diff
@@ -1,38 +1,48 @@
 --- old.declarationEmitPrivatePromiseLikeInterface.js
 +++ new.declarationEmitPrivatePromiseLikeInterface.js
-@@= skipped -36, +36 lines =@@
+@@= skipped -35, +35 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.HttpClient = void 0;
- class HttpClient {
--    constructor() {
--        this.request = () => {
+-var HttpClient = /** @class */ (function () {
+-    function HttpClient() {
+-        this.request = function () {
 -            return '';
 -        };
 -    }
+-    return HttpClient;
+-}());
++class HttpClient {
 +    request = () => {
 +        return '';
 +    };
- }
++}
  exports.HttpClient = HttpClient;
  //// [Api.js]
-@@= skipped -12, +10 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Api = void 0;
- class Api {
+-var Api = /** @class */ (function () {
+-    function Api(http) {
+-        var _this = this;
++class Api {
 +    http;
-     constructor(http) {
++    constructor(http) {
          this.http = http;
--        this.abc1 = () => this.http.request();
--        this.abc2 = () => this.http.request();
--        this.abc3 = () => this.http.request();
+-        this.abc1 = function () { return _this.http.request(); };
+-        this.abc2 = function () { return _this.http.request(); };
+-        this.abc3 = function () { return _this.http.request(); };
      }
+-    return Api;
+-}());
 +    abc1 = () => this.http.request();
 +    abc2 = () => this.http.request();
 +    abc3 = () => this.http.request();
- }
++}
  exports.Api = Api;
 
-@@= skipped -20, +21 lines =@@
+
+@@= skipped -36, +32 lines =@@
      error: E;
  }
  export declare class HttpClient {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateReadonlyLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateReadonlyLiterals.js.diff
index 9b324bfd28..de69f46de6 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateReadonlyLiterals.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateReadonlyLiterals.js.diff
@@ -4,17 +4,15 @@
 
 
  //// [declarationEmitPrivateReadonlyLiterals.js]
--let Foo = (() => {
--    class Foo {
--        constructor() {
--            this.B = "b";
--            this.D = 42;
--        }
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-        this.B = "b";
+-        this.D = 42;
 -    }
 -    Foo.A = "a";
 -    Foo.C = 42;
 -    return Foo;
--})();
+-}());
 +class Foo {
 +    static A = "a";
 +    B = "b";
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.js.diff
index 68223f05a7..d6a663cc65 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationEmit2.js.diff
@@ -8,31 +8,54 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.C = void 0;
 -var a_1 = require("./a");
-+const a_1 = require("./a");
- class C {
--    constructor() {
+-var C = /** @class */ (function () {
+-    function C() {
 -        this[_a] = 1;
 -    }
+-    return C;
+-}());
++const a_1 = require("./a");
++class C {
 +    [a_1.x] = 1;
- }
++}
  exports.C = C;
 -_a = a_1.x;
  //// [c.js]
  "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
 -var _a;
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.D = void 0;
 -var a_1 = require("./a");
 -var b_1 = require("./b");
+-var D = /** @class */ (function (_super) {
+-    __extends(D, _super);
+-    function D() {
+-        var _this = _super !== null && _super.apply(this, arguments) || this;
+-        _this[_a] = 12;
+-        return _this;
+-    }
+-    return D;
+-}(b_1.C));
 +const a_1 = require("./a");
 +const b_1 = require("./b");
- class D extends b_1.C {
--    constructor() {
--        super(...arguments);
--        this[_a] = 12;
--    }
++class D extends b_1.C {
 +    [a_1.x] = 12;
- }
++}
  exports.D = D;
 -_a = a_1.x;
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js.diff
index bd53485158..855a82c752 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js.diff
@@ -1,10 +1,18 @@
 --- old.declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js
 +++ new.declarationEmitPrivateSymbolCausesVarDeclarationToBeEmitted.js
-@@= skipped -13, +13 lines =@@
+@@= skipped -11, +11 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
  exports.User = void 0;
- const _data = Symbol('data');
- class User {
+-var _data = Symbol('data');
+-var User = /** @class */ (function () {
+-    function User() {
+-    }
+-    return User;
+-}());
++const _data = Symbol('data');
++class User {
 +    [_data];
- }
++}
  exports.User = User;
- ;
\ No newline at end of file
+ ;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitPropertyNumericStringKey.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitPropertyNumericStringKey.js.diff
new file mode 100644
index 0000000000..ed2beeeb3f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitPropertyNumericStringKey.js.diff
@@ -0,0 +1,24 @@
+--- old.declarationEmitPropertyNumericStringKey.js
++++ new.declarationEmitPropertyNumericStringKey.js
+@@= skipped -15, +15 lines =@@
+
+ //// [declarationEmitPropertyNumericStringKey.js]
+ // https://github.com/microsoft/TypeScript/issues/55292
+-var _a, _b, _c;
+-var STATUS = (_a = {},
+-    _a["404"] = "not found",
+-    _a);
+-var hundredStr = "100";
+-var obj = (_b = {}, _b[hundredStr] = "foo", _b);
+-var hundredNum = 100;
+-var obj2 = (_c = {}, _c[hundredNum] = "bar", _c);
++const STATUS = {
++    ["404"]: "not found",
++};
++const hundredStr = "100";
++const obj = { [hundredStr]: "foo" };
++const hundredNum = 100;
++const obj2 = { [hundredNum]: "bar" };
+
+
+ //// [declarationEmitPropertyNumericStringKey.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitProtectedMembers.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitProtectedMembers.js.diff
index 53806d70f5..4492a3580f 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitProtectedMembers.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitProtectedMembers.js.diff
@@ -1,34 +1,129 @@
 --- old.declarationEmitProtectedMembers.js
 +++ new.declarationEmitProtectedMembers.js
-@@= skipped -53, +53 lines =@@
+@@= skipped -51, +51 lines =@@
+ }
+
  //// [declarationEmitProtectedMembers.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  // Class with protected members
- class C1 {
+-var C1 = /** @class */ (function () {
+-    function C1() {
+-    }
+-    C1.prototype.f = function () {
++class C1 {
 +    x;
-     f() {
++    f() {
          return this.x;
-     }
-     set accessor(a) { }
-     get accessor() { return 0; }
+-    };
+-    Object.defineProperty(C1.prototype, "accessor", {
+-        get: function () { return 0; },
+-        set: function (a) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    C1.sf = function () {
++    }
++    set accessor(a) { }
++    get accessor() { return 0; }
 +    static sx;
-     static sf() {
++    static sf() {
          return this.sx;
-     }
-@@= skipped -22, +24 lines =@@
- }
+-    };
+-    Object.defineProperty(C1, "staticSetter", {
+-        set: function (a) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(C1, "staticGetter", {
+-        get: function () { return 0; },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return C1;
+-}());
++    }
++    static set staticSetter(a) { }
++    static get staticGetter() { return 0; }
++}
+ // Derived class overriding protected members
+-var C2 = /** @class */ (function (_super) {
+-    __extends(C2, _super);
+-    function C2() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    C2.prototype.f = function () {
+-        return _super.prototype.f.call(this) + this.x;
+-    };
+-    C2.sf = function () {
+-        return _super.sf.call(this) + this.sx;
+-    };
+-    return C2;
+-}(C1));
++class C2 extends C1 {
++    f() {
++        return super.f() + this.x;
++    }
++    static sf() {
++        return super.sf() + this.sx;
++    }
++}
  // Derived class making protected members public
- class C3 extends C2 {
+-var C3 = /** @class */ (function (_super) {
+-    __extends(C3, _super);
+-    function C3() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    C3.prototype.f = function () {
+-        return _super.prototype.f.call(this);
+-    };
+-    C3.sf = function () {
+-        return _super.sf.call(this);
+-    };
+-    Object.defineProperty(C3, "staticGetter", {
+-        get: function () { return 1; },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return C3;
+-}(C2));
++class C3 extends C2 {
 +    x;
 +    static sx;
-     f() {
-         return super.f();
-     }
-@@= skipped -10, +12 lines =@@
- }
++    f() {
++        return super.f();
++    }
++    static sf() {
++        return super.sf();
++    }
++    static get staticGetter() { return 1; }
++}
  // Protected properties in constructors
- class C4 {
+-var C4 = /** @class */ (function () {
+-    function C4(a, b) {
++class C4 {
 +    a;
 +    b;
-     constructor(a, b) {
++    constructor(a, b) {
          this.a = a;
-         this.b = b;
\ No newline at end of file
+         this.b = b;
+     }
+-    return C4;
+-}());
++}
+
+
+ //// [declarationEmitProtectedMembers.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitReadonlyComputedProperty.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitReadonlyComputedProperty.js.diff
index 57152bbabf..21ac13eb9b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitReadonlyComputedProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitReadonlyComputedProperty.js.diff
@@ -1,6 +1,20 @@
 --- old.declarationEmitReadonlyComputedProperty.js
 +++ new.declarationEmitReadonlyComputedProperty.js
-@@= skipped -45, +45 lines =@@
+@@= skipped -26, +26 lines =@@
+ exports.createInstance = createInstance;
+ exports.SYMBOL = Symbol();
+ function createInstance() {
+-    var _a;
+-    return _a = {},
+-        _a[exports.SYMBOL] = '',
+-        _a;
++    return {
++        [exports.SYMBOL]: ''
++    };
+ }
+ //// [index.js]
+ "use strict";
+@@= skipped -20, +19 lines =@@
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.spread = void 0;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitRecursiveConditionalAliasPreserved.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitRecursiveConditionalAliasPreserved.js.diff
new file mode 100644
index 0000000000..fc35291af8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitRecursiveConditionalAliasPreserved.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitRecursiveConditionalAliasPreserved.js
++++ new.declarationEmitRecursiveConditionalAliasPreserved.js
+@@= skipped -106, +106 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.power = void 0;
+-var power = function (num, powerOf) { return (Math.pow(num, powerOf)); };
++const power = (num, powerOf) => (Math.pow(num, powerOf));
+ exports.power = power;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.js.diff
index 69daf85b04..ba706c147d 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitRetainedAnnotationRetainsImportInOutput.js.diff
@@ -5,6 +5,8 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.run = void 0;
 -var E = require("whatever");
+-var run = function (i) { return E.something(i); };
 +const E = require("whatever");
- const run = (i) => E.something(i);
++const run = (i) => E.something(i);
  exports.run = run;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitRetainsJsdocyComments.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitRetainsJsdocyComments.js.diff
index 4f488b5332..bee3cd1ce6 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitRetainsJsdocyComments.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitRetainsJsdocyComments.js.diff
@@ -13,9 +13,40 @@
  /**
   * comment1
   * @param p
-@@= skipped -29, +33 lines =@@
-     }
- }
+  */
+-var foo = function (p) {
++const foo = (p) => {
+     return {
+         /**
+          * comment2
+          * @param s
+          */
+-        bar: function (s) { },
++        bar: (s) => { },
+         /**
+          * comment3
+          * @param s
+          */
+-        bar2: function (s) { },
++        bar2(s) { },
+     };
+ };
+ exports.foo = foo;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
++class Foo {
+     /**
+      * comment4
+      * @param s
+      */
+-    Foo.prototype.bar = function (s) {
+-    };
+-    return Foo;
+-}());
++    bar(s) {
++    }
++}
  exports.Foo = Foo;
 -/**
 -* comment5
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency.js.diff
index 3cf7d94e90..e2abbc1471 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency.js.diff
@@ -1,6 +1,13 @@
 --- old.declarationEmitScopeConsistency.js
 +++ new.declarationEmitScopeConsistency.js
-@@= skipped -19, +19 lines =@@
+@@= skipped -13, +13 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.f = void 0;
+-var f = function (x) { return x; };
++const f = (x) => x;
+ exports.f = f;
+ //// [b.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.g = void 0;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency3.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency3.js.diff
new file mode 100644
index 0000000000..f120f50c4c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitScopeConsistency3.js.diff
@@ -0,0 +1,15 @@
+--- old.declarationEmitScopeConsistency3.js
++++ new.declarationEmitScopeConsistency3.js
+@@= skipped -10, +10 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.g = void 0;
+-var g = function (v) {
+-    var f = function (v) { return function () { return null; }; };
+-    var r = f(null);
++const g = (v) => {
++    const f = (v) => () => null;
++    const r = f(null);
+     return r;
+ };
+ exports.g = g;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitShadowing.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitShadowing.js.diff
index ceb4e07236..603cf44134 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitShadowing.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitShadowing.js.diff
@@ -1,21 +1,26 @@
 --- old.declarationEmitShadowing.js
 +++ new.declarationEmitShadowing.js
-@@= skipped -19, +19 lines =@@
+@@= skipped -18, +18 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
  exports.A = void 0;
  exports.needsRenameForShadowing = needsRenameForShadowing;
- class A {
--    constructor() {
--        this.ShadowedButDoesNotRequireRenaming = () => {
+-var A = /** @class */ (function () {
+-    function A() {
+-        this.ShadowedButDoesNotRequireRenaming = function () {
 -            return null;
 -        };
 -    }
+-    return A;
+-}());
++class A {
 +    ShadowedButDoesNotRequireRenaming = () => {
 +        return null;
 +    };
- }
++}
  exports.A = A;
  function needsRenameForShadowing() {
-@@= skipped -17, +15 lines =@@
+     return function O(t, t2) {
+@@= skipped -19, +16 lines =@@
  export declare class A {
      readonly ShadowedButDoesNotRequireRenaming: () => T_1;
  }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitShadowingInferNotRenamed.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitShadowingInferNotRenamed.js.diff
index 897aca737b..90899460ec 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitShadowingInferNotRenamed.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitShadowingInferNotRenamed.js.diff
@@ -1,6 +1,14 @@
 --- old.declarationEmitShadowingInferNotRenamed.js
 +++ new.declarationEmitShadowingInferNotRenamed.js
-@@= skipped -33, +33 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createClient = void 0;
+-var createClient = function (clientDef) {
++const createClient = (clientDef) => {
+     return null;
+ };
+ exports.createClient = createClient;
 
 
  //// [declarationEmitShadowingInferNotRenamed.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.js.diff
index 9caf44fdeb..24c5f403ff 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.js.diff
@@ -1,6 +1,58 @@
 --- old.declarationEmitSimpleComputedNames1.js
 +++ new.declarationEmitSimpleComputedNames1.js
-@@= skipped -70, +70 lines =@@
+@@= skipped -34, +34 lines =@@
+
+ //// [declarationEmitSimpleComputedNames1.js]
+ "use strict";
+-var _a;
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.instanceLookup = exports.staticLookup = exports.Holder = exports.conatainer = exports.fieldName = void 0;
+ exports.fieldName = Math.random() > 0.5 ? "f1" : "f2";
+-exports.conatainer = (_a = {},
+-    _a[exports.fieldName] = function () {
++exports.conatainer = {
++    [exports.fieldName]() {
+         return "result";
+-    },
+-    _a);
+-var classFieldName = Math.random() > 0.5 ? "g1" : "g2";
+-var otherField = classFieldName === "g1" ? "g2" : "g1";
+-var staticField = Math.random() > 0.5 ? "s1" : "s2";
+-var Holder = /** @class */ (function () {
+-    function Holder() {
+     }
+-    Holder.prototype[classFieldName] = function () {
++};
++const classFieldName = Math.random() > 0.5 ? "g1" : "g2";
++const otherField = classFieldName === "g1" ? "g2" : "g1";
++const staticField = Math.random() > 0.5 ? "s1" : "s2";
++class Holder {
++    [classFieldName]() {
+         return "value";
+-    };
+-    Holder.prototype[otherField] = function () {
++    }
++    [otherField]() {
+         return 42;
+-    };
+-    Holder[staticField] = function () {
++    }
++    static [staticField]() {
+         return { static: true };
+-    };
+-    Holder[staticField] = function () {
++    }
++    static [staticField]() {
+         return { static: "sometimes" };
+-    };
+-    return Holder;
+-}());
++    }
++}
+ exports.Holder = Holder;
+ /**
+  * Could be `"prototype"`, so all static string indexers include the instance type
+@@= skipped -40, +36 lines =@@
  //// [declarationEmitSimpleComputedNames1.d.ts]
  export declare const fieldName: string;
  export declare const conatainer: {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.symbols.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.symbols.diff
new file mode 100644
index 0000000000..93b2bd8bfa
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitSimpleComputedNames1.symbols.diff
@@ -0,0 +1,29 @@
+--- old.declarationEmitSimpleComputedNames1.symbols
++++ new.declarationEmitSimpleComputedNames1.symbols
+@@= skipped -3, +3 lines =@@
+ export const fieldName = Math.random() > 0.5 ? "f1" : "f2";
+ >fieldName : Symbol(fieldName, Decl(declarationEmitSimpleComputedNames1.ts, 0, 12))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+ export const conatainer = {
+@@= skipped -17, +17 lines =@@
+ const classFieldName = Math.random() > 0.5 ? "g1" : "g2";
+ >classFieldName : Symbol(classFieldName, Decl(declarationEmitSimpleComputedNames1.ts, 7, 5))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+ const otherField = classFieldName === "g1" ? "g2" : "g1";
+@@= skipped -10, +10 lines =@@
+ const staticField = Math.random() > 0.5 ? "s1" : "s2";
+ >staticField : Symbol(staticField, Decl(declarationEmitSimpleComputedNames1.ts, 9, 5))
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+ export class Holder {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.js.diff
index 10be9dc844..216e7933e5 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.js.diff
@@ -1,11 +1,79 @@
 --- old.declarationEmitStringEnumUsedInNonlocalSpread.js
 +++ new.declarationEmitStringEnumUsedInNonlocalSpread.js
-@@= skipped -58, +58 lines =@@
+@@= skipped -34, +34 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.A = void 0;
+-var A = /** @class */ (function () {
+-    function A() {
++class A {
++    getA() {
++        return {
++            ["123123" /* TestEnum.Test1 */]: '123',
++            ["12312312312" /* TestEnum.Test2 */]: '123',
++        };
+     }
+-    A.prototype.getA = function () {
+-        var _a;
+-        return _a = {},
+-            _a["123123" /* TestEnum.Test1 */] = '123',
+-            _a["12312312312" /* TestEnum.Test2 */] = '123',
+-            _a;
+-    };
+-    return A;
+-}());
++}
+ exports.A = A;
+ //// [index.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ var __assign = (this && this.__assign) || function () {
+     __assign = Object.assign || function(t) {
+         for (var s, i = 1, n = arguments.length; i < n; i++) {
+@@= skipped -43, +24 lines =@@
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.B = void 0;
 -var class_1 = require("./class");
+-var B = /** @class */ (function (_super) {
+-    __extends(B, _super);
+-    function B() {
+-        return _super !== null && _super.apply(this, arguments) || this;
 +const class_1 = require("./class");
- class B extends class_1.A {
-     getA() {
-         return __assign(__assign({}, super.getA()), { a: '123' });
\ No newline at end of file
++class B extends class_1.A {
++    getA() {
++        return __assign(__assign({}, super.getA()), { a: '123' });
+     }
+-    B.prototype.getA = function () {
+-        return __assign(__assign({}, _super.prototype.getA.call(this)), { a: '123' });
+-    };
+-    return B;
+-}(class_1.A));
++}
+ exports.B = B;
+
+
+@@= skipped -30, +25 lines =@@
+ import { A } from './class';
+ export declare class B extends A {
+     getA(): {
+-        a: string;
+         "123123": string;
+         "12312312312": string;
++        a: string;
+     };
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.types.diff
new file mode 100644
index 0000000000..9dd79e586b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitStringEnumUsedInNonlocalSpread.types.diff
@@ -0,0 +1,15 @@
+--- old.declarationEmitStringEnumUsedInNonlocalSpread.types
++++ new.declarationEmitStringEnumUsedInNonlocalSpread.types
+@@= skipped -61, +61 lines =@@
+ >A : A
+
+     getA() { // TS4053 error
+->getA : () => { a: string; "123123": string; "12312312312": string; }
++>getA : () => { "123123": string; "12312312312": string; a: string; }
+
+         return {
+->{            ...super.getA(),            a: '123',        } : { a: string; "123123": string; "12312312312": string; }
++>{            ...super.getA(),            a: '123',        } : { "123123": string; "12312312312": string; a: string; }
+
+             ...super.getA(),
+ >super.getA() : import("class").ITest
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTopLevelNodeFromCrossFile.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTopLevelNodeFromCrossFile.js.diff
index 3ade3ca35d..4f4d273b10 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitTopLevelNodeFromCrossFile.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTopLevelNodeFromCrossFile.js.diff
@@ -1,6 +1,12 @@
 --- old.declarationEmitTopLevelNodeFromCrossFile.js
 +++ new.declarationEmitTopLevelNodeFromCrossFile.js
-@@= skipped -24, +24 lines =@@
+@@= skipped -19, +19 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fn = void 0;
+-exports.fn = { o: function (a) { } };
++exports.fn = { o: (a) => { } };
+ //// [b.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.x = exports.m = void 0;
@@ -9,7 +15,7 @@
  exports.m = {
      /**
      * leading doc for prop
-@@= skipped -13, +13 lines =@@
+@@= skipped -18, +18 lines =@@
  //// [a.d.ts]
  export type X = string;
  export declare const fn: {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTupleRestSignatureLeadingVariadic.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTupleRestSignatureLeadingVariadic.js.diff
new file mode 100644
index 0000000000..5f3c0ca551
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTupleRestSignatureLeadingVariadic.js.diff
@@ -0,0 +1,16 @@
+--- old.declarationEmitTupleRestSignatureLeadingVariadic.js
++++ new.declarationEmitTupleRestSignatureLeadingVariadic.js
+@@= skipped -3, +3 lines =@@
+ const f = (...args: [...TFirstArgs, TLastArg]): void => {};
+
+ //// [declarationEmitTupleRestSignatureLeadingVariadic.js]
+-var f = function () {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
+-    }
+-};
++const f = (...args) => { };
+
+
+ //// [declarationEmitTupleRestSignatureLeadingVariadic.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters1.js.diff
new file mode 100644
index 0000000000..c76a0d2a3b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters1.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitTypeAliasWithTypeParameters1.js
++++ new.declarationEmitTypeAliasWithTypeParameters1.js
+@@= skipped -8, +8 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.y = void 0;
+-var y = function (x) { return 1; };
++const y = (x) => 1;
+ exports.y = y;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters2.js.diff
new file mode 100644
index 0000000000..177c426876
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeAliasWithTypeParameters2.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationEmitTypeAliasWithTypeParameters2.js
++++ new.declarationEmitTypeAliasWithTypeParameters2.js
+@@= skipped -9, +9 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.y = void 0;
+-var y = function (x) { return 1; };
++const y = (x) => 1;
+ exports.y = y;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameInOuterScope.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameInOuterScope.js.diff
new file mode 100644
index 0000000000..2501ffa840
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameInOuterScope.js.diff
@@ -0,0 +1,23 @@
+--- old.declarationEmitTypeParameterNameInOuterScope.js
++++ new.declarationEmitTypeParameterNameInOuterScope.js
+@@= skipped -16, +16 lines =@@
+
+
+ //// [declarationEmitTypeParameterNameInOuterScope.js]
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    return A;
+-}());
+-var a = function (x) { return x; };
++class A {
++}
++var a = (x) => x;
+ function a2(x) { return x; }
+-var a3 = function (x) { return new A(); };
++var a3 = (x) => new A();
+ function a4(x) { return new A(); }
+-var b = function (x) { return x; };
++var b = (x) => x;
+ function b2(x) { return x; }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameReusedInOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameReusedInOverloads.js.diff
index dddc06a9c2..92b28001b4 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameReusedInOverloads.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameReusedInOverloads.js.diff
@@ -1,17 +1,55 @@
 --- old.declarationEmitTypeParameterNameReusedInOverloads.js
 +++ new.declarationEmitTypeParameterNameReusedInOverloads.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -18, +18 lines =@@
+
+ //// [declarationEmitTypeParameterNameReusedInOverloads.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Derived2 = exports.Derived = exports.Base = void 0;
- class Base {
+-var Base = /** @class */ (function () {
+-    function Base() {
+-    }
+-    return Base;
+-}());
++class Base {
 +    foo;
- }
++}
  exports.Base = Base;
- class Derived extends Base {
+-var Derived = /** @class */ (function (_super) {
+-    __extends(Derived, _super);
+-    function Derived() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return Derived;
+-}(Base));
++class Derived extends Base {
 +    bar;
- }
++}
  exports.Derived = Derived;
- class Derived2 extends Derived {
+-var Derived2 = /** @class */ (function (_super) {
+-    __extends(Derived2, _super);
+-    function Derived2() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return Derived2;
+-}(Derived));
++class Derived2 extends Derived {
 +    baz;
- }
++}
  exports.Derived2 = Derived2;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameShadowedInternally.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameShadowedInternally.js.diff
new file mode 100644
index 0000000000..33050dde48
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeParameterNameShadowedInternally.js.diff
@@ -0,0 +1,13 @@
+--- old.declarationEmitTypeParameterNameShadowedInternally.js
++++ new.declarationEmitTypeParameterNameShadowedInternally.js
+@@= skipped -10, +10 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.foo = void 0;
+-var foo = function (x) {
+-    var inner = function (y) { return [x, y]; };
++const foo = (x) => {
++    const inner = (y) => [x, y];
+     return inner;
+ };
+ exports.foo = foo;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofDefaultExport.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofDefaultExport.js.diff
index dd076f5639..9b527ec068 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofDefaultExport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofDefaultExport.js.diff
@@ -1,6 +1,18 @@
 --- old.declarationEmitTypeofDefaultExport.js
 +++ new.declarationEmitTypeofDefaultExport.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -10, +10 lines =@@
+ //// [a.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
++class C {
++}
+ exports.default = C;
+ ;
  //// [b.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofThisInClass.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofThisInClass.js.diff
index 9da3a505c5..6f6dd7ebd1 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofThisInClass.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitTypeofThisInClass.js.diff
@@ -5,8 +5,15 @@
 
  //// [declarationEmitTypeofThisInClass.js]
 -"use strict";
- class Foo {
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
 +    foo;
 +    bar; //Public property 'bar' of exported class has or is using private name 'this'.(4031)
- }
++}
+
 
+ //// [declarationEmitTypeofThisInClass.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules1.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules1.types.diff
index 8d4033c770..edd5e8efcc 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules1.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules1.types.diff
@@ -1,6 +1,20 @@
 --- old.declarationEmitUsingAlternativeContainingModules1.types
 +++ new.declarationEmitUsingAlternativeContainingModules1.types
-@@= skipped -349, +349 lines =@@
+@@= skipped -300, +300 lines =@@
+ === node_modules/@tanstack/vue-query/build/modern/index.d.ts ===
+ export { UseQueryReturnType, useQuery } from './useQuery-CPqkvEsh.js';
+ >UseQueryReturnType : any
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
+
+ === src/index.mts ===
+ import { useQuery } from '@tanstack/vue-query'
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
+
+ const baseUrl = 'https://api.publicapis.org/'
+ >baseUrl : "https://api.publicapis.org/"
+@@= skipped -49, +49 lines =@@
  >fetch(baseUrl + 'entries')      .then((res) => res.json()) : Promise
  >fetch(baseUrl + 'entries')      .then : (onfulfilled?: ((value: Response) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise
  >fetch(baseUrl + 'entries') : Promise
@@ -9,7 +23,16 @@
  >baseUrl + 'entries' : string
  >baseUrl : "https://api.publicapis.org/"
  >'entries' : "entries"
-@@= skipped -83, +83 lines =@@
+@@= skipped -62, +62 lines =@@
+
+   return useQuery({
+ >useQuery({    queryKey: entryKeys.list(),    queryFn: testApi.getEntries,    select: (data) => data.slice(0, 10)  }) : import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").UseQueryReturnType
+ >{    queryKey: entryKeys.list(),    queryFn: testApi.getEntries,    select: (data) => data.slice(0, 10)  } : { queryKey: readonly ["entries", "list"]; queryFn: () => Promise; select: (data: IEntry[]) => IEntry[]; }
+
+     queryKey: entryKeys.list(),
+@@= skipped -21, +21 lines =@@
  >(data) => data.slice(0, 10) : (data: IEntry[]) => IEntry[]
  >data : IEntry[]
  >data.slice(0, 10) : IEntry[]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules2.types.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules2.types.diff
index 5aa7357847..3c49924e2b 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules2.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitUsingAlternativeContainingModules2.types.diff
@@ -1,6 +1,22 @@
 --- old.declarationEmitUsingAlternativeContainingModules2.types
 +++ new.declarationEmitUsingAlternativeContainingModules2.types
-@@= skipped -353, +353 lines =@@
+@@= skipped -303, +303 lines =@@
+ export { b as UseQueryReturnType, u as useQuery } from './useQuery-CPqkvEsh.js';
+ >b : any
+ >UseQueryReturnType : any
+->u : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
++>u : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
+
+ === src/index.mts ===
+ import { useQuery } from '@tanstack/vue-query'
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
+
+ const baseUrl = 'https://api.publicapis.org/'
+ >baseUrl : "https://api.publicapis.org/"
+@@= skipped -50, +50 lines =@@
  >fetch(baseUrl + 'entries')      .then((res) => res.json()) : Promise
  >fetch(baseUrl + 'entries')      .then : (onfulfilled?: ((value: Response) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise
  >fetch(baseUrl + 'entries') : Promise
@@ -9,7 +25,16 @@
  >baseUrl + 'entries' : string
  >baseUrl : "https://api.publicapis.org/"
  >'entries' : "entries"
-@@= skipped -83, +83 lines =@@
+@@= skipped -62, +62 lines =@@
+
+   return useQuery({
+ >useQuery({    queryKey: entryKeys.list(),    queryFn: testApi.getEntries,    select: (data) => data.slice(0, 10)  }) : import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
+->useQuery : (options: { enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
++>useQuery : (options: { retry?: (number | boolean | ((failureCount: number, error: TError) => boolean)) | undefined; queryFn?: ((context: { queryKey: TQueryKey; }) => TQueryFnData | Promise) | undefined; queryKey?: TQueryKey | undefined; initialData?: TQueryFnData | undefined; initialDataUpdatedAt?: number | (() => number | undefined) | undefined; enabled?: boolean | undefined; refetchInterval?: number | undefined; select?: ((data: TQueryFnData) => TData) | undefined; } & { initialData?: undefined; }) => import("node_modules/@tanstack/vue-query/build/modern/useQuery-CPqkvEsh").b
+ >{    queryKey: entryKeys.list(),    queryFn: testApi.getEntries,    select: (data) => data.slice(0, 10)  } : { queryKey: readonly ["entries", "list"]; queryFn: () => Promise; select: (data: IEntry[]) => IEntry[]; }
+
+     queryKey: entryKeys.list(),
+@@= skipped -21, +21 lines =@@
  >(data) => data.slice(0, 10) : (data: IEntry[]) => IEntry[]
  >data : IEntry[]
  >data.slice(0, 10) : IEntry[]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName.js.diff
index c78674f754..8a5aabb246 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName.js.diff
@@ -1,11 +1,20 @@
 --- old.declarationEmitWithDefaultAsComputedName.js
 +++ new.declarationEmitWithDefaultAsComputedName.js
-@@= skipped -26, +26 lines =@@
+@@= skipped -24, +24 lines =@@
+ });
+ //// [main.js]
  "use strict";
+-var _a;
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.obj = void 0;
 -var other_1 = require("./other");
+-exports.obj = (_a = {},
+-    _a[other_1.default.name] = 1,
+-    _a);
 +const other_1 = require("./other");
- exports.obj = {
-     [other_1.default.name]: 1,
- };
\ No newline at end of file
++exports.obj = {
++    [other_1.default.name]: 1,
++};
+
+
+ //// [other.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName2.js.diff
index 150c2f5a62..14c4e5ef0e 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitWithDefaultAsComputedName2.js.diff
@@ -1,11 +1,20 @@
 --- old.declarationEmitWithDefaultAsComputedName2.js
 +++ new.declarationEmitWithDefaultAsComputedName2.js
-@@= skipped -26, +26 lines =@@
+@@= skipped -24, +24 lines =@@
+ });
+ //// [main.js]
  "use strict";
+-var _a;
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.obj = void 0;
 -var other2 = require("./other");
+-exports.obj = (_a = {},
+-    _a[other2.default.name] = 1,
+-    _a);
 +const other2 = require("./other");
- exports.obj = {
-     [other2.default.name]: 1
- };
\ No newline at end of file
++exports.obj = {
++    [other2.default.name]: 1
++};
+
+
+ //// [other.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitWithInvalidPackageJsonTypings.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitWithInvalidPackageJsonTypings.js.diff
new file mode 100644
index 0000000000..4848c55300
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitWithInvalidPackageJsonTypings.js.diff
@@ -0,0 +1,16 @@
+--- old.declarationEmitWithInvalidPackageJsonTypings.js
++++ new.declarationEmitWithInvalidPackageJsonTypings.js
+@@= skipped -30, +30 lines =@@
+ exports.useCsvParser = void 0;
+ exports.useRef = useRef;
+ function useRef(current) {
+-    return { current: current };
++    return { current };
+ }
+-var useCsvParser = function () {
+-    var parserRef = useRef(null);
++const useCsvParser = () => {
++    const parserRef = useRef(null);
+     return parserRef;
+ };
+ exports.useCsvParser = useCsvParser;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileNoCrashOnExtraExportModifier.js.diff b/testdata/baselines/reference/submodule/compiler/declarationFileNoCrashOnExtraExportModifier.js.diff
index 55a9cb6e9e..356ac85d88 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationFileNoCrashOnExtraExportModifier.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationFileNoCrashOnExtraExportModifier.js.diff
@@ -1,9 +1,15 @@
 --- old.declarationFileNoCrashOnExtraExportModifier.js
 +++ new.declarationFileNoCrashOnExtraExportModifier.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+ //// [input.js]
  "use strict";
  exports.Sub = void 0;
- class Sub {
+-var Sub = /** @class */ (function () {
+-    function Sub() {
+-    }
+-    return Sub;
+-}());
++class Sub {
 +    instance;
- }
++}
  module.exports = exports;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.js.diff b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.js.diff
new file mode 100644
index 0000000000..f79ce10091
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationFileOverwriteError.js.diff
@@ -0,0 +1,13 @@
+--- old.declarationFileOverwriteError.js
++++ new.declarationFileOverwriteError.js
+@@= skipped -8, +8 lines =@@
+ }
+
+ //// [a.js]
+-var d = /** @class */ (function () {
+-    function d() {
+-    }
+-    return d;
+-}());
++class d {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationFunctionTypeNonlocalShouldNotBeAnError.js.diff b/testdata/baselines/reference/submodule/compiler/declarationFunctionTypeNonlocalShouldNotBeAnError.js.diff
new file mode 100644
index 0000000000..e29f660aa8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationFunctionTypeNonlocalShouldNotBeAnError.js.diff
@@ -0,0 +1,10 @@
+--- old.declarationFunctionTypeNonlocalShouldNotBeAnError.js
++++ new.declarationFunctionTypeNonlocalShouldNotBeAnError.js
+@@= skipped -14, +14 lines =@@
+ (function (foo) {
+     function bar() { }
+     foo.obj = {
+-        bar: bar
++        bar
+     };
+ })(foo || (foo = {}));
diff --git a/testdata/baselines/reference/submodule/compiler/declarationImportTypeAliasInferredAndEmittable.js.diff b/testdata/baselines/reference/submodule/compiler/declarationImportTypeAliasInferredAndEmittable.js.diff
index 35e05ba873..dbbe9d9b70 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationImportTypeAliasInferredAndEmittable.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationImportTypeAliasInferredAndEmittable.js.diff
@@ -1,22 +1,36 @@
 --- old.declarationImportTypeAliasInferredAndEmittable.js
 +++ new.declarationImportTypeAliasInferredAndEmittable.js
-@@= skipped -22, +22 lines =@@
+@@= skipped -21, +21 lines =@@
+
  //// [foo.js]
  "use strict";
- class Conn {
--    constructor() {
+-var Conn = /** @class */ (function () {
+-    function Conn() {
 -        this.item = 3;
 -    }
+-    Conn.prototype.method = function () { };
+-    return Conn;
+-}());
++class Conn {
 +    constructor() { }
 +    item = 3;
-     method() { }
- }
++    method() { }
++}
  module.exports = Conn;
-@@= skipped -11, +10 lines =@@
+ //// [usage.js]
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Wrap = void 0;
- class Wrap {
+-var Wrap = /** @class */ (function () {
+-    function Wrap(c) {
+-        if (c === void 0) { c = x; }
++class Wrap {
 +    connItem;
-     constructor(c = x) {
++    constructor(c = x) {
          this.connItem = c.item;
-     }
\ No newline at end of file
+     }
+-    return Wrap;
+-}());
++}
+ exports.Wrap = Wrap;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.js b/testdata/baselines/reference/submodule/compiler/declarationMaps.js
index 1129dcac17..483346be73 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationMaps.ts] ////
 
 //// [declarationMaps.ts]
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map b/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map
index 34b32281d3..764cdd3330 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map
@@ -1,3 +1,3 @@
 //// [declarationMaps.d.ts.map]
-{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC,CAAC;IACP,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQU8sRUFBRSxDQUFDLENBQUM7SUFDUCxVQUFpQixhQUFhO1FBQzFCLENBQUMsR0FBRyxLQUFBLEVBQUUsR0FBRyxLQUFBLEVBQUUsSUFBSSxLQUFBLEdBQUcsSUFBSSxDQUFDO0tBQzFCO0lBQ0QsVUFBaUIsYUFBYTtRQUMxQixHQUFHLEVBQUUsQ0FBQyxHQUFHLEVBQUUsYUFBYSxLQUFLLGFBQWEsQ0FBQztRQUMzQyxNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxLQUFLLElBQUksQ0FBQztLQUNsQztDQUVKO0FBRUQsUUFBQSxJQUFJLEVBQUUsRUFBRTtJQUNKLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUNyQixLQUFLLEVBQUUsRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUN4QixLQUFLLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztDQUM3QixDQUFDO0FBRUYsU0FBUyxFQUFFLENBQUMifQ==,bW9kdWxlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
+{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAU,EAAE,CAAC,CAAC;IACV,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQVUsRUFBRSxDQUFDLENBQUM7SUFDVixVQUFpQixhQUFhO1FBQzFCLENBQUMsR0FBRyxLQUFBLEVBQUUsR0FBRyxLQUFBLEVBQUUsSUFBSSxLQUFBLEdBQUcsSUFBSSxDQUFDO0tBQzFCO0lBQ0QsVUFBaUIsYUFBYTtRQUMxQixHQUFHLEVBQUUsQ0FBQyxHQUFHLEVBQUUsYUFBYSxLQUFLLGFBQWEsQ0FBQztRQUMzQyxNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxLQUFLLElBQUksQ0FBQztLQUNsQztDQUVKO0FBRUQsUUFBQSxJQUFJLEVBQUUsRUFBRTtJQUNKLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUNyQixLQUFLLEVBQUUsRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUN4QixLQUFLLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztDQUM3QixDQUFDO0FBRUYsU0FBUyxFQUFFLENBQUMifQ==,bmFtZXNwYWNlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map.diff b/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map.diff
index 7269f76819..f355cf82c0 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.js.map.diff
@@ -2,7 +2,7 @@
 +++ new.declarationMaps.js.map
 @@= skipped -0, +0 lines =@@
  //// [declarationMaps.d.ts.map]
--{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACN,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
--//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQU8sRUFBRSxDQUFDO0lBQ04sVUFBaUIsYUFBYTtRQUMxQixDQUFDLEdBQUcsS0FBQSxFQUFFLEdBQUcsS0FBQSxFQUFFLElBQUksS0FBQSxHQUFHLElBQUksQ0FBQztLQUMxQjtJQUNELFVBQWlCLGFBQWE7UUFDMUIsR0FBRyxFQUFFLENBQUMsR0FBRyxFQUFFLGFBQWEsS0FBSyxhQUFhLENBQUM7UUFDM0MsTUFBTSxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sS0FBSyxJQUFJLENBQUM7S0FDbEM7Q0FFSjtBQUVELFFBQUEsSUFBSSxFQUFFLEVBQUU7SUFDSixJQUFJLEVBQUUsQ0FBQyxhQUFhLENBQUM7SUFDckIsS0FBSyxFQUFFLEVBQUUsQ0FBQyxhQUFhLENBQUM7SUFDeEIsS0FBSyxJQUFJLEVBQUUsQ0FBQyxhQUFhLENBQUM7Q0FDN0IsQ0FBQztBQUVGLFNBQVMsRUFBRSxDQUFDIn0=,bW9kdWxlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
-+{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC,CAAC;IACP,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQU8sRUFBRSxDQUFDLENBQUM7SUFDUCxVQUFpQixhQUFhO1FBQzFCLENBQUMsR0FBRyxLQUFBLEVBQUUsR0FBRyxLQUFBLEVBQUUsSUFBSSxLQUFBLEdBQUcsSUFBSSxDQUFDO0tBQzFCO0lBQ0QsVUFBaUIsYUFBYTtRQUMxQixHQUFHLEVBQUUsQ0FBQyxHQUFHLEVBQUUsYUFBYSxLQUFLLGFBQWEsQ0FBQztRQUMzQyxNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxLQUFLLElBQUksQ0FBQztLQUNsQztDQUVKO0FBRUQsUUFBQSxJQUFJLEVBQUUsRUFBRTtJQUNKLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUNyQixLQUFLLEVBQUUsRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUN4QixLQUFLLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztDQUM3QixDQUFDO0FBRUYsU0FBUyxFQUFFLENBQUMifQ==,bW9kdWxlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
\ No newline at end of file
+-{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAU,EAAE,CAAC;IACT,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
+-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQVUsRUFBRSxDQUFDO0lBQ1QsVUFBaUIsYUFBYTtRQUMxQixDQUFDLEdBQUcsS0FBQSxFQUFFLEdBQUcsS0FBQSxFQUFFLElBQUksS0FBQSxHQUFHLElBQUksQ0FBQztLQUMxQjtJQUNELFVBQWlCLGFBQWE7UUFDMUIsR0FBRyxFQUFFLENBQUMsR0FBRyxFQUFFLGFBQWEsS0FBSyxhQUFhLENBQUM7UUFDM0MsTUFBTSxFQUFFLENBQUMsSUFBSSxFQUFFLE1BQU0sS0FBSyxJQUFJLENBQUM7S0FDbEM7Q0FFSjtBQUVELFFBQUEsSUFBSSxFQUFFLEVBQUU7SUFDSixJQUFJLEVBQUUsQ0FBQyxhQUFhLENBQUM7SUFDckIsS0FBSyxFQUFFLEVBQUUsQ0FBQyxhQUFhLENBQUM7SUFDeEIsS0FBSyxJQUFJLEVBQUUsQ0FBQyxhQUFhLENBQUM7Q0FDN0IsQ0FBQztBQUVGLFNBQVMsRUFBRSxDQUFDIn0=,bmFtZXNwYWNlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
++{"version":3,"file":"declarationMaps.d.ts","sourceRoot":"","sources":["declarationMaps.ts"],"names":[],"mappings":"AAAA,kBAAU,EAAE,CAAC,CAAC;IACV,UAAiB,aAAa;QAC1B,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,IAAI,KAAA,GAAG,IAAI,CAAC;KAC1B;IACD,UAAiB,aAAa;QAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,aAAa,CAAC;QAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KAClC;CAEJ;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC;IACxB,KAAK,IAAI,EAAE,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,SAAS,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTIgew0KICAgIGludGVyZmFjZSBjb25uZWN0TW9kdWxlIHsNCiAgICAgICAgKHJlczogYW55LCByZXE6IGFueSwgbmV4dDogYW55KTogdm9pZDsNCiAgICB9DQogICAgaW50ZXJmYWNlIGNvbm5lY3RFeHBvcnQgew0KICAgICAgICB1c2U6IChtb2Q6IGNvbm5lY3RNb2R1bGUpID0+IGNvbm5lY3RFeHBvcnQ7DQogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsNCiAgICB9DQp9DQpkZWNsYXJlIHZhciBtMjogew0KICAgICgpOiBtMi5jb25uZWN0RXhwb3J0Ow0KICAgIHRlc3QxOiBtMi5jb25uZWN0TW9kdWxlOw0KICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7DQp9Ow0KZXhwb3J0ID0gbTI7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbk1hcHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25NYXBzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbk1hcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsa0JBQVUsRUFBRSxDQUFDLENBQUM7SUFDVixVQUFpQixhQUFhO1FBQzFCLENBQUMsR0FBRyxLQUFBLEVBQUUsR0FBRyxLQUFBLEVBQUUsSUFBSSxLQUFBLEdBQUcsSUFBSSxDQUFDO0tBQzFCO0lBQ0QsVUFBaUIsYUFBYTtRQUMxQixHQUFHLEVBQUUsQ0FBQyxHQUFHLEVBQUUsYUFBYSxLQUFLLGFBQWEsQ0FBQztRQUMzQyxNQUFNLEVBQUUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxLQUFLLElBQUksQ0FBQztLQUNsQztDQUVKO0FBRUQsUUFBQSxJQUFJLEVBQUUsRUFBRTtJQUNKLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUNyQixLQUFLLEVBQUUsRUFBRSxDQUFDLGFBQWEsQ0FBQztJQUN4QixLQUFLLElBQUksRUFBRSxDQUFDLGFBQWEsQ0FBQztDQUM3QixDQUFDO0FBRUYsU0FBUyxFQUFFLENBQUMifQ==,bmFtZXNwYWNlIG0yIHsKICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdE1vZHVsZSB7CiAgICAgICAgKHJlcywgcmVxLCBuZXh0KTogdm9pZDsKICAgIH0KICAgIGV4cG9ydCBpbnRlcmZhY2UgY29ubmVjdEV4cG9ydCB7CiAgICAgICAgdXNlOiAobW9kOiBjb25uZWN0TW9kdWxlKSA9PiBjb25uZWN0RXhwb3J0OwogICAgICAgIGxpc3RlbjogKHBvcnQ6IG51bWJlcikgPT4gdm9pZDsKICAgIH0KCn0KCnZhciBtMjogewogICAgKCk6IG0yLmNvbm5lY3RFeHBvcnQ7CiAgICB0ZXN0MTogbTIuY29ubmVjdE1vZHVsZTsKICAgIHRlc3QyKCk6IG0yLmNvbm5lY3RNb2R1bGU7Cn07CgpleHBvcnQgPSBtMjs=
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt
index 99cef5ecbe..b30a3b68e0 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt
@@ -16,15 +16,15 @@ sourceFile:declarationMaps.ts
 5 >                     ^
 6 >                      ^^^^^^^^->
 1 >
-2 >module 
+2 >namespace 
 3 >                  m2
 4 >                     
 5 >                     {
 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
-2 >Emitted(1, 19) Source(1, 8) + SourceIndex(0)
-3 >Emitted(1, 21) Source(1, 10) + SourceIndex(0)
-4 >Emitted(1, 22) Source(1, 11) + SourceIndex(0)
-5 >Emitted(1, 23) Source(1, 12) + SourceIndex(0)
+2 >Emitted(1, 19) Source(1, 11) + SourceIndex(0)
+3 >Emitted(1, 21) Source(1, 13) + SourceIndex(0)
+4 >Emitted(1, 22) Source(1, 14) + SourceIndex(0)
+5 >Emitted(1, 23) Source(1, 15) + SourceIndex(0)
 ---
 >>>    interface connectModule {
 1->^^^^
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt.diff
index 0b707c1c17..ad1b5a7132 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.sourcemap.txt.diff
@@ -8,15 +8,15 @@
 +5 >                     ^
 +6 >                      ^^^^^^^^->
  1 >
- 2 >module 
+ 2 >namespace 
  3 >                  m2
  4 >                     
 +5 >                     {
  1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
- 2 >Emitted(1, 19) Source(1, 8) + SourceIndex(0)
- 3 >Emitted(1, 21) Source(1, 10) + SourceIndex(0)
- 4 >Emitted(1, 22) Source(1, 11) + SourceIndex(0)
-+5 >Emitted(1, 23) Source(1, 12) + SourceIndex(0)
+ 2 >Emitted(1, 19) Source(1, 11) + SourceIndex(0)
+ 3 >Emitted(1, 21) Source(1, 13) + SourceIndex(0)
+ 4 >Emitted(1, 22) Source(1, 14) + SourceIndex(0)
++5 >Emitted(1, 23) Source(1, 15) + SourceIndex(0)
  ---
  >>>    interface connectModule {
  1->^^^^
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.symbols b/testdata/baselines/reference/submodule/compiler/declarationMaps.symbols
index 1bc439499b..e956b8944e 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declarationMaps.ts] ////
 
 === declarationMaps.ts ===
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declarationMaps.ts, 0, 0), Decl(declarationMaps.ts, 11, 3))
 
     export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declarationMaps.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declarationMaps.ts, 0, 14))
 
         (res, req, next): void;
 >res : Symbol(res, Decl(declarationMaps.ts, 2, 9))
@@ -18,7 +18,7 @@ module m2 {
         use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declarationMaps.ts, 4, 36))
 >mod : Symbol(mod, Decl(declarationMaps.ts, 5, 14))
->connectModule : Symbol(connectModule, Decl(declarationMaps.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declarationMaps.ts, 0, 14))
 >connectExport : Symbol(connectExport, Decl(declarationMaps.ts, 3, 5))
 
         listen: (port: number) => void;
@@ -38,12 +38,12 @@ var m2: {
     test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declarationMaps.ts, 12, 25))
 >m2 : Symbol(m2, Decl(declarationMaps.ts, 0, 0), Decl(declarationMaps.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declarationMaps.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declarationMaps.ts, 0, 14))
 
     test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declarationMaps.ts, 13, 28))
 >m2 : Symbol(m2, Decl(declarationMaps.ts, 0, 0), Decl(declarationMaps.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declarationMaps.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declarationMaps.ts, 0, 14))
 
 };
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMaps.types b/testdata/baselines/reference/submodule/compiler/declarationMaps.types
index 66bd23ef76..2a2a276437 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMaps.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationMaps.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationMaps.ts] ////
 
 === declarationMaps.ts ===
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsMultifile.js.diff b/testdata/baselines/reference/submodule/compiler/declarationMapsMultifile.js.diff
index 3bd4d3f673..abce8ac5d9 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMapsMultifile.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationMapsMultifile.js.diff
@@ -1,11 +1,36 @@
 --- old.declarationMapsMultifile.js
 +++ new.declarationMapsMultifile.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -22, +22 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    Foo.prototype.doThing = function (x) {
++class Foo {
++    doThing(x) {
+         return { b: x.a };
+-    };
+-    Foo.make = function () {
++    }
++    static make() {
+         return new Foo();
+-    };
+-    return Foo;
+-}());
++    }
++}
+ exports.Foo = Foo;
+ //// [index.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.Foo = exports.c = exports.x = void 0;
 -var a_1 = require("./a");
 +const a_1 = require("./a");
  Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return a_1.Foo; } });
- const c = new a_1.Foo();
- exports.c = c;
\ No newline at end of file
+-var c = new a_1.Foo();
++const c = new a_1.Foo();
+ exports.c = c;
+ c.doThing({ a: 42 });
+ exports.x = c.doThing({ a: 12 });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt
index ba3e9d6c33..b254f30cc9 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.errors.txt
@@ -3,7 +3,7 @@ error TS5069: Option 'declarationMap' cannot be specified without specifying opt
 
 !!! error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'.
 ==== declarationMapsWithoutDeclaration.ts (0 errors) ====
-    module m2 {
+    namespace m2 {
         export interface connectModule {
             (res, req, next): void;
         }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.js b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.js
index 77743fd289..adf5c0ccaf 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationMapsWithoutDeclaration.ts] ////
 
 //// [declarationMapsWithoutDeclaration.ts]
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.symbols
index 327eea8f66..f8e0849051 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declarationMapsWithoutDeclaration.ts] ////
 
 === declarationMapsWithoutDeclaration.ts ===
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declarationMapsWithoutDeclaration.ts, 0, 0), Decl(declarationMapsWithoutDeclaration.ts, 11, 3))
 
     export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 14))
 
         (res, req, next): void;
 >res : Symbol(res, Decl(declarationMapsWithoutDeclaration.ts, 2, 9))
@@ -18,7 +18,7 @@ module m2 {
         use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declarationMapsWithoutDeclaration.ts, 4, 36))
 >mod : Symbol(mod, Decl(declarationMapsWithoutDeclaration.ts, 5, 14))
->connectModule : Symbol(connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 14))
 >connectExport : Symbol(connectExport, Decl(declarationMapsWithoutDeclaration.ts, 3, 5))
 
         listen: (port: number) => void;
@@ -38,12 +38,12 @@ var m2: {
     test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declarationMapsWithoutDeclaration.ts, 12, 25))
 >m2 : Symbol(m2, Decl(declarationMapsWithoutDeclaration.ts, 0, 0), Decl(declarationMapsWithoutDeclaration.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 14))
 
     test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declarationMapsWithoutDeclaration.ts, 13, 28))
 >m2 : Symbol(m2, Decl(declarationMapsWithoutDeclaration.ts, 0, 0), Decl(declarationMapsWithoutDeclaration.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declarationMapsWithoutDeclaration.ts, 0, 14))
 
 };
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.types b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.types
index 8f5b218567..807c649a99 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.types
+++ b/testdata/baselines/reference/submodule/compiler/declarationMapsWithoutDeclaration.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declarationMapsWithoutDeclaration.ts] ////
 
 === declarationMapsWithoutDeclaration.ts ===
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declarationMerging1.js.diff b/testdata/baselines/reference/submodule/compiler/declarationMerging1.js.diff
index 4c0a4ae19d..2274be0562 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationMerging1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationMerging1.js.diff
@@ -1,10 +1,17 @@
 --- old.declarationMerging1.js
 +++ new.declarationMerging1.js
-@@= skipped -12, +12 lines =@@
+@@= skipped -11, +11 lines =@@
+ }
 
  //// [file1.js]
- class A {
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    A.prototype.getF = function () { return this._f; };
+-    return A;
+-}());
++class A {
 +    _f;
-     getF() { return this._f; }
- }
++    getF() { return this._f; }
++}
  //// [file2.js]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationNoDanglingGenerics.js.diff b/testdata/baselines/reference/submodule/compiler/declarationNoDanglingGenerics.js.diff
index ab998bb17c..87affcb6ae 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationNoDanglingGenerics.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationNoDanglingGenerics.js.diff
@@ -1,27 +1,62 @@
 --- old.declarationNoDanglingGenerics.js
 +++ new.declarationNoDanglingGenerics.js
-@@= skipped -45, +45 lines =@@
+@@= skipped -35, +35 lines =@@
+
+ //// [declarationNoDanglingGenerics.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.CKind = exports.BKind = exports.AKind = void 0;
+-var kindCache = {};
++const kindCache = {};
+ function register(kind) {
+     if (kindCache[kind]) {
+-        throw new Error("Class with kind \"".concat(kind, "\" is already registered."));
++        throw new Error(`Class with kind "${kind}" is already registered.`);
+     }
      kindCache[kind] = true;
  }
  function ClassFactory(kind) {
 -    var _a;
      register(kind);
--    return _a = class {
--            constructor() {
+-    return _a = /** @class */ (function () {
+-            function class_1() {
 -                this.kind = kind;
 -            }
--        },
+-            return class_1;
+-        }()),
 -        _a.THE_KIND = kind,
 -        _a;
 -}
--let Kinds = (() => {
--    class Kinds {
+-var Kinds = /** @class */ (function () {
+-    function Kinds() {
 -    }
 -    Kinds.A = "A";
 -    Kinds.B = "B";
 -    Kinds.C = "C";
 -    return Kinds;
--})();
+-}());
+-var AKind = /** @class */ (function (_super) {
+-    __extends(AKind, _super);
+-    function AKind() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return AKind;
+-}(ClassFactory(Kinds.A)));
 +    return class {
 +        static THE_KIND = kind;
 +        kind = kind;
@@ -32,6 +67,27 @@
 +    static B = "B";
 +    static C = "C";
 +}
- class AKind extends ClassFactory(Kinds.A) {
- }
- exports.AKind = AKind;
\ No newline at end of file
++class AKind extends ClassFactory(Kinds.A) {
++}
+ exports.AKind = AKind;
+-var BKind = /** @class */ (function (_super) {
+-    __extends(BKind, _super);
+-    function BKind() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return BKind;
+-}(ClassFactory(Kinds.B)));
++class BKind extends ClassFactory(Kinds.B) {
++}
+ exports.BKind = BKind;
+-var CKind = /** @class */ (function (_super) {
+-    __extends(CKind, _super);
+-    function CKind() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return CKind;
+-}(ClassFactory(Kinds.C)));
++class CKind extends ClassFactory(Kinds.C) {
++}
+ exports.CKind = CKind;
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationsForFileShadowingGlobalNoError.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsForFileShadowingGlobalNoError.js.diff
index 75daa4a853..e4b578520e 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationsForFileShadowingGlobalNoError.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationsForFileShadowingGlobalNoError.js.diff
@@ -1,6 +1,43 @@
 --- old.declarationsForFileShadowingGlobalNoError.js
 +++ new.declarationsForFileShadowingGlobalNoError.js
-@@= skipped -38, +38 lines =@@
+@@= skipped -23, +23 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ //// [index.js]
+ "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.mixin = void 0;
+-var mixin = function (Base) {
+-    return /** @class */ (function (_super) {
+-        __extends(class_1, _super);
+-        function class_1() {
+-            return _super !== null && _super.apply(this, arguments) || this;
+-        }
+-        class_1.prototype.get = function (domNode) { };
+-        return class_1;
+-    }(Base));
++const mixin = (Base) => {
++    return class extends Base {
++        get(domNode) { }
++    };
+ };
+ exports.mixin = mixin;
+
+@@= skipped -35, +15 lines =@@
  //// [custom.d.ts]
  export type Node = {};
  //// [index.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationsForIndirectTypeAliasReference.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsForIndirectTypeAliasReference.js.diff
new file mode 100644
index 0000000000..eb3b9f84f8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declarationsForIndirectTypeAliasReference.js.diff
@@ -0,0 +1,24 @@
+--- old.declarationsForIndirectTypeAliasReference.js
++++ new.declarationsForIndirectTypeAliasReference.js
+@@= skipped -39, +39 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.doSome = doSome;
+-var MAP = {
+-    a: "a"
+-};
+-var MAP2 = {
+-    a: "a"
+-};
+-function doSome(arg1, arg2, arg3) {
+-    if (arg2 === void 0) { arg2 = MAP; }
+-    if (arg3 === void 0) { arg3 = MAP2; }
++const MAP = {
++    a: "a"
++};
++const MAP2 = {
++    a: "a"
++};
++function doSome(arg1, arg2 = MAP, arg3 = MAP2) {
+ }
+
diff --git a/testdata/baselines/reference/submodule/compiler/declarationsForInferredTypeFromOtherFile.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsForInferredTypeFromOtherFile.js.diff
index 832b323d4f..3a1495b02f 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationsForInferredTypeFromOtherFile.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationsForInferredTypeFromOtherFile.js.diff
@@ -1,6 +1,20 @@
 --- old.declarationsForInferredTypeFromOtherFile.js
 +++ new.declarationsForInferredTypeFromOtherFile.js
-@@= skipped -30, +30 lines =@@
+@@= skipped -16, +16 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Foo = void 0;
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
+ exports.Foo = Foo;
+ //// [file2.js]
+ "use strict";
+@@= skipped -17, +14 lines =@@
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.bar = bar;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationsIndirectGeneratedAliasReference.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsIndirectGeneratedAliasReference.js.diff
index c460ba5131..c7bd073740 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationsIndirectGeneratedAliasReference.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationsIndirectGeneratedAliasReference.js.diff
@@ -5,8 +5,9 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyComp = void 0;
 -var ns = require("mod");
+-var Ctor = ns.default;
 +const ns = require("mod");
- const Ctor = ns.default;
++const Ctor = ns.default;
  exports.MyComp = Ctor.extends({ foo: "bar" });
 
 
diff --git a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff b/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff
index 936f834eeb..6b62457252 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js.diff
@@ -8,4 +8,52 @@
 -// for having too many instances of the same symbol nesting.
  var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
-         for (var s, i = 1, n = arguments.length; i < n; i++) {
\ No newline at end of file
+         for (var s, i = 1, n = arguments.length; i < n; i++) {
+@@= skipped -15, +13 lines =@@
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.testRecFun = exports.updateIfChanged = void 0;
+-var updateIfChanged = function (t) {
+-    var reduce = function (u, update) {
+-        var set = function (newU) { return Object.is(u, newU) ? t : update(newU); };
+-        return Object.assign(function (key) {
+-            return reduce(u[key], function (v) {
+-                var _a;
+-                return update(Object.assign(Array.isArray(u) ? [] : {}, u, (_a = {}, _a[key] = v, _a)));
+-            });
+-        }, { map: function (updater) { return set(updater(u)); }, set: set });
++const updateIfChanged = (t) => {
++    const reduce = (u, update) => {
++        const set = (newU) => Object.is(u, newU) ? t : update(newU);
++        return Object.assign((key) => reduce(u[key], (v) => {
++            return update(Object.assign(Array.isArray(u) ? [] : {}, u, { [key]: v }));
++        }), { map: (updater) => set(updater(u)), set });
+     };
+-    return reduce(t, function (t) { return t; });
++    return reduce(t, (t) => t);
+ };
+ exports.updateIfChanged = updateIfChanged;
+ // example from https://github.com/microsoft/TypeScript/issues/31605
+-var testRecFun = function (parent) {
++const testRecFun = (parent) => {
+     return {
+         result: parent,
+-        deeper: function (child) {
+-            return (0, exports.testRecFun)(__assign(__assign({}, parent), child));
+-        }
++        deeper: (child) => (0, exports.testRecFun)(__assign(__assign({}, parent), child))
+     };
+ };
+ exports.testRecFun = testRecFun;
+-var p1 = (0, exports.testRecFun)({ one: '1' });
++let p1 = (0, exports.testRecFun)({ one: '1' });
+ void p1.result.one;
+-var p2 = p1.deeper({ two: '2' });
++let p2 = p1.deeper({ two: '2' });
+ void p2.result.one;
+ void p2.result.two;
+-var p3 = p2.deeper({ three: '3' });
++let p3 = p2.deeper({ three: '3' });
+ void p3.result.one;
+ void p3.result.two;
+ void p3.result.three;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.errors.txt b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.errors.txt
index 02a9b3802c..6030069171 100644
--- a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.errors.txt
@@ -5,7 +5,7 @@ declareAlreadySeen.ts(7,13): error TS1030: 'declare' modifier already seen.
 
 
 ==== declareAlreadySeen.ts (4 errors) ====
-    module M {
+    namespace M {
         declare declare var x;
                 ~~~~~~~
 !!! error TS1030: 'declare' modifier already seen.
@@ -13,7 +13,7 @@ declareAlreadySeen.ts(7,13): error TS1030: 'declare' modifier already seen.
                 ~~~~~~~
 !!! error TS1030: 'declare' modifier already seen.
     
-        declare declare module N { }  
+        declare declare namespace N { }  
                 ~~~~~~~
 !!! error TS1030: 'declare' modifier already seen.
     
diff --git a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.js b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.js
index c69a29fbb0..0c1d8dd5a0 100644
--- a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.js
+++ b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.js
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declareAlreadySeen.ts] ////
 
 //// [declareAlreadySeen.ts]
-module M {
+namespace M {
     declare declare var x;
     declare declare function f();
 
-    declare declare module N { }  
+    declare declare namespace N { }  
 
     declare declare class C { }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.symbols b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.symbols
index 5c6d7566a9..7d53eeb886 100644
--- a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.symbols
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareAlreadySeen.ts] ////
 
 === declareAlreadySeen.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declareAlreadySeen.ts, 0, 0))
 
     declare declare var x;
@@ -10,9 +10,9 @@ module M {
     declare declare function f();
 >f : Symbol(f, Decl(declareAlreadySeen.ts, 1, 26))
 
-    declare declare module N { }  
+    declare declare namespace N { }  
 >N : Symbol(N, Decl(declareAlreadySeen.ts, 2, 33))
 
     declare declare class C { }
->C : Symbol(C, Decl(declareAlreadySeen.ts, 4, 32))
+>C : Symbol(C, Decl(declareAlreadySeen.ts, 4, 35))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.types b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.types
index d4a9a24ec7..de35d05670 100644
--- a/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.types
+++ b/testdata/baselines/reference/submodule/compiler/declareAlreadySeen.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareAlreadySeen.ts] ////
 
 === declareAlreadySeen.ts ===
-module M {
+namespace M {
 >M : typeof M
 
     declare declare var x;
@@ -10,7 +10,7 @@ module M {
     declare declare function f();
 >f : () => any
 
-    declare declare module N { }  
+    declare declare namespace N { }  
 
     declare declare class C { }
 >C : C
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff b/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
index b21e4794d3..02f29525af 100644
--- a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
@@ -4,7 +4,37 @@
 
 
  //// [declareDottedExtend.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
 -var ab = A.B;
- class D extends ab.C {
- }
- class E extends A.B.C {
\ No newline at end of file
+-var D = /** @class */ (function (_super) {
+-    __extends(D, _super);
+-    function D() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return D;
+-}(ab.C));
+-var E = /** @class */ (function (_super) {
+-    __extends(E, _super);
+-    function E() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return E;
+-}(A.B.C));
++class D extends ab.C {
++}
++class E extends A.B.C {
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.js b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.js
index a7ea2f3591..5b807c0513 100644
--- a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.js
+++ b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.js
@@ -1,15 +1,15 @@
 //// [tests/cases/compiler/declareDottedModuleName.ts] ////
 
 //// [declareDottedModuleName.ts]
-module M {
-    module P.Q { } // This shouldnt be emitted
+namespace M {
+    namespace P.Q { } // This shouldnt be emitted
 }
 
-module M {
-    export module R.S { }  //This should be emitted
+namespace M {
+    export namespace R.S { }  //This should be emitted
 }
 
-module T.U { // This needs to be emitted
+namespace T.U { // This needs to be emitted
 }
 
 //// [declareDottedModuleName.js]
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.symbols b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.symbols
index e5c5b9a816..312a45e461 100644
--- a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.symbols
@@ -1,23 +1,23 @@
 //// [tests/cases/compiler/declareDottedModuleName.ts] ////
 
 === declareDottedModuleName.ts ===
-module M {
+namespace M {
 >M : Symbol(M, Decl(declareDottedModuleName.ts, 0, 0), Decl(declareDottedModuleName.ts, 2, 1))
 
-    module P.Q { } // This shouldnt be emitted
->P : Symbol(P, Decl(declareDottedModuleName.ts, 0, 10))
->Q : Symbol(Q, Decl(declareDottedModuleName.ts, 1, 13))
+    namespace P.Q { } // This shouldnt be emitted
+>P : Symbol(P, Decl(declareDottedModuleName.ts, 0, 13))
+>Q : Symbol(Q, Decl(declareDottedModuleName.ts, 1, 16))
 }
 
-module M {
+namespace M {
 >M : Symbol(M, Decl(declareDottedModuleName.ts, 0, 0), Decl(declareDottedModuleName.ts, 2, 1))
 
-    export module R.S { }  //This should be emitted
->R : Symbol(R, Decl(declareDottedModuleName.ts, 4, 10))
->S : Symbol(S, Decl(declareDottedModuleName.ts, 5, 20))
+    export namespace R.S { }  //This should be emitted
+>R : Symbol(R, Decl(declareDottedModuleName.ts, 4, 13))
+>S : Symbol(S, Decl(declareDottedModuleName.ts, 5, 23))
 }
 
-module T.U { // This needs to be emitted
+namespace T.U { // This needs to be emitted
 >T : Symbol(T, Decl(declareDottedModuleName.ts, 6, 1))
->U : Symbol(U, Decl(declareDottedModuleName.ts, 8, 9))
+>U : Symbol(U, Decl(declareDottedModuleName.ts, 8, 12))
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.types b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.types
index 6dbf9ab415..d60ae6bc6d 100644
--- a/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.types
+++ b/testdata/baselines/reference/submodule/compiler/declareDottedModuleName.types
@@ -2,13 +2,13 @@
 
 === declareDottedModuleName.ts ===
 
-module M {
-    module P.Q { } // This shouldnt be emitted
+namespace M {
+    namespace P.Q { } // This shouldnt be emitted
 }
 
-module M {
-    export module R.S { }  //This should be emitted
+namespace M {
+    export namespace R.S { }  //This should be emitted
 }
 
-module T.U { // This needs to be emitted
+namespace T.U { // This needs to be emitted
 }
diff --git a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.js b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.js
index 3f8e1a342a..8683d3d7d1 100644
--- a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.js
+++ b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.js
@@ -7,7 +7,7 @@ declare module "express" {
 
     function express(): express.ExpressServer;
 
-    module express {
+    namespace express {
 
         export interface ExpressServer {
 
diff --git a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols
index 7d70f58092..4e199a345a 100644
--- a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols
@@ -10,18 +10,18 @@ declare module "express" {
     function express(): express.ExpressServer;
 >express : Symbol(express, Decl(declareExternalModuleWithExportAssignedFundule.ts, 2, 21), Decl(declareExternalModuleWithExportAssignedFundule.ts, 4, 46))
 >express : Symbol(express, Decl(declareExternalModuleWithExportAssignedFundule.ts, 2, 21), Decl(declareExternalModuleWithExportAssignedFundule.ts, 4, 46))
->ExpressServer : Symbol(express.ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 20))
+>ExpressServer : Symbol(express.ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 23))
 
-    module express {
+    namespace express {
 >express : Symbol(express, Decl(declareExternalModuleWithExportAssignedFundule.ts, 2, 21), Decl(declareExternalModuleWithExportAssignedFundule.ts, 4, 46))
 
         export interface ExpressServer {
->ExpressServer : Symbol(ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 20))
+>ExpressServer : Symbol(ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 23))
 
             enable(name: string): ExpressServer;
 >enable : Symbol(ExpressServer.enable, Decl(declareExternalModuleWithExportAssignedFundule.ts, 8, 40))
 >name : Symbol(name, Decl(declareExternalModuleWithExportAssignedFundule.ts, 10, 19))
->ExpressServer : Symbol(ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 20))
+>ExpressServer : Symbol(ExpressServer, Decl(declareExternalModuleWithExportAssignedFundule.ts, 6, 23))
 
             post(path: RegExp, handler: (req: Function) => void ): void;
 >post : Symbol(ExpressServer.post, Decl(declareExternalModuleWithExportAssignedFundule.ts, 10, 48))
diff --git a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols.diff b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols.diff
new file mode 100644
index 0000000000..eed4c86b02
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.symbols.diff
@@ -0,0 +1,14 @@
+--- old.declareExternalModuleWithExportAssignedFundule.symbols
++++ new.declareExternalModuleWithExportAssignedFundule.symbols
+@@= skipped -25, +25 lines =@@
+             post(path: RegExp, handler: (req: Function) => void ): void;
+ >post : Symbol(ExpressServer.post, Decl(declareExternalModuleWithExportAssignedFundule.ts, 10, 48))
+ >path : Symbol(path, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 17))
+->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >handler : Symbol(handler, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 30))
+ >req : Symbol(req, Decl(declareExternalModuleWithExportAssignedFundule.ts, 12, 41))
+->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+         }
diff --git a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.types b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.types
index 9399d89512..cd9e4fdc4f 100644
--- a/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.types
+++ b/testdata/baselines/reference/submodule/compiler/declareExternalModuleWithExportAssignedFundule.types
@@ -11,7 +11,7 @@ declare module "express" {
 >express : typeof express
 >express : any
 
-    module express {
+    namespace express {
 >express : typeof express
 
         export interface ExpressServer {
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.js b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.js
index ed4b9e960e..b183c71909 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareFileExportAssignment.ts] ////
 
 //// [declareFileExportAssignment.ts]
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.symbols b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.symbols
index 4fcb69bccc..4d053e6590 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declareFileExportAssignment.ts] ////
 
 === declareFileExportAssignment.ts ===
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declareFileExportAssignment.ts, 0, 0), Decl(declareFileExportAssignment.ts, 11, 3))
 
     export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declareFileExportAssignment.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declareFileExportAssignment.ts, 0, 14))
 
         (res, req, next): void;
 >res : Symbol(res, Decl(declareFileExportAssignment.ts, 2, 9))
@@ -18,7 +18,7 @@ module m2 {
         use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declareFileExportAssignment.ts, 4, 36))
 >mod : Symbol(mod, Decl(declareFileExportAssignment.ts, 5, 14))
->connectModule : Symbol(connectModule, Decl(declareFileExportAssignment.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declareFileExportAssignment.ts, 0, 14))
 >connectExport : Symbol(connectExport, Decl(declareFileExportAssignment.ts, 3, 5))
 
         listen: (port: number) => void;
@@ -38,12 +38,12 @@ var m2: {
     test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declareFileExportAssignment.ts, 12, 25))
 >m2 : Symbol(m2, Decl(declareFileExportAssignment.ts, 0, 0), Decl(declareFileExportAssignment.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignment.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignment.ts, 0, 14))
 
     test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declareFileExportAssignment.ts, 13, 28))
 >m2 : Symbol(m2, Decl(declareFileExportAssignment.ts, 0, 0), Decl(declareFileExportAssignment.ts, 11, 3))
->connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignment.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignment.ts, 0, 14))
 
 };
 
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.types b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.types
index edd56b955d..35c6299d01 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.types
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignment.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareFileExportAssignment.ts] ////
 
 === declareFileExportAssignment.ts ===
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.js b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.js
index a442fcc99f..18a17244c7 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.js
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts] ////
 
 //// [declareFileExportAssignmentWithVarFromVariableStatement.ts]
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
     }
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.symbols b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.symbols
index ec49b2f1b9..9a46ddb063 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.symbols
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts] ////
 
 === declareFileExportAssignmentWithVarFromVariableStatement.ts ===
-module m2 {
+namespace m2 {
 >m2 : Symbol(m2, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 0), Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 11, 11))
 
     export interface connectModule {
->connectModule : Symbol(connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 14))
 
         (res, req, next): void;
 >res : Symbol(res, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 2, 9))
@@ -18,7 +18,7 @@ module m2 {
         use: (mod: connectModule) => connectExport;
 >use : Symbol(connectExport.use, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 4, 36))
 >mod : Symbol(mod, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 5, 14))
->connectModule : Symbol(connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 11))
+>connectModule : Symbol(connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 14))
 >connectExport : Symbol(connectExport, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 3, 5))
 
         listen: (port: number) => void;
@@ -39,12 +39,12 @@ var x = 10, m2: {
     test1: m2.connectModule;
 >test1 : Symbol(test1, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 12, 25))
 >m2 : Symbol(m2, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 0), Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 11, 11))
->connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 14))
 
     test2(): m2.connectModule;
 >test2 : Symbol(test2, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 13, 28))
 >m2 : Symbol(m2, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 0), Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 11, 11))
->connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 11))
+>connectModule : Symbol(m2.connectModule, Decl(declareFileExportAssignmentWithVarFromVariableStatement.ts, 0, 14))
 
 };
 
diff --git a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.types b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.types
index 55e22b666c..b94c182a61 100644
--- a/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.types
+++ b/testdata/baselines/reference/submodule/compiler/declareFileExportAssignmentWithVarFromVariableStatement.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/declareFileExportAssignmentWithVarFromVariableStatement.ts] ////
 
 === declareFileExportAssignmentWithVarFromVariableStatement.ts ===
-module m2 {
+namespace m2 {
     export interface connectModule {
         (res, req, next): void;
 >res : any
diff --git a/testdata/baselines/reference/submodule/compiler/declareIdentifierAsBeginningOfStatementExpression01.js.diff b/testdata/baselines/reference/submodule/compiler/declareIdentifierAsBeginningOfStatementExpression01.js.diff
new file mode 100644
index 0000000000..d81401043d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/declareIdentifierAsBeginningOfStatementExpression01.js.diff
@@ -0,0 +1,15 @@
+--- old.declareIdentifierAsBeginningOfStatementExpression01.js
++++ new.declareIdentifierAsBeginningOfStatementExpression01.js
+@@= skipped -8, +8 lines =@@
+ declare instanceof C;
+
+ //// [declareIdentifierAsBeginningOfStatementExpression01.js]
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
++class C {
++}
+ var declare;
+ declare instanceof C;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataConditionalType.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataConditionalType.js.diff
index 984a229851..683ce51bd2 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataConditionalType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataConditionalType.js.diff
@@ -13,24 +13,24 @@
 -var __metadata = (this && this.__metadata) || function (k, v) {
 -    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
 -};
--let BaseEntity = (() => {
--    class BaseEntity {
+-var BaseEntity = /** @class */ (function () {
+-    function BaseEntity() {
 -    }
 -    __decorate([
 -        d(),
 -        __metadata("design:type", Object)
 -    ], BaseEntity.prototype, "attributes", void 0);
 -    return BaseEntity;
--})();
--let C = (() => {
--    class C {
+-}());
+-var C = /** @class */ (function () {
+-    function C() {
 -    }
 -    __decorate([
 -        d(),
 -        __metadata("design:type", Boolean)
 -    ], C.prototype, "x", void 0);
 -    return C;
--})();
+-}());
 +class BaseEntity {
 +    @d()
 +    attributes;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js.diff
index 7c093f8747..96639b23b6 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js.diff
@@ -4,13 +4,11 @@
 
 
  //// [decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js]
--let MyClass = (() => {
--    class MyClass {
--        constructor(test, test2) {
--        }
--        doSomething() {
--        }
+-var MyClass = /** @class */ (function () {
+-    function MyClass(test, test2) {
 -    }
+-    MyClass.prototype.doSomething = function () {
+-    };
 -    __decorate([
 -        decorator,
 -        __metadata("design:type", Function),
@@ -18,7 +16,7 @@
 -        __metadata("design:returntype", void 0)
 -    ], MyClass.prototype, "doSomething", null);
 -    return MyClass;
--})();
+-}());
 +class MyClass {
 +    constructor(test, test2) {
 +    }
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariable.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariable.js.diff
index a244db4e3a..e5ca48120e 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariable.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariable.js.diff
@@ -15,15 +15,15 @@
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.C = void 0;
--let C = (() => {
--    class C {
+-var C = /** @class */ (function () {
+-    function C() {
 -    }
 -    __decorate([
 -        Decorate,
 -        __metadata("design:type", Object)
 -    ], C.prototype, "member", void 0);
 -    return C;
--})();
+-}());
 +class C {
 +    @Decorate
 +    member;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableDefault.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableDefault.js.diff
index 2b9ff874c4..201b6f6f3f 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableDefault.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableDefault.js.diff
@@ -15,15 +15,15 @@
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.C = void 0;
--let C = (() => {
--    class C {
+-var C = /** @class */ (function () {
+-    function C() {
 -    }
 -    __decorate([
 -        Decorate,
 -        __metadata("design:type", Object)
 -    ], C.prototype, "member", void 0);
 -    return C;
--})();
+-}());
 +class C {
 +    @Decorate
 +    member;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableInScope.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableInScope.js.diff
index 3d6afafc4b..3556cf9fa4 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableInScope.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataGenericTypeVariableInScope.js.diff
@@ -16,17 +16,22 @@
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.C = void 0;
  // Unused, but could collide with the named type argument below.
- class TypeVariable {
- }
--let C = (() => {
--    class C {
+-var TypeVariable = /** @class */ (function () {
+-    function TypeVariable() {
+-    }
+-    return TypeVariable;
+-}());
+-var C = /** @class */ (function () {
+-    function C() {
 -    }
 -    __decorate([
 -        Decorate,
 -        __metadata("design:type", Object)
 -    ], C.prototype, "member", void 0);
 -    return C;
--})();
+-}());
++class TypeVariable {
++}
 +class C {
 +    @Decorate
 +    member;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoLibIsolatedModulesTypes.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoLibIsolatedModulesTypes.js.diff
index cbe209f149..93ed971218 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoLibIsolatedModulesTypes.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoLibIsolatedModulesTypes.js.diff
@@ -15,16 +15,16 @@
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.B = void 0;
--let B = (() => {
--    var _a;
--    class B {
+-var B = /** @class */ (function () {
+-    function B() {
 -    }
+-    var _a;
 -    __decorate([
 -        Decorate,
 -        __metadata("design:type", typeof (_a = typeof Map !== "undefined" && Map) === "function" ? _a : Object)
 -    ], B.prototype, "member", void 0);
 -    return B;
--})();
+-}());
 +class B {
 +    @Decorate
 +    member;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoStrictNull.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoStrictNull.js.diff
index ef3a9eeac5..6bc17f0957 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoStrictNull.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataNoStrictNull.js.diff
@@ -13,9 +13,9 @@
 -var __metadata = (this && this.__metadata) || function (k, v) {
 -    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
 -};
- const dec = (obj, prop) => undefined;
--let Foo = (() => {
--    class Foo {
+-var dec = function (obj, prop) { return undefined; };
+-var Foo = /** @class */ (function () {
+-    function Foo() {
 -    }
 -    __decorate([
 -        dec,
@@ -26,7 +26,8 @@
 -        __metadata("design:type", String)
 -    ], Foo.prototype, "bar", void 0);
 -    return Foo;
--})();
+-}());
++const dec = (obj, prop) => undefined;
 +class Foo {
 +    @dec
 +    foo;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataOnInferredType.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataOnInferredType.js.diff
index be80267c83..614c387ec4 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataOnInferredType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataOnInferredType.js.diff
@@ -1,21 +1,30 @@
 --- old.decoratorMetadataOnInferredType.js
 +++ new.decoratorMetadataOnInferredType.js
-@@= skipped -26, +26 lines =@@
- }
+@@= skipped -21, +21 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.B = void 0;
+-var A = /** @class */ (function () {
+-    function A() {
+-        console.log('new A');
+-    }
+-    return A;
+-}());
++class A {
++    constructor() { console.log('new A'); }
++}
  function decorator(target, propertyKey) {
  }
--let B = (() => {
--    class B {
--        constructor() {
--            this.x = new A();
--        }
+-var B = /** @class */ (function () {
+-    function B() {
+-        this.x = new A();
 -    }
 -    __decorate([
 -        decorator,
 -        __metadata("design:type", Object)
 -    ], B.prototype, "x", void 0);
 -    return B;
--})();
+-}());
 +class B {
 +    @decorator
 +    x = new A();
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataRestParameterWithImportedType.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataRestParameterWithImportedType.js.diff
index fdaf69b640..1c594abdb4 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataRestParameterWithImportedType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataRestParameterWithImportedType.js.diff
@@ -1,27 +1,43 @@
 --- old.decoratorMetadataRestParameterWithImportedType.js
 +++ new.decoratorMetadataRestParameterWithImportedType.js
-@@= skipped -43, +43 lines =@@
+@@= skipped -42, +42 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SomeClass = void 0;
- class SomeClass {
+-var SomeClass = /** @class */ (function () {
+-    function SomeClass() {
+-    }
+-    return SomeClass;
+-}());
++class SomeClass {
 +    field;
- }
++}
  exports.SomeClass = SomeClass;
  //// [aux1.js]
-@@= skipped -7, +8 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SomeClass1 = void 0;
- class SomeClass1 {
+-var SomeClass1 = /** @class */ (function () {
+-    function SomeClass1() {
+-    }
+-    return SomeClass1;
+-}());
++class SomeClass1 {
 +    field;
- }
++}
  exports.SomeClass1 = SomeClass1;
  //// [aux2.js]
-@@= skipped -7, +8 lines =@@
+ "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.SomeClass2 = void 0;
- class SomeClass2 {
+-var SomeClass2 = /** @class */ (function () {
+-    function SomeClass2() {
+-    }
+-    return SomeClass2;
+-}());
++class SomeClass2 {
 +    field;
- }
++}
  exports.SomeClass2 = SomeClass2;
  //// [main.js]
  "use strict";
@@ -39,17 +55,29 @@
 -var aux_1 = require("./aux");
 -var aux1_1 = require("./aux1");
  function annotation() {
-     return (target) => { };
+-    return function (target) { };
++    return (target) => { };
  }
  function annotation1() {
-     return (target) => { };
+-    return function (target) { };
++    return (target) => { };
  }
--let ClassA = (() => {
--    let ClassA = class ClassA {
--        constructor(...init) {
--            this.array = init;
+-var ClassA = /** @class */ (function () {
+-    function ClassA() {
+-        var init = [];
+-        for (var _i = 0; _i < arguments.length; _i++) {
+-            init[_i] = arguments[_i];
 -        }
--        foo(...args) {
++@annotation()
++class ClassA {
++    array;
++    constructor(...init) {
+         this.array = init;
+     }
+-    ClassA.prototype.foo = function () {
+-        var args = [];
+-        for (var _i = 0; _i < arguments.length; _i++) {
+-            args[_i] = arguments[_i];
 -        }
 -    };
 -    __decorate([
@@ -63,13 +91,7 @@
 -        __metadata("design:paramtypes", [aux_1.SomeClass])
 -    ], ClassA);
 -    return ClassA;
--})();
-+@annotation()
-+class ClassA {
-+    array;
-+    constructor(...init) {
-+        this.array = init;
-+    }
+-}());
 +    @annotation1()
 +    foo(...args) {
 +    }
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyExport.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyExport.js.diff
index 9f026d745b..53dff7aa27 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyExport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyExport.js.diff
@@ -1,7 +1,16 @@
 --- old.decoratorMetadataTypeOnlyExport.js
 +++ new.decoratorMetadataTypeOnlyExport.js
-@@= skipped -21, +21 lines =@@
- }
+@@= skipped -17, +17 lines =@@
+ //// [a.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
  //// [b.js]
  "use strict";
 -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -14,17 +23,17 @@
 -    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
- const Decorator = () => undefined;
--let Bar = (() => {
--    let Bar = class Bar {
--        constructor(par) { }
--    };
+-var Decorator = function () { return undefined; };
+-var Bar = /** @class */ (function () {
+-    function Bar(par) {
+-    }
 -    Bar = __decorate([
 -        Decorator,
 -        __metadata("design:paramtypes", [Function])
 -    ], Bar);
 -    return Bar;
--})();
+-}());
++const Decorator = () => undefined;
 +@Decorator
 +class Bar {
 +    constructor(par) { }
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyImport.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyImport.js.diff
index a49628cdf0..df57dec63e 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyImport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataTypeOnlyImport.js.diff
@@ -14,15 +14,15 @@
 -    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
--let Foo = (() => {
--    class Foo {
+-var Foo = /** @class */ (function () {
+-    function Foo() {
 -    }
 -    __decorate([
 -        Decorator,
 -        __metadata("design:type", Object)
 -    ], Foo.prototype, "myList", void 0);
 -    return Foo;
--})();
+-}());
 +class Foo {
 +    @Decorator
 +    myList;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithConstructorType.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithConstructorType.js.diff
index 26885372e7..ac381be5a4 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithConstructorType.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithConstructorType.js.diff
@@ -1,21 +1,30 @@
 --- old.decoratorMetadataWithConstructorType.js
 +++ new.decoratorMetadataWithConstructorType.js
-@@= skipped -26, +26 lines =@@
- }
+@@= skipped -21, +21 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.B = void 0;
+-var A = /** @class */ (function () {
+-    function A() {
+-        console.log('new A');
+-    }
+-    return A;
+-}());
++class A {
++    constructor() { console.log('new A'); }
++}
  function decorator(target, propertyKey) {
  }
--let B = (() => {
--    class B {
--        constructor() {
--            this.x = new A();
--        }
+-var B = /** @class */ (function () {
+-    function B() {
+-        this.x = new A();
 -    }
 -    __decorate([
 -        decorator,
 -        __metadata("design:type", A)
 -    ], B.prototype, "x", void 0);
 -    return B;
--})();
+-}());
 +class B {
 +    @decorator
 +    x = new A();
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision.js.diff
index d2adab911a..3494cb054b 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.db = void 0;
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.db = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [db_1.db])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision2.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision2.js.diff
index fcc4f9fc78..a89665a65a 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision2.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision2.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision2.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.db = void 0;
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.db = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [db_1.db])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision3.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision3.js.diff
index 3b7e2467b4..ab36588ff2 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision3.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision3.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision3.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.db = void 0;
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.db = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [db.db])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.js.diff
index 1874b1d5e5..6c9bc65503 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision4.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision4.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision4.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.db = void 0;
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.db = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,26 +23,21 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    var _a;
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [typeof (_a = typeof db_1.default !== "undefined" && db_1.default.db) === "function" ? _a : Object])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision5.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision5.js.diff
index 54b82621a7..c5252e1a84 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision5.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision5.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision5.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision5.js
-@@= skipped -34, +34 lines =@@
+@@= skipped -25, +25 lines =@@
+ //// [db.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.default = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [db_1.default])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision6.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision6.js.diff
index e4e4bd26fd..240b1bba9f 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision6.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision6.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision6.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision6.js
-@@= skipped -34, +34 lines =@@
+@@= skipped -25, +25 lines =@@
+ //// [db.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.default = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [db_1.default])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision7.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision7.js.diff
index 5bf4140db7..4d883d32cf 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision7.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision7.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision7.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision7.js
-@@= skipped -34, +34 lines =@@
+@@= skipped -25, +25 lines =@@
+ //// [db.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.default = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,26 +23,21 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db; //error
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    var _a;
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [typeof (_a = typeof db_1.default !== "undefined" && db_1.default.db) === "function" ? _a : Object])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db; //error
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision8.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision8.js.diff
index 44fcb18c71..102cceb637 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision8.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorMetadataWithImportDeclarationNameCollision8.js.diff
@@ -1,6 +1,21 @@
 --- old.decoratorMetadataWithImportDeclarationNameCollision8.js
 +++ new.decoratorMetadataWithImportDeclarationNameCollision8.js
-@@= skipped -35, +35 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.db = void 0;
+-var db = /** @class */ (function () {
+-    function db() {
++class db {
++    doSomething() {
+     }
+-    db.prototype.doSomething = function () {
+-    };
+-    return db;
+-}());
++}
+ exports.db = db;
+ //// [service.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyClass = void 0;
@@ -8,25 +23,20 @@
  function someDecorator(target) {
      return target;
  }
--let MyClass = (() => {
--    let MyClass = class MyClass {
--        constructor(db) {
--            this.db = db;
--            this.db.doSomething();
--        }
--    };
+-var MyClass = /** @class */ (function () {
+-    function MyClass(db) {
++@someDecorator
++class MyClass {
++    db;
++    constructor(db) {
+         this.db = db;
+         this.db.doSomething();
+     }
 -    MyClass = __decorate([
 -        someDecorator,
 -        __metadata("design:paramtypes", [database.db])
 -    ], MyClass);
 -    return MyClass;
--})();
-+@someDecorator
-+class MyClass {
-+    db;
-+    constructor(db) {
-+        this.db = db;
-+        this.db.doSomething();
-+    }
+-}());
 +}
  exports.MyClass = MyClass;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorReferenceOnOtherProperty.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorReferenceOnOtherProperty.js.diff
index 9831574364..bf1d3ee577 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorReferenceOnOtherProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorReferenceOnOtherProperty.js.diff
@@ -1,6 +1,16 @@
 --- old.decoratorReferenceOnOtherProperty.js
 +++ new.decoratorReferenceOnOtherProperty.js
-@@= skipped -31, +31 lines =@@
+@@= skipped -26, +26 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.Yoha = void 0;
+-var Yoha = /** @class */ (function () {
+-    function Yoha() {
+-    }
+-    return Yoha;
+-}());
++class Yoha {
++}
  exports.Yoha = Yoha;
  //// [index.js]
  "use strict";
@@ -18,11 +28,19 @@
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
 -var yoha_1 = require("./yoha");
- function foo(...args) { }
--let Bar = (() => {
--    class Bar {
--        yoha(yoha, bar) { }
+-function foo() {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
 -    }
++function foo(...args) { }
++class Bar {
++    yoha(yoha, bar) { }
+ }
+-var Bar = /** @class */ (function () {
+-    function Bar() {
+-    }
+-    Bar.prototype.yoha = function (yoha, bar) { };
 -    __decorate([
 -        __param(0, foo),
 -        __metadata("design:type", Function),
@@ -30,10 +48,7 @@
 -        __metadata("design:returntype", void 0)
 -    ], Bar.prototype, "yoha", null);
 -    return Bar;
--})();
-+class Bar {
-+    yoha(yoha, bar) { }
-+}
+-}());
  //// [index2.js]
  "use strict";
 -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -50,11 +65,24 @@
 -};
  Object.defineProperty(exports, "__esModule", { value: true });
 -var yoha_1 = require("./yoha");
- function foo(...args) { }
--let Bar = (() => {
--    class Bar {
--        yoha(yoha, ...bar) { }
+-function foo() {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
 -    }
++function foo(...args) { }
++class Bar {
++    yoha(yoha, ...bar) { }
+ }
+-var Bar = /** @class */ (function () {
+-    function Bar() {
+-    }
+-    Bar.prototype.yoha = function (yoha) {
+-        var bar = [];
+-        for (var _i = 1; _i < arguments.length; _i++) {
+-            bar[_i - 1] = arguments[_i];
+-        }
+-    };
 -    __decorate([
 -        __param(0, foo),
 -        __metadata("design:type", Function),
@@ -62,7 +90,4 @@
 -        __metadata("design:returntype", void 0)
 -    ], Bar.prototype, "yoha", null);
 -    return Bar;
--})();
-+class Bar {
-+    yoha(yoha, ...bar) { }
-+}
\ No newline at end of file
+-}());
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorReferences.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorReferences.js.diff
index 97bd982473..32a28124c0 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorReferences.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorReferences.js.diff
@@ -13,20 +13,20 @@
 -var __param = (this && this.__param) || function (paramIndex, decorator) {
 -    return function (target, key) { decorator(target, key, paramIndex); }
 -};
--let C = (() => {
--    let C = class C {
--        method(x, y) { } // <-- decorator y should be resolved at the class declaration, not the parameter.
--    };
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype.method = function (x, y) { }; // <-- decorator y should be resolved at the class declaration, not the parameter.
 -    __decorate([
 -        y(null) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
 -        ,
 -        __param(0, y)
 -    ], C.prototype, "method", null);
 -    C = __decorate([
--        y(1, () => C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
+-        y(1, function () { return C; }) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
 -    ], C);
 -    return C;
--})();
+-}());
 +@y(1, () => C) // <-- T should be resolved to the type alias, not the type parameter of the class; C should resolve to the class
 +class C {
 +    @y(null) // <-- y should resolve to the function declaration, not the parameter; T should resolve to the type parameter of the class
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorUsedBeforeDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorUsedBeforeDeclaration.js.diff
index 9d4bca892f..eedf32e08a 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorUsedBeforeDeclaration.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorUsedBeforeDeclaration.js.diff
@@ -13,23 +13,28 @@
 -var __param = (this && this.__param) || function (paramIndex, decorator) {
 -    return function (target, key) { decorator(target, key, paramIndex); }
 -};
--let Greeter = (() => {
--    let Greeter = class Greeter {
--        constructor(message) {
--            this.greeting = message;
--        }
--        greet() {
--            return "Hello, " + this.greeting;
--        }
--        greet1() {
--            return "Hello, " + this.greeting;
--        }
--        greet2(param) {
--            return "Hello, " + this.greeting;
--        }
--        greet3(param) {
--            return "Hello, " + this.greeting;
--        }
+-var Greeter = /** @class */ (function () {
+-    function Greeter(message) {
++@lambda(Enum.No)
++@deco(Enum.No)
++class Greeter {
++    @lambda(Enum.No)
++    @deco(Enum.No)
++    greeting;
++    constructor(message) {
+         this.greeting = message;
+     }
+-    Greeter.prototype.greet = function () {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter.prototype.greet1 = function () {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter.prototype.greet2 = function (param) {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter.prototype.greet3 = function (param) {
+-        return "Hello, " + this.greeting;
 -    };
 -    __decorate([
 -        lambda(Enum.No),
@@ -56,16 +61,11 @@
 -        deco(Enum.No)
 -    ], Greeter);
 -    return Greeter;
--})();
-+@lambda(Enum.No)
-+@deco(Enum.No)
-+class Greeter {
-+    @lambda(Enum.No)
-+    @deco(Enum.No)
-+    greeting;
-+    constructor(message) {
-+        this.greeting = message;
-+    }
+-}());
+-function deco() {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
 +    @lambda(Enum.No)
 +    @deco(Enum.No)
 +    greet() {
@@ -81,32 +81,43 @@
 +    }
 +    greet3(param) {
 +        return "Hello, " + this.greeting;
-+    }
-+}
- function deco(...args) { }
+     }
+ }
++function deco(...args) { }
  var Enum;
  (function (Enum) {
-@@= skipped -60, +33 lines =@@
+     Enum[Enum["No"] = 0] = "No";
      Enum[Enum["Yes"] = 1] = "Yes";
  })(Enum || (Enum = {}));
- const lambda = (...args) => { };
--let Greeter1 = (() => {
--    let Greeter1 = class Greeter1 {
--        constructor(message) {
--            this.greeting = message;
--        }
--        greet() {
--            return "Hello, " + this.greeting;
--        }
--        greet1() {
--            return "Hello, " + this.greeting;
--        }
--        greet2(param) {
--            return "Hello, " + this.greeting;
--        }
--        greet3(param) {
--            return "Hello, " + this.greeting;
--        }
+-var lambda = function () {
+-    var args = [];
+-    for (var _i = 0; _i < arguments.length; _i++) {
+-        args[_i] = arguments[_i];
+-    }
+-};
+-var Greeter1 = /** @class */ (function () {
+-    function Greeter1(message) {
++const lambda = (...args) => { };
++@lambda(Enum.No)
++@deco(Enum.No)
++class Greeter1 {
++    @lambda(Enum.No)
++    @deco(Enum.No)
++    greeting;
++    constructor(message) {
+         this.greeting = message;
+     }
+-    Greeter1.prototype.greet = function () {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter1.prototype.greet1 = function () {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter1.prototype.greet2 = function (param) {
+-        return "Hello, " + this.greeting;
+-    };
+-    Greeter1.prototype.greet3 = function (param) {
+-        return "Hello, " + this.greeting;
 -    };
 -    __decorate([
 -        lambda(Enum.No),
@@ -133,16 +144,7 @@
 -        deco(Enum.No)
 -    ], Greeter1);
 -    return Greeter1;
--})();
-+@lambda(Enum.No)
-+@deco(Enum.No)
-+class Greeter1 {
-+    @lambda(Enum.No)
-+    @deco(Enum.No)
-+    greeting;
-+    constructor(message) {
-+        this.greeting = message;
-+    }
+-}());
 +    @lambda(Enum.No)
 +    @deco(Enum.No)
 +    greet() {
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorWithNegativeLiteralTypeNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorWithNegativeLiteralTypeNoCrash.js.diff
index 3901d9ac35..f86f309a59 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorWithNegativeLiteralTypeNoCrash.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorWithNegativeLiteralTypeNoCrash.js.diff
@@ -13,18 +13,16 @@
 -var __metadata = (this && this.__metadata) || function (k, v) {
 -    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
 -};
--let A = (() => {
--    class A {
--        constructor() {
--            this.field1 = -1;
--        }
+-var A = /** @class */ (function () {
+-    function A() {
+-        this.field1 = -1;
 -    }
 -    __decorate([
 -        decorator,
 -        __metadata("design:type", Number)
 -    ], A.prototype, "field1", void 0);
 -    return A;
--})();
+-}());
 +class A {
 +    @decorator
 +    field1 = -1;
diff --git a/testdata/baselines/reference/submodule/compiler/decoratorWithUnderscoreMethod.js.diff b/testdata/baselines/reference/submodule/compiler/decoratorWithUnderscoreMethod.js.diff
index e0bece90d5..c8279995b1 100644
--- a/testdata/baselines/reference/submodule/compiler/decoratorWithUnderscoreMethod.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/decoratorWithUnderscoreMethod.js.diff
@@ -4,19 +4,19 @@
          //propKey has three underscores as prefix, but the method has only two underscores
      };
  }
--let A = (() => {
--    class A {
--        __foo(bar) {
--            // do something with bar
--        }
+-var A = /** @class */ (function () {
+-    function A() {
+-    }
+-    A.prototype.__foo = function (bar) {
 +class A {
 +    @dec()
 +    __foo(bar) {
-+        // do something with bar
-     }
+         // do something with bar
+-    };
 -    __decorate([
 -        dec()
 -    ], A.prototype, "__foo", null);
 -    return A;
--})();
+-}());
++    }
 +}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deepComparisons.js.diff b/testdata/baselines/reference/submodule/compiler/deepComparisons.js.diff
new file mode 100644
index 0000000000..15459dd209
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deepComparisons.js.diff
@@ -0,0 +1,23 @@
+--- old.deepComparisons.js
++++ new.deepComparisons.js
+@@= skipped -41, +41 lines =@@
+
+ //// [deepComparisons.js]
+ function f1() {
+-    var v1 = 0; // Error
+-    var v2 = 0; // Error
+-    var v3 = 0; // No error
++    let v1 = 0; // Error
++    let v2 = 0; // Error
++    let v3 = 0; // No error
+ }
+ function f2() {
+-    var x = 0; // Error, excessive stack depth
++    let x = 0; // Error, excessive stack depth
+ }
+ function f3() {
+-    var x = 0; // No error!
++    let x = 0; // No error!
+ }
+ function g() {
+     return f();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.js.diff b/testdata/baselines/reference/submodule/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.js.diff
new file mode 100644
index 0000000000..9ba172c503
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deepExcessPropertyCheckingWhenTargetIsIntersection.js.diff
@@ -0,0 +1,16 @@
+--- old.deepExcessPropertyCheckingWhenTargetIsIntersection.js
++++ new.deepExcessPropertyCheckingWhenTargetIsIntersection.js
+@@= skipped -30, +30 lines =@@
+
+
+ //// [deepExcessPropertyCheckingWhenTargetIsIntersection.js]
+-var TestComponent = function (props) {
++const TestComponent = (props) => {
+     return null;
+ };
+ TestComponent({ icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } } });
+-var TestComponent2 = function (props) {
++const TestComponent2 = (props) => {
+     return null;
+ };
+ TestComponent2({ icon: { props: { INVALID_PROP_NAME: 'share', ariaLabel: 'test label' } } });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deepKeysIndexing.js.diff b/testdata/baselines/reference/submodule/compiler/deepKeysIndexing.js.diff
new file mode 100644
index 0000000000..72f82d0659
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deepKeysIndexing.js.diff
@@ -0,0 +1,24 @@
+--- old.deepKeysIndexing.js
++++ new.deepKeysIndexing.js
+@@= skipped -58, +58 lines =@@
+
+
+ //// [deepKeysIndexing.js]
+-var Bar = /** @class */ (function () {
+-    function Bar() {
+-    }
+-    Bar.prototype.broken = function (k1, k2, value) { };
+-    Bar.prototype.working = function (k1, k2, value) { };
+-    Bar.prototype.workaround = function (k1, k2, value) { };
+-    return Bar;
+-}());
+-var bar = new Bar();
++class Bar {
++    broken(k1, k2, value) { }
++    working(k1, k2, value) { }
++    workaround(k1, k2, value) { }
++}
++const bar = new Bar();
+ // all 3 of the below should error on passing `true` for `"1"`
+ bar.broken("a", "1", true); // was broken in the past - with 2nd argument incorrectly of type "1" | "2" | "3".
+ bar.working("a", "1", true); // ok - true is not allowed
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.js.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.js.diff
index 8cb0b7c695..e1d936a5c1 100644
--- a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityErrorsCombined.js.diff
@@ -1,19 +1,34 @@
 --- old.deeplyNestedAssignabilityErrorsCombined.js
 +++ new.deeplyNestedAssignabilityErrorsCombined.js
-@@= skipped -21, +21 lines =@@
- let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } };
+@@= skipped -17, +17 lines =@@
+ x2 = y2;
+
+ //// [deeplyNestedAssignabilityErrorsCombined.js]
+-var x = { a: { b: { c: { d: { e: { f: function () { return { g: "hello" }; } } } } } } };
+-var y = { a: { b: { c: { d: { e: { f: function () { return { g: 12345 }; } } } } } } };
++let x = { a: { b: { c: { d: { e: { f() { return { g: "hello" }; } } } } } } };
++let y = { a: { b: { c: { d: { e: { f() { return { g: 12345 }; } } } } } } };
  x = y;
- class Ctor1 {
--    constructor() {
+-var Ctor1 = /** @class */ (function () {
+-    function Ctor1() {
 -        this.g = "ok";
 -    }
-+    g = "ok";
- }
- class Ctor2 {
--    constructor() {
+-    return Ctor1;
+-}());
+-var Ctor2 = /** @class */ (function () {
+-    function Ctor2() {
 -        this.g = 12;
 -    }
+-    return Ctor2;
+-}());
+-var x2 = { a: { b: { c: { d: { e: { f: Ctor1 } } } } } };
+-var y2 = { a: { b: { c: { d: { e: { f: Ctor2 } } } } } };
++class Ctor1 {
++    g = "ok";
++}
++class Ctor2 {
 +    g = 12;
- }
- let x2 = { a: { b: { c: { d: { e: { f: Ctor1 } } } } } };
- let y2 = { a: { b: { c: { d: { e: { f: Ctor2 } } } } } };
\ No newline at end of file
++}
++let x2 = { a: { b: { c: { d: { e: { f: Ctor1 } } } } } };
++let y2 = { a: { b: { c: { d: { e: { f: Ctor2 } } } } } };
+ x2 = y2;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.js.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.js.diff
new file mode 100644
index 0000000000..448ad23a35
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedAssignabilityIssue.js.diff
@@ -0,0 +1,11 @@
+--- old.deeplyNestedAssignabilityIssue.js
++++ new.deeplyNestedAssignabilityIssue.js
+@@= skipped -32, +32 lines =@@
+
+
+ //// [deeplyNestedAssignabilityIssue.js]
+-var x = {
++const x = {
+     something: {
+         another: {
+             more: {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedCheck.js.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedCheck.js.diff
index 28297b816c..d65ae923e2 100644
--- a/testdata/baselines/reference/submodule/compiler/deeplyNestedCheck.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedCheck.js.diff
@@ -5,9 +5,11 @@
 
  //// [deeplyNestedCheck.js]
 -// Repro from #14794
- const x = {
+-var x = {
++const x = {
      b: [
          {
+             c: {
 @@= skipped -13, +12 lines =@@
                                      {
                                          g: {
@@ -18,4 +20,12 @@
 +                                                {},
                                              ],
                                          },
-                                     },
\ No newline at end of file
+                                     },
+@@= skipped -16, +14 lines =@@
+     ],
+ };
+ // Repro from 34619
+-var a1 = [[[[[42]]]]];
+-var a2 = [[[[[[[[[[42]]]]]]]]]];
++const a1 = [[[[[42]]]]];
++const a2 = [[[[[[[[[[42]]]]]]]]]];
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedConditionalTypes.types.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedConditionalTypes.types.diff
new file mode 100644
index 0000000000..36bf4ab092
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedConditionalTypes.types.diff
@@ -0,0 +1,8 @@
+--- old.deeplyNestedConditionalTypes.types
++++ new.deeplyNestedConditionalTypes.types
+@@= skipped -109, +109 lines =@@
+ >T0 : "99"
+
+ type T1 = Foo;
+->T1 : "99" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98"
++>T1 : "0" | "1" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "2" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "3" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "4" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "5" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "6" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "7" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "8" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "9" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98" | "99"
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedConstraints.js.diff
index aa5c1605a1..a7d66a89a4 100644
--- a/testdata/baselines/reference/submodule/compiler/deeplyNestedConstraints.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedConstraints.js.diff
@@ -6,6 +6,18 @@
  //// [deeplyNestedConstraints.js]
 -"use strict";
 -// Repro from #41931
- class BufferPool {
-     setArray2(_, array) {
-         array.length; // Requires exploration of >5 levels of constraints
\ No newline at end of file
+-var BufferPool = /** @class */ (function () {
+-    function BufferPool() {
+-    }
+-    BufferPool.prototype.setArray2 = function (_, array) {
++class BufferPool {
++    setArray2(_, array) {
+         array.length; // Requires exploration of >5 levels of constraints
+-    };
+-    return BufferPool;
+-}());
++    }
++}
+
+
+ //// [deeplyNestedConstraints.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deeplyNestedMappedTypes.types.diff b/testdata/baselines/reference/submodule/compiler/deeplyNestedMappedTypes.types.diff
index ffdfe007e4..f4c5f553ec 100644
--- a/testdata/baselines/reference/submodule/compiler/deeplyNestedMappedTypes.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/deeplyNestedMappedTypes.types.diff
@@ -1,6 +1,15 @@
 --- old.deeplyNestedMappedTypes.types
 +++ new.deeplyNestedMappedTypes.types
-@@= skipped -212, +212 lines =@@
+@@= skipped -67, +67 lines =@@
+ >A : A
+ >a : { b: { c: 1 | { d: 2000; }; }; } | undefined
+ >b : { c: 1 | { d: 2000; }; }
+->c : { d: 2000; } | 1
++>c : 1 | { d: 2000; }
+ >d : 2000
+
+ type B = { a?: { b: { c: { d: { e: { f: { g: 2 }}}}, x: 1000 }}}
+@@= skipped -145, +145 lines =@@
  })
 
  function problematicFunction1(ors: Input[]): Output[] {
@@ -26,4 +35,22 @@
 +>problematicFunction3 : (ors: { level1: { level2: { foo: string; }; }; }[]) => { level1: { level2: { foo: string; bar: string; }; }; }[]
  >ors : { level1: { level2: { foo: string; }; }; }[]
  >Input.static : { level1: { level2: { foo: string; }; }; }
- >Input : TObject<{ level1: TObject<{ level2: TObject<{ foo: TString; }>; }>; }>
\ No newline at end of file
+ >Input : TObject<{ level1: TObject<{ level2: TObject<{ foo: TString; }>; }>; }>
+@@= skipped -85, +85 lines =@@
+ >OptionalPropertyKeys : OptionalPropertyKeys
+
+ export type RequiredPropertyKeys = keyof Omit | ReadonlyPropertyKeys | OptionalPropertyKeys>
+->RequiredPropertyKeys : Exclude | ReadonlyPropertyKeys | OptionalPropertyKeys>
++>RequiredPropertyKeys : Exclude | ReadonlyOptionalPropertyKeys | ReadonlyPropertyKeys>
+
+ export type PropertiesReducer> = Evaluate<(
+ >PropertiesReducer : PropertiesReducer
+@@= skipped -27, +27 lines =@@
+ >Kind : unique symbol
+
+     static: PropertiesReduce
+->static : Evaluate; }, ReadonlyOptionalPropertyKeys>>> & Readonly; }, ReadonlyPropertyKeys>> & Partial; }, OptionalPropertyKeys>> & Required; }, Exclude | ReadonlyPropertyKeys | OptionalPropertyKeys>>>>
++>static : Evaluate; }, ReadonlyOptionalPropertyKeys>>> & Readonly; }, ReadonlyPropertyKeys>> & Partial; }, OptionalPropertyKeys>> & Required; }, Exclude | ReadonlyOptionalPropertyKeys | ReadonlyPropertyKeys>>>>
+
+     type: 'object'
+ >type : "object"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.errors.txt b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.errors.txt
index 3c2f0998ac..b13d583cfe 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.errors.txt
@@ -48,8 +48,8 @@ defaultArgsInFunctionExpressions.ts(28,15): error TS2708: Cannot use namespace '
 !!! error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
     
     // Instantiated module
-    module T { }
-    module U {
+    namespace T { }
+    namespace U {
         export var x;
     }
     
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js
index b12c8ad6ab..10f331f63d 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js
@@ -23,8 +23,8 @@ var f4: (a: number) => void = function (a = "") { };
 var f5: (a: (s: string) => any) => void = function (a = s => s) { };
 
 // Instantiated module
-module T { }
-module U {
+namespace T { }
+namespace U {
     export var x;
 }
 
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js.diff
new file mode 100644
index 0000000000..6a893a18d1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.js.diff
@@ -0,0 +1,52 @@
+--- old.defaultArgsInFunctionExpressions.js
++++ new.defaultArgsInFunctionExpressions.js
+@@= skipped -33, +33 lines =@@
+ f7().x;
+
+ //// [defaultArgsInFunctionExpressions.js]
+-var f = function (a) {
+-    if (a === void 0) { a = 3; }
+-    return a;
+-}; // Type should be (a?: number) => number
++var f = function (a = 3) { return a; }; // Type should be (a?: number) => number
+ var n = f(4);
+ n = f();
+ var s = f('');
+ s = f();
+ // Type check the default argument with the type annotation
+-var f2 = function (a) {
+-    if (a === void 0) { a = 3; }
+-    return a;
+-}; // Should error, but be of type (a: string) => string;
++var f2 = function (a = 3) { return a; }; // Should error, but be of type (a: string) => string;
+ s = f2('');
+ s = f2();
+ n = f2();
+ // Contextually type the default arg with the type annotation
+-var f3 = function (a) {
+-    if (a === void 0) { a = function (s) { return s; }; }
+-};
++var f3 = function (a = (s) => s) { };
+ // Type check using the function's contextual type
+-var f4 = function (a) {
+-    if (a === void 0) { a = ""; }
+-};
++var f4 = function (a = "") { };
+ // Contextually type the default arg using the function's contextual type
+-var f5 = function (a) {
+-    if (a === void 0) { a = function (s) { return s; }; }
+-};
++var f5 = function (a = s => s) { };
+ var U;
+ (function (U) {
+ })(U || (U = {}));
+-var f6 = function (t) {
+-    if (t === void 0) { t = T; }
+-};
+-var f7 = function (t) {
+-    if (t === void 0) { t = U; }
+-    return t;
+-};
++var f6 = (t = T) => { };
++var f7 = (t = U) => { return t; };
+ f7().x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.symbols b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.symbols
index 34adf9dd69..27edda98fb 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.symbols
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.symbols
@@ -64,11 +64,11 @@ var f5: (a: (s: string) => any) => void = function (a = s => s) { };
 >s : Symbol(s, Decl(defaultArgsInFunctionExpressions.ts, 19, 55))
 
 // Instantiated module
-module T { }
+namespace T { }
 >T : Symbol(T, Decl(defaultArgsInFunctionExpressions.ts, 19, 76))
 
-module U {
->U : Symbol(U, Decl(defaultArgsInFunctionExpressions.ts, 22, 12))
+namespace U {
+>U : Symbol(U, Decl(defaultArgsInFunctionExpressions.ts, 22, 15))
 
     export var x;
 >x : Symbol(x, Decl(defaultArgsInFunctionExpressions.ts, 24, 14))
@@ -81,7 +81,7 @@ var f6 = (t = T) => { };
 var f7 = (t = U) => { return t; };
 >f7 : Symbol(f7, Decl(defaultArgsInFunctionExpressions.ts, 28, 3))
 >t : Symbol(t, Decl(defaultArgsInFunctionExpressions.ts, 28, 10))
->U : Symbol(U, Decl(defaultArgsInFunctionExpressions.ts, 22, 12))
+>U : Symbol(U, Decl(defaultArgsInFunctionExpressions.ts, 22, 15))
 >t : Symbol(t, Decl(defaultArgsInFunctionExpressions.ts, 28, 10))
 
 f7().x;
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.types b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.types
index 993e90374b..20ea891044 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.types
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInFunctionExpressions.types
@@ -91,8 +91,8 @@ var f5: (a: (s: string) => any) => void = function (a = s => s) { };
 >s : string
 
 // Instantiated module
-module T { }
-module U {
+namespace T { }
+namespace U {
 >U : typeof U
 
     export var x;
diff --git a/testdata/baselines/reference/submodule/compiler/defaultArgsInOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/defaultArgsInOverloads.js.diff
new file mode 100644
index 0000000000..5fd7581985
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultArgsInOverloads.js.diff
@@ -0,0 +1,25 @@
+--- old.defaultArgsInOverloads.js
++++ new.defaultArgsInOverloads.js
+@@= skipped -21, +21 lines =@@
+ var f: (a = 3) => number;
+
+ //// [defaultArgsInOverloads.js]
+-function fun(a) {
+-    if (a === void 0) { a = null; }
++function fun(a = null) { }
++class C {
++    fun(a = null) { }
++    static fun(a = null) { }
+ }
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype.fun = function (a) {
+-        if (a === void 0) { a = null; }
+-    };
+-    C.fun = function (a) {
+-        if (a === void 0) { a = null; }
+-    };
+-    return C;
+-}());
+ var f;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitDefaultImport.js.diff b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitDefaultImport.js.diff
index c452d600c7..bfe0ea17a8 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitDefaultImport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitDefaultImport.js.diff
@@ -1,6 +1,18 @@
 --- old.defaultDeclarationEmitDefaultImport.js
 +++ new.defaultDeclarationEmitDefaultImport.js
-@@= skipped -19, +19 lines =@@
+@@= skipped -12, +12 lines =@@
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getSomething = getSomething;
+ function getSomething() { return null; }
+-var Something = /** @class */ (function () {
+-    function Something() {
+-    }
+-    return Something;
+-}());
++class Something {
++}
+ exports.default = Something;
+ //// [main.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.instance = void 0;
diff --git a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitNamedCorrectly.js.diff b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitNamedCorrectly.js.diff
index 8ddf6a5f80..3ecd87228f 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitNamedCorrectly.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitNamedCorrectly.js.diff
@@ -4,12 +4,12 @@
  function make(x) {
      return null;
  }
--let MyComponent = (() => {
--    class MyComponent {
+-var MyComponent = /** @class */ (function () {
+-    function MyComponent() {
 -    }
 -    MyComponent.create = make(MyComponent);
 -    return MyComponent;
--})();
+-}());
 +class MyComponent {
 +    props;
 +    static create = make(MyComponent);
diff --git a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitShadowedNamedCorrectly.js.diff b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitShadowedNamedCorrectly.js.diff
index 6718c3ad88..0cbd1fe3ce 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitShadowedNamedCorrectly.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultDeclarationEmitShadowedNamedCorrectly.js.diff
@@ -9,12 +9,23 @@
  function make(x) {
      return null;
  }
- class MyComponent {
+-var MyComponent = /** @class */ (function () {
+-    function MyComponent() {
+-    }
+-    return MyComponent;
+-}());
++class MyComponent {
 +    props;
- }
++}
  exports.default = MyComponent;
  var Something;
-@@= skipped -31, +32 lines =@@
+ (function (Something) {
+-    var MyComponent = 2; // Shadow declaration, so symbol is only usable via the self-import
++    let MyComponent = 2; // Shadow declaration, so symbol is only usable via the self-import
+     Something.create = make(me.default);
+ })(Something || (exports.Something = Something = {}));
+
+@@= skipped -34, +32 lines =@@
      props: Props;
  }
  export declare namespace Something {
diff --git a/testdata/baselines/reference/submodule/compiler/defaultIndexProps1.js.diff b/testdata/baselines/reference/submodule/compiler/defaultIndexProps1.js.diff
index c1018cd606..f38a59105a 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultIndexProps1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultIndexProps1.js.diff
@@ -1,13 +1,18 @@
 --- old.defaultIndexProps1.js
 +++ new.defaultIndexProps1.js
-@@= skipped -15, +15 lines =@@
+@@= skipped -14, +14 lines =@@
+
 
  //// [defaultIndexProps1.js]
- class Foo {
--    constructor() {
+-var Foo = /** @class */ (function () {
+-    function Foo() {
 -        this.v = "Yo";
 -    }
+-    return Foo;
+-}());
++class Foo {
 +    v = "Yo";
- }
++}
  var f = new Foo();
- var q = f["v"];
\ No newline at end of file
+ var q = f["v"];
+ var o = { v: "Yo2" };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultIndexProps2.js.diff b/testdata/baselines/reference/submodule/compiler/defaultIndexProps2.js.diff
index d75d3b004b..2f78f4ad68 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultIndexProps2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultIndexProps2.js.diff
@@ -1,13 +1,18 @@
 --- old.defaultIndexProps2.js
 +++ new.defaultIndexProps2.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+
 
  //// [defaultIndexProps2.js]
- class Foo {
--    constructor() {
+-var Foo = /** @class */ (function () {
+-    function Foo() {
 -        this.v = "Yo";
 -    }
+-    return Foo;
+-}());
++class Foo {
 +    v = "Yo";
- }
++}
  var f = new Foo();
- // WScript.Echo(f[0]);
\ No newline at end of file
+ // WScript.Echo(f[0]);
+ var o = { v: "Yo2" };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultKeywordWithoutExport1.js.diff b/testdata/baselines/reference/submodule/compiler/defaultKeywordWithoutExport1.js.diff
index 6f2ceb0597..cc0cecf302 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultKeywordWithoutExport1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultKeywordWithoutExport1.js.diff
@@ -10,14 +10,14 @@
 -    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
 -    return c > 3 && r && Object.defineProperty(target, key, r), r;
 -};
--let default_1 = (() => {
--    let default_1 = class {
--    };
+-var default_1 = /** @class */ (function () {
+-    function default_1() {
+-    }
 -    default_1 = __decorate([
 -        decorator
 -    ], default_1);
 -    return default_1;
--})();
+-}());
 +@decorator
 +default class {
 +}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultOfAnyInStrictNullChecks.js.diff b/testdata/baselines/reference/submodule/compiler/defaultOfAnyInStrictNullChecks.js.diff
new file mode 100644
index 0000000000..74c9391fc4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultOfAnyInStrictNullChecks.js.diff
@@ -0,0 +1,10 @@
+--- old.defaultOfAnyInStrictNullChecks.js
++++ new.defaultOfAnyInStrictNullChecks.js
+@@= skipped -17, +17 lines =@@
+     try {
+     }
+     catch (e) {
+-        var s = e.message;
++        let s = e.message;
+     }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.js.diff b/testdata/baselines/reference/submodule/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.js.diff
new file mode 100644
index 0000000000..1847c61afa
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.js.diff
@@ -0,0 +1,64 @@
+--- old.defaultParameterAddsUndefinedWithStrictNullChecks.js
++++ new.defaultParameterAddsUndefinedWithStrictNullChecks.js
+@@= skipped -61, +61 lines =@@
+
+
+ //// [defaultParameterAddsUndefinedWithStrictNullChecks.js]
+-function f(addUndefined1, addUndefined2) {
+-    if (addUndefined1 === void 0) { addUndefined1 = "J"; }
++function f(addUndefined1 = "J", addUndefined2) {
+     return addUndefined1.length + (addUndefined2 || 0);
+ }
+-function g(addUndefined, addDefined) {
+-    if (addUndefined === void 0) { addUndefined = "J"; }
++function g(addUndefined = "J", addDefined) {
+     return addUndefined.length + addDefined;
+ }
+-var total = f() + f('a', 1) + f('b') + f(undefined, 2);
++let total = f() + f('a', 1) + f('b') + f(undefined, 2);
+ total = g('c', 3) + g(undefined, 4);
+-function foo1(x, b) {
+-    if (x === void 0) { x = "string"; }
++function foo1(x = "string", b) {
+     x.length;
+ }
+-function foo2(x, b) {
+-    if (x === void 0) { x = "string"; }
++function foo2(x = "string", b) {
+     x.length; // ok, should be string
+ }
+-function foo3(x, b) {
+-    if (x === void 0) { x = "string"; }
++function foo3(x = "string", b) {
+     x.length; // ok, should be string
+     x = undefined;
+ }
+-function foo4(x, b) {
+-    if (x === void 0) { x = undefined; }
++function foo4(x = undefined, b) {
+     x; // should be string | undefined
+     x = undefined;
+ }
+-function allowsNull(val) {
+-    if (val === void 0) { val = ""; }
++function allowsNull(val = "") {
+     val = null;
+     val = 'string and null are both ok';
+ }
+@@= skipped -39, +32 lines =@@
+ foo2(undefined, 1);
+ foo3(undefined, 1);
+ foo4(undefined, 1);
+-function removeUndefinedButNotFalse(x) {
+-    if (x === void 0) { x = true; }
++function removeUndefinedButNotFalse(x = true) {
+     if (x === false) {
+         return x;
+     }
+ }
+-function removeNothing(y) {
+-    if (y === void 0) { y = cond ? true : undefined; }
++function removeNothing(y = cond ? true : undefined) {
+     if (y !== undefined) {
+         if (y === false) {
+             return y;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultParameterTrailingComments.js.diff b/testdata/baselines/reference/submodule/compiler/defaultParameterTrailingComments.js.diff
new file mode 100644
index 0000000000..99bac7772b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultParameterTrailingComments.js.diff
@@ -0,0 +1,18 @@
+--- old.defaultParameterTrailingComments.js
++++ new.defaultParameterTrailingComments.js
+@@= skipped -7, +7 lines =@@
+ function foo(defaultParam = 10 /*emit only once*/) {}
+
+ //// [defaultParameterTrailingComments.js]
+-var C = /** @class */ (function () {
+-    function C(defaultParam /* Emit only once*/) {
+-        if (defaultParam === void 0) { defaultParam = false; }
+-    }
+-    return C;
+-}());
+-function foo(defaultParam /*emit only once*/) {
+-    if (defaultParam === void 0) { defaultParam = 10; }
++class C {
++    constructor(defaultParam = false /* Emit only once*/) { }
+ }
++function foo(defaultParam = 10 /*emit only once*/) { }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultPropsEmptyCurlyBecomesAnyForJs.js.diff b/testdata/baselines/reference/submodule/compiler/defaultPropsEmptyCurlyBecomesAnyForJs.js.diff
index 96490a6aa9..390d02e824 100644
--- a/testdata/baselines/reference/submodule/compiler/defaultPropsEmptyCurlyBecomesAnyForJs.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/defaultPropsEmptyCurlyBecomesAnyForJs.js.diff
@@ -1,21 +1,78 @@
 --- old.defaultPropsEmptyCurlyBecomesAnyForJs.js
 +++ new.defaultPropsEmptyCurlyBecomesAnyForJs.js
-@@= skipped -28, +28 lines =@@
+@@= skipped -26, +26 lines =@@
+
+ //// [component.js]
  "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.MyFoo = void 0;
 -var library_1 = require("./library");
+-var MyFoo = /** @class */ (function (_super) {
+-    __extends(MyFoo, _super);
+-    function MyFoo() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    return MyFoo;
+-}(library_1.Foo));
 +const library_1 = require("./library");
- class MyFoo extends library_1.Foo {
++class MyFoo extends library_1.Foo {
 +    member;
- }
++}
  exports.MyFoo = MyFoo;
  //// [typed_component.js]
  "use strict";
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.TypedFoo = void 0;
 -var component_1 = require("./component");
+-var TypedFoo = /** @class */ (function (_super) {
+-    __extends(TypedFoo, _super);
+-    function TypedFoo() {
+-        var _this = _super.call(this, { x: "string", y: 42 }, { value: undefined }) || this;
+-        _this.props.x;
+-        _this.props.y;
+-        _this.state.value;
+-        _this.member;
+-        return _this;
 +const component_1 = require("./component");
- class TypedFoo extends component_1.MyFoo {
-     constructor() {
-         super({ x: "string", y: 42 }, { value: undefined });
\ No newline at end of file
++class TypedFoo extends component_1.MyFoo {
++    constructor() {
++        super({ x: "string", y: 42 }, { value: undefined });
++        this.props.x;
++        this.props.y;
++        this.state.value;
++        this.member;
+     }
+-    return TypedFoo;
+-}(component_1.MyFoo));
++}
+ exports.TypedFoo = TypedFoo;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultValueInConstructorOverload1.js.diff b/testdata/baselines/reference/submodule/compiler/defaultValueInConstructorOverload1.js.diff
new file mode 100644
index 0000000000..19c1b8ceae
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultValueInConstructorOverload1.js.diff
@@ -0,0 +1,15 @@
+--- old.defaultValueInConstructorOverload1.js
++++ new.defaultValueInConstructorOverload1.js
+@@= skipped -7, +7 lines =@@
+ }
+
+ //// [defaultValueInConstructorOverload1.js]
+-var C = /** @class */ (function () {
+-    function C(x) {
+-        if (x === void 0) { x = ''; }
++class C {
++    constructor(x = '') {
+     }
+-    return C;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/defaultValueInFunctionOverload1.js.diff b/testdata/baselines/reference/submodule/compiler/defaultValueInFunctionOverload1.js.diff
new file mode 100644
index 0000000000..7459931564
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/defaultValueInFunctionOverload1.js.diff
@@ -0,0 +1,10 @@
+--- old.defaultValueInFunctionOverload1.js
++++ new.defaultValueInFunctionOverload1.js
+@@= skipped -4, +4 lines =@@
+ function foo(x = '') { }
+
+ //// [defaultValueInFunctionOverload1.js]
+-function foo(x) {
+-    if (x === void 0) { x = ''; }
+-}
++function foo(x = '') { }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.js.diff b/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.js.diff
index 4d447e3693..49cbc6299a 100644
--- a/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.js.diff
@@ -8,4 +8,32 @@
 -// Repro from #17456
  function f2(a) {
      return f1(a, 'x');
- }
\ No newline at end of file
+ }
+@@= skipped -27, +25 lines =@@
+ declare function f1(a: A, b: B): {
+     [P in A | B]: any;
+ };
+-declare function f2(a: A): { [P in A | "x"]: any; };
++declare function f2(a: A): { [P in "x" | A]: any; };
+ declare function f3(x: 'a' | 'b'): {
+     a: any;
+     b: any;
+     x: any;
+ };
+-
+-
+-!!!! File deferredLookupTypeResolution.d.ts differs from original emit in noCheck emit
+-//// [deferredLookupTypeResolution.d.ts]
+-===================================================================
+---- Expected	The full check baseline
+-+++ Actual	with noCheck set
+-@@= skipped --41, +-39 lines =@@
+-     [P in A | B]: any;
+- };
+- declare function f2(a: A): { [P in A | "x"]: any; };
+- declare function f3(x: 'a' | 'b'): {
+-+    x: any;
+-     a: any;
+-     b: any;
+--    x: any;
+- };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.types.diff b/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.types.diff
new file mode 100644
index 0000000000..f8b56f4d12
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deferredLookupTypeResolution.types.diff
@@ -0,0 +1,24 @@
+--- old.deferredLookupTypeResolution.types
++++ new.deferredLookupTypeResolution.types
+@@= skipped -33, +33 lines =@@
+ >b : B
+
+ function f2(a: A) {
+->f2 : (a: A) => { [P in A | "x"]: any; }
++>f2 : (a: A) => { [P in "x" | A]: any; }
+ >a : A
+
+     return f1(a, 'x');
+->f1(a, 'x') : { [P in A | "x"]: any; }
++>f1(a, 'x') : { [P in "x" | A]: any; }
+ >f1 : (a: A_1, b: B) => { [P in A_1 | B]: any; }
+ >a : A
+ >'x' : "x"
+@@= skipped -16, +16 lines =@@
+
+     return f2(x);
+ >f2(x) : { a: any; b: any; x: any; }
+->f2 : (a: A) => { [P in A | "x"]: any; }
++>f2 : (a: A) => { [P in "x" | A]: any; }
+ >x : "a" | "b"
+ }
diff --git a/testdata/baselines/reference/submodule/compiler/definiteAssignmentOfDestructuredVariable.js.diff b/testdata/baselines/reference/submodule/compiler/definiteAssignmentOfDestructuredVariable.js.diff
index cc0f7cc5f7..d45b610c23 100644
--- a/testdata/baselines/reference/submodule/compiler/definiteAssignmentOfDestructuredVariable.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/definiteAssignmentOfDestructuredVariable.js.diff
@@ -1,10 +1,22 @@
 --- old.definiteAssignmentOfDestructuredVariable.js
 +++ new.definiteAssignmentOfDestructuredVariable.js
-@@= skipped -18, +18 lines =@@
+@@= skipped -17, +17 lines =@@
+ }
 
  //// [definiteAssignmentOfDestructuredVariable.js]
- class C {
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    C.prototype.method = function () {
+-        var _a = this.foo, a = _a.a, b = _a.b;
++class C {
 +    foo;
-     method() {
-         let { a, b } = this.foo;
-         !(a && b);
\ No newline at end of file
++    method() {
++        let { a, b } = this.foo;
+         !(a && b);
+         a;
+-    };
+-    return C;
+-}());
++    }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.js.diff b/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.js.diff
new file mode 100644
index 0000000000..d666c47b03
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.js.diff
@@ -0,0 +1,14 @@
+--- old.deleteReadonlyInStrictNullChecks.js
++++ new.deleteReadonlyInStrictNullChecks.js
+@@= skipped -6, +6 lines =@@
+
+
+ //// [deleteReadonlyInStrictNullChecks.js]
+-var Foo = /** @class */ (function () {
+-    function Foo() {
+-    }
+-    return Foo;
+-}());
++class Foo {
++}
+ delete Foo.name;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.symbols.diff b/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.symbols.diff
new file mode 100644
index 0000000000..1109473f3e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deleteReadonlyInStrictNullChecks.symbols.diff
@@ -0,0 +1,20 @@
+--- old.deleteReadonlyInStrictNullChecks.symbols
++++ new.deleteReadonlyInStrictNullChecks.symbols
+@@= skipped -1, +1 lines =@@
+
+ === deleteReadonlyInStrictNullChecks.ts ===
+ interface Function { readonly name: string; }
+->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(deleteReadonlyInStrictNullChecks.ts, 0, 0))
+->name : Symbol(Function.name, Decl(lib.es2015.core.d.ts, --, --), Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(deleteReadonlyInStrictNullChecks.ts, 0, 0))
++>name : Symbol(Function.name, Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
+
+ class Foo {}
+ >Foo : Symbol(Foo, Decl(deleteReadonlyInStrictNullChecks.ts, 0, 45))
+
+ delete Foo.name;
+->Foo.name : Symbol(Function.name, Decl(lib.es2015.core.d.ts, --, --), Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
++>Foo.name : Symbol(Function.name, Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
+ >Foo : Symbol(Foo, Decl(deleteReadonlyInStrictNullChecks.ts, 0, 45))
+->name : Symbol(Function.name, Decl(lib.es2015.core.d.ts, --, --), Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
++>name : Symbol(Function.name, Decl(deleteReadonlyInStrictNullChecks.ts, 0, 20))
diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js.diff b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js.diff
new file mode 100644
index 0000000000..43fa0ae77f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions1.js.diff
@@ -0,0 +1,8 @@
+--- old.deprecatedCompilerOptions1.js
++++ new.deprecatedCompilerOptions1.js
+@@= skipped -4, +4 lines =@@
+
+
+ //// [a.js]
+-var a = 1;
++const a = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js.diff b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js.diff
new file mode 100644
index 0000000000..6259e1a3b4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions3.js.diff
@@ -0,0 +1,8 @@
+--- old.deprecatedCompilerOptions3.js
++++ new.deprecatedCompilerOptions3.js
+@@= skipped -4, +4 lines =@@
+
+
+ //// [a.js]
+-var a = 1;
++const a = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js.diff b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js.diff
new file mode 100644
index 0000000000..f7bd5b783b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions4.js.diff
@@ -0,0 +1,8 @@
+--- old.deprecatedCompilerOptions4.js
++++ new.deprecatedCompilerOptions4.js
+@@= skipped -4, +4 lines =@@
+
+
+ //// [a.js]
+-var a = 1;
++const a = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js.diff b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js.diff
new file mode 100644
index 0000000000..bd81f89dcb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/deprecatedCompilerOptions5.js.diff
@@ -0,0 +1,8 @@
+--- old.deprecatedCompilerOptions5.js
++++ new.deprecatedCompilerOptions5.js
+@@= skipped -4, +4 lines =@@
+
+
+ //// [a.js]
+-var a = 1;
++const a = 1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.diff b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.diff
index 6773e3172c..3be6e3e24e 100644
--- a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.diff
@@ -1,24 +1,67 @@
 --- old.derivedClassConstructorWithExplicitReturns01.js
 +++ new.derivedClassConstructorWithExplicitReturns01.js
-@@= skipped -36, +36 lines =@@
+@@= skipped -35, +35 lines =@@
+ }
 
  //// [derivedClassConstructorWithExplicitReturns01.js]
- class C {
-+    cProp = 10;
-     foo() { return "this never gets used."; }
-     constructor(value) {
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var C = /** @class */ (function () {
+-    function C(value) {
 -        this.cProp = 10;
++class C {
++    cProp = 10;
++    foo() { return "this never gets used."; }
++    constructor(value) {
          return {
              cProp: value,
-             foo() {
-@@= skipped -12, +12 lines =@@
+-            foo: function () {
++            foo() {
+                 return "well this looks kinda C-ish.";
+             }
+         };
      }
- }
- class D extends C {
+-    C.prototype.foo = function () { return "this never gets used."; };
+-    return C;
+-}());
+-var D = /** @class */ (function (_super) {
+-    __extends(D, _super);
+-    function D(a) {
+-        if (a === void 0) { a = 100; }
+-        var _this = _super.call(this, a) || this;
+-        _this.dProp = function () { return _this; };
++}
++class D extends C {
 +    dProp = () => this;
-     constructor(a = 100) {
-         super(a);
--        this.dProp = () => this;
++    constructor(a = 100) {
++        super(a);
          if (Math.random() < 0.5) {
              "You win!";
-             return {
\ No newline at end of file
+             return {
+                 cProp: 1,
+-                dProp: function () { return _this; },
+-                foo: function () { return "You win!!!!!"; }
++                dProp: () => this,
++                foo() { return "You win!!!!!"; }
+             };
+         }
+         else
+             return null;
+     }
+-    return D;
+-}(C));
++}
+ //# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.map.diff b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.map.diff
index bc876ddc28..e1a4788d34 100644
--- a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.map.diff
+++ b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.js.map.diff
@@ -2,7 +2,7 @@
 +++ new.derivedClassConstructorWithExplicitReturns01.js.map
 @@= skipped -0, +0 lines =@@
  //// [derivedClassConstructorWithExplicitReturns01.js.map]
--{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;IAGH,GAAG,KAAK,OAAO,uBAAuB,CAAC,CAAC,CAAC;IAEzC,YAAY,KAAa;QAJzB,UAAK,GAAG,EAAE,CAAC;QAKP,OAAO;YACH,KAAK,EAAE,KAAK;YACZ,GAAG;gBACC,OAAO,8BAA8B,CAAC;YAC1C,CAAC;SACJ,CAAA;IACL,CAAC;CACJ;AAED,MAAM,CAAE,SAAQ,CAAC;IAGb,YAAY,CAAC,GAAG,GAAG;QACf,KAAK,CAAC,CAAC,CAAC,CAAC;QAHb,UAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;QAKf,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,UAAU,CAAA;YACV,OAAO;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;gBACjB,GAAG,KAAK,OAAO,cAAc,CAAA,CAAC,CAAC;aAClC,CAAC;QACN,CAAC;;YAEG,OAAO,IAAI,CAAC;IACpB,CAAC;CACJ"}
--//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgQyB7DQogICAgZm9vKCkgeyByZXR1cm4gInRoaXMgbmV2ZXIgZ2V0cyB1c2VkLiI7IH0NCiAgICBjb25zdHJ1Y3Rvcih2YWx1ZSkgew0KICAgICAgICB0aGlzLmNQcm9wID0gMTA7DQogICAgICAgIHJldHVybiB7DQogICAgICAgICAgICBjUHJvcDogdmFsdWUsDQogICAgICAgICAgICBmb28oKSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfTsNCiAgICB9DQp9DQpjbGFzcyBEIGV4dGVuZHMgQyB7DQogICAgY29uc3RydWN0b3IoYSA9IDEwMCkgew0KICAgICAgICBzdXBlcihhKTsNCiAgICAgICAgdGhpcy5kUHJvcCA9ICgpID0+IHRoaXM7DQogICAgICAgIGlmIChNYXRoLnJhbmRvbSgpIDwgMC41KSB7DQogICAgICAgICAgICAiWW91IHdpbiEiOw0KICAgICAgICAgICAgcmV0dXJuIHsNCiAgICAgICAgICAgICAgICBjUHJvcDogMSwNCiAgICAgICAgICAgICAgICBkUHJvcDogKCkgPT4gdGhpcywNCiAgICAgICAgICAgICAgICBmb28oKSB7IHJldHVybiAiWW91IHdpbiEhISEhIjsgfQ0KICAgICAgICAgICAgfTsNCiAgICAgICAgfQ0KICAgICAgICBlbHNlDQogICAgICAgICAgICByZXR1cm4gbnVsbDsNCiAgICB9DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVyaXZlZENsYXNzQ29uc3RydWN0b3JXaXRoRXhwbGljaXRSZXR1cm5zMDEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUM7SUFHSCxHQUFHLEtBQUssT0FBTyx1QkFBdUIsQ0FBQyxDQUFDLENBQUM7SUFFekMsWUFBWSxLQUFhO1FBSnpCLFVBQUssR0FBRyxFQUFFLENBQUM7UUFLUCxPQUFPO1lBQ0gsS0FBSyxFQUFFLEtBQUs7WUFDWixHQUFHO2dCQUNDLE9BQU8sOEJBQThCLENBQUM7WUFDMUMsQ0FBQztTQUNKLENBQUE7SUFDTCxDQUFDO0NBQ0o7QUFFRCxNQUFNLENBQUUsU0FBUSxDQUFDO0lBR2IsWUFBWSxDQUFDLEdBQUcsR0FBRztRQUNmLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUhiLFVBQUssR0FBRyxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUM7UUFLZixJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxHQUFHLEVBQUUsQ0FBQztZQUN0QixVQUFVLENBQUE7WUFDVixPQUFPO2dCQUNILEtBQUssRUFBRSxDQUFDO2dCQUNSLEtBQUssRUFBRSxHQUFHLEVBQUUsQ0FBQyxJQUFJO2dCQUNqQixHQUFHLEtBQUssT0FBTyxjQUFjLENBQUEsQ0FBQyxDQUFDO2FBQ2xDLENBQUM7UUFDTixDQUFDOztZQUVHLE9BQU8sSUFBSSxDQUFDO0lBQ3BCLENBQUM7Q0FDSiJ9,Y2xhc3MgQyB7CiAgICBjUHJvcCA9IDEwOwoKICAgIGZvbygpIHsgcmV0dXJuICJ0aGlzIG5ldmVyIGdldHMgdXNlZC4iOyB9CgogICAgY29uc3RydWN0b3IodmFsdWU6IG51bWJlcikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGNQcm9wOiB2YWx1ZSwKICAgICAgICAgICAgZm9vKCkgewogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQoKY2xhc3MgRCBleHRlbmRzIEMgewogICAgZFByb3AgPSAoKSA9PiB0aGlzOwoKICAgIGNvbnN0cnVjdG9yKGEgPSAxMDApIHsKICAgICAgICBzdXBlcihhKTsKCiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPCAwLjUpIHsKICAgICAgICAgICAgIllvdSB3aW4hIgogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgY1Byb3A6IDEsCiAgICAgICAgICAgICAgICBkUHJvcDogKCkgPT4gdGhpcywKICAgICAgICAgICAgICAgIGZvbygpIHsgcmV0dXJuICJZb3Ugd2luISEhISEiIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KfQ==
+-{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;IAKI,WAAY,KAAa;QAJzB,UAAK,GAAG,EAAE,CAAC;QAKP,OAAO;YACH,KAAK,EAAE,KAAK;YACZ,GAAG;gBACC,OAAO,8BAA8B,CAAC;YAC1C,CAAC;SACJ,CAAA;IACL,CAAC;IATD,eAAG,GAAH,cAAQ,OAAO,uBAAuB,CAAC,CAAC,CAAC;IAU7C,QAAC;AAAD,CAAC,AAbD,IAaC;AAED;IAAgB,qBAAC;IAGb,WAAY,CAAO;QAAP,kBAAA,EAAA,OAAO;QACf,YAAA,MAAK,YAAC,CAAC,CAAC,SAAC;QAHb,WAAK,GAAG,cAAM,OAAA,KAAI,EAAJ,CAAI,CAAC;QAKf,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,UAAU,CAAA;YACV,OAAO;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,cAAM,OAAA,KAAI,EAAJ,CAAI;gBACjB,GAAG,gBAAK,OAAO,cAAc,CAAA,CAAC,CAAC;aAClC,CAAC;QACN,CAAC;;YAEG,OAAO,IAAI,CAAC;IACpB,CAAC;IACL,QAAC;AAAD,CAAC,AAjBD,CAAgB,CAAC,GAiBhB"}
+-//// https://sokra.github.io/source-map-visualization#base64,dmFyIF9fZXh0ZW5kcyA9ICh0aGlzICYmIHRoaXMuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkgew0KICAgIHZhciBleHRlbmRTdGF0aWNzID0gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fA0KICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2YgQXJyYXkgJiYgZnVuY3Rpb24gKGQsIGIpIHsgZC5fX3Byb3RvX18gPSBiOyB9KSB8fA0KICAgICAgICAgICAgZnVuY3Rpb24gKGQsIGIpIHsgZm9yICh2YXIgcCBpbiBiKSBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKGIsIHApKSBkW3BdID0gYltwXTsgfTsNCiAgICAgICAgcmV0dXJuIGV4dGVuZFN0YXRpY3MoZCwgYik7DQogICAgfTsNCiAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGIpIHsNCiAgICAgICAgaWYgKHR5cGVvZiBiICE9PSAiZnVuY3Rpb24iICYmIGIgIT09IG51bGwpDQogICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIgKyBTdHJpbmcoYikgKyAiIGlzIG5vdCBhIGNvbnN0cnVjdG9yIG9yIG51bGwiKTsNCiAgICAgICAgZXh0ZW5kU3RhdGljcyhkLCBiKTsNCiAgICAgICAgZnVuY3Rpb24gX18oKSB7IHRoaXMuY29uc3RydWN0b3IgPSBkOyB9DQogICAgICAgIGQucHJvdG90eXBlID0gYiA9PT0gbnVsbCA/IE9iamVjdC5jcmVhdGUoYikgOiAoX18ucHJvdG90eXBlID0gYi5wcm90b3R5cGUsIG5ldyBfXygpKTsNCiAgICB9Ow0KfSkoKTsNCnZhciBDID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkgew0KICAgIGZ1bmN0aW9uIEModmFsdWUpIHsNCiAgICAgICAgdGhpcy5jUHJvcCA9IDEwOw0KICAgICAgICByZXR1cm4gew0KICAgICAgICAgICAgY1Byb3A6IHZhbHVlLA0KICAgICAgICAgICAgZm9vOiBmdW5jdGlvbiAoKSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfTsNCiAgICB9DQogICAgQy5wcm90b3R5cGUuZm9vID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gInRoaXMgbmV2ZXIgZ2V0cyB1c2VkLiI7IH07DQogICAgcmV0dXJuIEM7DQp9KCkpOw0KdmFyIEQgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoX3N1cGVyKSB7DQogICAgX19leHRlbmRzKEQsIF9zdXBlcik7DQogICAgZnVuY3Rpb24gRChhKSB7DQogICAgICAgIGlmIChhID09PSB2b2lkIDApIHsgYSA9IDEwMDsgfQ0KICAgICAgICB2YXIgX3RoaXMgPSBfc3VwZXIuY2FsbCh0aGlzLCBhKSB8fCB0aGlzOw0KICAgICAgICBfdGhpcy5kUHJvcCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzOyB9Ow0KICAgICAgICBpZiAoTWF0aC5yYW5kb20oKSA8IDAuNSkgew0KICAgICAgICAgICAgIllvdSB3aW4hIjsNCiAgICAgICAgICAgIHJldHVybiB7DQogICAgICAgICAgICAgICAgY1Byb3A6IDEsDQogICAgICAgICAgICAgICAgZFByb3A6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzOyB9LA0KICAgICAgICAgICAgICAgIGZvbzogZnVuY3Rpb24gKCkgeyByZXR1cm4gIllvdSB3aW4hISEhISI7IH0NCiAgICAgICAgICAgIH07DQogICAgICAgIH0NCiAgICAgICAgZWxzZQ0KICAgICAgICAgICAgcmV0dXJuIG51bGw7DQogICAgfQ0KICAgIHJldHVybiBEOw0KfShDKSk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVyaXZlZENsYXNzQ29uc3RydWN0b3JXaXRoRXhwbGljaXRSZXR1cm5zMDEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQTtJQUtJLFdBQVksS0FBYTtRQUp6QixVQUFLLEdBQUcsRUFBRSxDQUFDO1FBS1AsT0FBTztZQUNILEtBQUssRUFBRSxLQUFLO1lBQ1osR0FBRztnQkFDQyxPQUFPLDhCQUE4QixDQUFDO1lBQzFDLENBQUM7U0FDSixDQUFBO0lBQ0wsQ0FBQztJQVRELGVBQUcsR0FBSCxjQUFRLE9BQU8sdUJBQXVCLENBQUMsQ0FBQyxDQUFDO0lBVTdDLFFBQUM7QUFBRCxDQUFDLEFBYkQsSUFhQztBQUVEO0lBQWdCLHFCQUFDO0lBR2IsV0FBWSxDQUFPO1FBQVAsa0JBQUEsRUFBQSxPQUFPO1FBQ2YsWUFBQSxNQUFLLFlBQUMsQ0FBQyxDQUFDLFNBQUM7UUFIYixXQUFLLEdBQUcsY0FBTSxPQUFBLEtBQUksRUFBSixDQUFJLENBQUM7UUFLZixJQUFJLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxHQUFHLEVBQUUsQ0FBQztZQUN0QixVQUFVLENBQUE7WUFDVixPQUFPO2dCQUNILEtBQUssRUFBRSxDQUFDO2dCQUNSLEtBQUssRUFBRSxjQUFNLE9BQUEsS0FBSSxFQUFKLENBQUk7Z0JBQ2pCLEdBQUcsZ0JBQUssT0FBTyxjQUFjLENBQUEsQ0FBQyxDQUFDO2FBQ2xDLENBQUM7UUFDTixDQUFDOztZQUVHLE9BQU8sSUFBSSxDQUFDO0lBQ3BCLENBQUM7SUFDTCxRQUFDO0FBQUQsQ0FBQyxBQWpCRCxDQUFnQixDQUFDLEdBaUJoQiJ9,Y2xhc3MgQyB7CiAgICBjUHJvcCA9IDEwOwoKICAgIGZvbygpIHsgcmV0dXJuICJ0aGlzIG5ldmVyIGdldHMgdXNlZC4iOyB9CgogICAgY29uc3RydWN0b3IodmFsdWU6IG51bWJlcikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGNQcm9wOiB2YWx1ZSwKICAgICAgICAgICAgZm9vKCkgewogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQoKY2xhc3MgRCBleHRlbmRzIEMgewogICAgZFByb3AgPSAoKSA9PiB0aGlzOwoKICAgIGNvbnN0cnVjdG9yKGEgPSAxMDApIHsKICAgICAgICBzdXBlcihhKTsKCiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPCAwLjUpIHsKICAgICAgICAgICAgIllvdSB3aW4hIgogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgY1Byb3A6IDEsCiAgICAgICAgICAgICAgICBkUHJvcDogKCkgPT4gdGhpcywKICAgICAgICAgICAgICAgIGZvbygpIHsgcmV0dXJuICJZb3Ugd2luISEhISEiIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KfQ==
 +{"version":3,"file":"derivedClassConstructorWithExplicitReturns01.js","sourceRoot":"","sources":["derivedClassConstructorWithExplicitReturns01.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;IACH,KAAK,GAAG,EAAE,CAAC;IAEX,GAAG,GAAG,EAAE,OAAO,uBAAuB,CAAC,CAAA,CAAE;IAEzC,YAAY,KAAa,EAAE;QACvB,OAAO;YACH,KAAK,EAAE,KAAK;YACZ,GAAG,GAAG;gBACF,OAAO,8BAA8B,CAAC;YAAA,CACzC;SACJ,CAAA;IAAA,CACJ;CACJ;AAED,MAAM,CAAE,SAAQ,CAAC;IACb,KAAK,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IAEnB,YAAY,CAAC,GAAG,GAAG,EAAE;QACjB,KAAK,CAAC,CAAC,CAAC,CAAC;QAET,IAAI,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACtB,UAAU,CAAA;YACV,OAAO;gBACH,KAAK,EAAE,CAAC;gBACR,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI;gBACjB,GAAG,GAAG,EAAE,OAAO,cAAc,CAAA,CAAA,CAAE;aAClC,CAAC;QACN,CAAC;;YAEG,OAAO,IAAI,CAAC;IAAA,CACnB;CACJ"}
 +//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgQyB7DQogICAgY1Byb3AgPSAxMDsNCiAgICBmb28oKSB7IHJldHVybiAidGhpcyBuZXZlciBnZXRzIHVzZWQuIjsgfQ0KICAgIGNvbnN0cnVjdG9yKHZhbHVlKSB7DQogICAgICAgIHJldHVybiB7DQogICAgICAgICAgICBjUHJvcDogdmFsdWUsDQogICAgICAgICAgICBmb28oKSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfTsNCiAgICB9DQp9DQpjbGFzcyBEIGV4dGVuZHMgQyB7DQogICAgZFByb3AgPSAoKSA9PiB0aGlzOw0KICAgIGNvbnN0cnVjdG9yKGEgPSAxMDApIHsNCiAgICAgICAgc3VwZXIoYSk7DQogICAgICAgIGlmIChNYXRoLnJhbmRvbSgpIDwgMC41KSB7DQogICAgICAgICAgICAiWW91IHdpbiEiOw0KICAgICAgICAgICAgcmV0dXJuIHsNCiAgICAgICAgICAgICAgICBjUHJvcDogMSwNCiAgICAgICAgICAgICAgICBkUHJvcDogKCkgPT4gdGhpcywNCiAgICAgICAgICAgICAgICBmb28oKSB7IHJldHVybiAiWW91IHdpbiEhISEhIjsgfQ0KICAgICAgICAgICAgfTsNCiAgICAgICAgfQ0KICAgICAgICBlbHNlDQogICAgICAgICAgICByZXR1cm4gbnVsbDsNCiAgICB9DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVyaXZlZENsYXNzQ29uc3RydWN0b3JXaXRoRXhwbGljaXRSZXR1cm5zMDEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZXJpdmVkQ2xhc3NDb25zdHJ1Y3RvcldpdGhFeHBsaWNpdFJldHVybnMwMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUM7SUFDSCxLQUFLLEdBQUcsRUFBRSxDQUFDO0lBRVgsR0FBRyxHQUFHLEVBQUUsT0FBTyx1QkFBdUIsQ0FBQyxDQUFBLENBQUU7SUFFekMsWUFBWSxLQUFhLEVBQUU7UUFDdkIsT0FBTztZQUNILEtBQUssRUFBRSxLQUFLO1lBQ1osR0FBRyxHQUFHO2dCQUNGLE9BQU8sOEJBQThCLENBQUM7WUFBQSxDQUN6QztTQUNKLENBQUE7SUFBQSxDQUNKO0NBQ0o7QUFFRCxNQUFNLENBQUUsU0FBUSxDQUFDO0lBQ2IsS0FBSyxHQUFHLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQztJQUVuQixZQUFZLENBQUMsR0FBRyxHQUFHLEVBQUU7UUFDakIsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRVQsSUFBSSxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxFQUFFLENBQUM7WUFDdEIsVUFBVSxDQUFBO1lBQ1YsT0FBTztnQkFDSCxLQUFLLEVBQUUsQ0FBQztnQkFDUixLQUFLLEVBQUUsR0FBRyxFQUFFLENBQUMsSUFBSTtnQkFDakIsR0FBRyxHQUFHLEVBQUUsT0FBTyxjQUFjLENBQUEsQ0FBQSxDQUFFO2FBQ2xDLENBQUM7UUFDTixDQUFDOztZQUVHLE9BQU8sSUFBSSxDQUFDO0lBQUEsQ0FDbkI7Q0FDSiJ9,Y2xhc3MgQyB7CiAgICBjUHJvcCA9IDEwOwoKICAgIGZvbygpIHsgcmV0dXJuICJ0aGlzIG5ldmVyIGdldHMgdXNlZC4iOyB9CgogICAgY29uc3RydWN0b3IodmFsdWU6IG51bWJlcikgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIGNQcm9wOiB2YWx1ZSwKICAgICAgICAgICAgZm9vKCkgewogICAgICAgICAgICAgICAgcmV0dXJuICJ3ZWxsIHRoaXMgbG9va3Mga2luZGEgQy1pc2guIjsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KfQoKY2xhc3MgRCBleHRlbmRzIEMgewogICAgZFByb3AgPSAoKSA9PiB0aGlzOwoKICAgIGNvbnN0cnVjdG9yKGEgPSAxMDApIHsKICAgICAgICBzdXBlcihhKTsKCiAgICAgICAgaWYgKE1hdGgucmFuZG9tKCkgPCAwLjUpIHsKICAgICAgICAgICAgIllvdSB3aW4hIgogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgY1Byb3A6IDEsCiAgICAgICAgICAgICAgICBkUHJvcDogKCkgPT4gdGhpcywKICAgICAgICAgICAgICAgIGZvbygpIHsgcmV0dXJuICJZb3Ugd2luISEhISEiIH0KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgIH0KfQ==
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.sourcemap.txt.diff
index 2ba14a1617..faeed51d04 100644
--- a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.sourcemap.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.sourcemap.txt.diff
@@ -1,18 +1,63 @@
 --- old.derivedClassConstructorWithExplicitReturns01.sourcemap.txt
 +++ new.derivedClassConstructorWithExplicitReturns01.sourcemap.txt
-@@= skipped -11, +11 lines =@@
- 1 >
- 2 >^^^^^^
- 3 >      ^
--4 >       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
+@@= skipped -7, +7 lines =@@
+ emittedFile:derivedClassConstructorWithExplicitReturns01.js
+ sourceFile:derivedClassConstructorWithExplicitReturns01.ts
+ -------------------------------------------------------------------
+->>>var __extends = (this && this.__extends) || (function () {
+->>>    var extendStatics = function (d, b) {
+->>>        extendStatics = Object.setPrototypeOf ||
+->>>            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+->>>            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+->>>        return extendStatics(d, b);
+->>>    };
+->>>    return function (d, b) {
+->>>        if (typeof b !== "function" && b !== null)
+->>>            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+->>>        extendStatics(d, b);
+->>>        function __() { this.constructor = d; }
+->>>        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+->>>    };
+->>>})();
+->>>var C = /** @class */ (function () {
+-1 >
+-2 >^^^^^^^^^^^^^^^^^^^^^^^^->
+-1 >
+-1 >Emitted(16, 1) Source(1, 1) + SourceIndex(0)
+----
+->>>    function C(value) {
+-1->^^^^
+-2 >    ^^^^^^^^^^^
+-3 >               ^^^^^
+-4 >                    ^^^^^->
+-1->class C {
+-  >    cProp = 10;
+-  >
+-  >    foo() { return "this never gets used."; }
+-  >
+-  >    
+-2 >    constructor(
+-3 >               value: number
+-1->Emitted(17, 5) Source(6, 5) + SourceIndex(0)
+-2 >Emitted(17, 16) Source(6, 17) + SourceIndex(0)
+-3 >Emitted(17, 21) Source(6, 30) + SourceIndex(0)
+----
+->>>        this.cProp = 10;
+-1->^^^^^^^^
+-2 >        ^^^^^^^^^^
+-3 >                  ^^^
++>>>class C {
++1 >
++2 >^^^^^^
++3 >      ^
 +4 >       ^^^^^^^^^->
- 1 >
- 2 >class 
- 3 >      C
-@@= skipped -8, +8 lines =@@
- 2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0)
- 3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0)
- ---
++1 >
++2 >class 
++3 >      C
++1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0)
++2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0)
++3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0)
++---
 +>>>    cProp = 10;
 +1->^^^^
 +2 >    ^^^^^
@@ -32,17 +77,9 @@
 +4 >Emitted(2, 15) Source(2, 15) + SourceIndex(0)
 +5 >Emitted(2, 16) Source(2, 16) + SourceIndex(0)
 +---
- >>>    foo() { return "this never gets used."; }
- 1->^^^^
- 2 >    ^^^
--3 >       ^^^^^
--4 >            ^^^^^^^
--5 >                   ^^^^^^^^^^^^^^^^^^^^^^^
--6 >                                          ^
--7 >                                           ^
--8 >                                            ^
--1-> {
--  >    cProp = 10;
++>>>    foo() { return "this never gets used."; }
++1->^^^^
++2 >    ^^^
 +3 >       ^^^
 +4 >          ^^
 +5 >            ^^^^^^^
@@ -51,23 +88,9 @@
 +8 >                                           ^
 +9 >                                            ^
 +1->
-   >
-   >    
- 2 >    foo
--3 >       () { 
--4 >            return 
--5 >                   "this never gets used."
--6 >                                          ;
--7 >                                            
--8 >                                            }
--1->Emitted(2, 5) Source(4, 5) + SourceIndex(0)
--2 >Emitted(2, 8) Source(4, 8) + SourceIndex(0)
--3 >Emitted(2, 13) Source(4, 13) + SourceIndex(0)
--4 >Emitted(2, 20) Source(4, 20) + SourceIndex(0)
--5 >Emitted(2, 43) Source(4, 43) + SourceIndex(0)
--6 >Emitted(2, 44) Source(4, 44) + SourceIndex(0)
--7 >Emitted(2, 45) Source(4, 45) + SourceIndex(0)
--8 >Emitted(2, 46) Source(4, 46) + SourceIndex(0)
++  >
++  >    
++2 >    foo
 +3 >       () 
 +4 >          { 
 +5 >            return 
@@ -84,25 +107,11 @@
 +7 >Emitted(3, 44) Source(4, 44) + SourceIndex(0)
 +8 >Emitted(3, 45) Source(4, 44) + SourceIndex(0)
 +9 >Emitted(3, 46) Source(4, 46) + SourceIndex(0)
- ---
- >>>    constructor(value) {
- 1 >^^^^
- 2 >    ^^^^^^^^^^^^
- 3 >                ^^^^^
--4 >                     ^^^^->
--1 >
--  >
--  >    
--2 >    constructor(
--3 >                value: number
--1 >Emitted(3, 5) Source(6, 5) + SourceIndex(0)
--2 >Emitted(3, 17) Source(6, 17) + SourceIndex(0)
--3 >Emitted(3, 22) Source(6, 30) + SourceIndex(0)
-----
-->>>        this.cProp = 10;
--1->^^^^^^^^
--2 >        ^^^^^^^^^^
--3 >                  ^^^
++---
++>>>    constructor(value) {
++1 >^^^^
++2 >    ^^^^^^^^^^^^
++3 >                ^^^^^
  4 >                     ^^
 -5 >                       ^
 -1->
@@ -110,11 +119,11 @@
 -3 >                   = 
 -4 >                     10
 -5 >                       ;
--1->Emitted(4, 9) Source(2, 5) + SourceIndex(0)
--2 >Emitted(4, 19) Source(2, 10) + SourceIndex(0)
--3 >Emitted(4, 22) Source(2, 13) + SourceIndex(0)
--4 >Emitted(4, 24) Source(2, 15) + SourceIndex(0)
--5 >Emitted(4, 25) Source(2, 16) + SourceIndex(0)
+-1->Emitted(18, 9) Source(2, 5) + SourceIndex(0)
+-2 >Emitted(18, 19) Source(2, 10) + SourceIndex(0)
+-3 >Emitted(18, 22) Source(2, 13) + SourceIndex(0)
+-4 >Emitted(18, 24) Source(2, 15) + SourceIndex(0)
+-5 >Emitted(18, 25) Source(2, 16) + SourceIndex(0)
 +1 >
 +  >
 +  >    
@@ -138,20 +147,48 @@
 +1 >{
    >        
  2 >        return 
- 1 >Emitted(5, 9) Source(7, 9) + SourceIndex(0)
-@@= skipped -92, +94 lines =@@
- >>>            foo() {
- 1 >^^^^^^^^^^^^
+-1 >Emitted(19, 9) Source(7, 9) + SourceIndex(0)
+-2 >Emitted(19, 16) Source(7, 16) + SourceIndex(0)
++1 >Emitted(5, 9) Source(7, 9) + SourceIndex(0)
++2 >Emitted(5, 16) Source(7, 16) + SourceIndex(0)
+ ---
+ >>>            cProp: value,
+ 1->^^^^^^^^^^^^
+ 2 >            ^^^^^
+ 3 >                 ^^
+ 4 >                   ^^^^^
+-5 >                        ^^^^^^^->
+ 1->{
+   >            
+ 2 >            cProp
+ 3 >                 : 
+ 4 >                   value
+-1->Emitted(20, 13) Source(8, 13) + SourceIndex(0)
+-2 >Emitted(20, 18) Source(8, 18) + SourceIndex(0)
+-3 >Emitted(20, 20) Source(8, 20) + SourceIndex(0)
+-4 >Emitted(20, 25) Source(8, 25) + SourceIndex(0)
++1->Emitted(6, 13) Source(8, 13) + SourceIndex(0)
++2 >Emitted(6, 18) Source(8, 18) + SourceIndex(0)
++3 >Emitted(6, 20) Source(8, 20) + SourceIndex(0)
++4 >Emitted(6, 25) Source(8, 25) + SourceIndex(0)
+ ---
+->>>            foo: function () {
+-1->^^^^^^^^^^^^
++>>>            foo() {
++1 >^^^^^^^^^^^^
  2 >            ^^^
 -3 >               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
+-1->,
 +3 >               ^^^
 +4 >                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
- 1 >,
++1 >,
    >            
  2 >            foo
+-1->Emitted(21, 13) Source(9, 13) + SourceIndex(0)
+-2 >Emitted(21, 16) Source(9, 16) + SourceIndex(0)
 +3 >               () 
- 1 >Emitted(7, 13) Source(9, 13) + SourceIndex(0)
- 2 >Emitted(7, 16) Source(9, 16) + SourceIndex(0)
++1 >Emitted(7, 13) Source(9, 13) + SourceIndex(0)
++2 >Emitted(7, 16) Source(9, 16) + SourceIndex(0)
 +3 >Emitted(7, 19) Source(9, 19) + SourceIndex(0)
  ---
  >>>                return "well this looks kinda C-ish.";
@@ -164,45 +201,180 @@
    >                
  2 >                return 
  3 >                       "well this looks kinda C-ish."
-@@= skipped -26, +29 lines =@@
+ 4 >                                                     ;
+-1->Emitted(22, 17) Source(10, 17) + SourceIndex(0)
+-2 >Emitted(22, 24) Source(10, 24) + SourceIndex(0)
+-3 >Emitted(22, 54) Source(10, 54) + SourceIndex(0)
+-4 >Emitted(22, 55) Source(10, 55) + SourceIndex(0)
++1->Emitted(8, 17) Source(10, 17) + SourceIndex(0)
++2 >Emitted(8, 24) Source(10, 24) + SourceIndex(0)
++3 >Emitted(8, 54) Source(10, 54) + SourceIndex(0)
++4 >Emitted(8, 55) Source(10, 55) + SourceIndex(0)
+ ---
+ >>>            }
  1 >^^^^^^^^^^^^
  2 >            ^
  1 >
 -  >            
 -2 >            }
--1 >Emitted(9, 13) Source(11, 13) + SourceIndex(0)
+-1 >Emitted(23, 13) Source(11, 13) + SourceIndex(0)
+-2 >Emitted(23, 14) Source(11, 14) + SourceIndex(0)
 +2 >            
 +  >                        }
 +1 >Emitted(9, 13) Source(10, 55) + SourceIndex(0)
- 2 >Emitted(9, 14) Source(11, 14) + SourceIndex(0)
++2 >Emitted(9, 14) Source(11, 14) + SourceIndex(0)
  ---
  >>>        };
-@@= skipped -18, +18 lines =@@
+ 1 >^^^^^^^^^
+@@= skipped -125, +146 lines =@@
+ 1 >
+   >        }
+ 2 >         
+-1 >Emitted(24, 10) Source(12, 10) + SourceIndex(0)
+-2 >Emitted(24, 11) Source(12, 10) + SourceIndex(0)
++1 >Emitted(10, 10) Source(12, 10) + SourceIndex(0)
++2 >Emitted(10, 11) Source(12, 10) + SourceIndex(0)
+ ---
+ >>>    }
  1 >^^^^
  2 >    ^
- 1 >
+-3 >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
+-1 >
 -  >    
 -2 >    }
--1 >Emitted(11, 5) Source(13, 5) + SourceIndex(0)
+-1 >Emitted(25, 5) Source(13, 5) + SourceIndex(0)
+-2 >Emitted(25, 6) Source(13, 6) + SourceIndex(0)
+----
+->>>    C.prototype.foo = function () { return "this never gets used."; };
+-1->^^^^
+-2 >    ^^^^^^^^^^^^^^^
+-3 >                   ^^^
+-4 >                      ^^^^^^^^^^^^^^
+-5 >                                    ^^^^^^^
+-6 >                                           ^^^^^^^^^^^^^^^^^^^^^^^
+-7 >                                                                  ^
+-8 >                                                                   ^
+-9 >                                                                    ^
+-1->
+-2 >    foo
+-3 >                   
+-4 >                      foo() { 
+-5 >                                    return 
+-6 >                                           "this never gets used."
+-7 >                                                                  ;
+-8 >                                                                    
+-9 >                                                                    }
+-1->Emitted(26, 5) Source(4, 5) + SourceIndex(0)
+-2 >Emitted(26, 20) Source(4, 8) + SourceIndex(0)
+-3 >Emitted(26, 23) Source(4, 5) + SourceIndex(0)
+-4 >Emitted(26, 37) Source(4, 13) + SourceIndex(0)
+-5 >Emitted(26, 44) Source(4, 20) + SourceIndex(0)
+-6 >Emitted(26, 67) Source(4, 43) + SourceIndex(0)
+-7 >Emitted(26, 68) Source(4, 44) + SourceIndex(0)
+-8 >Emitted(26, 69) Source(4, 45) + SourceIndex(0)
+-9 >Emitted(26, 70) Source(4, 46) + SourceIndex(0)
+----
+->>>    return C;
+-1 >^^^^
+-2 >    ^^^^^^^^
+-1 >
+-  >
+-  >    constructor(value: number) {
+-  >        return {
+-  >            cProp: value,
+-  >            foo() {
+-  >                return "well this looks kinda C-ish.";
+-  >            }
++1 >
 +2 >    
-+  >        }
+   >        }
+-  >    }
+-  >
+-2 >    }
+-1 >Emitted(27, 5) Source(14, 1) + SourceIndex(0)
+-2 >Emitted(27, 13) Source(14, 2) + SourceIndex(0)
+----
+->>>}());
+-1 >
+-2 >^
+-3 > 
+-4 > ^^^^
+-5 >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
+-1 >
+-2 >}
+-3 > 
+-4 > class C {
+-  >     cProp = 10;
+-  > 
+-  >     foo() { return "this never gets used."; }
+-  > 
+-  >     constructor(value: number) {
+-  >         return {
+-  >             cProp: value,
+-  >             foo() {
+-  >                 return "well this looks kinda C-ish.";
+-  >             }
+-  >         }
+-  >     }
+-  > }
+-1 >Emitted(28, 1) Source(14, 1) + SourceIndex(0)
+-2 >Emitted(28, 2) Source(14, 2) + SourceIndex(0)
+-3 >Emitted(28, 2) Source(1, 1) + SourceIndex(0)
+-4 >Emitted(28, 6) Source(14, 2) + SourceIndex(0)
+----
+->>>var D = /** @class */ (function (_super) {
+-1->
+-2 >^^^^^^^^^^^^^^^^^^^^^^^^^^->
+-1->
+-  >
+-  >
+-1->Emitted(29, 1) Source(16, 1) + SourceIndex(0)
+----
+->>>    __extends(D, _super);
+-1->^^^^
+-2 >    ^^^^^^^^^^^^^^^^^^^^^
+-1->class D extends 
+-2 >    C
+-1->Emitted(30, 5) Source(16, 17) + SourceIndex(0)
+-2 >Emitted(30, 26) Source(16, 18) + SourceIndex(0)
+----
+->>>    function D(a) {
+-1 >^^^^
+-2 >    ^^^^^^^^^^^
+-3 >               ^
+-4 >                ^^^^^^^^^^^^^^^^^^^^^^^->
+-1 > {
+-  >    dProp = () => this;
 +1 >Emitted(11, 5) Source(12, 10) + SourceIndex(0)
- 2 >Emitted(11, 6) Source(13, 6) + SourceIndex(0)
- ---
- >>>}
-@@= skipped -18, +18 lines =@@
- 3 >      ^
- 4 >       ^^^^^^^^^
- 5 >                ^
--6 >                 ^^^^^^^^^^->
++2 >Emitted(11, 6) Source(13, 6) + SourceIndex(0)
++---
++>>>}
++1 >^
++2 > ^^^^^^^^^^^^^^^^^^^->
++1 >
++  >}
++1 >Emitted(12, 2) Source(14, 2) + SourceIndex(0)
++---
++>>>class D extends C {
++1->
++2 >^^^^^^
++3 >      ^
++4 >       ^^^^^^^^^
++5 >                ^
 +6 >                 ^^^^^^^->
- 1->
-   >
-   >
-@@= skipped -14, +14 lines =@@
- 4 >Emitted(13, 17) Source(16, 17) + SourceIndex(0)
- 5 >Emitted(13, 18) Source(16, 18) + SourceIndex(0)
- ---
++1->
++  >
++  >
++2 >class 
++3 >      D 
++4 >       extends 
++5 >                C
++1->Emitted(13, 1) Source(16, 1) + SourceIndex(0)
++2 >Emitted(13, 7) Source(16, 7) + SourceIndex(0)
++3 >Emitted(13, 8) Source(16, 9) + SourceIndex(0)
++4 >Emitted(13, 17) Source(16, 17) + SourceIndex(0)
++5 >Emitted(13, 18) Source(16, 18) + SourceIndex(0)
++---
 +>>>    dProp = () => this;
 +1->^^^^
 +2 >    ^^^^^
@@ -231,27 +403,50 @@
 +7 >Emitted(14, 23) Source(17, 23) + SourceIndex(0)
 +8 >Emitted(14, 24) Source(17, 24) + SourceIndex(0)
 +---
- >>>    constructor(a = 100) {
- 1->^^^^
- 2 >    ^^^^^^^^^^^^
- 3 >                ^
- 4 >                 ^^^
- 5 >                    ^^^
--1-> {
--  >    dProp = () => this;
++>>>    constructor(a = 100) {
++1->^^^^
++2 >    ^^^^^^^^^^^^
++3 >                ^
++4 >                 ^^^
++5 >                    ^^^
 +6 >                       ^^
 +1->
    >
    >    
  2 >    constructor(
- 3 >                a
- 4 >                  = 
- 5 >                    100
--1->Emitted(14, 5) Source(19, 5) + SourceIndex(0)
--2 >Emitted(14, 17) Source(19, 17) + SourceIndex(0)
--3 >Emitted(14, 18) Source(19, 18) + SourceIndex(0)
--4 >Emitted(14, 21) Source(19, 21) + SourceIndex(0)
--5 >Emitted(14, 24) Source(19, 24) + SourceIndex(0)
+-3 >               a = 100
+-1 >Emitted(31, 5) Source(19, 5) + SourceIndex(0)
+-2 >Emitted(31, 16) Source(19, 17) + SourceIndex(0)
+-3 >Emitted(31, 17) Source(19, 24) + SourceIndex(0)
+----
+->>>        if (a === void 0) { a = 100; }
+-1->^^^^^^^^
+-2 >        ^^^^^^^^^^^^^^^^^^
+-3 >                          ^^
+-4 >                            ^^^^^^^
+-5 >                                   ^^^^^^^^^^^^^^^->
+-1->
+-2 >        
+-3 >                          
+-4 >                            a = 100
+-1->Emitted(32, 9) Source(19, 17) + SourceIndex(0)
+-2 >Emitted(32, 27) Source(19, 17) + SourceIndex(0)
+-3 >Emitted(32, 29) Source(19, 17) + SourceIndex(0)
+-4 >Emitted(32, 36) Source(19, 24) + SourceIndex(0)
+----
+->>>        var _this = _super.call(this, a) || this;
+-1->^^^^^^^^
+-2 >        ^^^^^^^^^^^^
+-3 >                    ^^^^^^
+-4 >                          ^^^^^^^^^^^^
+-5 >                                      ^
+-6 >                                       ^
+-7 >                                        ^^^^^^^^^
+-8 >                                                 ^^^^->
+-1->) {
++3 >                a
++4 >                  = 
++5 >                    100
 +6 >                       ) 
 +1->Emitted(15, 5) Source(19, 5) + SourceIndex(0)
 +2 >Emitted(15, 17) Source(19, 17) + SourceIndex(0)
@@ -259,56 +454,64 @@
 +4 >Emitted(15, 21) Source(19, 21) + SourceIndex(0)
 +5 >Emitted(15, 24) Source(19, 24) + SourceIndex(0)
 +6 >Emitted(15, 26) Source(19, 26) + SourceIndex(0)
- ---
- >>>        super(a);
- 1 >^^^^^^^^
-@@= skipped -27, +57 lines =@@
- 4 >              ^
- 5 >               ^
- 6 >                ^
--7 >                 ^^^^^^^^^^^^^^^^->
--1 >) {
++---
++>>>        super(a);
++1 >^^^^^^^^
++2 >        ^^^^^
++3 >             ^
++4 >              ^
++5 >               ^
++6 >                ^
 +7 >                 ^^^^^^^^^^^^^^^^^^->
 +1 >{
    >        
- 2 >        super
- 3 >             (
- 4 >              a
- 5 >               )
- 6 >                ;
--1 >Emitted(15, 9) Source(20, 9) + SourceIndex(0)
--2 >Emitted(15, 14) Source(20, 14) + SourceIndex(0)
--3 >Emitted(15, 15) Source(20, 15) + SourceIndex(0)
--4 >Emitted(15, 16) Source(20, 16) + SourceIndex(0)
--5 >Emitted(15, 17) Source(20, 17) + SourceIndex(0)
--6 >Emitted(15, 18) Source(20, 18) + SourceIndex(0)
+-2 >        
+-3 >                    super
+-4 >                          (
+-5 >                                      a
+-6 >                                       )
+-7 >                                        ;
+-1->Emitted(33, 9) Source(20, 9) + SourceIndex(0)
+-2 >Emitted(33, 21) Source(20, 9) + SourceIndex(0)
+-3 >Emitted(33, 27) Source(20, 14) + SourceIndex(0)
+-4 >Emitted(33, 39) Source(20, 15) + SourceIndex(0)
+-5 >Emitted(33, 40) Source(20, 16) + SourceIndex(0)
+-6 >Emitted(33, 41) Source(20, 17) + SourceIndex(0)
+-7 >Emitted(33, 50) Source(20, 18) + SourceIndex(0)
 ----
-->>>        this.dProp = () => this;
+->>>        _this.dProp = function () { return _this; };
 -1->^^^^^^^^
--2 >        ^^^^^^^^^^
--3 >                  ^^^
--4 >                     ^^^
--5 >                        ^^
--6 >                          ^
--7 >                           ^^^^
--8 >                               ^
--9 >                                ^^^->
+-2 >        ^^^^^^^^^^^
+-3 >                   ^^^
+-4 >                      ^^^^^^^^^^^^^^
+-5 >                                    ^^^^^^^
+-6 >                                           ^^^^^
+-7 >                                                ^^
+-8 >                                                  ^
+-9 >                                                   ^
 -1->
 -2 >        dProp
--3 >                   = 
--4 >                     () 
--5 >                        =>
--6 >                           
--7 >                           this
--8 >                               ;
--1->Emitted(16, 9) Source(17, 5) + SourceIndex(0)
--2 >Emitted(16, 19) Source(17, 10) + SourceIndex(0)
--3 >Emitted(16, 22) Source(17, 13) + SourceIndex(0)
--4 >Emitted(16, 25) Source(17, 16) + SourceIndex(0)
--5 >Emitted(16, 27) Source(17, 18) + SourceIndex(0)
--6 >Emitted(16, 28) Source(17, 19) + SourceIndex(0)
--7 >Emitted(16, 32) Source(17, 23) + SourceIndex(0)
--8 >Emitted(16, 33) Source(17, 24) + SourceIndex(0)
+-3 >                    = 
+-4 >                      () => 
+-5 >                                    
+-6 >                                           this
+-7 >                                                
+-8 >                                                  this
+-9 >                                                   ;
+-1->Emitted(34, 9) Source(17, 5) + SourceIndex(0)
+-2 >Emitted(34, 20) Source(17, 10) + SourceIndex(0)
+-3 >Emitted(34, 23) Source(17, 13) + SourceIndex(0)
+-4 >Emitted(34, 37) Source(17, 19) + SourceIndex(0)
+-5 >Emitted(34, 44) Source(17, 19) + SourceIndex(0)
+-6 >Emitted(34, 49) Source(17, 23) + SourceIndex(0)
+-7 >Emitted(34, 51) Source(17, 19) + SourceIndex(0)
+-8 >Emitted(34, 52) Source(17, 23) + SourceIndex(0)
+-9 >Emitted(34, 53) Source(17, 24) + SourceIndex(0)
++2 >        super
++3 >             (
++4 >              a
++5 >               )
++6 >                ;
 +1 >Emitted(16, 9) Source(20, 9) + SourceIndex(0)
 +2 >Emitted(16, 14) Source(20, 14) + SourceIndex(0)
 +3 >Emitted(16, 15) Source(20, 15) + SourceIndex(0)
@@ -317,27 +520,148 @@
 +6 >Emitted(16, 18) Source(20, 18) + SourceIndex(0)
  ---
  >>>        if (Math.random() < 0.5) {
- 1->^^^^^^^^
-@@= skipped -55, +28 lines =@@
+-1 >^^^^^^^^
++1->^^^^^^^^
+ 2 >        ^^^^
+ 3 >            ^^^^
+ 4 >                ^
+@@= skipped -199, +122 lines =@@
+ 8 >                            ^^^
+ 9 >                               ^^
  10>                                 ^
- 1->
-   >
+-1 >
+-  >
 -  >    constructor(a = 100) {
 -  >        super(a);
--  >
++1->
+   >
    >        
  2 >        if (
- 3 >            Math
-@@= skipped -90, +87 lines =@@
- >>>                foo() { return "You win!!!!!"; }
+@@= skipped -15, +12 lines =@@
+ 8 >                            0.5
+ 9 >                               ) 
+ 10>                                 {
+-1 >Emitted(35, 9) Source(22, 9) + SourceIndex(0)
+-2 >Emitted(35, 13) Source(22, 13) + SourceIndex(0)
+-3 >Emitted(35, 17) Source(22, 17) + SourceIndex(0)
+-4 >Emitted(35, 18) Source(22, 18) + SourceIndex(0)
+-5 >Emitted(35, 24) Source(22, 24) + SourceIndex(0)
+-6 >Emitted(35, 26) Source(22, 26) + SourceIndex(0)
+-7 >Emitted(35, 29) Source(22, 29) + SourceIndex(0)
+-8 >Emitted(35, 32) Source(22, 32) + SourceIndex(0)
+-9 >Emitted(35, 34) Source(22, 34) + SourceIndex(0)
+-10>Emitted(35, 35) Source(22, 35) + SourceIndex(0)
++1->Emitted(17, 9) Source(22, 9) + SourceIndex(0)
++2 >Emitted(17, 13) Source(22, 13) + SourceIndex(0)
++3 >Emitted(17, 17) Source(22, 17) + SourceIndex(0)
++4 >Emitted(17, 18) Source(22, 18) + SourceIndex(0)
++5 >Emitted(17, 24) Source(22, 24) + SourceIndex(0)
++6 >Emitted(17, 26) Source(22, 26) + SourceIndex(0)
++7 >Emitted(17, 29) Source(22, 29) + SourceIndex(0)
++8 >Emitted(17, 32) Source(22, 32) + SourceIndex(0)
++9 >Emitted(17, 34) Source(22, 34) + SourceIndex(0)
++10>Emitted(17, 35) Source(22, 35) + SourceIndex(0)
+ ---
+ >>>            "You win!";
+ 1 >^^^^^^^^^^^^
+@@= skipped -19, +19 lines =@@
+   >            
+ 2 >            "You win!"
+ 3 >                      
+-1 >Emitted(36, 13) Source(23, 13) + SourceIndex(0)
+-2 >Emitted(36, 23) Source(23, 23) + SourceIndex(0)
+-3 >Emitted(36, 24) Source(23, 23) + SourceIndex(0)
++1 >Emitted(18, 13) Source(23, 13) + SourceIndex(0)
++2 >Emitted(18, 23) Source(23, 23) + SourceIndex(0)
++3 >Emitted(18, 24) Source(23, 23) + SourceIndex(0)
+ ---
+ >>>            return {
+ 1 >^^^^^^^^^^^^
+@@= skipped -11, +11 lines =@@
+ 1 >
+   >            
+ 2 >            return 
+-1 >Emitted(37, 13) Source(24, 13) + SourceIndex(0)
+-2 >Emitted(37, 20) Source(24, 20) + SourceIndex(0)
++1 >Emitted(19, 13) Source(24, 13) + SourceIndex(0)
++2 >Emitted(19, 20) Source(24, 20) + SourceIndex(0)
+ ---
+ >>>                cProp: 1,
+ 1->^^^^^^^^^^^^^^^^
+ 2 >                ^^^^^
+ 3 >                     ^^
+ 4 >                       ^
+-5 >                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
++5 >                        ^^^^^^^^^^^->
+ 1->{
+   >                
+ 2 >                cProp
+ 3 >                     : 
+ 4 >                       1
+-1->Emitted(38, 17) Source(25, 17) + SourceIndex(0)
+-2 >Emitted(38, 22) Source(25, 22) + SourceIndex(0)
+-3 >Emitted(38, 24) Source(25, 24) + SourceIndex(0)
+-4 >Emitted(38, 25) Source(25, 25) + SourceIndex(0)
++1->Emitted(20, 17) Source(25, 17) + SourceIndex(0)
++2 >Emitted(20, 22) Source(25, 22) + SourceIndex(0)
++3 >Emitted(20, 24) Source(25, 24) + SourceIndex(0)
++4 >Emitted(20, 25) Source(25, 25) + SourceIndex(0)
+ ---
+->>>                dProp: function () { return _this; },
++>>>                dProp: () => this,
+ 1->^^^^^^^^^^^^^^^^
+ 2 >                ^^^^^
+ 3 >                     ^^
+-4 >                       ^^^^^^^^^^^^^^
+-5 >                                     ^^^^^^^
+-6 >                                            ^^^^^
+-7 >                                                 ^^
+-8 >                                                   ^
+-9 >                                                    ^^^^^^^^->
++4 >                       ^^^
++5 >                          ^^
++6 >                            ^
++7 >                             ^^^^
++8 >                                 ^^^^^^^^^^^^^^^^->
+ 1->,
+   >                
+ 2 >                dProp
+ 3 >                     : 
+-4 >                       () => 
+-5 >                                     
+-6 >                                            this
+-7 >                                                 
+-8 >                                                   this
+-1->Emitted(39, 17) Source(26, 17) + SourceIndex(0)
+-2 >Emitted(39, 22) Source(26, 22) + SourceIndex(0)
+-3 >Emitted(39, 24) Source(26, 24) + SourceIndex(0)
+-4 >Emitted(39, 38) Source(26, 30) + SourceIndex(0)
+-5 >Emitted(39, 45) Source(26, 30) + SourceIndex(0)
+-6 >Emitted(39, 50) Source(26, 34) + SourceIndex(0)
+-7 >Emitted(39, 52) Source(26, 30) + SourceIndex(0)
+-8 >Emitted(39, 53) Source(26, 34) + SourceIndex(0)
++4 >                       () 
++5 >                          =>
++6 >                             
++7 >                             this
++1->Emitted(21, 17) Source(26, 17) + SourceIndex(0)
++2 >Emitted(21, 22) Source(26, 22) + SourceIndex(0)
++3 >Emitted(21, 24) Source(26, 24) + SourceIndex(0)
++4 >Emitted(21, 27) Source(26, 27) + SourceIndex(0)
++5 >Emitted(21, 29) Source(26, 29) + SourceIndex(0)
++6 >Emitted(21, 30) Source(26, 30) + SourceIndex(0)
++7 >Emitted(21, 34) Source(26, 34) + SourceIndex(0)
+ ---
+->>>                foo: function () { return "You win!!!!!"; }
++>>>                foo() { return "You win!!!!!"; }
  1->^^^^^^^^^^^^^^^^
  2 >                ^^^
--3 >                   ^^^^^
--4 >                        ^^^^^^^
--5 >                               ^^^^^^^^^^^^^^
--6 >                                             ^
--7 >                                              ^
--8 >                                               ^
+-3 >                   ^^^^^^^^^^^^^^^^
+-4 >                                   ^^^^^^^
+-5 >                                          ^^^^^^^^^^^^^^
+-6 >                                                        ^
+-7 >                                                         ^
+-8 >                                                          ^
 +3 >                   ^^^
 +4 >                      ^^
 +5 >                        ^^^^^^^
@@ -349,11 +673,19 @@
    >                
  2 >                foo
 -3 >                   () { 
--4 >                        return 
--5 >                               "You win!!!!!"
--6 >                                             
--7 >                                               
--8 >                                               }
+-4 >                                   return 
+-5 >                                          "You win!!!!!"
+-6 >                                                        
+-7 >                                                          
+-8 >                                                          }
+-1->Emitted(40, 17) Source(27, 17) + SourceIndex(0)
+-2 >Emitted(40, 20) Source(27, 20) + SourceIndex(0)
+-3 >Emitted(40, 36) Source(27, 25) + SourceIndex(0)
+-4 >Emitted(40, 43) Source(27, 32) + SourceIndex(0)
+-5 >Emitted(40, 57) Source(27, 46) + SourceIndex(0)
+-6 >Emitted(40, 58) Source(27, 46) + SourceIndex(0)
+-7 >Emitted(40, 59) Source(27, 47) + SourceIndex(0)
+-8 >Emitted(40, 60) Source(27, 48) + SourceIndex(0)
 +3 >                   () 
 +4 >                      { 
 +5 >                        return 
@@ -361,14 +693,8 @@
 +7 >                                             
 +8 >                                              
 +9 >                                                }
- 1->Emitted(22, 17) Source(27, 17) + SourceIndex(0)
- 2 >Emitted(22, 20) Source(27, 20) + SourceIndex(0)
--3 >Emitted(22, 25) Source(27, 25) + SourceIndex(0)
--4 >Emitted(22, 32) Source(27, 32) + SourceIndex(0)
--5 >Emitted(22, 46) Source(27, 46) + SourceIndex(0)
--6 >Emitted(22, 47) Source(27, 46) + SourceIndex(0)
--7 >Emitted(22, 48) Source(27, 47) + SourceIndex(0)
--8 >Emitted(22, 49) Source(27, 48) + SourceIndex(0)
++1->Emitted(22, 17) Source(27, 17) + SourceIndex(0)
++2 >Emitted(22, 20) Source(27, 20) + SourceIndex(0)
 +3 >Emitted(22, 23) Source(27, 23) + SourceIndex(0)
 +4 >Emitted(22, 25) Source(27, 25) + SourceIndex(0)
 +5 >Emitted(22, 32) Source(27, 32) + SourceIndex(0)
@@ -379,16 +705,108 @@
  ---
  >>>            };
  1 >^^^^^^^^^^^^^
-@@= skipped -64, +67 lines =@@
+@@= skipped -80, +80 lines =@@
+ 1 >
+   >            }
+ 2 >             ;
+-1 >Emitted(41, 14) Source(28, 14) + SourceIndex(0)
+-2 >Emitted(41, 15) Source(28, 15) + SourceIndex(0)
++1 >Emitted(23, 14) Source(28, 14) + SourceIndex(0)
++2 >Emitted(23, 15) Source(28, 15) + SourceIndex(0)
+ ---
+ >>>        }
+ 1 >^^^^^^^^
+@@= skipped -10, +10 lines =@@
+ 1 >
+   >        
+ 2 >        }
+-1 >Emitted(42, 9) Source(29, 9) + SourceIndex(0)
+-2 >Emitted(42, 10) Source(29, 10) + SourceIndex(0)
++1 >Emitted(24, 9) Source(29, 9) + SourceIndex(0)
++2 >Emitted(24, 10) Source(29, 10) + SourceIndex(0)
+ ---
+ >>>        else
+ >>>            return null;
+@@= skipped -15, +15 lines =@@
+ 2 >            return 
+ 3 >                   null
+ 4 >                       ;
+-1->Emitted(44, 13) Source(31, 13) + SourceIndex(0)
+-2 >Emitted(44, 20) Source(31, 20) + SourceIndex(0)
+-3 >Emitted(44, 24) Source(31, 24) + SourceIndex(0)
+-4 >Emitted(44, 25) Source(31, 25) + SourceIndex(0)
++1->Emitted(26, 13) Source(31, 13) + SourceIndex(0)
++2 >Emitted(26, 20) Source(31, 20) + SourceIndex(0)
++3 >Emitted(26, 24) Source(31, 24) + SourceIndex(0)
++4 >Emitted(26, 25) Source(31, 25) + SourceIndex(0)
+ ---
+ >>>    }
  1 >^^^^
  2 >    ^
- 1 >
+-3 >     ^^^^^^^^^->
+-1 >
 -  >    
 -2 >    }
--1 >Emitted(27, 5) Source(32, 5) + SourceIndex(0)
+-1 >Emitted(45, 5) Source(32, 5) + SourceIndex(0)
+-2 >Emitted(45, 6) Source(32, 6) + SourceIndex(0)
+----
+->>>    return D;
+-1->^^^^
+-2 >    ^^^^^^^^
+-1->
+-  >
+-2 >    }
+-1->Emitted(46, 5) Source(33, 1) + SourceIndex(0)
+-2 >Emitted(46, 13) Source(33, 2) + SourceIndex(0)
+----
+->>>}(C));
+-1 >
+-2 >^
+-3 > 
+-4 > ^
+-5 >  ^
+-6 >   ^^^
+-7 >      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
+-1 >
+-2 >}
+-3 > 
+-4 > class D extends 
+-5 >  C
+-6 >    {
+-  >       dProp = () => this;
+-  >   
+-  >       constructor(a = 100) {
+-  >           super(a);
+-  >   
+-  >           if (Math.random() < 0.5) {
+-  >               "You win!"
+-  >               return {
+-  >                   cProp: 1,
+-  >                   dProp: () => this,
+-  >                   foo() { return "You win!!!!!" }
+-  >               };
+-  >           }
+-  >           else
+-  >               return null;
+-  >       }
+-  >   }
+-1 >Emitted(47, 1) Source(33, 1) + SourceIndex(0)
+-2 >Emitted(47, 2) Source(33, 2) + SourceIndex(0)
+-3 >Emitted(47, 2) Source(16, 1) + SourceIndex(0)
+-4 >Emitted(47, 3) Source(16, 17) + SourceIndex(0)
+-5 >Emitted(47, 4) Source(16, 18) + SourceIndex(0)
+-6 >Emitted(47, 7) Source(33, 2) + SourceIndex(0)
++1 >
 +2 >    
 +  >        }
 +1 >Emitted(27, 5) Source(31, 25) + SourceIndex(0)
- 2 >Emitted(27, 6) Source(32, 6) + SourceIndex(0)
++2 >Emitted(27, 6) Source(32, 6) + SourceIndex(0)
++---
++>>>}
++1 >^
++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
++1 >
++  >}
++1 >Emitted(28, 2) Source(33, 2) + SourceIndex(0)
  ---
- >>>}
\ No newline at end of file
+ >>>//# sourceMappingURL=derivedClassConstructorWithExplicitReturns01.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.symbols.diff b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.symbols.diff
new file mode 100644
index 0000000000..a6e2e5ead3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/derivedClassConstructorWithExplicitReturns01.symbols.diff
@@ -0,0 +1,11 @@
+--- old.derivedClassConstructorWithExplicitReturns01.symbols
++++ new.derivedClassConstructorWithExplicitReturns01.symbols
+@@= skipped -43, +43 lines =@@
+
+         if (Math.random() < 0.5) {
+ >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
+
+             "You win!"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClassOverridesPrivateFunction1.js.diff b/testdata/baselines/reference/submodule/compiler/derivedClassOverridesPrivateFunction1.js.diff
new file mode 100644
index 0000000000..e6d2d2dc31
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/derivedClassOverridesPrivateFunction1.js.diff
@@ -0,0 +1,51 @@
+--- old.derivedClassOverridesPrivateFunction1.js
++++ new.derivedClassOverridesPrivateFunction1.js
+@@= skipped -17, +17 lines =@@
+ new DerivedClass();
+
+ //// [derivedClassOverridesPrivateFunction1.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var BaseClass = /** @class */ (function () {
+-    function BaseClass() {
++class BaseClass {
++    constructor() {
+         this._init();
+     }
+-    BaseClass.prototype._init = function () {
+-    };
+-    return BaseClass;
+-}());
+-var DerivedClass = /** @class */ (function (_super) {
+-    __extends(DerivedClass, _super);
+-    function DerivedClass() {
+-        return _super.call(this) || this;
+-    }
+-    DerivedClass.prototype._init = function () {
+-    };
+-    return DerivedClass;
+-}(BaseClass));
++    _init() {
++    }
++}
++class DerivedClass extends BaseClass {
++    constructor() {
++        super();
++    }
++    _init() {
++    }
++}
+ new DerivedClass();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedClasses.js.diff b/testdata/baselines/reference/submodule/compiler/derivedClasses.js.diff
new file mode 100644
index 0000000000..2036ce9eb2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/derivedClasses.js.diff
@@ -0,0 +1,69 @@
+--- old.derivedClasses.js
++++ new.derivedClasses.js
+@@= skipped -32, +32 lines =@@
+
+
+ //// [derivedClasses.js]
+-var __extends = (this && this.__extends) || (function () {
+-    var extendStatics = function (d, b) {
+-        extendStatics = Object.setPrototypeOf ||
+-            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+-            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+-        return extendStatics(d, b);
+-    };
+-    return function (d, b) {
+-        if (typeof b !== "function" && b !== null)
+-            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+-        extendStatics(d, b);
+-        function __() { this.constructor = d; }
+-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+-    };
+-})();
+-var Red = /** @class */ (function (_super) {
+-    __extends(Red, _super);
+-    function Red() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    Red.prototype.shade = function () {
+-        var _this = this;
+-        var getHue = function () { return _this.hue(); };
++class Red extends Color {
++    shade() {
++        var getHue = () => { return this.hue(); };
+         return getHue() + " red";
+-    };
+-    return Red;
+-}(Color));
+-var Color = /** @class */ (function () {
+-    function Color() {
+-    }
+-    Color.prototype.shade = function () { return "some shade"; };
+-    Color.prototype.hue = function () { return "some hue"; };
+-    return Color;
+-}());
+-var Blue = /** @class */ (function (_super) {
+-    __extends(Blue, _super);
+-    function Blue() {
+-        return _super !== null && _super.apply(this, arguments) || this;
+-    }
+-    Blue.prototype.shade = function () {
+-        var _this = this;
+-        var getHue = function () { return _this.hue(); };
++    }
++}
++class Color {
++    shade() { return "some shade"; }
++    hue() { return "some hue"; }
++}
++class Blue extends Color {
++    shade() {
++        var getHue = () => { return this.hue(); };
+         return getHue() + " blue";
+-    };
+-    return Blue;
+-}(Color));
++    }
++}
+ var r = new Red();
+ var b = new Blue();
+ r.shade();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/derivedTypeCallingBaseImplWithOptionalParams.js.diff b/testdata/baselines/reference/submodule/compiler/derivedTypeCallingBaseImplWithOptionalParams.js.diff
new file mode 100644
index 0000000000..6316d67835
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/derivedTypeCallingBaseImplWithOptionalParams.js.diff
@@ -0,0 +1,19 @@
+--- old.derivedTypeCallingBaseImplWithOptionalParams.js
++++ new.derivedTypeCallingBaseImplWithOptionalParams.js
+@@= skipped -15, +15 lines =@@
+ y.myMethod(); // error
+
+ //// [derivedTypeCallingBaseImplWithOptionalParams.js]
+-var MyClass = /** @class */ (function () {
+-    function MyClass() {
++class MyClass {
++    myMethod(myList) {
+     }
+-    MyClass.prototype.myMethod = function (myList) {
+-    };
+-    return MyClass;
+-}());
++}
+ var x = new MyClass();
+ x.myMethod(); // should be valid, but MyClass has no implementation to handle it.
+ var y = new MyClass();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructionAssignmentError.js.diff b/testdata/baselines/reference/submodule/compiler/destructionAssignmentError.js.diff
new file mode 100644
index 0000000000..4deb417dd7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructionAssignmentError.js.diff
@@ -0,0 +1,23 @@
+--- old.destructionAssignmentError.js
++++ new.destructionAssignmentError.js
+@@= skipped -14, +14 lines =@@
+ = fn();
+
+ //// [destructionAssignmentError.js]
+-var _a, _b;
+-var a;
+-var b;
+-(_a = fn(), a = _a.a, b = _a.b);
++let a;
++let b;
++({ a, b } = fn());
+ {
+     a, b;
+ }
+ fn();
+-(_b = fn(), a = _b.a, b = _b.b);
++({ a, b } =
++    fn());
+ {
+     a, b;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=false).js.diff b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=false).js.diff
new file mode 100644
index 0000000000..8001bed262
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=false).js.diff
@@ -0,0 +1,191 @@
+--- old.destructureCatchClause(strict=false,useunknownincatchvariables=false).js
++++ new.destructureCatchClause(strict=false,useunknownincatchvariables=false).js
+@@= skipped -40, +40 lines =@@
+ //// [destructureCatchClause.js]
+ // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true.
+ try { }
+-catch (_a) {
+-    var x = _a.x;
+-    x;
+-}
+-try { }
+-catch (_b) {
+-    var x = _b[0];
+-    x;
+-}
+-try { }
+-catch (_c) {
+-    var x = _c.a.x;
+-    x;
+-}
+-try { }
+-catch (_d) {
+-    var x = _d.a[0];
+-    x;
+-}
+-try { }
+-catch (_e) {
+-    var x = _e[0].x;
+-    x;
+-}
+-try { }
+-catch (_f) {
+-    var x = _f[0][0];
+-    x;
+-}
+-try { }
+-catch (_g) {
+-    var x = _g.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_h) {
+-    var x = _h.x;
+-    x;
+-}
+-try { }
+-catch (_j) {
+-    var x = _j[0];
+-    x;
+-}
+-try { }
+-catch (_k) {
+-    var x = _k.a.x;
+-    x;
+-}
+-try { }
+-catch (_l) {
+-    var x = _l.a[0];
+-    x;
+-}
+-try { }
+-catch (_m) {
+-    var x = _m[0].x;
+-    x;
+-}
+-try { }
+-catch (_o) {
+-    var x = _o[0][0];
+-    x;
+-}
+-try { }
+-catch (_p) {
+-    var x = _p.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_q) {
+-    var x = _q.x;
+-    x;
+-}
+-try { }
+-catch (_r) {
+-    var x = _r[0];
+-    x;
+-}
+-try { }
+-catch (_s) {
+-    var x = _s.a.x;
+-    x;
+-}
+-try { }
+-catch (_t) {
+-    var x = _t.a[0];
+-    x;
+-}
+-try { }
+-catch (_u) {
+-    var x = _u[0].x;
+-    x;
+-}
+-try { }
+-catch (_v) {
+-    var x = _v[0][0];
+-    x;
+-}
+-try { }
+-catch (_w) {
+-    var x = _w.a.b.c.x;
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
+     x;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=true).js.diff b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=true).js.diff
new file mode 100644
index 0000000000..2330d390af
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=false,useunknownincatchvariables=true).js.diff
@@ -0,0 +1,191 @@
+--- old.destructureCatchClause(strict=false,useunknownincatchvariables=true).js
++++ new.destructureCatchClause(strict=false,useunknownincatchvariables=true).js
+@@= skipped -40, +40 lines =@@
+ //// [destructureCatchClause.js]
+ // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true.
+ try { }
+-catch (_a) {
+-    var x = _a.x;
+-    x;
+-}
+-try { }
+-catch (_b) {
+-    var x = _b[0];
+-    x;
+-}
+-try { }
+-catch (_c) {
+-    var x = _c.a.x;
+-    x;
+-}
+-try { }
+-catch (_d) {
+-    var x = _d.a[0];
+-    x;
+-}
+-try { }
+-catch (_e) {
+-    var x = _e[0].x;
+-    x;
+-}
+-try { }
+-catch (_f) {
+-    var x = _f[0][0];
+-    x;
+-}
+-try { }
+-catch (_g) {
+-    var x = _g.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_h) {
+-    var x = _h.x;
+-    x;
+-}
+-try { }
+-catch (_j) {
+-    var x = _j[0];
+-    x;
+-}
+-try { }
+-catch (_k) {
+-    var x = _k.a.x;
+-    x;
+-}
+-try { }
+-catch (_l) {
+-    var x = _l.a[0];
+-    x;
+-}
+-try { }
+-catch (_m) {
+-    var x = _m[0].x;
+-    x;
+-}
+-try { }
+-catch (_o) {
+-    var x = _o[0][0];
+-    x;
+-}
+-try { }
+-catch (_p) {
+-    var x = _p.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_q) {
+-    var x = _q.x;
+-    x;
+-}
+-try { }
+-catch (_r) {
+-    var x = _r[0];
+-    x;
+-}
+-try { }
+-catch (_s) {
+-    var x = _s.a.x;
+-    x;
+-}
+-try { }
+-catch (_t) {
+-    var x = _t.a[0];
+-    x;
+-}
+-try { }
+-catch (_u) {
+-    var x = _u[0].x;
+-    x;
+-}
+-try { }
+-catch (_v) {
+-    var x = _v[0][0];
+-    x;
+-}
+-try { }
+-catch (_w) {
+-    var x = _w.a.b.c.x;
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
+     x;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=false).js.diff b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=false).js.diff
index ea30523a36..94b016478e 100644
--- a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=false).js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=false).js.diff
@@ -7,4 +7,188 @@
 -"use strict";
  // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true.
  try { }
- catch ({ x }) {
\ No newline at end of file
+-catch (_a) {
+-    var x = _a.x;
+-    x;
+-}
+-try { }
+-catch (_b) {
+-    var x = _b[0];
+-    x;
+-}
+-try { }
+-catch (_c) {
+-    var x = _c.a.x;
+-    x;
+-}
+-try { }
+-catch (_d) {
+-    var x = _d.a[0];
+-    x;
+-}
+-try { }
+-catch (_e) {
+-    var x = _e[0].x;
+-    x;
+-}
+-try { }
+-catch (_f) {
+-    var x = _f[0][0];
+-    x;
+-}
+-try { }
+-catch (_g) {
+-    var x = _g.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_h) {
+-    var x = _h.x;
+-    x;
+-}
+-try { }
+-catch (_j) {
+-    var x = _j[0];
+-    x;
+-}
+-try { }
+-catch (_k) {
+-    var x = _k.a.x;
+-    x;
+-}
+-try { }
+-catch (_l) {
+-    var x = _l.a[0];
+-    x;
+-}
+-try { }
+-catch (_m) {
+-    var x = _m[0].x;
+-    x;
+-}
+-try { }
+-catch (_o) {
+-    var x = _o[0][0];
+-    x;
+-}
+-try { }
+-catch (_p) {
+-    var x = _p.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_q) {
+-    var x = _q.x;
+-    x;
+-}
+-try { }
+-catch (_r) {
+-    var x = _r[0];
+-    x;
+-}
+-try { }
+-catch (_s) {
+-    var x = _s.a.x;
+-    x;
+-}
+-try { }
+-catch (_t) {
+-    var x = _t.a[0];
+-    x;
+-}
+-try { }
+-catch (_u) {
+-    var x = _u[0].x;
+-    x;
+-}
+-try { }
+-catch (_v) {
+-    var x = _v[0][0];
+-    x;
+-}
+-try { }
+-catch (_w) {
+-    var x = _w.a.b.c.x;
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
+     x;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=true).js.diff b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=true).js.diff
index de3f1c287d..b1d9a4b674 100644
--- a/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=true).js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructureCatchClause(strict=true,useunknownincatchvariables=true).js.diff
@@ -7,4 +7,188 @@
 -"use strict";
  // These are okay with useUnknownInCatchVariables=false, but not okay with useUnknownInCatchVariables=true.
  try { }
- catch ({ x }) {
\ No newline at end of file
+-catch (_a) {
+-    var x = _a.x;
+-    x;
+-}
+-try { }
+-catch (_b) {
+-    var x = _b[0];
+-    x;
+-}
+-try { }
+-catch (_c) {
+-    var x = _c.a.x;
+-    x;
+-}
+-try { }
+-catch (_d) {
+-    var x = _d.a[0];
+-    x;
+-}
+-try { }
+-catch (_e) {
+-    var x = _e[0].x;
+-    x;
+-}
+-try { }
+-catch (_f) {
+-    var x = _f[0][0];
+-    x;
+-}
+-try { }
+-catch (_g) {
+-    var x = _g.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_h) {
+-    var x = _h.x;
+-    x;
+-}
+-try { }
+-catch (_j) {
+-    var x = _j[0];
+-    x;
+-}
+-try { }
+-catch (_k) {
+-    var x = _k.a.x;
+-    x;
+-}
+-try { }
+-catch (_l) {
+-    var x = _l.a[0];
+-    x;
+-}
+-try { }
+-catch (_m) {
+-    var x = _m[0].x;
+-    x;
+-}
+-try { }
+-catch (_o) {
+-    var x = _o[0][0];
+-    x;
+-}
+-try { }
+-catch (_p) {
+-    var x = _p.a.b.c.x;
+-    x;
+-}
+-try { }
+-catch (_q) {
+-    var x = _q.x;
+-    x;
+-}
+-try { }
+-catch (_r) {
+-    var x = _r[0];
+-    x;
+-}
+-try { }
+-catch (_s) {
+-    var x = _s.a.x;
+-    x;
+-}
+-try { }
+-catch (_t) {
+-    var x = _t.a[0];
+-    x;
+-}
+-try { }
+-catch (_u) {
+-    var x = _u[0].x;
+-    x;
+-}
+-try { }
+-catch (_v) {
+-    var x = _v[0][0];
+-    x;
+-}
+-try { }
+-catch (_w) {
+-    var x = _w.a.b.c.x;
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
++    x;
++}
++try { }
++catch ({ x }) {
++    x;
++}
++try { }
++catch ([x]) {
++    x;
++}
++try { }
++catch ({ a: { x } }) {
++    x;
++}
++try { }
++catch ({ a: [x] }) {
++    x;
++}
++try { }
++catch ([{ x }]) {
++    x;
++}
++try { }
++catch ([[x]]) {
++    x;
++}
++try { }
++catch ({ a: { b: { c: { x } } } }) {
+     x;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureComputedProperty.js.diff b/testdata/baselines/reference/submodule/compiler/destructureComputedProperty.js.diff
index 9467bcaf61..62bd544048 100644
--- a/testdata/baselines/reference/submodule/compiler/destructureComputedProperty.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructureComputedProperty.js.diff
@@ -1,10 +1,28 @@
 --- old.destructureComputedProperty.js
 +++ new.destructureComputedProperty.js
-@@= skipped -16, +16 lines =@@
- const nameN = "n";
- const { [nameN]: n } = ab;
- class C {
+@@= skipped -13, +13 lines =@@
+
+
+ //// [destructureComputedProperty.js]
+-var nameN = "n";
+-var _a = ab, _b = nameN, n = _a[_b];
+-var C = /** @class */ (function () {
+-    function C() {
+-    }
+-    return C;
+-}());
+-var nameP = "p";
+-var p0 = new C()["p"];
+-var p1 = new C()["p"];
+-var _c = new C(), _d = nameP, p2 = _c[_d];
+-var p3 = new C().p;
++const nameN = "n";
++const { [nameN]: n } = ab;
++class C {
 +    p;
- }
- const nameP = "p";
- const { "p": p0 } = new C();
\ No newline at end of file
++}
++const nameP = "p";
++const { "p": p0 } = new C();
++const { ["p"]: p1 } = new C();
++const { [nameP]: p2 } = new C();
++const { p: p3 } = new C();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.js.diff b/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.js.diff
index 1ca788a757..4174c270ea 100644
--- a/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.js.diff
@@ -13,30 +13,73 @@
 -        step((generator = generator.apply(thisArg, _arguments || [])).next());
 -    });
 -};
+-var __generator = (this && this.__generator) || function (thisArg, body) {
+-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+-    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+-    function verb(n) { return function (v) { return step([n, v]); }; }
+-    function step(op) {
+-        if (f) throw new TypeError("Generator is already executing.");
+-        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+-            if (y = 0, t) op = [op[0] & 2, t.value];
+-            switch (op[0]) {
+-                case 0: case 1: t = op; break;
+-                case 4: _.label++; return { value: op[1], done: false };
+-                case 5: _.label++; y = op[1]; op = [0]; continue;
+-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+-                default:
+-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+-                    if (t[2]) _.ops.pop();
+-                    _.trys.pop(); continue;
+-            }
+-            op = body.call(thisArg, _);
+-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+-    }
+-};
 -function main() {
--    return __awaiter(this, void 0, void 0, function* () {
--        // These work examples as expected
--        get().then((response) => {
--            // body is never
--            const body = response.data;
--        });
--        get().then(({ data }) => {
--            // data is never
+-    return __awaiter(this, void 0, void 0, function () {
+-        var response, body, data, shouldBeNever;
+-        return __generator(this, function (_a) {
+-            switch (_a.label) {
+-                case 0:
+-                    // These work examples as expected
+-                    get().then(function (response) {
+-                        // body is never
+-                        var body = response.data;
+-                    });
+-                    get().then(function (_a) {
+-                        var data = _a.data;
+-                        // data is never
+-                    });
+-                    return [4 /*yield*/, get()
+-                        // body is never
+-                    ];
+-                case 1:
+-                    response = _a.sent();
+-                    body = response.data;
+-                    return [4 /*yield*/, get()];
+-                case 2:
+-                    data = (_a.sent()).data;
+-                    return [4 /*yield*/, get()];
+-                case 3:
+-                    shouldBeNever = (_a.sent()).data;
+-                    return [2 /*return*/];
+-            }
 -        });
--        const response = yield get();
+-    });
 +async function main() {
 +    // These work examples as expected
 +    get().then((response) => {
-         // body is never
-         const body = response.data;
++        // body is never
++        const body = response.data;
 +    });
 +    get().then(({ data }) => {
-         // data is never
--        const { data } = yield get();
--        // The following did not work as expected.
--        // shouldBeNever should be never, but was any
--        const { data: shouldBeNever } = yield get();
-     });
++        // data is never
++    });
 +    const response = await get();
 +    // body is never
 +    const body = response.data;
diff --git a/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.symbols.diff b/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.symbols.diff
new file mode 100644
index 0000000000..8005fb6255
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructureOfVariableSameAsShorthand.symbols.diff
@@ -0,0 +1,11 @@
+--- old.destructureOfVariableSameAsShorthand.symbols
++++ new.destructureOfVariableSameAsShorthand.symbols
+@@= skipped -16, +16 lines =@@
+ >R : Symbol(R, Decl(destructureOfVariableSameAsShorthand.ts, 5, 31))
+ >AxiosResponse : Symbol(AxiosResponse, Decl(destructureOfVariableSameAsShorthand.ts, 0, 0))
+ >T : Symbol(T, Decl(destructureOfVariableSameAsShorthand.ts, 5, 21))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
+ >R : Symbol(R, Decl(destructureOfVariableSameAsShorthand.ts, 5, 31))
+
+ async function main() {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureOptionalParameter.js.diff b/testdata/baselines/reference/submodule/compiler/destructureOptionalParameter.js.diff
new file mode 100644
index 0000000000..f4ced31619
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructureOptionalParameter.js.diff
@@ -0,0 +1,12 @@
+--- old.destructureOptionalParameter.js
++++ new.destructureOptionalParameter.js
+@@= skipped -25, +25 lines =@@
+
+
+ //// [destructureOptionalParameter.js]
+-function f2(_a) {
+-    var _b = _a === void 0 ? { a: 0, b: 0 } : _a, a = _b.a, b = _b.b;
++function f2({ a, b } = { a: 0, b: 0 }) {
+     a;
+     b;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructureTupleWithVariableElement.symbols.diff b/testdata/baselines/reference/submodule/compiler/destructureTupleWithVariableElement.symbols.diff
new file mode 100644
index 0000000000..5c94536e7c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructureTupleWithVariableElement.symbols.diff
@@ -0,0 +1,20 @@
+--- old.destructureTupleWithVariableElement.symbols
++++ new.destructureTupleWithVariableElement.symbols
+@@= skipped -4, +4 lines =@@
+
+ type NonEmptyStringArray = [string, ...Array]
+ >NonEmptyStringArray : Symbol(NonEmptyStringArray, Decl(destructureTupleWithVariableElement.ts, 0, 0))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const strings: NonEmptyStringArray = ['one', 'two']
+ >strings : Symbol(strings, Decl(destructureTupleWithVariableElement.ts, 4, 5))
+@@= skipped -29, +29 lines =@@
+
+ declare const strings2: [string, ...Array, string]
+ >strings2 : Symbol(strings2, Decl(destructureTupleWithVariableElement.ts, 11, 13))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const [s3, s4, s5] = strings2;
+ >s3 : Symbol(s3, Decl(destructureTupleWithVariableElement.ts, 13, 7))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.js.diff b/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.js.diff
index eb09637a97..e2727d5915 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.js.diff
@@ -1,6 +1,16 @@
 --- old.destructuredDeclarationEmit.js
 +++ new.destructuredDeclarationEmit.js
-@@= skipped -33, +33 lines =@@
+@@= skipped -25, +25 lines =@@
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.arr = exports.foo = void 0;
+-var foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } };
++const foo = { bar: 'hello', bat: 'world', bam: { bork: { bar: 'a', baz: 'b' } } };
+ exports.foo = foo;
+-var arr = [0, 1, 2, ['a', 'b', 'c', [{ def: 'def' }, { sec: 'sec' }]]];
++const arr = [0, 1, 2, ['a', 'b', 'c', [{ def: 'def' }, { sec: 'sec' }]]];
+ exports.arr = arr;
+ //// [index.js]
  "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.foo2 = exports.sec = exports.bee = exports.one = exports.ibaz = exports.baz = exports.arr = exports.foo = void 0;
@@ -8,18 +18,23 @@
 +const foo_1 = require("./foo");
  Object.defineProperty(exports, "foo", { enumerable: true, get: function () { return foo_1.foo; } });
  Object.defineProperty(exports, "arr", { enumerable: true, get: function () { return foo_1.arr; } });
- const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo_1.foo;
+-var baz = foo_1.foo.bar, bat = foo_1.foo.bat, _a = foo_1.foo.bam.bork, ibar = _a.bar, ibaz = _a.baz;
 -exports.baz = baz;
 -exports.ibaz = ibaz;
- const [, one, , [, bee, , [, { sec }]]] = foo_1.arr;
+-var one = foo_1.arr[1], _b = foo_1.arr[3], bee = _b[1], _c = _b[3], sec = _c[1].sec;
 -exports.one = one;
 -exports.bee = bee;
 -exports.sec = sec;
- const getFoo = () => ({
+-var getFoo = function () { return ({
++const { bar: baz, bat, bam: { bork: { bar: ibar, baz: ibaz } } } = foo_1.foo;
++const [, one, , [, bee, , [, { sec }]]] = foo_1.arr;
++const getFoo = () => ({
      foo: 'foo'
- });
- const { foo: foo2 } = getFoo();
+-}); };
+-var foo2 = getFoo().foo;
 -exports.foo2 = foo2;
++});
++const { foo: foo2 } = getFoo();
 
 
  //// [foo.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.types.diff b/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.types.diff
new file mode 100644
index 0000000000..49c1c5572e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuredDeclarationEmit.types.diff
@@ -0,0 +1,15 @@
+--- old.destructuredDeclarationEmit.types
++++ new.destructuredDeclarationEmit.types
+@@= skipped -66, +66 lines =@@
+ >ibaz : string
+
+ const [ , one, , [, bee, , [, {sec} ]]] = arr;
+-> : undefined
+ >one : 1
+-> : undefined
+-> : undefined
+ >bee : "b"
+-> : undefined
+-> : undefined
+ >sec : "sec"
+ >arr : [0, 1, 2, ["a", "b", "c", [{ def: "def"; }, { sec: "sec"; }]]]
diff --git a/testdata/baselines/reference/submodule/compiler/destructuredMaappedTypeIsNotImplicitlyAny.js.diff b/testdata/baselines/reference/submodule/compiler/destructuredMaappedTypeIsNotImplicitlyAny.js.diff
new file mode 100644
index 0000000000..2fc51a6f1f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuredMaappedTypeIsNotImplicitlyAny.js.diff
@@ -0,0 +1,13 @@
+--- old.destructuredMaappedTypeIsNotImplicitlyAny.js
++++ new.destructuredMaappedTypeIsNotImplicitlyAny.js
+@@= skipped -10, +10 lines =@@
+
+ //// [destructuredMaappedTypeIsNotImplicitlyAny.js]
+ function foo(key, obj) {
+-    var _a = obj, _b = key, bar = _a[_b]; // Element implicitly has an 'any' type because type '{ [_ in T]: number; }' has no index signature.
++    const { [key]: bar } = obj; // Element implicitly has an 'any' type because type '{ [_ in T]: number; }' has no index signature.
+     bar; // bar : any
+     // Note: this does work:
+-    var lorem = obj[key];
++    const lorem = obj[key];
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.js.diff
new file mode 100644
index 0000000000..0dc6fc77d7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.js.diff
@@ -0,0 +1,54 @@
+--- old.destructuringAssignmentWithDefault.js
++++ new.destructuringAssignmentWithDefault.js
+@@= skipped -34, +34 lines =@@
+
+
+ //// [destructuringAssignmentWithDefault.js]
+-var _a;
+-var a = {};
+-var x = 0;
+-(_a = a.x, x = _a === void 0 ? 1 : _a);
++const a = {};
++let x = 0;
++({ x = 1 } = a);
+ // Repro from #26235
+ function f1(options) {
+-    var _a;
+-    var _b = options || {}, color = _b.color, width = _b.width;
+-    (_a = options || {}, color = _a.color, width = _a.width);
+-    var x1 = (options || {}).color;
+-    var x2 = (options || {})["color"];
++    let { color, width } = options || {};
++    ({ color, width } = options || {});
++    let x1 = (options || {}).color;
++    let x2 = (options || {})["color"];
+ }
+ function f2(options) {
+-    var _a;
+-    var _b = options || [], str = _b[0], num = _b[1];
+-    _a = options || [], str = _a[0], num = _a[1];
+-    var x1 = (options || {})[0];
++    let [str, num] = options || [];
++    [str, num] = options || [];
++    let x1 = (options || {})[0];
+ }
+ function f3(options) {
+-    var _a;
+-    var _b = options || {}, color = _b.color, width = _b.width;
+-    (_a = options || {}, color = _a.color, width = _a.width);
+-    var x1 = (options || {}).color;
+-    var x2 = (options || {})["color"];
++    let { color, width } = options || {};
++    ({ color, width } = options || {});
++    let x1 = (options || {}).color;
++    let x2 = (options || {})["color"];
+ }
+ function f4(options) {
+-    var _a;
+-    var _b = options || [], str = _b[0], num = _b[1];
+-    _a = options || [], str = _a[0], num = _a[1];
+-    var x1 = (options || {})[0];
++    let [str, num] = options || [];
++    [str, num] = options || [];
++    let x1 = (options || {})[0];
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.types.diff b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.types.diff
index 30581aabee..7706c84149 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault.types.diff
@@ -87,7 +87,17 @@
  >options : [(string | undefined)?, (number | undefined)?] | undefined
 
      let [str, num] = options || [];
-@@= skipped -82, +82 lines =@@
+@@= skipped -74, +74 lines =@@
+     let x1 = (options || {})[0];
+ >x1 : string | undefined
+ >(options || {})[0] : string | undefined
+->(options || {}) : [(string | undefined)?, (number | undefined)?] | {}
+->options || {} : [(string | undefined)?, (number | undefined)?] | {}
++>(options || {}) : {} | [(string | undefined)?, (number | undefined)?]
++>options || {} : {} | [(string | undefined)?, (number | undefined)?]
+ >options : [(string | undefined)?, (number | undefined)?] | undefined
+ >{} : {}
+ >0 : 0
  }
 
  function f3(options?: { color: string, width: number }) {
@@ -96,7 +106,7 @@
  >options : { color: string; width: number; } | undefined
  >color : string
  >width : number
-@@= skipped -42, +42 lines =@@
+@@= skipped -50, +50 lines =@@
  }
 
  function f4(options?: [string, number]) {
@@ -105,20 +115,14 @@
  >options : [string, number] | undefined
 
      let [str, num] = options || [];
- >str : string | undefined
- >num : number | undefined
-->options || [] : [string, number] | []
-+>options || [] : [] | [string, number]
- >options : [string, number] | undefined
- >[] : []
-
-     [str, num] = options || [];
-->[str, num] = options || [] : [string, number] | []
-+>[str, num] = options || [] : [] | [string, number]
- >[str, num] : [string | undefined, number | undefined]
- >str : string | undefined
- >num : number | undefined
-->options || [] : [string, number] | []
-+>options || [] : [] | [string, number]
+@@= skipped -22, +22 lines =@@
+     let x1 = (options || {})[0];
+ >x1 : string | undefined
+ >(options || {})[0] : string | undefined
+->(options || {}) : [string, number] | {}
+->options || {} : [string, number] | {}
++>(options || {}) : {} | [string, number]
++>options || {} : {} | [string, number]
  >options : [string, number] | undefined
- >[] : []
+ >{} : {}
+ >0 : 0
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault2.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault2.js.diff
new file mode 100644
index 0000000000..57a400d385
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithDefault2.js.diff
@@ -0,0 +1,39 @@
+--- old.destructuringAssignmentWithDefault2.js
++++ new.destructuringAssignmentWithDefault2.js
+@@= skipped -27, +27 lines =@@
+ ({ done: done = false, value } = r.next());
+
+ //// [destructuringAssignmentWithDefault2.js]
+-var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
+-var a = {};
+-var x;
++const a = {};
++let x;
+ // Should not error out
+-(_a = a.x, x = _a === void 0 ? 0 : _a);
+-(_b = a.x, x = _b === void 0 ? 0 : _b);
+-(_c = a.y, x = _c === void 0 ? 0 : _c);
++({ x = 0 } = a);
++({ x: x = 0 } = a);
++({ y: x = 0 } = a);
+ // Should be error
+-(_d = a.x, x = _d === void 0 ? undefined : _d);
+-(_e = a.x, x = _e === void 0 ? undefined : _e);
+-(_f = a.y, x = _f === void 0 ? undefined : _f);
+-var z1 = a.x;
+-var _l = a.x, z2 = _l === void 0 ? 0 : _l;
+-var _m = a.x, z3 = _m === void 0 ? undefined : _m;
+-var done;
+-var value;
+-(_g = r.next(), _h = _g.done, done = _h === void 0 ? false : _h, value = _g.value);
+-(_j = r.next(), _k = _j.done, done = _k === void 0 ? false : _k, value = _j.value);
++({ x = undefined } = a);
++({ x: x = undefined } = a);
++({ y: x = undefined } = a);
++const { x: z1 } = a;
++const { x: z2 = 0 } = a;
++const { x: z3 = undefined } = a;
++let done;
++let value;
++({ done = false, value } = r.next());
++({ done: done = false, value } = r.next());
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithStrictNullChecks.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithStrictNullChecks.js.diff
index 5677b8d6b6..4d83a11a5a 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithStrictNullChecks.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringAssignmentWithStrictNullChecks.js.diff
@@ -4,7 +4,8 @@
          }
      return t;
  };
-+var _a;
- let bar;
+-var bar;
 -(bar = __rest({}, []));
++var _a;
++let bar;
 +(_a = {}, bar = __rest(_a, []));
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringAssignment_private.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringAssignment_private.js.diff
index b721d74be4..18efe965f9 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringAssignment_private.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringAssignment_private.js.diff
@@ -1,15 +1,32 @@
 --- old.destructuringAssignment_private.js
 +++ new.destructuringAssignment_private.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -16, +16 lines =@@
+
 
  //// [destructuringAssignment_private.js]
- class C {
--    constructor() {
+-var _a, _b, _c, _d;
+-var C = /** @class */ (function () {
+-    function C() {
 -        this.x = 0;
 -        this.o = [{ a: 1 }];
 -    }
+-    return C;
+-}());
+-var x;
+-(x = [{ a: new C() }][0].a.x);
+-(x = new C().o[0].a);
+-var nameX = "x";
+-(_a = [{ a: new C() }], _b = nameX, x = _a[0].a[_b]);
+-var nameO = "o";
+-(_c = new C(), _d = nameO, x = _c[_d][0].a);
++class C {
 +    x = 0;
 +    o = [{ a: 1 }];
- }
- let x;
- ([{ a: { x } }] = [{ a: new C() }]);
\ No newline at end of file
++}
++let x;
++([{ a: { x } }] = [{ a: new C() }]);
++({ o: [{ a: x }] } = new C());
++const nameX = "x";
++([{ a: { [nameX]: x } }] = [{ a: new C() }]);
++const nameO = "o";
++({ [nameO]: [{ a: x }] } = new C());
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.errors.txt.diff
new file mode 100644
index 0000000000..174c97fa28
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.errors.txt.diff
@@ -0,0 +1,25 @@
+--- old.destructuringControlFlowNoCrash.errors.txt
++++ new.destructuringControlFlowNoCrash.errors.txt
+@@= skipped -0, +0 lines =@@
++error TS2468: Cannot find global value 'Promise'.
+ destructuringControlFlowNoCrash.ts(3,3): error TS2339: Property 'date' does not exist on type '(inspectedElement: any) => number'.
+ destructuringControlFlowNoCrash.ts(10,3): error TS2339: Property 'date2' does not exist on type '(inspectedElement: any) => any'.
+ destructuringControlFlowNoCrash.ts(11,28): error TS1005: '=>' expected.
+-
+-
+-==== destructuringControlFlowNoCrash.ts (3 errors) ====
++destructuringControlFlowNoCrash.ts(16,25): error TS2705: An async function or method in ES5 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
++
++
++!!! error TS2468: Cannot find global value 'Promise'.
++==== destructuringControlFlowNoCrash.ts (4 errors) ====
+     // legal JS, if nonsensical, which also triggers the issue
+     const {
+       date,
+@@= skipped -25, +28 lines =@@
+     
+     // It could also be an async function
+     const { constructor } = async () => {};
++                            ~~~~~~~~~~~~~~
++!!! error TS2705: An async function or method in ES5 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
+     
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.js.diff
index 83f94da264..1160dbfef9 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringControlFlowNoCrash.js.diff
@@ -13,12 +13,44 @@
 -        step((generator = generator.apply(thisArg, _arguments || [])).next());
 -    });
 -};
+-var __generator = (this && this.__generator) || function (thisArg, body) {
+-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+-    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+-    function verb(n) { return function (v) { return step([n, v]); }; }
+-    function step(op) {
+-        if (f) throw new TypeError("Generator is already executing.");
+-        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+-            if (y = 0, t) op = [op[0] & 2, t.value];
+-            switch (op[0]) {
+-                case 0: case 1: t = op; break;
+-                case 4: _.label++; return { value: op[1], done: false };
+-                case 5: _.label++; y = op[1]; op = [0]; continue;
+-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+-                default:
+-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+-                    if (t[2]) _.ops.pop();
+-                    _.trys.pop(); continue;
+-            }
+-            op = body.call(thisArg, _);
+-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+-    }
+-};
+-var _this = this;
  // legal JS, if nonsensical, which also triggers the issue
- const { date, } = (inspectedElement) => 0;
+-var date = function (inspectedElement) { return 0; }.date;
++const { date, } = (inspectedElement) => 0;
  date.toISOString();
-@@= skipped -16, +7 lines =@@
- const { date2, } = (inspectedElement) => , props;
+ // Working flow code
+-var date2 = function (inspectedElement) { return ; }.date2, props;
++const { date2, } = (inspectedElement) => , props;
  date2.toISOString();
  // It could also be an async function
--const { constructor } = () => __awaiter(this, void 0, void 0, function* () { });
+-var constructor = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
+-    return [2 /*return*/];
+-}); }); }.constructor;
 +const { constructor } = async () => { };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringFromUnionSpread.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringFromUnionSpread.js.diff
new file mode 100644
index 0000000000..eae25cc364
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringFromUnionSpread.js.diff
@@ -0,0 +1,8 @@
+--- old.destructuringFromUnionSpread.js
++++ new.destructuringFromUnionSpread.js
+@@= skipped -19, +19 lines =@@
+     };
+     return __assign.apply(this, arguments);
+ };
+-var a = __assign({}, x).a; // error
++const { a } = __assign({}, x); // error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.js.diff
index 0e60106225..4a30c52d80 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.js.diff
@@ -7,4 +7,29 @@
 -"use strict";
  var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
-         for (var s, i = 1, n = arguments.length; i < n; i++) {
\ No newline at end of file
+         for (var s, i = 1, n = arguments.length; i < n; i++) {
+@@= skipped -23, +22 lines =@@
+         }
+     return t;
+ };
+-var Parent = function (_a) {
+-    var children = _a.children, _b = _a.name, name = _b === void 0 ? "Artemis" : _b, props = __rest(_a, ["children", "name"]);
+-    return Child(__assign({ name: name }, props));
+-};
+-var Child = function (_a) {
+-    var children = _a.children, _b = _a.name, name = _b === void 0 ? "Artemis" : _b, props = __rest(_a, ["children", "name"]);
+-    return "name: ".concat(name, " props: ").concat(JSON.stringify(props));
+-};
+-f(function (_a) {
+-    var _1 = _a[0], _b = _a[1], _2 = _b === void 0 ? undefined : _b;
+-    return undefined;
+-});
++const Parent = (_a) => {
++    var { children, name = "Artemis" } = _a, props = __rest(_a, ["children", "name"]);
++    return Child(__assign({ name }, props));
++};
++const Child = (_a) => {
++    var { children, name = "Artemis" } = _a, props = __rest(_a, ["children", "name"]);
++    return `name: ${name} props: ${JSON.stringify(props)}`;
++};
++f(([_1, _2 = undefined]) => undefined);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.symbols.diff b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.symbols.diff
new file mode 100644
index 0000000000..e1ff02603f
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringInitializerContextualTypeFromContext.symbols.diff
@@ -0,0 +1,10 @@
+--- old.destructuringInitializerContextualTypeFromContext.symbols
++++ new.destructuringInitializerContextualTypeFromContext.symbols
+@@= skipped -53, +53 lines =@@
+ }) => `name: ${name} props: ${JSON.stringify(props)}`;
+ >name : Symbol(name, Decl(destructuringInitializerContextualTypeFromContext.ts, 15, 13))
+ >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >props : Symbol(props, Decl(destructuringInitializerContextualTypeFromContext.ts, 16, 21))
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringPropertyAssignmentNameIsNotAssignmentTarget.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringPropertyAssignmentNameIsNotAssignmentTarget.js.diff
new file mode 100644
index 0000000000..7edbe3fd2b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringPropertyAssignmentNameIsNotAssignmentTarget.js.diff
@@ -0,0 +1,13 @@
+--- old.destructuringPropertyAssignmentNameIsNotAssignmentTarget.js
++++ new.destructuringPropertyAssignmentNameIsNotAssignmentTarget.js
+@@= skipped -12, +12 lines =@@
+ //// [destructuringPropertyAssignmentNameIsNotAssignmentTarget.js]
+ // test for #10668
+ function qux(bar) {
+-    var foo;
+-    (foo = bar.value);
+-    var x = function () { return bar; };
++    let foo;
++    ({ value: foo } = bar);
++    let x = () => bar;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringTempOccursAfterPrologue.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringTempOccursAfterPrologue.js.diff
index 8bbf3085eb..08d901fd91 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringTempOccursAfterPrologue.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringTempOccursAfterPrologue.js.diff
@@ -4,7 +4,9 @@
  function test(p) {
      'use strict';
      'use strong';
+-    var _a;
+-    p = (_a = p, p = _a.prop, _a);
 +    'use strict';
 +    'use strong';
-     p = { prop: p } = p;
++    p = { prop: p } = p;
  }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringTuple.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringTuple.js.diff
index e471f14ee5..5373cbbfdd 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringTuple.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringTuple.js.diff
@@ -5,6 +5,12 @@
 
  //// [destructuringTuple.js]
 -"use strict";
- const [a, b, c, ...rest] = tuple;
- [...receiver] = tuple;
- // Repros from #32140
\ No newline at end of file
+-var a = tuple[0], b = tuple[1], c = tuple[2], rest = tuple.slice(3);
+-receiver = tuple.slice(0);
++const [a, b, c, ...rest] = tuple;
++[...receiver] = tuple;
+ // Repros from #32140
+-var oops1 = [1, 2, 3].reduce(function (accu, el) { return accu.concat(el); }, [])[0];
+-var oops2 = [1, 2, 3].reduce(function (acc, e) { return acc.concat(e); }, [])[0];
++const [oops1] = [1, 2, 3].reduce((accu, el) => accu.concat(el), []);
++const [oops2] = [1, 2, 3].reduce((acc, e) => acc.concat(e), []);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringTypeGuardFlow.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringTypeGuardFlow.js.diff
new file mode 100644
index 0000000000..784d808df5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringTypeGuardFlow.js.diff
@@ -0,0 +1,38 @@
+--- old.destructuringTypeGuardFlow.js
++++ new.destructuringTypeGuardFlow.js
+@@= skipped -38, +38 lines =@@
+
+
+ //// [destructuringTypeGuardFlow.js]
+-var aFoo = { bar: 3, baz: "b", nested: { a: 1, b: "y" } };
++const aFoo = { bar: 3, baz: "b", nested: { a: 1, b: "y" } };
+ if (aFoo.bar && aFoo.nested.b) {
+-    var bar = aFoo.bar, baz = aFoo.baz, _a = aFoo.nested, a = _a.a, text = _a.b;
+-    var right = aFoo.bar;
+-    var wrong = bar;
+-    var another = baz;
+-    var aAgain = a;
+-    var bAgain = text;
++    const { bar, baz, nested: { a, b: text } } = aFoo;
++    const right = aFoo.bar;
++    const wrong = bar;
++    const another = baz;
++    const aAgain = a;
++    const bAgain = text;
+ }
+-var bBar = { elem1: 7, elem2: aFoo };
++const bBar = { elem1: 7, elem2: aFoo };
+ if (bBar.elem2 && bBar.elem2.bar && bBar.elem2.nested.b) {
+-    var _b = bBar.elem2, bar = _b.bar, baz = _b.baz, _c = _b.nested, a = _c.a, text = _c.b;
+-    var right = bBar.elem2.bar;
+-    var wrong = bar;
+-    var another = baz;
+-    var aAgain = a;
+-    var bAgain = text;
++    const { bar, baz, nested: { a, b: text } } = bBar.elem2;
++    const right = bBar.elem2.bar;
++    const wrong = bar;
++    const another = baz;
++    const aAgain = a;
++    const bAgain = text;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.errors.txt.diff
new file mode 100644
index 0000000000..df826c8bb5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.errors.txt.diff
@@ -0,0 +1,239 @@
+--- old.destructuringUnspreadableIntoRest.errors.txt
++++ new.destructuringUnspreadableIntoRest.errors.txt
+@@= skipped -0, +0 lines =@@
+-destructuringUnspreadableIntoRest.ts(22,15): error TS2339: Property 'publicProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(22,15): error TS2339: Property 'publicProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(23,15): error TS2339: Property 'publicProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(25,15): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(25,15): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(26,15): error TS2339: Property 'privateProp' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(27,15): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(27,15): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(28,15): error TS2339: Property 'privateProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(30,15): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(30,15): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(31,15): error TS2339: Property 'protectedProp' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(32,15): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(32,15): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(33,15): error TS2339: Property 'protectedProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(35,15): error TS2339: Property 'getter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(35,15): error TS2339: Property 'getter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(36,15): error TS2339: Property 'getter' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(37,15): error TS2339: Property 'getter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(37,15): error TS2339: Property 'getter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(38,15): error TS2339: Property 'getter' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(40,15): error TS2339: Property 'setter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(40,15): error TS2339: Property 'setter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(41,15): error TS2339: Property 'setter' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(42,15): error TS2339: Property 'setter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(42,15): error TS2339: Property 'setter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(43,15): error TS2339: Property 'setter' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(45,15): error TS2339: Property 'method' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(45,15): error TS2339: Property 'method' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(46,15): error TS2339: Property 'method' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(47,15): error TS2339: Property 'method' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(47,15): error TS2339: Property 'method' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(48,15): error TS2339: Property 'method' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(60,11): error TS2339: Property 'publicProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(60,11): error TS2339: Property 'publicProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(61,11): error TS2339: Property 'publicProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(63,11): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(63,11): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(64,11): error TS2339: Property 'privateProp' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(65,11): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(65,11): error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(66,11): error TS2339: Property 'privateProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(68,11): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(68,11): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(69,11): error TS2339: Property 'protectedProp' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(70,11): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(70,11): error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(71,11): error TS2339: Property 'protectedProp' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(73,11): error TS2339: Property 'getter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(73,11): error TS2339: Property 'getter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(74,11): error TS2339: Property 'getter' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(75,11): error TS2339: Property 'getter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(75,11): error TS2339: Property 'getter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(76,11): error TS2339: Property 'getter' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(78,11): error TS2339: Property 'setter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(78,11): error TS2339: Property 'setter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(79,11): error TS2339: Property 'setter' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(80,11): error TS2339: Property 'setter' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(80,11): error TS2339: Property 'setter' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(81,11): error TS2339: Property 'setter' does not exist on type '{}'.
+-destructuringUnspreadableIntoRest.ts(83,11): error TS2339: Property 'method' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(83,11): error TS2339: Property 'method' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(84,11): error TS2339: Property 'method' does not exist on type '{ publicProp: string; }'.
+-destructuringUnspreadableIntoRest.ts(85,11): error TS2339: Property 'method' does not exist on type 'Omit'.
++destructuringUnspreadableIntoRest.ts(85,11): error TS2339: Property 'method' does not exist on type 'Omit'.
+ destructuringUnspreadableIntoRest.ts(86,11): error TS2339: Property 'method' does not exist on type '{}'.
+
+
+@@= skipped -67, +67 lines =@@
+             rest2.publicProp;
+             rest3.publicProp;
+                   ~~~~~~~~~~
+-!!! error TS2339: Property 'publicProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'publicProp' does not exist on type 'Omit'.
+             rest4.publicProp;
+                   ~~~~~~~~~~
+ !!! error TS2339: Property 'publicProp' does not exist on type '{}'.
+     
+             rest1.privateProp;
+                   ~~~~~~~~~~~
+-!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+             rest2.privateProp;
+                   ~~~~~~~~~~~
+ !!! error TS2339: Property 'privateProp' does not exist on type '{ publicProp: string; }'.
+             rest3.privateProp;
+                   ~~~~~~~~~~~
+-!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+             rest4.privateProp;
+                   ~~~~~~~~~~~
+ !!! error TS2339: Property 'privateProp' does not exist on type '{}'.
+     
+             rest1.protectedProp;
+                   ~~~~~~~~~~~~~
+-!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+             rest2.protectedProp;
+                   ~~~~~~~~~~~~~
+ !!! error TS2339: Property 'protectedProp' does not exist on type '{ publicProp: string; }'.
+             rest3.protectedProp;
+                   ~~~~~~~~~~~~~
+-!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+             rest4.protectedProp;
+                   ~~~~~~~~~~~~~
+ !!! error TS2339: Property 'protectedProp' does not exist on type '{}'.
+     
+             rest1.getter;
+                   ~~~~~~
+-!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
+             rest2.getter;
+                   ~~~~~~
+ !!! error TS2339: Property 'getter' does not exist on type '{ publicProp: string; }'.
+             rest3.getter;
+                   ~~~~~~
+-!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
+             rest4.getter;
+                   ~~~~~~
+ !!! error TS2339: Property 'getter' does not exist on type '{}'.
+     
+             rest1.setter;
+                   ~~~~~~
+-!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
+             rest2.setter;
+                   ~~~~~~
+ !!! error TS2339: Property 'setter' does not exist on type '{ publicProp: string; }'.
+             rest3.setter;
+                   ~~~~~~
+-!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
+             rest4.setter;
+                   ~~~~~~
+ !!! error TS2339: Property 'setter' does not exist on type '{}'.
+     
+             rest1.method;
+                   ~~~~~~
+-!!! error TS2339: Property 'method' does not exist on type 'Omit'.
++!!! error TS2339: Property 'method' does not exist on type 'Omit'.
+             rest2.method;
+                   ~~~~~~
+ !!! error TS2339: Property 'method' does not exist on type '{ publicProp: string; }'.
+             rest3.method;
+                   ~~~~~~
+-!!! error TS2339: Property 'method' does not exist on type 'Omit'.
++!!! error TS2339: Property 'method' does not exist on type 'Omit'.
+             rest4.method;
+                   ~~~~~~
+ !!! error TS2339: Property 'method' does not exist on type '{}'.
+@@= skipped -82, +82 lines =@@
+         rest2.publicProp;
+         rest3.publicProp;
+               ~~~~~~~~~~
+-!!! error TS2339: Property 'publicProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'publicProp' does not exist on type 'Omit'.
+         rest4.publicProp;
+               ~~~~~~~~~~
+ !!! error TS2339: Property 'publicProp' does not exist on type '{}'.
+     
+         rest1.privateProp;
+               ~~~~~~~~~~~
+-!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+         rest2.privateProp;
+               ~~~~~~~~~~~
+ !!! error TS2339: Property 'privateProp' does not exist on type '{ publicProp: string; }'.
+         rest3.privateProp;
+               ~~~~~~~~~~~
+-!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'privateProp' does not exist on type 'Omit'.
+         rest4.privateProp;
+               ~~~~~~~~~~~
+ !!! error TS2339: Property 'privateProp' does not exist on type '{}'.
+     
+         rest1.protectedProp;
+               ~~~~~~~~~~~~~
+-!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+         rest2.protectedProp;
+               ~~~~~~~~~~~~~
+ !!! error TS2339: Property 'protectedProp' does not exist on type '{ publicProp: string; }'.
+         rest3.protectedProp;
+               ~~~~~~~~~~~~~
+-!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
++!!! error TS2339: Property 'protectedProp' does not exist on type 'Omit'.
+         rest4.protectedProp;
+               ~~~~~~~~~~~~~
+ !!! error TS2339: Property 'protectedProp' does not exist on type '{}'.
+     
+         rest1.getter;
+               ~~~~~~
+-!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
+         rest2.getter;
+               ~~~~~~
+ !!! error TS2339: Property 'getter' does not exist on type '{ publicProp: string; }'.
+         rest3.getter;
+               ~~~~~~
+-!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'getter' does not exist on type 'Omit'.
+         rest4.getter;
+               ~~~~~~
+ !!! error TS2339: Property 'getter' does not exist on type '{}'.
+     
+         rest1.setter;
+               ~~~~~~
+-!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
+         rest2.setter;
+               ~~~~~~
+ !!! error TS2339: Property 'setter' does not exist on type '{ publicProp: string; }'.
+         rest3.setter;
+               ~~~~~~
+-!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
++!!! error TS2339: Property 'setter' does not exist on type 'Omit'.
+         rest4.setter;
+               ~~~~~~
+ !!! error TS2339: Property 'setter' does not exist on type '{}'.
+     
+         rest1.method;
+               ~~~~~~
+-!!! error TS2339: Property 'method' does not exist on type 'Omit'.
++!!! error TS2339: Property 'method' does not exist on type 'Omit'.
+         rest2.method;
+               ~~~~~~
+ !!! error TS2339: Property 'method' does not exist on type '{ publicProp: string; }'.
+         rest3.method;
+               ~~~~~~
+-!!! error TS2339: Property 'method' does not exist on type 'Omit'.
++!!! error TS2339: Property 'method' does not exist on type 'Omit'.
+         rest4.method;
+               ~~~~~~
+ !!! error TS2339: Property 'method' does not exist on type '{}'.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.types.diff b/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.types.diff
new file mode 100644
index 0000000000..00d83613cb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringUnspreadableIntoRest.types.diff
@@ -0,0 +1,254 @@
+--- old.destructuringUnspreadableIntoRest.types
++++ new.destructuringUnspreadableIntoRest.types
+@@= skipped -30, +30 lines =@@
+ >method : () => void
+
+         const {                 ...rest1 } = this;
+->rest1 : Omit
++>rest1 : Omit
+ >this : this
+
+         const {                 ...rest2 } = this as A;
+@@= skipped -11, +11 lines =@@
+         const { publicProp: _1, ...rest3 } = this;
+ >publicProp : any
+ >_1 : string
+->rest3 : Omit
++>rest3 : Omit
+ >this : this
+
+         const { publicProp: _2, ...rest4 } = this as A;
+@@= skipped -12, +12 lines =@@
+
+         rest1.publicProp;
+ >rest1.publicProp : this["publicProp"]
+->rest1 : Omit
++>rest1 : Omit
+ >publicProp : this["publicProp"]
+
+         rest2.publicProp;
+@@= skipped -10, +10 lines =@@
+
+         rest3.publicProp;
+ >rest3.publicProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >publicProp : any
+
+         rest4.publicProp;
+@@= skipped -10, +10 lines =@@
+
+         rest1.privateProp;
+ >rest1.privateProp : any
+->rest1 : Omit
++>rest1 : Omit
+ >privateProp : any
+
+         rest2.privateProp;
+@@= skipped -10, +10 lines =@@
+
+         rest3.privateProp;
+ >rest3.privateProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >privateProp : any
+
+         rest4.privateProp;
+@@= skipped -10, +10 lines =@@
+
+         rest1.protectedProp;
+ >rest1.protectedProp : any
+->rest1 : Omit
++>rest1 : Omit
+ >protectedProp : any
+
+         rest2.protectedProp;
+@@= skipped -10, +10 lines =@@
+
+         rest3.protectedProp;
+ >rest3.protectedProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >protectedProp : any
+
+         rest4.protectedProp;
+@@= skipped -10, +10 lines =@@
+
+         rest1.getter;
+ >rest1.getter : any
+->rest1 : Omit
++>rest1 : Omit
+ >getter : any
+
+         rest2.getter;
+@@= skipped -10, +10 lines =@@
+
+         rest3.getter;
+ >rest3.getter : any
+->rest3 : Omit
++>rest3 : Omit
+ >getter : any
+
+         rest4.getter;
+@@= skipped -10, +10 lines =@@
+
+         rest1.setter;
+ >rest1.setter : any
+->rest1 : Omit
++>rest1 : Omit
+ >setter : any
+
+         rest2.setter;
+@@= skipped -10, +10 lines =@@
+
+         rest3.setter;
+ >rest3.setter : any
+->rest3 : Omit
++>rest3 : Omit
+ >setter : any
+
+         rest4.setter;
+@@= skipped -10, +10 lines =@@
+
+         rest1.method;
+ >rest1.method : any
+->rest1 : Omit
++>rest1 : Omit
+ >method : any
+
+         rest2.method;
+@@= skipped -10, +10 lines =@@
+
+         rest3.method;
+ >rest3.method : any
+->rest3 : Omit
++>rest3 : Omit
+ >method : any
+
+         rest4.method;
+@@= skipped -15, +15 lines =@@
+ >x : T
+
+     const {                 ...rest1 } = x;
+->rest1 : Omit
++>rest1 : Omit
+ >x : T
+
+     const {                 ...rest2 } = x as A;
+@@= skipped -11, +11 lines =@@
+     const { publicProp: _1, ...rest3 } = x;
+ >publicProp : any
+ >_1 : string
+->rest3 : Omit
++>rest3 : Omit
+ >x : T
+
+     const { publicProp: _2, ...rest4 } = x as A;
+@@= skipped -12, +12 lines =@@
+
+     rest1.publicProp;
+ >rest1.publicProp : T["publicProp"]
+->rest1 : Omit
++>rest1 : Omit
+ >publicProp : T["publicProp"]
+
+     rest2.publicProp;
+@@= skipped -10, +10 lines =@@
+
+     rest3.publicProp;
+ >rest3.publicProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >publicProp : any
+
+     rest4.publicProp;
+@@= skipped -10, +10 lines =@@
+
+     rest1.privateProp;
+ >rest1.privateProp : any
+->rest1 : Omit
++>rest1 : Omit
+ >privateProp : any
+
+     rest2.privateProp;
+@@= skipped -10, +10 lines =@@
+
+     rest3.privateProp;
+ >rest3.privateProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >privateProp : any
+
+     rest4.privateProp;
+@@= skipped -10, +10 lines =@@
+
+     rest1.protectedProp;
+ >rest1.protectedProp : any
+->rest1 : Omit
++>rest1 : Omit
+ >protectedProp : any
+
+     rest2.protectedProp;
+@@= skipped -10, +10 lines =@@
+
+     rest3.protectedProp;
+ >rest3.protectedProp : any
+->rest3 : Omit
++>rest3 : Omit
+ >protectedProp : any
+
+     rest4.protectedProp;
+@@= skipped -10, +10 lines =@@
+
+     rest1.getter;
+ >rest1.getter : any
+->rest1 : Omit
++>rest1 : Omit
+ >getter : any
+
+     rest2.getter;
+@@= skipped -10, +10 lines =@@
+
+     rest3.getter;
+ >rest3.getter : any
+->rest3 : Omit
++>rest3 : Omit
+ >getter : any
+
+     rest4.getter;
+@@= skipped -10, +10 lines =@@
+
+     rest1.setter;
+ >rest1.setter : any
+->rest1 : Omit
++>rest1 : Omit
+ >setter : any
+
+     rest2.setter;
+@@= skipped -10, +10 lines =@@
+
+     rest3.setter;
+ >rest3.setter : any
+->rest3 : Omit
++>rest3 : Omit
+ >setter : any
+
+     rest4.setter;
+@@= skipped -10, +10 lines =@@
+
+     rest1.method;
+ >rest1.method : any
+->rest1 : Omit
++>rest1 : Omit
+ >method : any
+
+     rest2.method;
+@@= skipped -10, +10 lines =@@
+
+     rest3.method;
+ >rest3.method : any
+->rest3 : Omit
++>rest3 : Omit
+ >method : any
+
+     rest4.method;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringWithConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringWithConstraint.js.diff
index 7fc47b688a..47ac701e00 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringWithConstraint.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringWithConstraint.js.diff
@@ -7,5 +7,7 @@
 -"use strict";
 -// Repro from #22823
  function foo(props) {
-     let { foo = false } = props;
-     if (foo === true) { }
\ No newline at end of file
+-    var _a = props.foo, foo = _a === void 0 ? false : _a;
++    let { foo = false } = props;
+     if (foo === true) { }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringWithGenericParameter.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringWithGenericParameter.js.diff
index 84d4d75568..4256640f25 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringWithGenericParameter.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringWithGenericParameter.js.diff
@@ -1,10 +1,23 @@
 --- old.destructuringWithGenericParameter.js
 +++ new.destructuringWithGenericParameter.js
-@@= skipped -17, +17 lines =@@
+@@= skipped -16, +16 lines =@@
+
 
  //// [destructuringWithGenericParameter.js]
- class GenericClass {
+-var GenericClass = /** @class */ (function () {
+-    function GenericClass() {
+-    }
+-    return GenericClass;
+-}());
++class GenericClass {
 +    payload;
- }
++}
  var genericObject = new GenericClass();
- function genericFunction(object, callback) {
\ No newline at end of file
+ function genericFunction(object, callback) {
+     callback(object.payload);
+ }
+-genericFunction(genericObject, function (_a) {
+-    var greeting = _a.greeting;
++genericFunction(genericObject, ({ greeting }) => {
+     var s = greeting.toLocaleLowerCase(); // Greeting should be of type string
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringWithNewExpression.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringWithNewExpression.js.diff
index 8b975b45bd..27a251e0ab 100644
--- a/testdata/baselines/reference/submodule/compiler/destructuringWithNewExpression.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/destructuringWithNewExpression.js.diff
@@ -1,12 +1,17 @@
 --- old.destructuringWithNewExpression.js
 +++ new.destructuringWithNewExpression.js
-@@= skipped -8, +8 lines =@@
+@@= skipped -7, +7 lines =@@
+ var { x } = new C;
 
  //// [destructuringWithNewExpression.js]
- class C {
--    constructor() {
+-var C = /** @class */ (function () {
+-    function C() {
 -        this.x = 0;
 -    }
+-    return C;
+-}());
+-var x = (new C).x;
++class C {
 +    x = 0;
- }
- var { x } = new C;
\ No newline at end of file
++}
++var { x } = new C;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/destructuringWithNumberLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/destructuringWithNumberLiteral.js.diff
new file mode 100644
index 0000000000..cf781ad3ac
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/destructuringWithNumberLiteral.js.diff
@@ -0,0 +1,8 @@
+--- old.destructuringWithNumberLiteral.js
++++ new.destructuringWithNumberLiteral.js
+@@= skipped -3, +3 lines =@@
+ var { toExponential } = 0;
+
+ //// [destructuringWithNumberLiteral.js]
+-var toExponential = 0..toExponential;
++var { toExponential } = 0;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor1.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor1.js.diff
index 4af9fd93f9..867ebef0ba 100644
--- a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor1.js.diff
@@ -1,11 +1,22 @@
 --- old.detachedCommentAtStartOfConstructor1.js
 +++ new.detachedCommentAtStartOfConstructor1.js
-@@= skipped -13, +13 lines =@@
+@@= skipped -12, +12 lines =@@
+ }
 
  //// [detachedCommentAtStartOfConstructor1.js]
- class TestFile {
+-var TestFile = /** @class */ (function () {
+-    function TestFile(message) {
+-        var _this = this;
++class TestFile {
 +    message;
 +    name;
-     constructor(message) {
++    constructor(message) {
          /// Test summary
-         /// 
\ No newline at end of file
+         /// 
+-        var getMessage = function () { return message + _this.name; };
++        var getMessage = () => message + this.name;
+         this.message = getMessage();
+     }
+-    return TestFile;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor2.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor2.js.diff
index 3e2b3d8870..669545b7d6 100644
--- a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfConstructor2.js.diff
@@ -1,11 +1,22 @@
 --- old.detachedCommentAtStartOfConstructor2.js
 +++ new.detachedCommentAtStartOfConstructor2.js
-@@= skipped -14, +14 lines =@@
+@@= skipped -13, +13 lines =@@
+ }
 
  //// [detachedCommentAtStartOfConstructor2.js]
- class TestFile {
+-var TestFile = /** @class */ (function () {
+-    function TestFile(message) {
++class TestFile {
 +    message;
 +    name;
-     constructor(message) {
++    constructor(message) {
          /// Test summary
-         /// 
\ No newline at end of file
+         /// 
+-        var _this = this;
+-        var getMessage = function () { return message + _this.name; };
++        var getMessage = () => message + this.name;
+         this.message = getMessage();
+     }
+-    return TestFile;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody1.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody1.js.diff
new file mode 100644
index 0000000000..3c7fe4455e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody1.js.diff
@@ -0,0 +1,23 @@
+--- old.detachedCommentAtStartOfFunctionBody1.js
++++ new.detachedCommentAtStartOfFunctionBody1.js
+@@= skipped -10, +10 lines =@@
+ }
+
+ //// [detachedCommentAtStartOfFunctionBody1.js]
+-var TestFile = /** @class */ (function () {
+-    function TestFile() {
+-    }
+-    TestFile.prototype.foo = function (message) {
+-        var _this = this;
++class TestFile {
++    foo(message) {
+         /// Test summary
+         /// 
+         /// 
+-        return function () { return message + _this.name; };
+-    };
+-    return TestFile;
+-}());
++        return () => message + this.name;
++    }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody2.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody2.js.diff
new file mode 100644
index 0000000000..0e6dc485f8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfFunctionBody2.js.diff
@@ -0,0 +1,23 @@
+--- old.detachedCommentAtStartOfFunctionBody2.js
++++ new.detachedCommentAtStartOfFunctionBody2.js
+@@= skipped -11, +11 lines =@@
+ }
+
+ //// [detachedCommentAtStartOfFunctionBody2.js]
+-var TestFile = /** @class */ (function () {
+-    function TestFile() {
+-    }
+-    TestFile.prototype.foo = function (message) {
++class TestFile {
++    foo(message) {
+         /// Test summary
+         /// 
+         /// 
+-        var _this = this;
+-        return function () { return message + _this.name; };
+-    };
+-    return TestFile;
+-}());
++        return () => message + this.name;
++    }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction1.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction1.js.diff
index 6113372102..98ed56983d 100644
--- a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction1.js.diff
@@ -1,10 +1,33 @@
 --- old.detachedCommentAtStartOfLambdaFunction1.js
 +++ new.detachedCommentAtStartOfLambdaFunction1.js
-@@= skipped -13, +13 lines =@@
+@@= skipped -12, +12 lines =@@
+ }
 
  //// [detachedCommentAtStartOfLambdaFunction1.js]
- class TestFile {
+-var TestFile = /** @class */ (function () {
+-    function TestFile() {
++class TestFile {
 +    name;
-     foo(message) {
-         return (...x) => 
-         /// Test summary
\ No newline at end of file
++    foo(message) {
++        return (...x) => 
++        /// Test summary
++        /// 
++        /// 
++        message + this.name;
+     }
+-    TestFile.prototype.foo = function (message) {
+-        var _this = this;
+-        return function () {
+-            var x = [];
+-            for (var _i = 0; _i < arguments.length; _i++) {
+-                x[_i] = arguments[_i];
+-            }
+-            /// Test summary
+-            /// 
+-            /// 
+-            return message + _this.name;
+-        };
+-    };
+-    return TestFile;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction2.js.diff b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction2.js.diff
index 391c0ab3b3..c547136c59 100644
--- a/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/detachedCommentAtStartOfLambdaFunction2.js.diff
@@ -1,10 +1,33 @@
 --- old.detachedCommentAtStartOfLambdaFunction2.js
 +++ new.detachedCommentAtStartOfLambdaFunction2.js
-@@= skipped -14, +14 lines =@@
+@@= skipped -13, +13 lines =@@
+ }
 
  //// [detachedCommentAtStartOfLambdaFunction2.js]
- class TestFile {
+-var TestFile = /** @class */ (function () {
+-    function TestFile() {
++class TestFile {
 +    name;
-     foo(message) {
-         return (...x) => 
-         /// Test summary
\ No newline at end of file
++    foo(message) {
++        return (...x) => 
++        /// Test summary
++        /// 
++        /// 
++        message + this.name;
+     }
+-    TestFile.prototype.foo = function (message) {
+-        var _this = this;
+-        return function () {
+-            /// Test summary
+-            /// 
+-            /// 
+-            var x = [];
+-            for (var _i = 0; _i < arguments.length; _i++) {
+-                x[_i] = arguments[_i];
+-            }
+-            return message + _this.name;
+-        };
+-    };
+-    return TestFile;
+-}());
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt.diff
new file mode 100644
index 0000000000..fa3a7a95d6
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt.diff
@@ -0,0 +1,18 @@
+--- old.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt
++++ new.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.errors.txt
+@@= skipped -0, +0 lines =@@
+ didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(10,8): error TS2741: Property 'x' is missing in type 'typeof Bar' but required in type 'Bar'.
+-didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(11,8): error TS2740: Type 'DateConstructor' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 38 more.
++didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(11,8): error TS2740: Type 'DateConstructor' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more.
+ didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(17,4): error TS2345: Argument of type '() => number' is not assignable to parameter of type 'number'.
+ didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts(26,5): error TS2322: Type '() => number' is not assignable to type 'number'.
+
+@@= skipped -20, +20 lines =@@
+ !!! related TS6213 didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:10:8: Did you mean to use 'new' with this expression?
+         y: Date
+            ~~~~
+-!!! error TS2740: Type 'DateConstructor' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 38 more.
++!!! error TS2740: Type 'DateConstructor' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more.
+ !!! related TS6213 didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts:11:8: Did you mean to use 'new' with this expression?
+     }, getNum());
+     
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js.diff
index 6d18232c12..9974b03eaa 100644
--- a/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js.diff
@@ -1,10 +1,17 @@
 --- old.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js
 +++ new.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js
-@@= skipped -31, +31 lines =@@
+@@= skipped -30, +30 lines =@@
+
 
  //// [didYouMeanElaborationsForExpressionsWhichCouldBeCalled.js]
- class Bar {
+-var Bar = /** @class */ (function () {
+-    function Bar() {
+-    }
+-    return Bar;
+-}());
++class Bar {
 +    x;
- }
++}
  foo({
-     x: Bar,
\ No newline at end of file
+     x: Bar,
+     y: Date
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols.diff
new file mode 100644
index 0000000000..e0599b17b4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols.diff
@@ -0,0 +1,38 @@
+--- old.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols
++++ new.didYouMeanElaborationsForExpressionsWhichCouldBeCalled.symbols
+@@= skipped -16, +16 lines =@@
+ >x : Symbol(x, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 6, 27))
+ >Bar : Symbol(Bar, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 0, 0))
+ >y : Symbol(y, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 6, 35))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+ >item : Symbol(item, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 6, 46))
+ >items : Symbol(items, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 6, 60))
+
+@@= skipped -13, +13 lines =@@
+
+     y: Date
+ >y : Symbol(y, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 9, 11))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+
+ }, getNum());
+ >getNum : Symbol(getNum, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 2, 1))
+@@= skipped -14, +14 lines =@@
+
+     y: new Date()
+ >y : Symbol(y, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 14, 17))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+
+ }, getNum);
+ >getNum : Symbol(getNum, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 2, 1))
+@@= skipped -15, +15 lines =@@
+
+     y: new Date()
+ >y : Symbol(y, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 20, 17))
+->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
+
+ }, getNum(), [
+ >getNum : Symbol(getNum, Decl(didYouMeanElaborationsForExpressionsWhichCouldBeCalled.ts, 2, 1))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.errors.txt.diff
new file mode 100644
index 0000000000..78928865a4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.errors.txt.diff
@@ -0,0 +1,22 @@
+--- old.didYouMeanStringLiteral.errors.txt
++++ new.didYouMeanStringLiteral.errors.txt
+@@= skipped -0, +0 lines =@@
+ didYouMeanStringLiteral.ts(5,7): error TS2820: Type '"strong"' is not assignable to type 'T1'. Did you mean '"string"'?
+-didYouMeanStringLiteral.ts(6,7): error TS2322: Type '"strong"' is not assignable to type '"number" | "boolean"'.
+-didYouMeanStringLiteral.ts(7,7): error TS2820: Type '"strong"' is not assignable to type '"string" | "boolean"'. Did you mean '"string"'?
++didYouMeanStringLiteral.ts(6,7): error TS2322: Type '"strong"' is not assignable to type '"boolean" | "number"'.
++didYouMeanStringLiteral.ts(7,7): error TS2820: Type '"strong"' is not assignable to type '"boolean" | "string"'. Did you mean '"string"'?
+
+
+ ==== didYouMeanStringLiteral.ts (3 errors) ====
+@@= skipped -12, +12 lines =@@
+ !!! error TS2820: Type '"strong"' is not assignable to type 'T1'. Did you mean '"string"'?
+     const t2: T2 = "strong";
+           ~~
+-!!! error TS2322: Type '"strong"' is not assignable to type '"number" | "boolean"'.
++!!! error TS2322: Type '"strong"' is not assignable to type '"boolean" | "number"'.
+     const t3: T3 = "strong";
+           ~~
+-!!! error TS2820: Type '"strong"' is not assignable to type '"string" | "boolean"'. Did you mean '"string"'?
++!!! error TS2820: Type '"strong"' is not assignable to type '"boolean" | "string"'. Did you mean '"string"'?
+     
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.js.diff
new file mode 100644
index 0000000000..d1fa7f0399
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.js.diff
@@ -0,0 +1,12 @@
+--- old.didYouMeanStringLiteral.js
++++ new.didYouMeanStringLiteral.js
+@@= skipped -10, +10 lines =@@
+
+
+ //// [didYouMeanStringLiteral.js]
+-var t1 = "strong";
+-var t2 = "strong";
+-var t3 = "strong";
++const t1 = "strong";
++const t2 = "strong";
++const t3 = "strong";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.types.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.types.diff
new file mode 100644
index 0000000000..8c353c8e82
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanStringLiteral.types.diff
@@ -0,0 +1,26 @@
+--- old.didYouMeanStringLiteral.types
++++ new.didYouMeanStringLiteral.types
+@@= skipped -4, +4 lines =@@
+ >T1 : T1
+
+ type T2 = T1 & ("number" | "boolean"); // "number" | "boolean"
+->T2 : "number" | "boolean"
++>T2 : "boolean" | "number"
+
+ type T3 = T1 & ("string" | "boolean"); // "string" | "boolean"
+->T3 : "string" | "boolean"
++>T3 : "boolean" | "string"
+
+ const t1: T1 = "strong";
+ >t1 : T1
+ >"strong" : "strong"
+
+ const t2: T2 = "strong";
+->t2 : "number" | "boolean"
++>t2 : "boolean" | "number"
+ >"strong" : "strong"
+
+ const t3: T3 = "strong";
+->t3 : "string" | "boolean"
++>t3 : "boolean" | "string"
+ >"strong" : "strong"
diff --git a/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.js.diff b/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.js.diff
new file mode 100644
index 0000000000..9c6130a1eb
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/didYouMeanSuggestionErrors.js.diff
@@ -0,0 +1,48 @@
+--- old.didYouMeanSuggestionErrors.js
++++ new.didYouMeanSuggestionErrors.js
+@@= skipped -30, +30 lines =@@
+ });
+
+ //// [didYouMeanSuggestionErrors.js]
+-describe("my test suite", function () {
+-    it("should run", function () {
+-        var a = $(".thing");
++describe("my test suite", () => {
++    it("should run", () => {
++        const a = $(".thing");
+     });
+ });
+-suite("another suite", function () {
+-    test("everything else", function () {
++suite("another suite", () => {
++    test("everything else", () => {
+         console.log(process.env);
+         document.createElement("div");
+-        var x = require("fs");
+-        var y = Buffer.from([]);
+-        var z = module.exports;
+-        var a = new Map();
+-        var b = new Set();
+-        var c = new WeakMap();
+-        var d = new WeakSet();
+-        var e = Symbol();
+-        var f = Promise.resolve(0);
+-        var i = null;
+-        var j = null;
+-        var k = null;
+-        var l = null;
++        const x = require("fs");
++        const y = Buffer.from([]);
++        const z = module.exports;
++        const a = new Map();
++        const b = new Set();
++        const c = new WeakMap();
++        const d = new WeakSet();
++        const e = Symbol();
++        const f = Promise.resolve(0);
++        const i = null;
++        const j = null;
++        const k = null;
++        const l = null;
+     });
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt
index cc817d8dbc..81a8c994a8 100644
--- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt
+++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.errors.txt
@@ -2,7 +2,7 @@ differentTypesWithSameName.ts(16,15): error TS2741: Property 's' is missing in t
 
 
 ==== differentTypesWithSameName.ts (1 errors) ====
-    module m {
+    namespace m {
       export class variable{
         s: string;
       }
diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js
index 4404bdc21b..0f20913464 100644
--- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js
+++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/differentTypesWithSameName.ts] ////
 
 //// [differentTypesWithSameName.ts]
-module m {
+namespace m {
   export class variable{
     s: string;
   }
diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js.diff b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js.diff
index 349eb2a58d..385f20e505 100644
--- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.js.diff
@@ -1,18 +1,29 @@
 --- old.differentTypesWithSameName.js
 +++ new.differentTypesWithSameName.js
-@@= skipped -21, +21 lines =@@
+@@= skipped -20, +20 lines =@@
+ //// [differentTypesWithSameName.js]
  var m;
  (function (m) {
-     class variable {
+-    var variable = /** @class */ (function () {
+-        function variable() {
+-        }
+-        return variable;
+-    }());
++    class variable {
 +        s;
-     }
++    }
      m.variable = variable;
      function doSomething(v) {
-@@= skipped -7, +8 lines =@@
+     }
      m.doSomething = doSomething;
  })(m || (m = {}));
- class variable {
+-var variable = /** @class */ (function () {
+-    function variable() {
+-    }
+-    return variable;
+-}());
++class variable {
 +    t;
- }
++}
  var v = new variable();
  m.doSomething(v);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.symbols b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.symbols
index 4dd5f0b417..d64e4c9f3e 100644
--- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.symbols
+++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.symbols
@@ -1,11 +1,11 @@
 //// [tests/cases/compiler/differentTypesWithSameName.ts] ////
 
 === differentTypesWithSameName.ts ===
-module m {
+namespace m {
 >m : Symbol(m, Decl(differentTypesWithSameName.ts, 0, 0))
 
   export class variable{
->variable : Symbol(variable, Decl(differentTypesWithSameName.ts, 0, 10))
+>variable : Symbol(variable, Decl(differentTypesWithSameName.ts, 0, 13))
 
     s: string;
 >s : Symbol(variable.s, Decl(differentTypesWithSameName.ts, 1, 24))
@@ -14,7 +14,7 @@ module m {
 >doSomething : Symbol(doSomething, Decl(differentTypesWithSameName.ts, 3, 3))
 >v : Symbol(v, Decl(differentTypesWithSameName.ts, 4, 30))
 >m : Symbol(m, Decl(differentTypesWithSameName.ts, 0, 0))
->variable : Symbol(variable, Decl(differentTypesWithSameName.ts, 0, 10))
+>variable : Symbol(variable, Decl(differentTypesWithSameName.ts, 0, 13))
     
   }
 }
diff --git a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.types b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.types
index 72311c55f8..a163bcff31 100644
--- a/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.types
+++ b/testdata/baselines/reference/submodule/compiler/differentTypesWithSameName.types
@@ -1,7 +1,7 @@
 //// [tests/cases/compiler/differentTypesWithSameName.ts] ////
 
 === differentTypesWithSameName.ts ===
-module m {
+namespace m {
 >m : typeof m
 
   export class variable{
diff --git a/testdata/baselines/reference/submodule/compiler/discriminableUnionWithIntersectedMembers.js.diff b/testdata/baselines/reference/submodule/compiler/discriminableUnionWithIntersectedMembers.js.diff
new file mode 100644
index 0000000000..1339019012
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminableUnionWithIntersectedMembers.js.diff
@@ -0,0 +1,11 @@
+--- old.discriminableUnionWithIntersectedMembers.js
++++ new.discriminableUnionWithIntersectedMembers.js
+@@= skipped -17, +17 lines =@@
+
+ //// [discriminableUnionWithIntersectedMembers.js]
+ // error
+-var x = 4;
++const x = 4;
+ // no  error
+-var y = 4;
++const y = 4;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantElementAccessCheck.js.diff b/testdata/baselines/reference/submodule/compiler/discriminantElementAccessCheck.js.diff
new file mode 100644
index 0000000000..87b73e9480
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminantElementAccessCheck.js.diff
@@ -0,0 +1,20 @@
+--- old.discriminantElementAccessCheck.js
++++ new.discriminantElementAccessCheck.js
+@@= skipped -76, +76 lines =@@
+     }
+ }
+ function IfWithTemplate(val) {
+-    if (val["kind"] === 'B') {
++    if (val[`kind`] === 'B') {
+         return val.b;
+     }
+     else {
+@@= skipped -8, +8 lines =@@
+     }
+ }
+ function SwitchWithTemplate(val) {
+-    switch (val["kind"]) {
++    switch (val[`kind`]) {
+         case 'A':
+             return val.a;
+         case 'B':
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantNarrowingCouldBeCircular.js.diff b/testdata/baselines/reference/submodule/compiler/discriminantNarrowingCouldBeCircular.js.diff
index 5e23b6a0f0..c7d4756a18 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantNarrowingCouldBeCircular.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantNarrowingCouldBeCircular.js.diff
@@ -5,6 +5,37 @@
 
  //// [discriminantNarrowingCouldBeCircular.js]
 -"use strict";
- const o = {};
+-var o = {};
++const o = {};
  if (o) {
-     for (const key in o) {
\ No newline at end of file
+-    for (var key in o) {
+-        var value = o[key];
++    for (const key in o) {
++        const value = o[key];
+         if (is(value)) {
+         }
+     }
+ }
+ function getImplicitAriaRole(element) {
+-    var ancestor = element;
++    let ancestor = element;
+     while (ancestor) {
+-        var parent = parentElementOrShadowHost(ancestor);
+-        var parents = kPresentationInheritanceParents[ancestor.a];
++        const parent = parentElementOrShadowHost(ancestor);
++        const parents = kPresentationInheritanceParents[ancestor.a];
+         if (!parents || !parent || !parents.includes(parent.a))
+             break;
+         ancestor = parent;
+     }
+ }
+ if (isPlainObject2(myObj2)) {
+-    for (var _i = 0, _a = ["a", "b", "c"]; _i < _a.length; _i++) {
+-        var key = _a[_i];
+-        var deeper = myObj2[key];
+-        var deeperKeys = isPlainObject2(deeper) ? Object.keys(deeper) : [];
++    for (const key of ["a", "b", "c"]) {
++        const deeper = myObj2[key];
++        const deeperKeys = isPlainObject2(deeper) ? Object.keys(deeper) : [];
+     }
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.js.diff b/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.js.diff
new file mode 100644
index 0000000000..53d0cd33e9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.js.diff
@@ -0,0 +1,38 @@
+--- old.discriminantPropertyCheck.js
++++ new.discriminantPropertyCheck.js
+@@= skipped -303, +303 lines =@@
+     }
+ }
+ // Repro from #29106
+-var f = function (_a, _b) { };
+-var u = {};
++const f = (_a, _b) => { };
++const u = {};
+ u.a && u.b && f(u.a, u.b);
+ u.b && u.a && f(u.a, u.b);
+ function foo(obj) {
+@@= skipped -29, +29 lines =@@
+ }
+ function WorksProperly(data) {
+     if (data.Name === "TypeA") {
+-        var value1 = data.Value1;
++        const value1 = data.Value1;
+     }
+ }
+ function DoesNotWork(data) {
+     if (isType(data)) {
+         if (data.Name === "TypeA") {
+-            var value1 = data.Value1;
++            const value1 = data.Value1;
+         }
+     }
+ }
+-var doTestingStuff = function (mapOfTests, ids) {
+-    ids.forEach(function (id) {
+-        var test;
++const doTestingStuff = (mapOfTests, ids) => {
++    ids.forEach(id => {
++        let test;
+         test = mapOfTests[id];
+         if (test.type === 'testA') {
+             console.log(test.bananas);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.symbols.diff b/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.symbols.diff
new file mode 100644
index 0000000000..8837413828
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminantPropertyCheck.symbols.diff
@@ -0,0 +1,14 @@
+--- old.discriminantPropertyCheck.symbols
++++ new.discriminantPropertyCheck.symbols
+@@= skipped -276, +276 lines =@@
+
+     while (true) {
+         switch (inst.type) {
+->inst.type : Symbol(type, Decl(discriminantPropertyCheck.ts, 74, 19), Decl(discriminantPropertyCheck.ts, 80, 19))
++>inst.type : Symbol(type, Decl(discriminantPropertyCheck.ts, 80, 19), Decl(discriminantPropertyCheck.ts, 74, 19))
+ >inst : Symbol(inst, Decl(discriminantPropertyCheck.ts, 85, 15))
+->type : Symbol(type, Decl(discriminantPropertyCheck.ts, 74, 19), Decl(discriminantPropertyCheck.ts, 80, 19))
++>type : Symbol(type, Decl(discriminantPropertyCheck.ts, 80, 19), Decl(discriminantPropertyCheck.ts, 74, 19))
+
+             case Types.Str: {
+ >Types.Str : Symbol(Types.Str, Decl(discriminantPropertyCheck.ts, 70, 12))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.js.diff b/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.js.diff
index 002fbe8bab..8ff5c56e96 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.js.diff
@@ -7,4 +7,24 @@
 -// Repro from #41759
  // simple inference
  f({
-     disc: true,
\ No newline at end of file
+     disc: true,
+-    cb: function (s) { return parseInt(s); }
++    cb: s => parseInt(s)
+ });
+ // simple inference
+ f({
+     disc: false,
+-    cb: function (n) { return n.toFixed(); }
++    cb: n => n.toFixed()
+ });
+ // simple inference when strict-null-checks are enabled
+ f({
+     disc: undefined,
+-    cb: function (n) { return n.toFixed(); }
++    cb: n => n.toFixed()
+ });
+ // requires checking type information since discriminator is missing from object
+ f({
+-    cb: function (n) { return n.toFixed(); }
++    cb: n => n.toFixed()
+ });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.types.diff b/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.types.diff
index 232f25b171..494022a18b 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantPropertyInference.types.diff
@@ -5,8 +5,9 @@
 
  declare function f(options: DiscriminatorTrue | DiscriminatorFalse): any;
 ->f : (options: DiscriminatorTrue | DiscriminatorFalse) => any
+->options : DiscriminatorTrue | DiscriminatorFalse
 +>f : (options: DiscriminatorFalse | DiscriminatorTrue) => any
- >options : DiscriminatorFalse | DiscriminatorTrue
++>options : DiscriminatorFalse | DiscriminatorTrue
 
  // simple inference
  f({
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantUsingEvaluatableTemplateExpression.types.diff b/testdata/baselines/reference/submodule/compiler/discriminantUsingEvaluatableTemplateExpression.types.diff
index e7148665e6..34c8b3453c 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantUsingEvaluatableTemplateExpression.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantUsingEvaluatableTemplateExpression.types.diff
@@ -5,8 +5,9 @@
 
  declare function foo(foo: S | N): void;
 ->foo : (foo: S | N) => void
+->foo : S | N
 +>foo : (foo: N | S) => void
- >foo : N | S
++>foo : N | S
 
  foo({
  >foo({  d: `${"s"}`,  cb: (x) => {    x; // string  },}) : void
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.js.diff b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.js.diff
index f9f7e9b017..a6c1f453f4 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.js.diff
@@ -7,4 +7,13 @@
 -// Repro from #10257 plus other tests
  function f1(x) {
      if (typeof x !== 'string') {
-         switch (x.kind) {
\ No newline at end of file
+         switch (x.kind) {
+@@= skipped -33, +32 lines =@@
+         }
+     }
+ }
+-var n;
++let n;
+ if (n.type === "Disjunction") {
+     n.alternatives.slice();
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.symbols.diff b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.symbols.diff
new file mode 100644
index 0000000000..2c46b32ad0
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.symbols.diff
@@ -0,0 +1,50 @@
+--- old.discriminantsAndPrimitives.symbols
++++ new.discriminantsAndPrimitives.symbols
+@@= skipped -32, +32 lines =@@
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 12, 12))
+
+         switch(x.kind) {
+->x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 12, 12))
+->kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+
+             case 'foo':
+                 x.name;
+@@= skipped -23, +23 lines =@@
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 21, 12))
+
+         switch(x.kind) {
+->x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 21, 12))
+->kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+
+             case 'foo':
+                 x.name;
+@@= skipped -24, +24 lines =@@
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 30, 12))
+
+         switch(x.kind) {
+->x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 30, 12))
+->kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+
+             case 'foo':
+                 x.name;
+@@= skipped -24, +24 lines =@@
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 39, 12))
+
+         switch(x.kind) {
+->x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>x.kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+ >x : Symbol(x, Decl(discriminantsAndPrimitives.ts, 39, 12))
+->kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 2, 15), Decl(discriminantsAndPrimitives.ts, 7, 15))
++>kind : Symbol(kind, Decl(discriminantsAndPrimitives.ts, 7, 15), Decl(discriminantsAndPrimitives.ts, 2, 15))
+
+             case 'foo':
+                 x.name;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.types.diff b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.types.diff
index 9f0a865643..f7d12a1340 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminantsAndPrimitives.types.diff
@@ -5,37 +5,117 @@
 
  function f1(x: Foo | Bar | string) {
 ->f1 : (x: Foo | Bar | string) => void
+->x : string | Foo | Bar
 +>f1 : (x: string | Bar | Foo) => void
- >x : string | Bar | Foo
++>x : string | Bar | Foo
 
      if (typeof x !== 'string') {
+ >typeof x !== 'string' : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+->x : string | Foo | Bar
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
++>x : string | Bar | Foo
+ >'string' : "string"
+
+         switch(x.kind) {
+->x.kind : "foo" | "bar"
+->x : Foo | Bar
+->kind : "foo" | "bar"
++>x.kind : "bar" | "foo"
++>x : Bar | Foo
++>kind : "bar" | "foo"
+
+             case 'foo':
+ >'foo' : "foo"
 @@= skipped -26, +26 lines =@@
  }
 
  function f2(x: Foo | Bar | string | undefined) {
 ->f2 : (x: Foo | Bar | string | undefined) => void
+->x : string | Foo | Bar | undefined
 +>f2 : (x: string | Bar | Foo | undefined) => void
- >x : string | Bar | Foo | undefined
++>x : string | Bar | Foo | undefined
 
      if (typeof x === "object") {
+ >typeof x === "object" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+->x : string | Foo | Bar | undefined
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
++>x : string | Bar | Foo | undefined
+ >"object" : "object"
+
+         switch(x.kind) {
+->x.kind : "foo" | "bar"
+->x : Foo | Bar
+->kind : "foo" | "bar"
++>x.kind : "bar" | "foo"
++>x : Bar | Foo
++>kind : "bar" | "foo"
+
+             case 'foo':
+ >'foo' : "foo"
 @@= skipped -26, +26 lines =@@
  }
 
  function f3(x: Foo | Bar | string | null) {
 ->f3 : (x: Foo | Bar | string | null) => void
+->x : string | Foo | Bar | null
 +>f3 : (x: string | Bar | Foo | null) => void
- >x : string | Bar | Foo | null
++>x : string | Bar | Foo | null
 
      if (x && typeof x !== "string") {
+->x && typeof x !== "string" : boolean | "" | null
+->x : string | Foo | Bar | null
++>x && typeof x !== "string" : "" | boolean | null
++>x : string | Bar | Foo | null
+ >typeof x !== "string" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+->x : string | Foo | Bar
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
++>x : string | Bar | Foo
+ >"string" : "string"
+
+         switch(x.kind) {
+->x.kind : "foo" | "bar"
+->x : Foo | Bar
+->kind : "foo" | "bar"
++>x.kind : "bar" | "foo"
++>x : Bar | Foo
++>kind : "bar" | "foo"
+
+             case 'foo':
+ >'foo' : "foo"
 @@= skipped -28, +28 lines =@@
  }
 
  function f4(x: Foo | Bar | string | number | null) {
 ->f4 : (x: Foo | Bar | string | number | null) => void
+->x : string | number | Foo | Bar | null
 +>f4 : (x: string | number | Bar | Foo | null) => void
- >x : string | number | Bar | Foo | null
++>x : string | number | Bar | Foo | null
 
      if (x && typeof x === "object") {
+->x && typeof x === "object" : boolean | "" | 0 | null
+->x : string | number | Foo | Bar | null
++>x && typeof x === "object" : "" | 0 | boolean | null
++>x : string | number | Bar | Foo | null
+ >typeof x === "object" : boolean
+->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
+->x : string | number | Foo | Bar
++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
++>x : string | number | Bar | Foo
+ >"object" : "object"
+
+         switch(x.kind) {
+->x.kind : "foo" | "bar"
+->x : Foo | Bar
+->kind : "foo" | "bar"
++>x.kind : "bar" | "foo"
++>x : Bar | Foo
++>kind : "bar" | "foo"
+
+             case 'foo':
+ >'foo' : "foo"
 @@= skipped -79, +79 lines =@@
 
      n.alternatives.slice()
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateObjectTypesOnly.js.diff b/testdata/baselines/reference/submodule/compiler/discriminateObjectTypesOnly.js.diff
index 804f8be116..995fad7c9f 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminateObjectTypesOnly.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminateObjectTypesOnly.js.diff
@@ -5,6 +5,11 @@
 
  //// [discriminateObjectTypesOnly.js]
 -"use strict";
- const k = { toFixed: null }; // OK, satisfies object
- const q = { toFixed: null };
- const h = { toString: null }; // OK, satisfies object
\ No newline at end of file
+-var k = { toFixed: null }; // OK, satisfies object
+-var q = { toFixed: null };
+-var h = { toString: null }; // OK, satisfies object
+-var l = { toString: undefined }; // error, toFixed isn't null
++const k = { toFixed: null }; // OK, satisfies object
++const q = { toFixed: null };
++const h = { toString: null }; // OK, satisfies object
++const l = { toString: undefined }; // error, toFixed isn't null
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateWithMissingProperty.symbols.diff b/testdata/baselines/reference/submodule/compiler/discriminateWithMissingProperty.symbols.diff
new file mode 100644
index 0000000000..573a5fa46d
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminateWithMissingProperty.symbols.diff
@@ -0,0 +1,17 @@
+--- old.discriminateWithMissingProperty.symbols
++++ new.discriminateWithMissingProperty.symbols
+@@= skipped -19, +19 lines =@@
+ } | {
+     data: string | Uint8Array;
+ >data : Symbol(data, Decl(discriminateWithMissingProperty.ts, 6, 5))
+->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ }
+
+ declare function foo(arg: Arg): void;
+@@= skipped -12, +12 lines =@@
+ >foo : Symbol(foo, Decl(discriminateWithMissingProperty.ts, 8, 1))
+ >mode : Symbol(mode, Decl(discriminateWithMissingProperty.ts, 11, 5))
+ >data : Symbol(data, Decl(discriminateWithMissingProperty.ts, 11, 22))
+->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types.diff b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types.diff
new file mode 100644
index 0000000000..7632b733a2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types.diff
@@ -0,0 +1,29 @@
+--- old.discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types
++++ new.discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types
+@@= skipped -59, +59 lines =@@
+
+       if (typeof iterator.return === "function") {
+ >typeof iterator.return === "function" : boolean
+->typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.return : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+@@= skipped -45, +45 lines =@@
+       return typeof iterator.return === "function"
+ >typeof iterator.return === "function"        ? mapResult(await iterator.return(value))        : { value: undefined as any, done: true } : Promise> | { value: any; done: true; }
+ >typeof iterator.return === "function" : boolean
+->typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.return : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+@@= skipped -31, +31 lines =@@
+
+       if (typeof iterator.throw === "function") {
+ >typeof iterator.throw === "function" : boolean
+->typeof iterator.throw : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.throw : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.throw : ((e?: any) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >throw : ((e?: any) => Promise>) | undefined
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types.diff b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types.diff
new file mode 100644
index 0000000000..286f0b164a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types.diff
@@ -0,0 +1,29 @@
+--- old.discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types
++++ new.discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types
+@@= skipped -59, +59 lines =@@
+
+       if (typeof iterator.return === "function") {
+ >typeof iterator.return === "function" : boolean
+->typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.return : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+@@= skipped -45, +45 lines =@@
+       return typeof iterator.return === "function"
+ >typeof iterator.return === "function"        ? mapResult(await iterator.return(value))        : { value: undefined as any, done: true } : Promise> | { value: any; done: true; }
+ >typeof iterator.return === "function" : boolean
+->typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.return : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >return : ((value?: R | PromiseLike | undefined) => Promise>) | undefined
+@@= skipped -31, +31 lines =@@
+
+       if (typeof iterator.throw === "function") {
+ >typeof iterator.throw === "function" : boolean
+->typeof iterator.throw : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof iterator.throw : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >iterator.throw : ((e?: any) => Promise>) | undefined
+ >iterator : AsyncIterator
+ >throw : ((e?: any) => Promise>) | undefined
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types.diff b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types.diff
new file mode 100644
index 0000000000..17ff845f06
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types.diff
@@ -0,0 +1,59 @@
+--- old.discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types
++++ new.discriminateWithOptionalProperty4(exactoptionalpropertytypes=false).types
+@@= skipped -7, +7 lines =@@
+ >a : string[] | undefined
+
+   const z = a ? { a } : { b: ["there"] };
+->z : { a: string[]; b?: undefined; } | { b: string[]; a?: undefined; }
++>z : { a: string[]; b?: undefined; } | { a?: undefined; b: string[]; }
+ >a ? { a } : { b: ["there"] } : { a: string[]; } | { b: string[]; }
+ >a : string[] | undefined
+ >{ a } : { a: string[]; }
+@@= skipped -13, +13 lines =@@
+   z.a //
+ >z.a //    ? z.a.toString()    : z.b.toString() : string
+ >z.a : string[] | undefined
+->z : { a: string[]; b?: undefined; } | { b: string[]; a?: undefined; }
++>z : { a: string[]; b?: undefined; } | { a?: undefined; b: string[]; }
+ >a : string[] | undefined
+
+     ? z.a.toString()
+@@= skipped -15, +15 lines =@@
+ >z.b.toString() : string
+ >z.b.toString : () => string
+ >z.b : string[]
+->z : { b: string[]; a?: undefined; }
++>z : { a?: undefined; b: string[]; }
+ >b : string[]
+ >toString : () => string
+
+@@= skipped -14, +14 lines =@@
+     | { b: string[]; a?: undefined } = z;
+ >b : string[]
+ >a : undefined
+->z : { a: string[]; b?: undefined; } | { b: string[]; a?: undefined; }
++>z : { a: string[]; b?: undefined; } | { a?: undefined; b: string[]; }
+
+   zWorkAround.a ? zWorkAround.a.toString() : zWorkAround.b.toString();
+ >zWorkAround.a ? zWorkAround.a.toString() : zWorkAround.b.toString() : string
+@@= skipped -24, +24 lines =@@
+ >"a" in z ? z.a.toString() : z.b.toString() : string
+ >"a" in z : boolean
+ >"a" : "a"
+->z : { a: string[]; b?: undefined; } | { b: string[]; a?: undefined; }
++>z : { a: string[]; b?: undefined; } | { a?: undefined; b: string[]; }
+ >z.a.toString() : string
+ >z.a.toString : () => string
+ >z.a : string[] | undefined
+->z : { a: string[]; b?: undefined; } | { b: string[]; a?: undefined; }
++>z : { a: string[]; b?: undefined; } | { a?: undefined; b: string[]; }
+ >a : string[] | undefined
+ >toString : () => string
+ >z.b.toString() : string
+ >z.b.toString : () => string
+ >z.b : string[]
+->z : { b: string[]; a?: undefined; }
++>z : { a?: undefined; b: string[]; }
+ >b : string[]
+ >toString : () => string
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types.diff b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types.diff
new file mode 100644
index 0000000000..a6085b3e0e
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types.diff
@@ -0,0 +1,59 @@
+--- old.discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types
++++ new.discriminateWithOptionalProperty4(exactoptionalpropertytypes=true).types
+@@= skipped -7, +7 lines =@@
+ >a : string[] | undefined
+
+   const z = a ? { a } : { b: ["there"] };
+->z : { a: string[]; b?: never; } | { b: string[]; a?: never; }
++>z : { a: string[]; b?: never; } | { a?: never; b: string[]; }
+ >a ? { a } : { b: ["there"] } : { a: string[]; } | { b: string[]; }
+ >a : string[] | undefined
+ >{ a } : { a: string[]; }
+@@= skipped -13, +13 lines =@@
+   z.a //
+ >z.a //    ? z.a.toString()    : z.b.toString() : string
+ >z.a : string[] | undefined
+->z : { a: string[]; b?: never; } | { b: string[]; a?: never; }
++>z : { a: string[]; b?: never; } | { a?: never; b: string[]; }
+ >a : string[] | undefined
+
+     ? z.a.toString()
+@@= skipped -15, +15 lines =@@
+ >z.b.toString() : string
+ >z.b.toString : () => string
+ >z.b : string[]
+->z : { b: string[]; a?: never; }
++>z : { a?: never; b: string[]; }
+ >b : string[]
+ >toString : () => string
+
+@@= skipped -14, +14 lines =@@
+     | { b: string[]; a?: undefined } = z;
+ >b : string[]
+ >a : undefined
+->z : { a: string[]; b?: never; } | { b: string[]; a?: never; }
++>z : { a: string[]; b?: never; } | { a?: never; b: string[]; }
+
+   zWorkAround.a ? zWorkAround.a.toString() : zWorkAround.b.toString();
+ >zWorkAround.a ? zWorkAround.a.toString() : zWorkAround.b.toString() : string
+@@= skipped -24, +24 lines =@@
+ >"a" in z ? z.a.toString() : z.b.toString() : string
+ >"a" in z : boolean
+ >"a" : "a"
+->z : { a: string[]; b?: never; } | { b: string[]; a?: never; }
++>z : { a: string[]; b?: never; } | { a?: never; b: string[]; }
+ >z.a.toString() : string
+ >z.a.toString : () => string
+ >z.a : string[]
+->z : { a: string[]; b?: never; } | { b: string[]; a?: never; }
++>z : { a: string[]; b?: never; } | { a?: never; b: string[]; }
+ >a : string[]
+ >toString : () => string
+ >z.b.toString() : string
+ >z.b.toString : () => string
+ >z.b : string[]
+->z : { b: string[]; a?: never; }
++>z : { a?: never; b: string[]; }
+ >b : string[]
+ >toString : () => string
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminatedUnionErrorMessage.js.diff b/testdata/baselines/reference/submodule/compiler/discriminatedUnionErrorMessage.js.diff
new file mode 100644
index 0000000000..d6221a4903
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminatedUnionErrorMessage.js.diff
@@ -0,0 +1,11 @@
+--- old.discriminatedUnionErrorMessage.js
++++ new.discriminatedUnionErrorMessage.js
+@@= skipped -15, +15 lines =@@
+
+
+ //// [discriminatedUnionErrorMessage.js]
+-var shape = {
++let shape = {
+     kind: "sq",
+     x: 12,
+     y: 13,
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminatedUnionJsxElement.js.diff b/testdata/baselines/reference/submodule/compiler/discriminatedUnionJsxElement.js.diff
index ad545cf227..f243df896f 100644
--- a/testdata/baselines/reference/submodule/compiler/discriminatedUnionJsxElement.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/discriminatedUnionJsxElement.js.diff
@@ -8,4 +8,8 @@
 -// Repro from #46021
  function Menu(data) {
      var _a;
-     const listItemVariant = (_a = data.menuItemsVariant) !== null && _a !== void 0 ? _a : ListItemVariant.OneLine;
\ No newline at end of file
+-    var listItemVariant = (_a = data.menuItemsVariant) !== null && _a !== void 0 ? _a : ListItemVariant.OneLine;
++    const listItemVariant = (_a = data.menuItemsVariant) !== null && _a !== void 0 ? _a : ListItemVariant.OneLine;
+     return ;
+ }
+ var ListItemVariant;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.js.diff b/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.js.diff
new file mode 100644
index 0000000000..4194a486c4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.js.diff
@@ -0,0 +1,17 @@
+--- old.discriminatedUnionWithIndexSignature.js
++++ new.discriminatedUnionWithIndexSignature.js
+@@= skipped -31, +31 lines =@@
+ //// [discriminatedUnionWithIndexSignature.js]
+ "use strict";
+ Object.defineProperty(exports, "__esModule", { value: true });
+-var withoutAsConst = {
++const withoutAsConst = {
+     1: {
+         type: 'text' /*as const*/,
+     },
+ };
+-var withAsConst = {
++const withAsConst = {
+     1: {
+         type: 'text',
+     },
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.types.diff b/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.types.diff
new file mode 100644
index 0000000000..9064cd6af4
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/discriminatedUnionWithIndexSignature.types.diff
@@ -0,0 +1,11 @@
+--- old.discriminatedUnionWithIndexSignature.types
++++ new.discriminatedUnionWithIndexSignature.types
+@@= skipped -7, +7 lines =@@
+
+ export interface UnionAltB {
+     type?: 'image' | 'video' | 'document';
+->type : "image" | "video" | "document" | undefined
++>type : "document" | "image" | "video" | undefined
+ }
+
+ export type ValueUnion = UnionAltA | UnionAltB;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.symbols.diff b/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.symbols.diff
new file mode 100644
index 0000000000..09c415fc02
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.symbols.diff
@@ -0,0 +1,11 @@
+--- old.distributiveConditionalTypeConstraints.symbols
++++ new.distributiveConditionalTypeConstraints.symbols
+@@= skipped -56, +56 lines =@@
+ function f4(x: IsArray) {
+ >f4 : Symbol(f4, Decl(distributiveConditionalTypeConstraints.ts, 15, 1))
+ >T : Symbol(T, Decl(distributiveConditionalTypeConstraints.ts, 17, 12))
+->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >x : Symbol(x, Decl(distributiveConditionalTypeConstraints.ts, 17, 32))
+ >IsArray : Symbol(IsArray, Decl(distributiveConditionalTypeConstraints.ts, 0, 0))
+ >T : Symbol(T, Decl(distributiveConditionalTypeConstraints.ts, 17, 12))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.types.diff b/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.types.diff
new file mode 100644
index 0000000000..aebe8ff9c1
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/distributiveConditionalTypeConstraints.types.diff
@@ -0,0 +1,49 @@
+--- old.distributiveConditionalTypeConstraints.types
++++ new.distributiveConditionalTypeConstraints.types
+@@= skipped -82, +82 lines =@@
+ >x : ZeroOf
+
+     let t: "" | 0 | false = x;
+->t : false | "" | 0
++>t : "" | 0 | false
+ >false : false
+->x : false | "" | 0
++>x : "" | 0 | false
+ }
+
+ type Foo = T extends "abc" | 42 ? true : false;
+@@= skipped -38, +38 lines =@@
+
+     if (typeof y == 'string') {
+ >typeof y == 'string' : boolean
+->typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof y : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >y : T extends B ? number : string
+ >'string' : "string"
+
+@@= skipped -25, +25 lines =@@
+
+     if (typeof y == 'string') {
+ >typeof y == 'string' : boolean
+->typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof y : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >y : T extends B ? string : number
+ >'string' : "string"
+
+@@= skipped -25, +25 lines =@@
+
+     if (typeof y == 'string') {
+ >typeof y == 'string' : boolean
+->typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof y : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >y : T extends C ? number : string
+ >'string' : "string"
+
+@@= skipped -25, +25 lines =@@
+
+     if (typeof y == 'string') {
+ >typeof y == 'string' : boolean
+->typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
++>typeof y : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined"
+ >y : T extends C ? string : number
+ >'string' : "string"
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessors1.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessors1.js.diff
index e1199d33f8..2ef225c097 100644
--- a/testdata/baselines/reference/submodule/compiler/divergentAccessors1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessors1.js.diff
@@ -7,4 +7,16 @@
 -"use strict";
  // Accessors in interfaces/types
  {
-     const ihgs = null;
\ No newline at end of file
+-    var ihgs = null;
++    const ihgs = null;
+     ihgs.foo = "32";
+-    var r_ihgs_foo = ihgs.foo;
++    let r_ihgs_foo = ihgs.foo;
+ }
+ {
+-    var t_hgs = null;
++    const t_hgs = null;
+     t_hgs.foo = "32";
+-    var r_t_hgs_foo = t_hgs.foo;
++    let r_t_hgs_foo = t_hgs.foo;
+ }
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes3.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes3.js.diff
index 8596113a9d..f8df396d0b 100644
--- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes3.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes3.js.diff
@@ -1,10 +1,80 @@
 --- old.divergentAccessorsTypes3.js
 +++ new.divergentAccessorsTypes3.js
-@@= skipped -50, +50 lines =@@
-     set prop1(s) { }
-     get prop2() { return ""; }
-     set prop2(s) { }
+@@= skipped -45, +45 lines =@@
+
+
+ //// [divergentAccessorsTypes3.js]
+-var One = /** @class */ (function () {
+-    function One() {
+-    }
+-    Object.defineProperty(One.prototype, "prop1", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(One.prototype, "prop2", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(One.prototype, "prop4", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return One;
+-}());
+-var Two = /** @class */ (function () {
+-    function Two() {
+-    }
+-    Object.defineProperty(Two.prototype, "prop1", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Two.prototype, "prop2", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Two.prototype, "prop3", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Two.prototype, "prop4", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return Two;
+-}());
++class One {
++    get prop1() { return ""; }
++    set prop1(s) { }
++    get prop2() { return ""; }
++    set prop2(s) { }
 +    prop3;
-     get prop4() { return ""; }
-     set prop4(s) { }
- }
\ No newline at end of file
++    get prop4() { return ""; }
++    set prop4(s) { }
++}
++class Two {
++    get prop1() { return ""; }
++    set prop1(s) { }
++    get prop2() { return ""; }
++    set prop2(s) { }
++    get prop3() { return ""; }
++    set prop3(s) { }
++    get prop4() { return ""; }
++    set prop4(s) { }
++}
+ u1.prop1 = 42;
+ u1.prop1 = "hello";
+ u1.prop2 = 42;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes4.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes4.js.diff
index 25b896293c..a7c2f538ac 100644
--- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes4.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes4.js.diff
@@ -1,10 +1,48 @@
 --- old.divergentAccessorsTypes4.js
 +++ new.divergentAccessorsTypes4.js
-@@= skipped -35, +35 lines =@@
- class One {
-     get prop1() { return ""; }
-     set prop1(s) { }
+@@= skipped -32, +32 lines =@@
+
+
+ //// [divergentAccessorsTypes4.js]
+-var One = /** @class */ (function () {
+-    function One() {
+-    }
+-    Object.defineProperty(One.prototype, "prop1", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return One;
+-}());
+-var Two = /** @class */ (function () {
+-    function Two() {
+-    }
+-    Object.defineProperty(Two.prototype, "prop1", {
+-        get: function () { return "hello"; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Two.prototype, "prop2", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return Two;
+-}());
++class One {
++    get prop1() { return ""; }
++    set prop1(s) { }
 +    prop2;
- }
- class Two {
-     get prop1() { return "hello"; }
\ No newline at end of file
++}
++class Two {
++    get prop1() { return "hello"; }
++    set prop1(s) { }
++    get prop2() { return ""; }
++    set prop2(s) { }
++}
+ // "hello"
+ i.prop1;
+ // number | "hello"
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.js.diff
index 1f7546aca2..c9ae963286 100644
--- a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.js.diff
@@ -1,10 +1,71 @@
 --- old.divergentAccessorsTypes5.js
 +++ new.divergentAccessorsTypes5.js
-@@= skipped -44, +44 lines =@@
- class One {
-     get prop1() { return ""; }
-     set prop1(s) { }
+@@= skipped -41, +41 lines =@@
+ //// [divergentAccessorsTypes5.js]
+ // Not really different from divergentAccessorsTypes4.ts,
+ // but goes through the deferred type code
+-var One = /** @class */ (function () {
+-    function One() {
+-    }
+-    Object.defineProperty(One.prototype, "prop1", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return One;
+-}());
+-var Two = /** @class */ (function () {
+-    function Two() {
+-    }
+-    Object.defineProperty(Two.prototype, "prop1", {
+-        get: function () { return "hello"; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Two.prototype, "prop2", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return Two;
+-}());
+-var Three = /** @class */ (function () {
+-    function Three() {
+-    }
+-    Object.defineProperty(Three.prototype, "prop1", {
+-        get: function () { return "hello"; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    Object.defineProperty(Three.prototype, "prop2", {
+-        get: function () { return ""; },
+-        set: function (s) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return Three;
+-}());
++class One {
++    get prop1() { return ""; }
++    set prop1(s) { }
 +    prop2;
- }
- class Two {
-     get prop1() { return "hello"; }
\ No newline at end of file
++}
++class Two {
++    get prop1() { return "hello"; }
++    set prop1(s) { }
++    get prop2() { return ""; }
++    set prop2(s) { }
++}
++class Three {
++    get prop1() { return "hello"; }
++    set prop1(s) { }
++    get prop2() { return ""; }
++    set prop2(s) { }
++}
+ // "hello"
+ i.prop1 = 42; // error
+ i.prop1 = "hello";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.types.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.types.diff
new file mode 100644
index 0000000000..6e530b0da9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes5.types.diff
@@ -0,0 +1,11 @@
+--- old.divergentAccessorsTypes5.types
++++ new.divergentAccessorsTypes5.types
+@@= skipped -48, +48 lines =@@
+
+   set prop1(s: "hello" | boolean) { }
+ >prop1 : "hello"
+->s : boolean | "hello"
++>s : "hello" | boolean
+
+   get prop2(): string { return ""; }
+ >prop2 : string
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.js.diff
new file mode 100644
index 0000000000..aff6c232a9
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.js.diff
@@ -0,0 +1,17 @@
+--- old.divergentAccessorsTypes6.js
++++ new.divergentAccessorsTypes6.js
+@@= skipped -42, +42 lines =@@
+ element.style = "color: red";
+ element.style.animationTimingFunction;
+ element.style = element.style; // error
+-var o1 = {
++const o1 = {
+     get x() { return 0; },
+     set x(value) { }
+ };
+ // A setter annotation still implies the getter return type.
+-var o2 = {
++const o2 = {
+     get p1() { return 0; }, // error - no annotation means type is implied from the setter annotation
+     set p1(value) { },
+     get p2() { return 0; }, // ok - explicit annotation
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.symbols.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.symbols.diff
new file mode 100644
index 0000000000..c9f2ae47f3
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes6.symbols.diff
@@ -0,0 +1,25 @@
+--- old.divergentAccessorsTypes6.symbols
++++ new.divergentAccessorsTypes6.symbols
+@@= skipped -7, +7 lines =@@
+
+     get style(): CSSStyleDeclaration;
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
+->CSSStyleDeclaration : Symbol(CSSStyleDeclaration, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
++>CSSStyleDeclaration : Symbol(CSSStyleDeclaration, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
+
+     set style(cssText: string);
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
+@@= skipped -17, +17 lines =@@
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
+
+ element.style.animationTimingFunction;
+->element.style.animationTimingFunction : Symbol(CSSStyleProperties.animationTimingFunction, Decl(lib.dom.d.ts, --, --))
++>element.style.animationTimingFunction : Symbol(CSSStyleDeclaration.animationTimingFunction, Decl(lib.dom.d.ts, --, --))
+ >element.style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
+ >element : Symbol(element, Decl(divergentAccessorsTypes6.ts, 7, 13))
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
+->animationTimingFunction : Symbol(CSSStyleProperties.animationTimingFunction, Decl(lib.dom.d.ts, --, --))
++>animationTimingFunction : Symbol(CSSStyleDeclaration.animationTimingFunction, Decl(lib.dom.d.ts, --, --))
+
+ element.style = element.style; // error
+ >element.style : Symbol(Element.style, Decl(divergentAccessorsTypes6.ts, 2, 19), Decl(divergentAccessorsTypes6.ts, 3, 37))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes7.js.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes7.js.diff
new file mode 100644
index 0000000000..a6c8bbd0b5
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes7.js.diff
@@ -0,0 +1,31 @@
+--- old.divergentAccessorsTypes7.js
++++ new.divergentAccessorsTypes7.js
+@@= skipped -27, +27 lines =@@
+
+
+ //// [divergentAccessorsTypes7.js]
+-var Test = /** @class */ (function () {
+-    function Test() {
++class Test {
++    constructor() { }
++    set value(value) { }
++    get value() {
++        return null;
+     }
+-    Object.defineProperty(Test.prototype, "value", {
+-        get: function () {
+-            return null;
+-        },
+-        set: function (value) { },
+-        enumerable: false,
+-        configurable: true
+-    });
+-    return Test;
+-}());
+-var a = new Test();
+-a.value = function (item) { return item.property; };
+-a['value'] = function (item) { return item.property; };
++}
++const a = new Test();
++a.value = (item) => item.property;
++a['value'] = (item) => item.property;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.symbols.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.symbols.diff
new file mode 100644
index 0000000000..0877a93f42
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.symbols.diff
@@ -0,0 +1,11 @@
+--- old.divergentAccessorsTypes8.symbols
++++ new.divergentAccessorsTypes8.symbols
+@@= skipped -38, +38 lines =@@
+
+     get style(): CSSStyleDeclaration;
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes8.ts, 12, 19), Decl(divergentAccessorsTypes8.ts, 13, 37))
+->CSSStyleDeclaration : Symbol(CSSStyleDeclaration, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
++>CSSStyleDeclaration : Symbol(CSSStyleDeclaration, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
+
+     set style(cssText: string);
+ >style : Symbol(Element.style, Decl(divergentAccessorsTypes8.ts, 12, 19), Decl(divergentAccessorsTypes8.ts, 13, 37))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.types.diff b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.types.diff
new file mode 100644
index 0000000000..3e1beaea16
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divergentAccessorsTypes8.types.diff
@@ -0,0 +1,11 @@
+--- old.divergentAccessorsTypes8.types
++++ new.divergentAccessorsTypes8.types
+@@= skipped -319, +319 lines =@@
+   }
+   set prop1(s: "hello" | boolean) {}
+ >prop1 : "hello"
+->s : boolean | "hello"
++>s : "hello" | boolean
+
+   get prop2(): string {
+ >prop2 : string
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.symbols.diff b/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.symbols.diff
new file mode 100644
index 0000000000..c4b6f93170
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.symbols.diff
@@ -0,0 +1,29 @@
+--- old.divideAndConquerIntersections.symbols
++++ new.divideAndConquerIntersections.symbols
+@@= skipped -289, +289 lines =@@
+ >Update : Symbol(Update, Decl(divideAndConquerIntersections.ts, 20, 20))
+ >ctx : Symbol(ctx, Decl(divideAndConquerIntersections.ts, 88, 37))
+ >U : Symbol(U, Decl(divideAndConquerIntersections.ts, 88, 16))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
+
+ class EventHub {
+ >EventHub : Symbol(EventHub, Decl(divideAndConquerIntersections.ts, 88, 75))
+@@= skipped -10, +10 lines =@@
+     use(...middleware: Array>): EventHub {
+ >use : Symbol(EventHub.use, Decl(divideAndConquerIntersections.ts, 89, 34))
+ >middleware : Symbol(middleware, Decl(divideAndConquerIntersections.ts, 90, 8))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >Middleware : Symbol(Middleware, Decl(divideAndConquerIntersections.ts, 86, 27))
+ >U : Symbol(U, Decl(divideAndConquerIntersections.ts, 89, 15))
+ >EventHub : Symbol(EventHub, Decl(divideAndConquerIntersections.ts, 88, 75))
+@@= skipped -29, +29 lines =@@
+
+         ...middleware: Array>>
+ >middleware : Symbol(middleware, Decl(divideAndConquerIntersections.ts, 95, 24))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >Middleware : Symbol(Middleware, Decl(divideAndConquerIntersections.ts, 86, 27))
+ >Filter : Symbol(Filter, Decl(divideAndConquerIntersections.ts, 58, 58))
+ >U : Symbol(U, Decl(divideAndConquerIntersections.ts, 89, 15))
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.types.diff b/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.types.diff
index f86848eed0..215859d32a 100644
--- a/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.types.diff
+++ b/testdata/baselines/reference/submodule/compiler/divideAndConquerIntersections.types.diff
@@ -9,8 +9,12 @@
 
      filter: Q | Q[],
  >filter : Q | Q[]
-@@= skipped -16, +16 lines =@@
- >filter : "callback_query" | "channel_post" | "chat_boost" | "chat_join_request" | "chat_member" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "message_reaction" | "message_reaction_count" | "my_chat_member" | "poll" | "poll_answer" | "pre_checkout_query" | "removed_chat_boost" | "shipping_query" | Q[]
+@@= skipped -13, +13 lines =@@
+ >console : Console
+ >log : (...data: any[]) => void
+ >"Matching" : "Matching"
+->filter : "message" | "edited_message" | "channel_post" | "edited_channel_post" | "message_reaction" | "message_reaction_count" | "inline_query" | "chosen_inline_result" | "callback_query" | "shipping_query" | "pre_checkout_query" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "chat_boost" | "removed_chat_boost" | Q[]
++>filter : "callback_query" | "channel_post" | "chat_boost" | "chat_join_request" | "chat_member" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "message_reaction" | "message_reaction_count" | "my_chat_member" | "poll" | "poll_answer" | "pre_checkout_query" | "removed_chat_boost" | "shipping_query" | Q[]
 
      return (up: U): up is Filter => !!up;
 ->(up: U): up is Filter => !!up : (up: U) => up is Filter
@@ -18,7 +22,16 @@
  >up : U
  >!!up : true
  >!up : false
-@@= skipped -58, +58 lines =@@
+@@= skipped -12, +12 lines =@@
+
+ /** All valid filter queries (every update key except update_id) */
+ export type FilterQuery = keyof Omit;
+->FilterQuery : "message" | "edited_message" | "channel_post" | "edited_channel_post" | "message_reaction" | "message_reaction_count" | "inline_query" | "chosen_inline_result" | "callback_query" | "shipping_query" | "pre_checkout_query" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "chat_boost" | "removed_chat_boost"
++>FilterQuery : "callback_query" | "channel_post" | "chat_boost" | "chat_join_request" | "chat_member" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "message_reaction" | "message_reaction_count" | "my_chat_member" | "poll" | "poll_answer" | "pre_checkout_query" | "removed_chat_boost" | "shipping_query"
+
+ /** Narrow down an update object based on a filter query */
+ export type Filter = PerformQuery<
+@@= skipped -49, +49 lines =@@
  >EventHub : EventHub
 
      use(...middleware: Array>): EventHub {
@@ -35,4 +48,13 @@
 +>on : (filter: Q | Q[], ...middleware: Middleware, Q>>>[]) => EventHub, Q>>>
 
          filter: Q | Q[],
- >filter : Q | Q[]
\ No newline at end of file
+ >filter : Q | Q[]
+@@= skipped -20, +20 lines =@@
+ >middleware : Middleware, Q>>>[]
+ >length : number
+ >"handlers for" : "handlers for"
+->filter : "message" | "edited_message" | "channel_post" | "edited_channel_post" | "message_reaction" | "message_reaction_count" | "inline_query" | "chosen_inline_result" | "callback_query" | "shipping_query" | "pre_checkout_query" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "chat_boost" | "removed_chat_boost" | Q[]
++>filter : "callback_query" | "channel_post" | "chat_boost" | "chat_join_request" | "chat_member" | "chosen_inline_result" | "edited_channel_post" | "edited_message" | "inline_query" | "message" | "message_reaction" | "message_reaction_count" | "my_chat_member" | "poll" | "poll_answer" | "pre_checkout_query" | "removed_chat_boost" | "shipping_query" | Q[]
+
+         return new EventHub>();
+ >new EventHub>() : EventHub, Q>>>
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.js.diff
index 873606815b..861dd3ba84 100644
--- a/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/doNotElaborateAssignabilityToTypeParameters.js.diff
@@ -13,10 +13,44 @@
 -        step((generator = generator.apply(thisArg, _arguments || [])).next());
 -    });
 -};
+-var __generator = (this && this.__generator) || function (thisArg, body) {
+-    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+-    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+-    function verb(n) { return function (v) { return step([n, v]); }; }
+-    function step(op) {
+-        if (f) throw new TypeError("Generator is already executing.");
+-        while (g && (g = 0, op[0] && (_ = 0)), _) try {
+-            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+-            if (y = 0, t) op = [op[0] & 2, t.value];
+-            switch (op[0]) {
+-                case 0: case 1: t = op; break;
+-                case 4: _.label++; return { value: op[1], done: false };
+-                case 5: _.label++; y = op[1]; op = [0]; continue;
+-                case 7: op = _.ops.pop(); _.trys.pop(); continue;
+-                default:
+-                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+-                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+-                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+-                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+-                    if (t[2]) _.ops.pop();
+-                    _.trys.pop(); continue;
+-            }
+-            op = body.call(thisArg, _);
+-        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+-        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+-    }
+-};
 -function foo(x) {
--    return __awaiter(this, void 0, void 0, function* () {
--        let yaddable = yield getXOrYadda(x);
--        return yaddable;
+-    return __awaiter(this, void 0, void 0, function () {
+-        var yaddable;
+-        return __generator(this, function (_a) {
+-            switch (_a.label) {
+-                case 0: return [4 /*yield*/, getXOrYadda(x)];
+-                case 1:
+-                    yaddable = _a.sent();
+-                    return [2 /*return*/, yaddable];
+-            }
+-        });
 -    });
 +async function foo(x) {
 +    let yaddable = await getXOrYadda(x);
diff --git a/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfConstructor.js.diff
new file mode 100644
index 0000000000..e8970a4bc2
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfConstructor.js.diff
@@ -0,0 +1,50 @@
+--- old.doNotEmitDetachedCommentsAtStartOfConstructor.js
++++ new.doNotEmitDetachedCommentsAtStartOfConstructor.js
+@@= skipped -39, +39 lines =@@
+ }
+
+ //// [doNotEmitDetachedCommentsAtStartOfConstructor.js]
+-var A = (function () {
+-    function A() {
+-        var x = 10;
+-    }
+-    return A;
+-}());
+-var B = (function () {
+-    function B() {
+-        var y = 10;
+-    }
+-    return B;
+-}());
+-var C = (function () {
+-    function C() {
+-        var x = 10;
+-    }
+-    return C;
+-}());
+-var D = (function () {
+-    function D() {
+-        var y = 10;
+-    }
+-    return D;
+-}());
++class A {
++    constructor() {
++        var x = 10;
++    }
++}
++class B {
++    constructor() {
++        var y = 10;
++    }
++}
++class C {
++    constructor() {
++        var x = 10;
++    }
++}
++class D {
++    constructor() {
++        var y = 10;
++    }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfLambdaFunction.js.diff b/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfLambdaFunction.js.diff
new file mode 100644
index 0000000000..684749350a
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotEmitDetachedCommentsAtStartOfLambdaFunction.js.diff
@@ -0,0 +1,30 @@
+--- old.doNotEmitDetachedCommentsAtStartOfLambdaFunction.js
++++ new.doNotEmitDetachedCommentsAtStartOfLambdaFunction.js
+@@= skipped -32, +32 lines =@@
+
+
+ //// [doNotEmitDetachedCommentsAtStartOfLambdaFunction.js]
+-(function () {
+-    return 0;
+-});
+-(function () {
+-    return 0;
+-});
+-(function () {
+-    return 0;
+-});
+-(function () {
+-    return 0;
+-});
++() => {
++    return 0;
++};
++() => {
++    return 0;
++};
++() => {
++    return 0;
++};
++() => {
++    return 0;
++};
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNode.js.diff b/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNode.js.diff
new file mode 100644
index 0000000000..ea55c59da7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNode.js.diff
@@ -0,0 +1,16 @@
+--- old.doNotEmitPinnedCommentOnNotEmittedNode.js
++++ new.doNotEmitPinnedCommentOnNotEmittedNode.js
+@@= skipped -12, +12 lines =@@
+ declare var OData: any;
+
+ //// [doNotEmitPinnedCommentOnNotEmittedNode.js]
+-var C = (function () {
+-    function C() {
+-    }
+-    C.prototype.foo = function (x, y) { };
+-    return C;
+-}());
++class C {
++    foo(x, y) { }
++}
+ var x = 10;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.js.diff b/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.js.diff
new file mode 100644
index 0000000000..f14aced62b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.js.diff
@@ -0,0 +1,15 @@
+--- old.doNotEmitPinnedCommentOnNotEmittedNodets.js
++++ new.doNotEmitPinnedCommentOnNotEmittedNodets.js
+@@= skipped -10, +10 lines =@@
+ declare var OData: any;
+
+ //// [doNotEmitPinnedCommentOnNotEmittedNodets.js]
+-var C = (function () {
+-    function C() {
+-    }
+-    C.prototype.foo = function (x, y) { };
+-    return C;
+-}());
++class C {
++    foo(x, y) { }
++}
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.js.diff b/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.js.diff
new file mode 100644
index 0000000000..be04c3f14b
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.js.diff
@@ -0,0 +1,8 @@
+--- old.doNotInferUnrelatedTypes.js
++++ new.doNotInferUnrelatedTypes.js
+@@= skipped -9, +9 lines =@@
+
+
+ //// [doNotInferUnrelatedTypes.js]
+-var foo = dearray(alt);
++let foo = dearray(alt);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.symbols.diff b/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.symbols.diff
new file mode 100644
index 0000000000..c79cb0eaac
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doNotInferUnrelatedTypes.symbols.diff
@@ -0,0 +1,20 @@
+--- old.doNotInferUnrelatedTypes.symbols
++++ new.doNotInferUnrelatedTypes.symbols
+@@= skipped -5, +5 lines =@@
+ >dearray : Symbol(dearray, Decl(doNotInferUnrelatedTypes.ts, 0, 0))
+ >T : Symbol(T, Decl(doNotInferUnrelatedTypes.ts, 1, 25))
+ >ara : Symbol(ara, Decl(doNotInferUnrelatedTypes.ts, 1, 28))
+->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --))
+ >T : Symbol(T, Decl(doNotInferUnrelatedTypes.ts, 1, 25))
+ >T : Symbol(T, Decl(doNotInferUnrelatedTypes.ts, 1, 25))
+
+@@= skipped -9, +9 lines =@@
+
+ declare var alt: Array;
+ >alt : Symbol(alt, Decl(doNotInferUnrelatedTypes.ts, 3, 11))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+ >LiteralType : Symbol(LiteralType, Decl(doNotInferUnrelatedTypes.ts, 1, 54))
+
+ let foo: LiteralType = dearray(alt);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doWhileUnreachableCode.js.diff b/testdata/baselines/reference/submodule/compiler/doWhileUnreachableCode.js.diff
new file mode 100644
index 0000000000..4862ed0de8
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doWhileUnreachableCode.js.diff
@@ -0,0 +1,11 @@
+--- old.doWhileUnreachableCode.js
++++ new.doWhileUnreachableCode.js
+@@= skipped -15, +15 lines =@@
+
+ //// [doWhileUnreachableCode.js]
+ function test() {
+-    var foo = 0;
++    let foo = 0;
+     testLoop: do {
+         foo++;
+         continue testLoop;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.errors.txt.diff
new file mode 100644
index 0000000000..becdf46a5c
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.errors.txt.diff
@@ -0,0 +1,351 @@
+--- old.doYouNeedToChangeYourTargetLibraryES2015.errors.txt
++++ new.doYouNeedToChangeYourTargetLibraryES2015.errors.txt
+@@= skipped -0, +0 lines =@@
+-
++doYouNeedToChangeYourTargetLibraryES2015.ts(3,26): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(4,30): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(5,35): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(6,35): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(7,24): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(8,45): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(9,35): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(10,33): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(11,28): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(12,38): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(13,24): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(14,35): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(15,28): error TS2550: Property 'find' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(18,33): error TS2550: Property 'findIndex' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(21,28): error TS2550: Property 'fill' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(22,34): error TS2550: Property 'copyWithin' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(23,31): error TS2550: Property 'entries' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(24,28): error TS2550: Property 'keys' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(25,30): error TS2550: Property 'values' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(26,40): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(27,38): error TS2550: Property 'of' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(28,44): error TS2550: Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(29,59): error TS2550: Property 'getOwnPropertySymbols' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(31,40): error TS2550: Property 'is' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(32,52): error TS2550: Property 'setPrototypeOf' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(33,46): error TS2550: Property 'isFinite' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(34,47): error TS2550: Property 'isInteger' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(35,43): error TS2550: Property 'isNaN' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(36,51): error TS2550: Property 'isSafeInteger' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(37,48): error TS2550: Property 'parseFloat' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(38,46): error TS2550: Property 'parseInt' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(39,28): error TS2550: Property 'clz32' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(40,27): error TS2550: Property 'imul' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(41,27): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(42,28): error TS2550: Property 'log10' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(43,27): error TS2550: Property 'log2' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(44,28): error TS2550: Property 'log1p' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(45,28): error TS2550: Property 'expm1' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(46,27): error TS2550: Property 'cosh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(47,27): error TS2550: Property 'sinh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(48,27): error TS2550: Property 'tanh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(49,28): error TS2550: Property 'acosh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(50,28): error TS2550: Property 'asinh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(51,28): error TS2550: Property 'atanh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(52,28): error TS2550: Property 'hypot' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(53,28): error TS2550: Property 'trunc' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(54,29): error TS2550: Property 'fround' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(55,27): error TS2550: Property 'cbrt' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(56,16): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(57,16): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(58,24): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(59,25): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(60,28): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(61,27): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(62,23): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(63,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(64,20): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(65,20): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(66,21): error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(67,26): error TS2583: Cannot find name 'AsyncIterator'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(68,34): error TS2550: Property 'codePointAt' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(69,31): error TS2550: Property 'includes' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(70,31): error TS2550: Property 'endsWith' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(71,32): error TS2550: Property 'normalize' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(72,29): error TS2550: Property 'repeat' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(73,33): error TS2550: Property 'startsWith' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(74,29): error TS2550: Property 'anchor' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(75,26): error TS2550: Property 'big' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(76,28): error TS2550: Property 'blink' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(77,27): error TS2550: Property 'bold' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(78,28): error TS2550: Property 'fixed' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(79,32): error TS2550: Property 'fontcolor' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(80,31): error TS2550: Property 'fontsize' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(81,30): error TS2550: Property 'italics' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(82,27): error TS2550: Property 'link' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(83,28): error TS2550: Property 'small' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(84,29): error TS2550: Property 'strike' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(85,26): error TS2550: Property 'sub' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(86,26): error TS2550: Property 'sup' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(87,51): error TS2550: Property 'fromCodePoint' does not exist on type 'StringConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(88,41): error TS2550: Property 'raw' does not exist on type 'StringConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(89,32): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(90,33): error TS2550: Property 'sticky' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++doYouNeedToChangeYourTargetLibraryES2015.ts(91,34): error TS2550: Property 'unicode' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++
++
++==== doYouNeedToChangeYourTargetLibraryES2015.ts (84 errors) ====
++    // es2015
++    const noOp = () => {};
++    const testReflectApply = Reflect.apply(noOp, this, []);
++                             ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectConstruct = Reflect.construct(noOp, []);
++                                 ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectDefineProperty = Reflect.defineProperty({}, "", {});
++                                      ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectDeleteProperty = Reflect.deleteProperty({}, "");
++                                      ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectGet = Reflect.get({}, "");
++                           ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor({}, "");
++                                                ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectGetPrototypeOf = Reflect.getPrototypeOf({});
++                                      ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectIsExtensible = Reflect.isExtensible({});
++                                    ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectOwnKeys = Reflect.ownKeys({});
++                               ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectPreventExtensions = Reflect.preventExtensions({});
++                                         ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectSet = Reflect.set({}, "", 0);
++                           ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testReflectSetPrototypeOf = Reflect.setPrototypeOf({}, {}); 
++                                      ~~~~~~~
++!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayFind = [""].find((val, idx, obj) => {
++                               ~~~~
++!!! error TS2550: Property 'find' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++        return true;
++    });
++    const testArrayFindIndex = [""].findIndex((val, idx, obj) => {
++                                    ~~~~~~~~~
++!!! error TS2550: Property 'findIndex' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++        return true;
++    });
++    const testArrayFill = [""].fill("fill");
++                               ~~~~
++!!! error TS2550: Property 'fill' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayCopyWithin = [""].copyWithin(0, 0);
++                                     ~~~~~~~~~~
++!!! error TS2550: Property 'copyWithin' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayEntries = [""].entries();
++                                  ~~~~~~~
++!!! error TS2550: Property 'entries' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayKeys = [""].keys();
++                               ~~~~
++!!! error TS2550: Property 'keys' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayValues = [""].values();
++                                 ~~~~~~
++!!! error TS2550: Property 'values' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayConstructorFrom = Array.from([]);
++                                           ~~~~
++!!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testArrayConstructorOf = Array.of([]);
++                                         ~~
++!!! error TS2550: Property 'of' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testObjectConstructorAssign = Object.assign({}, {});
++                                               ~~~~~~
++!!! error TS2550: Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testObjectConstructorGetOwnPropertySymbols = Object.getOwnPropertySymbols({});
++                                                              ~~~~~~~~~~~~~~~~~~~~~
++!!! error TS2550: Property 'getOwnPropertySymbols' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testObjectConstructorKeys = Object.keys({});
++    const testObjectConstructorIs = Object.is({}, {});
++                                           ~~
++!!! error TS2550: Property 'is' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testObjectConstructorSetPrototypeOf = Object.setPrototypeOf({}, {});
++                                                       ~~~~~~~~~~~~~~
++!!! error TS2550: Property 'setPrototypeOf' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorIsFinite = Number.isFinite(0);
++                                                 ~~~~~~~~
++!!! error TS2550: Property 'isFinite' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorIsInteger = Number.isInteger(0);
++                                                  ~~~~~~~~~
++!!! error TS2550: Property 'isInteger' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorIsNan = Number.isNaN(0);
++                                              ~~~~~
++!!! error TS2550: Property 'isNaN' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorIsSafeInteger = Number.isSafeInteger(0);
++                                                      ~~~~~~~~~~~~~
++!!! error TS2550: Property 'isSafeInteger' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorParseFloat = Number.parseFloat("0");
++                                                   ~~~~~~~~~~
++!!! error TS2550: Property 'parseFloat' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testNumberConstructorParseInt = Number.parseInt("0");
++                                                 ~~~~~~~~
++!!! error TS2550: Property 'parseInt' does not exist on type 'NumberConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathClz32 = Math.clz32(0);
++                               ~~~~~
++!!! error TS2550: Property 'clz32' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathImul = Math.imul(0,0);
++                              ~~~~
++!!! error TS2550: Property 'imul' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathSign = Math.sign(0);
++                              ~~~~
++!!! error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathLog10 = Math.log10(0);
++                               ~~~~~
++!!! error TS2550: Property 'log10' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathLog2 = Math.log2(0);
++                              ~~~~
++!!! error TS2550: Property 'log2' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathLog1p = Math.log1p(0);
++                               ~~~~~
++!!! error TS2550: Property 'log1p' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathExpm1 = Math.expm1(0);
++                               ~~~~~
++!!! error TS2550: Property 'expm1' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathCosh = Math.cosh(0);
++                              ~~~~
++!!! error TS2550: Property 'cosh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathSinh = Math.sinh(0);
++                              ~~~~
++!!! error TS2550: Property 'sinh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathTanh = Math.tanh(0);
++                              ~~~~
++!!! error TS2550: Property 'tanh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathAcosh = Math.acosh(0);
++                               ~~~~~
++!!! error TS2550: Property 'acosh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathAsinh = Math.asinh(0);
++                               ~~~~~
++!!! error TS2550: Property 'asinh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathAtanh = Math.atanh(0);
++                               ~~~~~
++!!! error TS2550: Property 'atanh' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathHypot = Math.hypot(0,0);
++                               ~~~~~
++!!! error TS2550: Property 'hypot' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathTrunc = Math.trunc(0);
++                               ~~~~~
++!!! error TS2550: Property 'trunc' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathFround = Math.fround(0);
++                                ~~~~~~
++!!! error TS2550: Property 'fround' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMathCbrt = Math.cbrt(0);
++                              ~~~~
++!!! error TS2550: Property 'cbrt' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testMap: Map = null as any;
++                   ~~~
++!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testSet: Set = null as any;
++                   ~~~
++!!! error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testPromiseAll = Promise.all([]);
++                           ~~~~~~~
++!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testPromiseRace = Promise.race([]);
++                            ~~~~~~~
++!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testPromiseResolve = Promise.resolve();
++                               ~~~~~~~
++!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testPromiseReject = Promise.reject();
++                              ~~~~~~~
++!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testSymbolFor = Symbol.for('a');
++                          ~~~~~~
++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testSymbolKeyFor = Symbol.keyFor(testSymbolFor);
++                             ~~~~~~
++!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
++    const testWeakMap: WeakMap = null as any;
++                       ~~~~~~~
++!!! error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testWeakSet: WeakMap = null as any;
++                       ~~~~~~~
++!!! error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testIterator: Iterator = null as any;
++                        ~~~~~~~~
++!!! error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testAsyncIterator: AsyncIterator = null as any;
++                             ~~~~~~~~~~~~~
++!!! error TS2583: Cannot find name 'AsyncIterator'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringCodePointAt = "".codePointAt(0);
++                                     ~~~~~~~~~~~
++!!! error TS2550: Property 'codePointAt' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringIncludes = "".includes("");
++                                  ~~~~~~~~
++!!! error TS2550: Property 'includes' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringEndsWith = "".endsWith("");
++                                  ~~~~~~~~
++!!! error TS2550: Property 'endsWith' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringNormalize = "".normalize();
++                                   ~~~~~~~~~
++!!! error TS2550: Property 'normalize' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringRepeat = "".repeat(0);
++                                ~~~~~~
++!!! error TS2550: Property 'repeat' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringStartsWith = "".startsWith("");
++                                    ~~~~~~~~~~
++!!! error TS2550: Property 'startsWith' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringAnchor = "".anchor("");
++                                ~~~~~~
++!!! error TS2550: Property 'anchor' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringBig = "".big();
++                             ~~~
++!!! error TS2550: Property 'big' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringBlink = "".blink();
++                               ~~~~~
++!!! error TS2550: Property 'blink' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringBold = "".bold();
++                              ~~~~
++!!! error TS2550: Property 'bold' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringFixed = "".fixed();
++                               ~~~~~
++!!! error TS2550: Property 'fixed' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringFontColor = "".fontcolor("blue");
++                                   ~~~~~~~~~
++!!! error TS2550: Property 'fontcolor' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringFontSize = "".fontsize(0);
++                                  ~~~~~~~~
++!!! error TS2550: Property 'fontsize' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringItalics = "".italics();
++                                 ~~~~~~~
++!!! error TS2550: Property 'italics' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringLink = "".link("");
++                              ~~~~
++!!! error TS2550: Property 'link' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringSmall = "".small();
++                               ~~~~~
++!!! error TS2550: Property 'small' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringStrike = "".strike();
++                                ~~~~~~
++!!! error TS2550: Property 'strike' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringSub = "".sub();
++                             ~~~
++!!! error TS2550: Property 'sub' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringSup = "".sup();
++                             ~~~
++!!! error TS2550: Property 'sup' does not exist on type '""'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringConstructorFromCodePoint = String.fromCodePoint();
++                                                      ~~~~~~~~~~~~~
++!!! error TS2550: Property 'fromCodePoint' does not exist on type 'StringConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testStringConstructorRaw = String.raw``;
++                                            ~~~
++!!! error TS2550: Property 'raw' does not exist on type 'StringConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testRegExpFlags = /abc/g.flags;
++                                   ~~~~~
++!!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testRegExpSticky = /abc/g.sticky;
++                                    ~~~~~~
++!!! error TS2550: Property 'sticky' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    const testRegExpUnicode = /abc/g.unicode;
++                                     ~~~~~~~
++!!! error TS2550: Property 'unicode' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
++    
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.js.diff b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.js.diff
new file mode 100644
index 0000000000..75f192e078
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.js.diff
@@ -0,0 +1,191 @@
+--- old.doYouNeedToChangeYourTargetLibraryES2015.js
++++ new.doYouNeedToChangeYourTargetLibraryES2015.js
+@@= skipped -94, +94 lines =@@
+
+
+ //// [doYouNeedToChangeYourTargetLibraryES2015.js]
+-var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
+-    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
+-    return cooked;
+-};
+ // es2015
+-var noOp = function () { };
+-var testReflectApply = Reflect.apply(noOp, this, []);
+-var testReflectConstruct = Reflect.construct(noOp, []);
+-var testReflectDefineProperty = Reflect.defineProperty({}, "", {});
+-var testReflectDeleteProperty = Reflect.deleteProperty({}, "");
+-var testReflectGet = Reflect.get({}, "");
+-var testReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor({}, "");
+-var testReflectGetPrototypeOf = Reflect.getPrototypeOf({});
+-var testReflectIsExtensible = Reflect.isExtensible({});
+-var testReflectOwnKeys = Reflect.ownKeys({});
+-var testReflectPreventExtensions = Reflect.preventExtensions({});
+-var testReflectSet = Reflect.set({}, "", 0);
+-var testReflectSetPrototypeOf = Reflect.setPrototypeOf({}, {});
+-var testArrayFind = [""].find(function (val, idx, obj) {
+-    return true;
+-});
+-var testArrayFindIndex = [""].findIndex(function (val, idx, obj) {
+-    return true;
+-});
+-var testArrayFill = [""].fill("fill");
+-var testArrayCopyWithin = [""].copyWithin(0, 0);
+-var testArrayEntries = [""].entries();
+-var testArrayKeys = [""].keys();
+-var testArrayValues = [""].values();
+-var testArrayConstructorFrom = Array.from([]);
+-var testArrayConstructorOf = Array.of([]);
+-var testObjectConstructorAssign = Object.assign({}, {});
+-var testObjectConstructorGetOwnPropertySymbols = Object.getOwnPropertySymbols({});
+-var testObjectConstructorKeys = Object.keys({});
+-var testObjectConstructorIs = Object.is({}, {});
+-var testObjectConstructorSetPrototypeOf = Object.setPrototypeOf({}, {});
+-var testNumberConstructorIsFinite = Number.isFinite(0);
+-var testNumberConstructorIsInteger = Number.isInteger(0);
+-var testNumberConstructorIsNan = Number.isNaN(0);
+-var testNumberConstructorIsSafeInteger = Number.isSafeInteger(0);
+-var testNumberConstructorParseFloat = Number.parseFloat("0");
+-var testNumberConstructorParseInt = Number.parseInt("0");
+-var testMathClz32 = Math.clz32(0);
+-var testMathImul = Math.imul(0, 0);
+-var testMathSign = Math.sign(0);
+-var testMathLog10 = Math.log10(0);
+-var testMathLog2 = Math.log2(0);
+-var testMathLog1p = Math.log1p(0);
+-var testMathExpm1 = Math.expm1(0);
+-var testMathCosh = Math.cosh(0);
+-var testMathSinh = Math.sinh(0);
+-var testMathTanh = Math.tanh(0);
+-var testMathAcosh = Math.acosh(0);
+-var testMathAsinh = Math.asinh(0);
+-var testMathAtanh = Math.atanh(0);
+-var testMathHypot = Math.hypot(0, 0);
+-var testMathTrunc = Math.trunc(0);
+-var testMathFround = Math.fround(0);
+-var testMathCbrt = Math.cbrt(0);
+-var testMap = null;
+-var testSet = null;
+-var testPromiseAll = Promise.all([]);
+-var testPromiseRace = Promise.race([]);
+-var testPromiseResolve = Promise.resolve();
+-var testPromiseReject = Promise.reject();
+-var testSymbolFor = Symbol.for('a');
+-var testSymbolKeyFor = Symbol.keyFor(testSymbolFor);
+-var testWeakMap = null;
+-var testWeakSet = null;
+-var testIterator = null;
+-var testAsyncIterator = null;
+-var testStringCodePointAt = "".codePointAt(0);
+-var testStringIncludes = "".includes("");
+-var testStringEndsWith = "".endsWith("");
+-var testStringNormalize = "".normalize();
+-var testStringRepeat = "".repeat(0);
+-var testStringStartsWith = "".startsWith("");
+-var testStringAnchor = "".anchor("");
+-var testStringBig = "".big();
+-var testStringBlink = "".blink();
+-var testStringBold = "".bold();
+-var testStringFixed = "".fixed();
+-var testStringFontColor = "".fontcolor("blue");
+-var testStringFontSize = "".fontsize(0);
+-var testStringItalics = "".italics();
+-var testStringLink = "".link("");
+-var testStringSmall = "".small();
+-var testStringStrike = "".strike();
+-var testStringSub = "".sub();
+-var testStringSup = "".sup();
+-var testStringConstructorFromCodePoint = String.fromCodePoint();
+-var testStringConstructorRaw = String.raw(__makeTemplateObject([""], [""]));
+-var testRegExpFlags = /abc/g.flags;
+-var testRegExpSticky = /abc/g.sticky;
+-var testRegExpUnicode = /abc/g.unicode;
++const noOp = () => { };
++const testReflectApply = Reflect.apply(noOp, this, []);
++const testReflectConstruct = Reflect.construct(noOp, []);
++const testReflectDefineProperty = Reflect.defineProperty({}, "", {});
++const testReflectDeleteProperty = Reflect.deleteProperty({}, "");
++const testReflectGet = Reflect.get({}, "");
++const testReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor({}, "");
++const testReflectGetPrototypeOf = Reflect.getPrototypeOf({});
++const testReflectIsExtensible = Reflect.isExtensible({});
++const testReflectOwnKeys = Reflect.ownKeys({});
++const testReflectPreventExtensions = Reflect.preventExtensions({});
++const testReflectSet = Reflect.set({}, "", 0);
++const testReflectSetPrototypeOf = Reflect.setPrototypeOf({}, {});
++const testArrayFind = [""].find((val, idx, obj) => {
++    return true;
++});
++const testArrayFindIndex = [""].findIndex((val, idx, obj) => {
++    return true;
++});
++const testArrayFill = [""].fill("fill");
++const testArrayCopyWithin = [""].copyWithin(0, 0);
++const testArrayEntries = [""].entries();
++const testArrayKeys = [""].keys();
++const testArrayValues = [""].values();
++const testArrayConstructorFrom = Array.from([]);
++const testArrayConstructorOf = Array.of([]);
++const testObjectConstructorAssign = Object.assign({}, {});
++const testObjectConstructorGetOwnPropertySymbols = Object.getOwnPropertySymbols({});
++const testObjectConstructorKeys = Object.keys({});
++const testObjectConstructorIs = Object.is({}, {});
++const testObjectConstructorSetPrototypeOf = Object.setPrototypeOf({}, {});
++const testNumberConstructorIsFinite = Number.isFinite(0);
++const testNumberConstructorIsInteger = Number.isInteger(0);
++const testNumberConstructorIsNan = Number.isNaN(0);
++const testNumberConstructorIsSafeInteger = Number.isSafeInteger(0);
++const testNumberConstructorParseFloat = Number.parseFloat("0");
++const testNumberConstructorParseInt = Number.parseInt("0");
++const testMathClz32 = Math.clz32(0);
++const testMathImul = Math.imul(0, 0);
++const testMathSign = Math.sign(0);
++const testMathLog10 = Math.log10(0);
++const testMathLog2 = Math.log2(0);
++const testMathLog1p = Math.log1p(0);
++const testMathExpm1 = Math.expm1(0);
++const testMathCosh = Math.cosh(0);
++const testMathSinh = Math.sinh(0);
++const testMathTanh = Math.tanh(0);
++const testMathAcosh = Math.acosh(0);
++const testMathAsinh = Math.asinh(0);
++const testMathAtanh = Math.atanh(0);
++const testMathHypot = Math.hypot(0, 0);
++const testMathTrunc = Math.trunc(0);
++const testMathFround = Math.fround(0);
++const testMathCbrt = Math.cbrt(0);
++const testMap = null;
++const testSet = null;
++const testPromiseAll = Promise.all([]);
++const testPromiseRace = Promise.race([]);
++const testPromiseResolve = Promise.resolve();
++const testPromiseReject = Promise.reject();
++const testSymbolFor = Symbol.for('a');
++const testSymbolKeyFor = Symbol.keyFor(testSymbolFor);
++const testWeakMap = null;
++const testWeakSet = null;
++const testIterator = null;
++const testAsyncIterator = null;
++const testStringCodePointAt = "".codePointAt(0);
++const testStringIncludes = "".includes("");
++const testStringEndsWith = "".endsWith("");
++const testStringNormalize = "".normalize();
++const testStringRepeat = "".repeat(0);
++const testStringStartsWith = "".startsWith("");
++const testStringAnchor = "".anchor("");
++const testStringBig = "".big();
++const testStringBlink = "".blink();
++const testStringBold = "".bold();
++const testStringFixed = "".fixed();
++const testStringFontColor = "".fontcolor("blue");
++const testStringFontSize = "".fontsize(0);
++const testStringItalics = "".italics();
++const testStringLink = "".link("");
++const testStringSmall = "".small();
++const testStringStrike = "".strike();
++const testStringSub = "".sub();
++const testStringSup = "".sup();
++const testStringConstructorFromCodePoint = String.fromCodePoint();
++const testStringConstructorRaw = String.raw ``;
++const testRegExpFlags = /abc/g.flags;
++const testRegExpSticky = /abc/g.sticky;
++const testRegExpUnicode = /abc/g.unicode;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.symbols.diff b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.symbols.diff
new file mode 100644
index 0000000000..de08c12993
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.symbols.diff
@@ -0,0 +1,513 @@
+--- old.doYouNeedToChangeYourTargetLibraryES2015.symbols
++++ new.doYouNeedToChangeYourTargetLibraryES2015.symbols
+@@= skipped -6, +6 lines =@@
+
+ const testReflectApply = Reflect.apply(noOp, this, []);
+ >testReflectApply : Symbol(testReflectApply, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 2, 5))
+->Reflect.apply : Symbol(Reflect.apply, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->apply : Symbol(Reflect.apply, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+ >noOp : Symbol(noOp, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 1, 5))
+ >this : Symbol(globalThis)
+
+ const testReflectConstruct = Reflect.construct(noOp, []);
+ >testReflectConstruct : Symbol(testReflectConstruct, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 3, 5))
+->Reflect.construct : Symbol(Reflect.construct, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->construct : Symbol(Reflect.construct, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+ >noOp : Symbol(noOp, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 1, 5))
+
+ const testReflectDefineProperty = Reflect.defineProperty({}, "", {});
+ >testReflectDefineProperty : Symbol(testReflectDefineProperty, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 4, 5))
+->Reflect.defineProperty : Symbol(Reflect.defineProperty, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->defineProperty : Symbol(Reflect.defineProperty, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectDeleteProperty = Reflect.deleteProperty({}, "");
+ >testReflectDeleteProperty : Symbol(testReflectDeleteProperty, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 5, 5))
+->Reflect.deleteProperty : Symbol(Reflect.deleteProperty, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->deleteProperty : Symbol(Reflect.deleteProperty, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectGet = Reflect.get({}, "");
+ >testReflectGet : Symbol(testReflectGet, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 6, 5))
+->Reflect.get : Symbol(Reflect.get, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->get : Symbol(Reflect.get, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor({}, "");
+ >testReflectGetOwnPropertyDescriptor : Symbol(testReflectGetOwnPropertyDescriptor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 7, 5))
+->Reflect.getOwnPropertyDescriptor : Symbol(Reflect.getOwnPropertyDescriptor, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->getOwnPropertyDescriptor : Symbol(Reflect.getOwnPropertyDescriptor, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectGetPrototypeOf = Reflect.getPrototypeOf({});
+ >testReflectGetPrototypeOf : Symbol(testReflectGetPrototypeOf, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 8, 5))
+->Reflect.getPrototypeOf : Symbol(Reflect.getPrototypeOf, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->getPrototypeOf : Symbol(Reflect.getPrototypeOf, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectIsExtensible = Reflect.isExtensible({});
+ >testReflectIsExtensible : Symbol(testReflectIsExtensible, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 9, 5))
+->Reflect.isExtensible : Symbol(Reflect.isExtensible, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->isExtensible : Symbol(Reflect.isExtensible, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectOwnKeys = Reflect.ownKeys({});
+ >testReflectOwnKeys : Symbol(testReflectOwnKeys, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 10, 5))
+->Reflect.ownKeys : Symbol(Reflect.ownKeys, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->ownKeys : Symbol(Reflect.ownKeys, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectPreventExtensions = Reflect.preventExtensions({});
+ >testReflectPreventExtensions : Symbol(testReflectPreventExtensions, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 11, 5))
+->Reflect.preventExtensions : Symbol(Reflect.preventExtensions, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->preventExtensions : Symbol(Reflect.preventExtensions, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectSet = Reflect.set({}, "", 0);
+ >testReflectSet : Symbol(testReflectSet, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 12, 5))
+->Reflect.set : Symbol(Reflect.set, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->set : Symbol(Reflect.set, Decl(lib.es2015.reflect.d.ts, --, --), Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testReflectSetPrototypeOf = Reflect.setPrototypeOf({}, {}); 
+ >testReflectSetPrototypeOf : Symbol(testReflectSetPrototypeOf, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 13, 5))
+->Reflect.setPrototypeOf : Symbol(Reflect.setPrototypeOf, Decl(lib.es2015.reflect.d.ts, --, --))
+->Reflect : Symbol(Reflect, Decl(lib.es2015.reflect.d.ts, --, --))
+->setPrototypeOf : Symbol(Reflect.setPrototypeOf, Decl(lib.es2015.reflect.d.ts, --, --))
+
+ const testArrayFind = [""].find((val, idx, obj) => {
+ >testArrayFind : Symbol(testArrayFind, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 14, 5))
+->[""].find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+->find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+ >val : Symbol(val, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 14, 33))
+ >idx : Symbol(idx, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 14, 37))
+ >obj : Symbol(obj, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 14, 42))
+@@= skipped -85, +47 lines =@@
+ });
+ const testArrayFindIndex = [""].findIndex((val, idx, obj) => {
+ >testArrayFindIndex : Symbol(testArrayFindIndex, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 17, 5))
+->[""].findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --))
+->findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --))
+ >val : Symbol(val, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 17, 43))
+ >idx : Symbol(idx, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 17, 47))
+ >obj : Symbol(obj, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 17, 52))
+@@= skipped -10, +8 lines =@@
+ });
+ const testArrayFill = [""].fill("fill");
+ >testArrayFill : Symbol(testArrayFill, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 20, 5))
+->[""].fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --))
+->fill : Symbol(Array.fill, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testArrayCopyWithin = [""].copyWithin(0, 0);
+ >testArrayCopyWithin : Symbol(testArrayCopyWithin, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 21, 5))
+->[""].copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --))
+->copyWithin : Symbol(Array.copyWithin, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testArrayEntries = [""].entries();
+ >testArrayEntries : Symbol(testArrayEntries, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 22, 5))
+->[""].entries : Symbol(Array.entries, Decl(lib.es2015.iterable.d.ts, --, --))
+->entries : Symbol(Array.entries, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ const testArrayKeys = [""].keys();
+ >testArrayKeys : Symbol(testArrayKeys, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 23, 5))
+->[""].keys : Symbol(Array.keys, Decl(lib.es2015.iterable.d.ts, --, --))
+->keys : Symbol(Array.keys, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ const testArrayValues = [""].values();
+ >testArrayValues : Symbol(testArrayValues, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 24, 5))
+->[""].values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --))
+->values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --))
+
+ const testArrayConstructorFrom = Array.from([]);
+ >testArrayConstructorFrom : Symbol(testArrayConstructorFrom, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 25, 5))
+->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testArrayConstructorOf = Array.of([]);
+ >testArrayConstructorOf : Symbol(testArrayConstructorOf, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 26, 5))
+->Array.of : Symbol(ArrayConstructor.of, Decl(lib.es2015.core.d.ts, --, --))
+->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->of : Symbol(ArrayConstructor.of, Decl(lib.es2015.core.d.ts, --, --))
++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testObjectConstructorAssign = Object.assign({}, {});
+ >testObjectConstructorAssign : Symbol(testObjectConstructorAssign, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 27, 5))
+->Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+ >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+
+ const testObjectConstructorGetOwnPropertySymbols = Object.getOwnPropertySymbols({});
+ >testObjectConstructorGetOwnPropertySymbols : Symbol(testObjectConstructorGetOwnPropertySymbols, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 28, 5))
+->Object.getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --))
+ >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->getOwnPropertySymbols : Symbol(ObjectConstructor.getOwnPropertySymbols, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testObjectConstructorKeys = Object.keys({});
+ >testObjectConstructorKeys : Symbol(testObjectConstructorKeys, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 29, 5))
+->Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --))
+ >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
++>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --))
+
+ const testObjectConstructorIs = Object.is({}, {});
+ >testObjectConstructorIs : Symbol(testObjectConstructorIs, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 30, 5))
+->Object.is : Symbol(ObjectConstructor.is, Decl(lib.es2015.core.d.ts, --, --))
+ >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->is : Symbol(ObjectConstructor.is, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testObjectConstructorSetPrototypeOf = Object.setPrototypeOf({}, {});
+ >testObjectConstructorSetPrototypeOf : Symbol(testObjectConstructorSetPrototypeOf, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 31, 5))
+->Object.setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --))
+ >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->setPrototypeOf : Symbol(ObjectConstructor.setPrototypeOf, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorIsFinite = Number.isFinite(0);
+ >testNumberConstructorIsFinite : Symbol(testNumberConstructorIsFinite, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 32, 5))
+->Number.isFinite : Symbol(NumberConstructor.isFinite, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->isFinite : Symbol(NumberConstructor.isFinite, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorIsInteger = Number.isInteger(0);
+ >testNumberConstructorIsInteger : Symbol(testNumberConstructorIsInteger, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 33, 5))
+->Number.isInteger : Symbol(NumberConstructor.isInteger, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->isInteger : Symbol(NumberConstructor.isInteger, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorIsNan = Number.isNaN(0);
+ >testNumberConstructorIsNan : Symbol(testNumberConstructorIsNan, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 34, 5))
+->Number.isNaN : Symbol(NumberConstructor.isNaN, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->isNaN : Symbol(NumberConstructor.isNaN, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorIsSafeInteger = Number.isSafeInteger(0);
+ >testNumberConstructorIsSafeInteger : Symbol(testNumberConstructorIsSafeInteger, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 35, 5))
+->Number.isSafeInteger : Symbol(NumberConstructor.isSafeInteger, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->isSafeInteger : Symbol(NumberConstructor.isSafeInteger, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorParseFloat = Number.parseFloat("0");
+ >testNumberConstructorParseFloat : Symbol(testNumberConstructorParseFloat, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 36, 5))
+->Number.parseFloat : Symbol(NumberConstructor.parseFloat, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->parseFloat : Symbol(NumberConstructor.parseFloat, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testNumberConstructorParseInt = Number.parseInt("0");
+ >testNumberConstructorParseInt : Symbol(testNumberConstructorParseInt, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 37, 5))
+->Number.parseInt : Symbol(NumberConstructor.parseInt, Decl(lib.es2015.core.d.ts, --, --))
+ >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+->parseInt : Symbol(NumberConstructor.parseInt, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testMathClz32 = Math.clz32(0);
+ >testMathClz32 : Symbol(testMathClz32, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 38, 5))
+->Math.clz32 : Symbol(Math.clz32, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->clz32 : Symbol(Math.clz32, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathImul = Math.imul(0,0);
+ >testMathImul : Symbol(testMathImul, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 39, 5))
+->Math.imul : Symbol(Math.imul, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->imul : Symbol(Math.imul, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathSign = Math.sign(0);
+ >testMathSign : Symbol(testMathSign, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 40, 5))
+->Math.sign : Symbol(Math.sign, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->sign : Symbol(Math.sign, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathLog10 = Math.log10(0);
+ >testMathLog10 : Symbol(testMathLog10, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 41, 5))
+->Math.log10 : Symbol(Math.log10, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->log10 : Symbol(Math.log10, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathLog2 = Math.log2(0);
+ >testMathLog2 : Symbol(testMathLog2, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 42, 5))
+->Math.log2 : Symbol(Math.log2, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->log2 : Symbol(Math.log2, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathLog1p = Math.log1p(0);
+ >testMathLog1p : Symbol(testMathLog1p, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 43, 5))
+->Math.log1p : Symbol(Math.log1p, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->log1p : Symbol(Math.log1p, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathExpm1 = Math.expm1(0);
+ >testMathExpm1 : Symbol(testMathExpm1, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 44, 5))
+->Math.expm1 : Symbol(Math.expm1, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->expm1 : Symbol(Math.expm1, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathCosh = Math.cosh(0);
+ >testMathCosh : Symbol(testMathCosh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 45, 5))
+->Math.cosh : Symbol(Math.cosh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->cosh : Symbol(Math.cosh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathSinh = Math.sinh(0);
+ >testMathSinh : Symbol(testMathSinh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 46, 5))
+->Math.sinh : Symbol(Math.sinh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->sinh : Symbol(Math.sinh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathTanh = Math.tanh(0);
+ >testMathTanh : Symbol(testMathTanh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 47, 5))
+->Math.tanh : Symbol(Math.tanh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->tanh : Symbol(Math.tanh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathAcosh = Math.acosh(0);
+ >testMathAcosh : Symbol(testMathAcosh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 48, 5))
+->Math.acosh : Symbol(Math.acosh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->acosh : Symbol(Math.acosh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathAsinh = Math.asinh(0);
+ >testMathAsinh : Symbol(testMathAsinh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 49, 5))
+->Math.asinh : Symbol(Math.asinh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->asinh : Symbol(Math.asinh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathAtanh = Math.atanh(0);
+ >testMathAtanh : Symbol(testMathAtanh, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 50, 5))
+->Math.atanh : Symbol(Math.atanh, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->atanh : Symbol(Math.atanh, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathHypot = Math.hypot(0,0);
+ >testMathHypot : Symbol(testMathHypot, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 51, 5))
+->Math.hypot : Symbol(Math.hypot, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->hypot : Symbol(Math.hypot, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathTrunc = Math.trunc(0);
+ >testMathTrunc : Symbol(testMathTrunc, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 52, 5))
+->Math.trunc : Symbol(Math.trunc, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->trunc : Symbol(Math.trunc, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathFround = Math.fround(0);
+ >testMathFround : Symbol(testMathFround, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 53, 5))
+->Math.fround : Symbol(Math.fround, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->fround : Symbol(Math.fround, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMathCbrt = Math.cbrt(0);
+ >testMathCbrt : Symbol(testMathCbrt, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 54, 5))
+->Math.cbrt : Symbol(Math.cbrt, Decl(lib.es2015.core.d.ts, --, --))
+->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->cbrt : Symbol(Math.cbrt, Decl(lib.es2015.core.d.ts, --, --))
++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testMap: Map = null as any;
+ >testMap : Symbol(testMap, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 55, 5))
+->Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Map : Symbol(Map)
+
+ const testSet: Set = null as any;
+ >testSet : Symbol(testSet, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 56, 5))
+->Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>Set : Symbol(Set)
+
+ const testPromiseAll = Promise.all([]);
+ >testPromiseAll : Symbol(testPromiseAll, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 57, 5))
+->Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+
+ const testPromiseRace = Promise.race([]);
+ >testPromiseRace : Symbol(testPromiseRace, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 58, 5))
+->Promise.race : Symbol(PromiseConstructor.race, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->race : Symbol(PromiseConstructor.race, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+
+ const testPromiseResolve = Promise.resolve();
+ >testPromiseResolve : Symbol(testPromiseResolve, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 59, 5))
+->Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --))
+
+ const testPromiseReject = Promise.reject();
+ >testPromiseReject : Symbol(testPromiseReject, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 60, 5))
+->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --))
+->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --))
+
+ const testSymbolFor = Symbol.for('a');
+ >testSymbolFor : Symbol(testSymbolFor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 61, 5))
+->Symbol.for : Symbol(SymbolConstructor.for, Decl(lib.es2015.symbol.d.ts, --, --))
+->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->for : Symbol(SymbolConstructor.for, Decl(lib.es2015.symbol.d.ts, --, --))
+
+ const testSymbolKeyFor = Symbol.keyFor(testSymbolFor);
+ >testSymbolKeyFor : Symbol(testSymbolKeyFor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 62, 5))
+->Symbol.keyFor : Symbol(SymbolConstructor.keyFor, Decl(lib.es2015.symbol.d.ts, --, --))
+->Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
+->keyFor : Symbol(SymbolConstructor.keyFor, Decl(lib.es2015.symbol.d.ts, --, --))
+ >testSymbolFor : Symbol(testSymbolFor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 61, 5))
+
+ const testWeakMap: WeakMap = null as any;
+ >testWeakMap : Symbol(testWeakMap, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 63, 5))
+->WeakMap : Symbol(WeakMap, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>WeakMap : Symbol(WeakMap)
+
+ const testWeakSet: WeakMap = null as any;
+ >testWeakSet : Symbol(testWeakSet, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 64, 5))
+->WeakMap : Symbol(WeakMap, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
++>WeakMap : Symbol(WeakMap)
+
+ const testIterator: Iterator = null as any;
+ >testIterator : Symbol(testIterator, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 65, 5))
+->Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --))
++>Iterator : Symbol(Iterator)
+
+ const testAsyncIterator: AsyncIterator = null as any;
+ >testAsyncIterator : Symbol(testAsyncIterator, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 66, 5))
+->AsyncIterator : Symbol(AsyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --))
++>AsyncIterator : Symbol(AsyncIterator)
+
+ const testStringCodePointAt = "".codePointAt(0);
+ >testStringCodePointAt : Symbol(testStringCodePointAt, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 67, 5))
+->"".codePointAt : Symbol(String.codePointAt, Decl(lib.es2015.core.d.ts, --, --))
+->codePointAt : Symbol(String.codePointAt, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringIncludes = "".includes("");
+ >testStringIncludes : Symbol(testStringIncludes, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 68, 5))
+->"".includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
+->includes : Symbol(String.includes, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringEndsWith = "".endsWith("");
+ >testStringEndsWith : Symbol(testStringEndsWith, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 69, 5))
+->"".endsWith : Symbol(String.endsWith, Decl(lib.es2015.core.d.ts, --, --))
+->endsWith : Symbol(String.endsWith, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringNormalize = "".normalize();
+ >testStringNormalize : Symbol(testStringNormalize, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 70, 5))
+->"".normalize : Symbol(String.normalize, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+->normalize : Symbol(String.normalize, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringRepeat = "".repeat(0);
+ >testStringRepeat : Symbol(testStringRepeat, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 71, 5))
+->"".repeat : Symbol(String.repeat, Decl(lib.es2015.core.d.ts, --, --))
+->repeat : Symbol(String.repeat, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringStartsWith = "".startsWith("");
+ >testStringStartsWith : Symbol(testStringStartsWith, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 72, 5))
+->"".startsWith : Symbol(String.startsWith, Decl(lib.es2015.core.d.ts, --, --))
+->startsWith : Symbol(String.startsWith, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringAnchor = "".anchor("");
+ >testStringAnchor : Symbol(testStringAnchor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 73, 5))
+->"".anchor : Symbol(String.anchor, Decl(lib.es2015.core.d.ts, --, --))
+->anchor : Symbol(String.anchor, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringBig = "".big();
+ >testStringBig : Symbol(testStringBig, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 74, 5))
+->"".big : Symbol(String.big, Decl(lib.es2015.core.d.ts, --, --))
+->big : Symbol(String.big, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringBlink = "".blink();
+ >testStringBlink : Symbol(testStringBlink, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 75, 5))
+->"".blink : Symbol(String.blink, Decl(lib.es2015.core.d.ts, --, --))
+->blink : Symbol(String.blink, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringBold = "".bold();
+ >testStringBold : Symbol(testStringBold, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 76, 5))
+->"".bold : Symbol(String.bold, Decl(lib.es2015.core.d.ts, --, --))
+->bold : Symbol(String.bold, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringFixed = "".fixed();
+ >testStringFixed : Symbol(testStringFixed, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 77, 5))
+->"".fixed : Symbol(String.fixed, Decl(lib.es2015.core.d.ts, --, --))
+->fixed : Symbol(String.fixed, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringFontColor = "".fontcolor("blue");
+ >testStringFontColor : Symbol(testStringFontColor, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 78, 5))
+->"".fontcolor : Symbol(String.fontcolor, Decl(lib.es2015.core.d.ts, --, --))
+->fontcolor : Symbol(String.fontcolor, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringFontSize = "".fontsize(0);
+ >testStringFontSize : Symbol(testStringFontSize, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 79, 5))
+->"".fontsize : Symbol(String.fontsize, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+->fontsize : Symbol(String.fontsize, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringItalics = "".italics();
+ >testStringItalics : Symbol(testStringItalics, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 80, 5))
+->"".italics : Symbol(String.italics, Decl(lib.es2015.core.d.ts, --, --))
+->italics : Symbol(String.italics, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringLink = "".link("");
+ >testStringLink : Symbol(testStringLink, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 81, 5))
+->"".link : Symbol(String.link, Decl(lib.es2015.core.d.ts, --, --))
+->link : Symbol(String.link, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringSmall = "".small();
+ >testStringSmall : Symbol(testStringSmall, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 82, 5))
+->"".small : Symbol(String.small, Decl(lib.es2015.core.d.ts, --, --))
+->small : Symbol(String.small, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringStrike = "".strike();
+ >testStringStrike : Symbol(testStringStrike, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 83, 5))
+->"".strike : Symbol(String.strike, Decl(lib.es2015.core.d.ts, --, --))
+->strike : Symbol(String.strike, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringSub = "".sub();
+ >testStringSub : Symbol(testStringSub, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 84, 5))
+->"".sub : Symbol(String.sub, Decl(lib.es2015.core.d.ts, --, --))
+->sub : Symbol(String.sub, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringSup = "".sup();
+ >testStringSup : Symbol(testStringSup, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 85, 5))
+->"".sup : Symbol(String.sup, Decl(lib.es2015.core.d.ts, --, --))
+->sup : Symbol(String.sup, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testStringConstructorFromCodePoint = String.fromCodePoint();
+ >testStringConstructorFromCodePoint : Symbol(testStringConstructorFromCodePoint, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 86, 5))
+->String.fromCodePoint : Symbol(StringConstructor.fromCodePoint, Decl(lib.es2015.core.d.ts, --, --))
+->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more)
+->fromCodePoint : Symbol(StringConstructor.fromCodePoint, Decl(lib.es2015.core.d.ts, --, --))
++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testStringConstructorRaw = String.raw``;
+ >testStringConstructorRaw : Symbol(testStringConstructorRaw, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 87, 5))
+->String.raw : Symbol(StringConstructor.raw, Decl(lib.es2015.core.d.ts, --, --))
+->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more)
+->raw : Symbol(StringConstructor.raw, Decl(lib.es2015.core.d.ts, --, --))
++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
+
+ const testRegExpFlags = /abc/g.flags;
+ >testRegExpFlags : Symbol(testRegExpFlags, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 88, 5))
+->/abc/g.flags : Symbol(RegExp.flags, Decl(lib.es2015.core.d.ts, --, --))
+->flags : Symbol(RegExp.flags, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testRegExpSticky = /abc/g.sticky;
+ >testRegExpSticky : Symbol(testRegExpSticky, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 89, 5))
+->/abc/g.sticky : Symbol(RegExp.sticky, Decl(lib.es2015.core.d.ts, --, --))
+->sticky : Symbol(RegExp.sticky, Decl(lib.es2015.core.d.ts, --, --))
+
+ const testRegExpUnicode = /abc/g.unicode;
+ >testRegExpUnicode : Symbol(testRegExpUnicode, Decl(doYouNeedToChangeYourTargetLibraryES2015.ts, 90, 5))
+->/abc/g.unicode : Symbol(RegExp.unicode, Decl(lib.es2015.core.d.ts, --, --))
+->unicode : Symbol(RegExp.unicode, Decl(lib.es2015.core.d.ts, --, --))
diff --git a/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.types.diff b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.types.diff
new file mode 100644
index 0000000000..3dce9709a7
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2015.types.diff
@@ -0,0 +1,996 @@
+--- old.doYouNeedToChangeYourTargetLibraryES2015.types
++++ new.doYouNeedToChangeYourTargetLibraryES2015.types
+@@= skipped -6, +6 lines =@@
+ >() => {} : () => void
+
+ const testReflectApply = Reflect.apply(noOp, this, []);
+->testReflectApply : void
+->Reflect.apply(noOp, this, []) : void
+->Reflect.apply : { (target: (this: T, ...args: A) => R, thisArgument: T, argumentsList: Readonly): R; (target: Function, thisArgument: any, argumentsList: ArrayLike): any; }
+->Reflect : typeof Reflect
+->apply : { (target: (this: T, ...args: A) => R, thisArgument: T, argumentsList: Readonly): R; (target: Function, thisArgument: any, argumentsList: ArrayLike): any; }
++>testReflectApply : any
++>Reflect.apply(noOp, this, []) : any
++>Reflect.apply : any
++>Reflect : any
++>apply : any
+ >noOp : () => void
+ >this : typeof globalThis
+->[] : []
++>[] : undefined[]
+
+ const testReflectConstruct = Reflect.construct(noOp, []);
+ >testReflectConstruct : any
+ >Reflect.construct(noOp, []) : any
+->Reflect.construct : { (target: new (...args: A) => R, argumentsList: Readonly, newTarget?: new (...args: any) => any): R; (target: Function, argumentsList: ArrayLike, newTarget?: Function): any; }
+->Reflect : typeof Reflect
+->construct : { (target: new (...args: A) => R, argumentsList: Readonly, newTarget?: new (...args: any) => any): R; (target: Function, argumentsList: ArrayLike, newTarget?: Function): any; }
++>Reflect.construct : any
++>Reflect : any
++>construct : any
+ >noOp : () => void
+ >[] : undefined[]
+
+ const testReflectDefineProperty = Reflect.defineProperty({}, "", {});
+->testReflectDefineProperty : boolean
+->Reflect.defineProperty({}, "", {}) : boolean
+->Reflect.defineProperty : (target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType) => boolean
+->Reflect : typeof Reflect
+->defineProperty : (target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType) => boolean
++>testReflectDefineProperty : any
++>Reflect.defineProperty({}, "", {}) : any
++>Reflect.defineProperty : any
++>Reflect : any
++>defineProperty : any
+ >{} : {}
+ >"" : ""
+ >{} : {}
+
+ const testReflectDeleteProperty = Reflect.deleteProperty({}, "");
+->testReflectDeleteProperty : boolean
+->Reflect.deleteProperty({}, "") : boolean
+->Reflect.deleteProperty : (target: object, propertyKey: PropertyKey) => boolean
+->Reflect : typeof Reflect
+->deleteProperty : (target: object, propertyKey: PropertyKey) => boolean
++>testReflectDeleteProperty : any
++>Reflect.deleteProperty({}, "") : any
++>Reflect.deleteProperty : any
++>Reflect : any
++>deleteProperty : any
+ >{} : {}
+ >"" : ""
+
+ const testReflectGet = Reflect.get({}, "");
+ >testReflectGet : any
+ >Reflect.get({}, "") : any
+->Reflect.get : (target: T, propertyKey: P, receiver?: unknown) => P extends keyof T ? T[P] : any
+->Reflect : typeof Reflect
+->get : (target: T, propertyKey: P, receiver?: unknown) => P extends keyof T ? T[P] : any
++>Reflect.get : any
++>Reflect : any
++>get : any
+ >{} : {}
+ >"" : ""
+
+ const testReflectGetOwnPropertyDescriptor = Reflect.getOwnPropertyDescriptor({}, "");
+->testReflectGetOwnPropertyDescriptor : TypedPropertyDescriptor
+->Reflect.getOwnPropertyDescriptor({}, "") : TypedPropertyDescriptor
+->Reflect.getOwnPropertyDescriptor : (target: T, propertyKey: P) => TypedPropertyDescriptor

| undefined +->Reflect : typeof Reflect +->getOwnPropertyDescriptor : (target: T, propertyKey: P) => TypedPropertyDescriptor

| undefined ++>testReflectGetOwnPropertyDescriptor : any ++>Reflect.getOwnPropertyDescriptor({}, "") : any ++>Reflect.getOwnPropertyDescriptor : any ++>Reflect : any ++>getOwnPropertyDescriptor : any + >{} : {} + >"" : "" + + const testReflectGetPrototypeOf = Reflect.getPrototypeOf({}); +->testReflectGetPrototypeOf : object +->Reflect.getPrototypeOf({}) : object +->Reflect.getPrototypeOf : (target: object) => object | null +->Reflect : typeof Reflect +->getPrototypeOf : (target: object) => object | null ++>testReflectGetPrototypeOf : any ++>Reflect.getPrototypeOf({}) : any ++>Reflect.getPrototypeOf : any ++>Reflect : any ++>getPrototypeOf : any + >{} : {} + + const testReflectIsExtensible = Reflect.isExtensible({}); +->testReflectIsExtensible : boolean +->Reflect.isExtensible({}) : boolean +->Reflect.isExtensible : (target: object) => boolean +->Reflect : typeof Reflect +->isExtensible : (target: object) => boolean ++>testReflectIsExtensible : any ++>Reflect.isExtensible({}) : any ++>Reflect.isExtensible : any ++>Reflect : any ++>isExtensible : any + >{} : {} + + const testReflectOwnKeys = Reflect.ownKeys({}); +->testReflectOwnKeys : (string | symbol)[] +->Reflect.ownKeys({}) : (string | symbol)[] +->Reflect.ownKeys : (target: object) => (string | symbol)[] +->Reflect : typeof Reflect +->ownKeys : (target: object) => (string | symbol)[] ++>testReflectOwnKeys : any ++>Reflect.ownKeys({}) : any ++>Reflect.ownKeys : any ++>Reflect : any ++>ownKeys : any + >{} : {} + + const testReflectPreventExtensions = Reflect.preventExtensions({}); +->testReflectPreventExtensions : boolean +->Reflect.preventExtensions({}) : boolean +->Reflect.preventExtensions : (target: object) => boolean +->Reflect : typeof Reflect +->preventExtensions : (target: object) => boolean ++>testReflectPreventExtensions : any ++>Reflect.preventExtensions({}) : any ++>Reflect.preventExtensions : any ++>Reflect : any ++>preventExtensions : any + >{} : {} + + const testReflectSet = Reflect.set({}, "", 0); +->testReflectSet : boolean +->Reflect.set({}, "", 0) : boolean +->Reflect.set : { (target: T, propertyKey: P, value: P extends keyof T ? T[P] : any, receiver?: any): boolean; (target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; } +->Reflect : typeof Reflect +->set : { (target: T, propertyKey: P, value: P extends keyof T ? T[P] : any, receiver?: any): boolean; (target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; } ++>testReflectSet : any ++>Reflect.set({}, "", 0) : any ++>Reflect.set : any ++>Reflect : any ++>set : any + >{} : {} + >"" : "" + >0 : 0 + + const testReflectSetPrototypeOf = Reflect.setPrototypeOf({}, {}); +->testReflectSetPrototypeOf : boolean +->Reflect.setPrototypeOf({}, {}) : boolean +->Reflect.setPrototypeOf : (target: object, proto: object | null) => boolean +->Reflect : typeof Reflect +->setPrototypeOf : (target: object, proto: object | null) => boolean ++>testReflectSetPrototypeOf : any ++>Reflect.setPrototypeOf({}, {}) : any ++>Reflect.setPrototypeOf : any ++>Reflect : any ++>setPrototypeOf : any + >{} : {} + >{} : {} + + const testArrayFind = [""].find((val, idx, obj) => { +->testArrayFind : string +->[""].find((val, idx, obj) => { return true;}) : string +->[""].find : { (predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S; (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string; } ++>testArrayFind : any ++>[""].find((val, idx, obj) => { return true;}) : any ++>[""].find : any + >[""] : string[] + >"" : "" +->find : { (predicate: (value: string, index: number, obj: string[]) => value is S, thisArg?: any): S; (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any): string; } +->(val, idx, obj) => { return true;} : (val: string, idx: number, obj: string[]) => true +->val : string +->idx : number +->obj : string[] ++>find : any ++>(val, idx, obj) => { return true;} : (val: any, idx: any, obj: any) => boolean ++>val : any ++>idx : any ++>obj : any + + return true; + >true : true + + }); + const testArrayFindIndex = [""].findIndex((val, idx, obj) => { +->testArrayFindIndex : number +->[""].findIndex((val, idx, obj) => { return true;}) : number +->[""].findIndex : (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number ++>testArrayFindIndex : any ++>[""].findIndex((val, idx, obj) => { return true;}) : any ++>[""].findIndex : any + >[""] : string[] + >"" : "" +->findIndex : (predicate: (value: string, index: number, obj: string[]) => unknown, thisArg?: any) => number +->(val, idx, obj) => { return true;} : (val: string, idx: number, obj: string[]) => boolean +->val : string +->idx : number +->obj : string[] ++>findIndex : any ++>(val, idx, obj) => { return true;} : (val: any, idx: any, obj: any) => boolean ++>val : any ++>idx : any ++>obj : any + + return true; + >true : true + + }); + const testArrayFill = [""].fill("fill"); +->testArrayFill : string[] +->[""].fill("fill") : string[] +->[""].fill : (value: string, start?: number, end?: number) => string[] ++>testArrayFill : any ++>[""].fill("fill") : any ++>[""].fill : any + >[""] : string[] + >"" : "" +->fill : (value: string, start?: number, end?: number) => string[] ++>fill : any + >"fill" : "fill" + + const testArrayCopyWithin = [""].copyWithin(0, 0); +->testArrayCopyWithin : string[] +->[""].copyWithin(0, 0) : string[] +->[""].copyWithin : (target: number, start: number, end?: number) => string[] ++>testArrayCopyWithin : any ++>[""].copyWithin(0, 0) : any ++>[""].copyWithin : any + >[""] : string[] + >"" : "" +->copyWithin : (target: number, start: number, end?: number) => string[] ++>copyWithin : any + >0 : 0 + >0 : 0 + + const testArrayEntries = [""].entries(); +->testArrayEntries : ArrayIterator<[number, string]> +->[""].entries() : ArrayIterator<[number, string]> +->[""].entries : () => ArrayIterator<[number, string]> ++>testArrayEntries : any ++>[""].entries() : any ++>[""].entries : any + >[""] : string[] + >"" : "" +->entries : () => ArrayIterator<[number, string]> ++>entries : any + + const testArrayKeys = [""].keys(); +->testArrayKeys : ArrayIterator +->[""].keys() : ArrayIterator +->[""].keys : () => ArrayIterator ++>testArrayKeys : any ++>[""].keys() : any ++>[""].keys : any + >[""] : string[] + >"" : "" +->keys : () => ArrayIterator ++>keys : any + + const testArrayValues = [""].values(); +->testArrayValues : ArrayIterator +->[""].values() : ArrayIterator +->[""].values : () => ArrayIterator ++>testArrayValues : any ++>[""].values() : any ++>[""].values : any + >[""] : string[] + >"" : "" +->values : () => ArrayIterator ++>values : any + + const testArrayConstructorFrom = Array.from([]); +->testArrayConstructorFrom : any[] +->Array.from([]) : any[] +->Array.from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } ++>testArrayConstructorFrom : any ++>Array.from([]) : any ++>Array.from : any + >Array : ArrayConstructor +->from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } ++>from : any + >[] : undefined[] + + const testArrayConstructorOf = Array.of([]); +->testArrayConstructorOf : any[][] +->Array.of([]) : any[][] +->Array.of : (...items: T[]) => T[] ++>testArrayConstructorOf : any ++>Array.of([]) : any ++>Array.of : any + >Array : ArrayConstructor +->of : (...items: T[]) => T[] ++>of : any + >[] : undefined[] + + const testObjectConstructorAssign = Object.assign({}, {}); +->testObjectConstructorAssign : {} +->Object.assign({}, {}) : {} +->Object.assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } ++>testObjectConstructorAssign : any ++>Object.assign({}, {}) : any ++>Object.assign : any + >Object : ObjectConstructor +->assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } ++>assign : any + >{} : {} + >{} : {} + + const testObjectConstructorGetOwnPropertySymbols = Object.getOwnPropertySymbols({}); +->testObjectConstructorGetOwnPropertySymbols : symbol[] +->Object.getOwnPropertySymbols({}) : symbol[] +->Object.getOwnPropertySymbols : (o: any) => symbol[] ++>testObjectConstructorGetOwnPropertySymbols : any ++>Object.getOwnPropertySymbols({}) : any ++>Object.getOwnPropertySymbols : any + >Object : ObjectConstructor +->getOwnPropertySymbols : (o: any) => symbol[] ++>getOwnPropertySymbols : any + >{} : {} + + const testObjectConstructorKeys = Object.keys({}); + >testObjectConstructorKeys : string[] + >Object.keys({}) : string[] +->Object.keys : { (o: object): string[]; (o: {}): string[]; } ++>Object.keys : (o: object) => string[] + >Object : ObjectConstructor +->keys : { (o: object): string[]; (o: {}): string[]; } ++>keys : (o: object) => string[] + >{} : {} + + const testObjectConstructorIs = Object.is({}, {}); +->testObjectConstructorIs : boolean +->Object.is({}, {}) : boolean +->Object.is : (value1: any, value2: any) => boolean ++>testObjectConstructorIs : any ++>Object.is({}, {}) : any ++>Object.is : any + >Object : ObjectConstructor +->is : (value1: any, value2: any) => boolean ++>is : any + >{} : {} + >{} : {} + + const testObjectConstructorSetPrototypeOf = Object.setPrototypeOf({}, {}); + >testObjectConstructorSetPrototypeOf : any + >Object.setPrototypeOf({}, {}) : any +->Object.setPrototypeOf : (o: any, proto: object | null) => any ++>Object.setPrototypeOf : any + >Object : ObjectConstructor +->setPrototypeOf : (o: any, proto: object | null) => any ++>setPrototypeOf : any + >{} : {} + >{} : {} + + const testNumberConstructorIsFinite = Number.isFinite(0); +->testNumberConstructorIsFinite : boolean +->Number.isFinite(0) : boolean +->Number.isFinite : (number: unknown) => boolean ++>testNumberConstructorIsFinite : any ++>Number.isFinite(0) : any ++>Number.isFinite : any + >Number : NumberConstructor +->isFinite : (number: unknown) => boolean ++>isFinite : any + >0 : 0 + + const testNumberConstructorIsInteger = Number.isInteger(0); +->testNumberConstructorIsInteger : boolean +->Number.isInteger(0) : boolean +->Number.isInteger : (number: unknown) => boolean ++>testNumberConstructorIsInteger : any ++>Number.isInteger(0) : any ++>Number.isInteger : any + >Number : NumberConstructor +->isInteger : (number: unknown) => boolean ++>isInteger : any + >0 : 0 + + const testNumberConstructorIsNan = Number.isNaN(0); +->testNumberConstructorIsNan : boolean +->Number.isNaN(0) : boolean +->Number.isNaN : (number: unknown) => boolean ++>testNumberConstructorIsNan : any ++>Number.isNaN(0) : any ++>Number.isNaN : any + >Number : NumberConstructor +->isNaN : (number: unknown) => boolean ++>isNaN : any + >0 : 0 + + const testNumberConstructorIsSafeInteger = Number.isSafeInteger(0); +->testNumberConstructorIsSafeInteger : boolean +->Number.isSafeInteger(0) : boolean +->Number.isSafeInteger : (number: unknown) => boolean ++>testNumberConstructorIsSafeInteger : any ++>Number.isSafeInteger(0) : any ++>Number.isSafeInteger : any + >Number : NumberConstructor +->isSafeInteger : (number: unknown) => boolean ++>isSafeInteger : any + >0 : 0 + + const testNumberConstructorParseFloat = Number.parseFloat("0"); +->testNumberConstructorParseFloat : number +->Number.parseFloat("0") : number +->Number.parseFloat : (string: string) => number ++>testNumberConstructorParseFloat : any ++>Number.parseFloat("0") : any ++>Number.parseFloat : any + >Number : NumberConstructor +->parseFloat : (string: string) => number ++>parseFloat : any + >"0" : "0" + + const testNumberConstructorParseInt = Number.parseInt("0"); +->testNumberConstructorParseInt : number +->Number.parseInt("0") : number +->Number.parseInt : (string: string, radix?: number) => number ++>testNumberConstructorParseInt : any ++>Number.parseInt("0") : any ++>Number.parseInt : any + >Number : NumberConstructor +->parseInt : (string: string, radix?: number) => number ++>parseInt : any + >"0" : "0" + + const testMathClz32 = Math.clz32(0); +->testMathClz32 : number +->Math.clz32(0) : number +->Math.clz32 : (x: number) => number ++>testMathClz32 : any ++>Math.clz32(0) : any ++>Math.clz32 : any + >Math : Math +->clz32 : (x: number) => number ++>clz32 : any + >0 : 0 + + const testMathImul = Math.imul(0,0); +->testMathImul : number +->Math.imul(0,0) : number +->Math.imul : (x: number, y: number) => number ++>testMathImul : any ++>Math.imul(0,0) : any ++>Math.imul : any + >Math : Math +->imul : (x: number, y: number) => number ++>imul : any + >0 : 0 + >0 : 0 + + const testMathSign = Math.sign(0); +->testMathSign : number +->Math.sign(0) : number +->Math.sign : (x: number) => number ++>testMathSign : any ++>Math.sign(0) : any ++>Math.sign : any + >Math : Math +->sign : (x: number) => number ++>sign : any + >0 : 0 + + const testMathLog10 = Math.log10(0); +->testMathLog10 : number +->Math.log10(0) : number +->Math.log10 : (x: number) => number ++>testMathLog10 : any ++>Math.log10(0) : any ++>Math.log10 : any + >Math : Math +->log10 : (x: number) => number ++>log10 : any + >0 : 0 + + const testMathLog2 = Math.log2(0); +->testMathLog2 : number +->Math.log2(0) : number +->Math.log2 : (x: number) => number ++>testMathLog2 : any ++>Math.log2(0) : any ++>Math.log2 : any + >Math : Math +->log2 : (x: number) => number ++>log2 : any + >0 : 0 + + const testMathLog1p = Math.log1p(0); +->testMathLog1p : number +->Math.log1p(0) : number +->Math.log1p : (x: number) => number ++>testMathLog1p : any ++>Math.log1p(0) : any ++>Math.log1p : any + >Math : Math +->log1p : (x: number) => number ++>log1p : any + >0 : 0 + + const testMathExpm1 = Math.expm1(0); +->testMathExpm1 : number +->Math.expm1(0) : number +->Math.expm1 : (x: number) => number ++>testMathExpm1 : any ++>Math.expm1(0) : any ++>Math.expm1 : any + >Math : Math +->expm1 : (x: number) => number ++>expm1 : any + >0 : 0 + + const testMathCosh = Math.cosh(0); +->testMathCosh : number +->Math.cosh(0) : number +->Math.cosh : (x: number) => number ++>testMathCosh : any ++>Math.cosh(0) : any ++>Math.cosh : any + >Math : Math +->cosh : (x: number) => number ++>cosh : any + >0 : 0 + + const testMathSinh = Math.sinh(0); +->testMathSinh : number +->Math.sinh(0) : number +->Math.sinh : (x: number) => number ++>testMathSinh : any ++>Math.sinh(0) : any ++>Math.sinh : any + >Math : Math +->sinh : (x: number) => number ++>sinh : any + >0 : 0 + + const testMathTanh = Math.tanh(0); +->testMathTanh : number +->Math.tanh(0) : number +->Math.tanh : (x: number) => number ++>testMathTanh : any ++>Math.tanh(0) : any ++>Math.tanh : any + >Math : Math +->tanh : (x: number) => number ++>tanh : any + >0 : 0 + + const testMathAcosh = Math.acosh(0); +->testMathAcosh : number +->Math.acosh(0) : number +->Math.acosh : (x: number) => number ++>testMathAcosh : any ++>Math.acosh(0) : any ++>Math.acosh : any + >Math : Math +->acosh : (x: number) => number ++>acosh : any + >0 : 0 + + const testMathAsinh = Math.asinh(0); +->testMathAsinh : number +->Math.asinh(0) : number +->Math.asinh : (x: number) => number ++>testMathAsinh : any ++>Math.asinh(0) : any ++>Math.asinh : any + >Math : Math +->asinh : (x: number) => number ++>asinh : any + >0 : 0 + + const testMathAtanh = Math.atanh(0); +->testMathAtanh : number +->Math.atanh(0) : number +->Math.atanh : (x: number) => number ++>testMathAtanh : any ++>Math.atanh(0) : any ++>Math.atanh : any + >Math : Math +->atanh : (x: number) => number ++>atanh : any + >0 : 0 + + const testMathHypot = Math.hypot(0,0); +->testMathHypot : number +->Math.hypot(0,0) : number +->Math.hypot : (...values: number[]) => number ++>testMathHypot : any ++>Math.hypot(0,0) : any ++>Math.hypot : any + >Math : Math +->hypot : (...values: number[]) => number ++>hypot : any + >0 : 0 + >0 : 0 + + const testMathTrunc = Math.trunc(0); +->testMathTrunc : number +->Math.trunc(0) : number +->Math.trunc : (x: number) => number ++>testMathTrunc : any ++>Math.trunc(0) : any ++>Math.trunc : any + >Math : Math +->trunc : (x: number) => number ++>trunc : any + >0 : 0 + + const testMathFround = Math.fround(0); +->testMathFround : number +->Math.fround(0) : number +->Math.fround : (x: number) => number ++>testMathFround : any ++>Math.fround(0) : any ++>Math.fround : any + >Math : Math +->fround : (x: number) => number ++>fround : any + >0 : 0 + + const testMathCbrt = Math.cbrt(0); +->testMathCbrt : number +->Math.cbrt(0) : number +->Math.cbrt : (x: number) => number ++>testMathCbrt : any ++>Math.cbrt(0) : any ++>Math.cbrt : any + >Math : Math +->cbrt : (x: number) => number ++>cbrt : any + >0 : 0 + + const testMap: Map = null as any; +@@= skipped -435, +435 lines =@@ + >null as any : any + + const testPromiseAll = Promise.all([]); +->testPromiseAll : Promise<[]> +->Promise.all([]) : Promise<[]> +->Promise.all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +->Promise : PromiseConstructor +->all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +->[] : [] ++>testPromiseAll : any ++>Promise.all([]) : any ++>Promise.all : any ++>Promise : any ++>all : any ++>[] : undefined[] + + const testPromiseRace = Promise.race([]); +->testPromiseRace : Promise +->Promise.race([]) : Promise +->Promise.race : { (values: Iterable>): Promise>; (values: T): Promise>; } +->Promise : PromiseConstructor +->race : { (values: Iterable>): Promise>; (values: T): Promise>; } +->[] : [] ++>testPromiseRace : any ++>Promise.race([]) : any ++>Promise.race : any ++>Promise : any ++>race : any ++>[] : undefined[] + + const testPromiseResolve = Promise.resolve(); +->testPromiseResolve : Promise +->Promise.resolve() : Promise +->Promise.resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } +->Promise : PromiseConstructor +->resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } ++>testPromiseResolve : any ++>Promise.resolve() : any ++>Promise.resolve : any ++>Promise : any ++>resolve : any + + const testPromiseReject = Promise.reject(); +->testPromiseReject : Promise +->Promise.reject() : Promise +->Promise.reject : (reason?: any) => Promise +->Promise : PromiseConstructor +->reject : (reason?: any) => Promise ++>testPromiseReject : any ++>Promise.reject() : any ++>Promise.reject : any ++>Promise : any ++>reject : any + + const testSymbolFor = Symbol.for('a'); +->testSymbolFor : unique symbol +->Symbol.for('a') : unique symbol +->Symbol.for : (key: string) => symbol +->Symbol : SymbolConstructor +->for : (key: string) => symbol ++>testSymbolFor : any ++>Symbol.for('a') : any ++>Symbol.for : any ++>Symbol : any ++>for : any + >'a' : "a" + + const testSymbolKeyFor = Symbol.keyFor(testSymbolFor); +->testSymbolKeyFor : string +->Symbol.keyFor(testSymbolFor) : string +->Symbol.keyFor : (sym: symbol) => string | undefined +->Symbol : SymbolConstructor +->keyFor : (sym: symbol) => string | undefined +->testSymbolFor : unique symbol ++>testSymbolKeyFor : any ++>Symbol.keyFor(testSymbolFor) : any ++>Symbol.keyFor : any ++>Symbol : any ++>keyFor : any ++>testSymbolFor : any + + const testWeakMap: WeakMap = null as any; + >testWeakMap : WeakMap +@@= skipped -62, +62 lines =@@ + >null as any : any + + const testStringCodePointAt = "".codePointAt(0); +->testStringCodePointAt : number +->"".codePointAt(0) : number +->"".codePointAt : (pos: number) => number | undefined ++>testStringCodePointAt : any ++>"".codePointAt(0) : any ++>"".codePointAt : any + >"" : "" +->codePointAt : (pos: number) => number | undefined ++>codePointAt : any + >0 : 0 + + const testStringIncludes = "".includes(""); +->testStringIncludes : boolean +->"".includes("") : boolean +->"".includes : (searchString: string, position?: number) => boolean ++>testStringIncludes : any ++>"".includes("") : any ++>"".includes : any + >"" : "" +->includes : (searchString: string, position?: number) => boolean ++>includes : any + >"" : "" + + const testStringEndsWith = "".endsWith(""); +->testStringEndsWith : boolean +->"".endsWith("") : boolean +->"".endsWith : (searchString: string, endPosition?: number) => boolean ++>testStringEndsWith : any ++>"".endsWith("") : any ++>"".endsWith : any + >"" : "" +->endsWith : (searchString: string, endPosition?: number) => boolean ++>endsWith : any + >"" : "" + + const testStringNormalize = "".normalize(); +->testStringNormalize : string +->"".normalize() : string +->"".normalize : { (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; } ++>testStringNormalize : any ++>"".normalize() : any ++>"".normalize : any + >"" : "" +->normalize : { (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; } ++>normalize : any + + const testStringRepeat = "".repeat(0); +->testStringRepeat : string +->"".repeat(0) : string +->"".repeat : (count: number) => string ++>testStringRepeat : any ++>"".repeat(0) : any ++>"".repeat : any + >"" : "" +->repeat : (count: number) => string ++>repeat : any + >0 : 0 + + const testStringStartsWith = "".startsWith(""); +->testStringStartsWith : boolean +->"".startsWith("") : boolean +->"".startsWith : (searchString: string, position?: number) => boolean ++>testStringStartsWith : any ++>"".startsWith("") : any ++>"".startsWith : any + >"" : "" +->startsWith : (searchString: string, position?: number) => boolean ++>startsWith : any + >"" : "" + + const testStringAnchor = "".anchor(""); +->testStringAnchor : string +->"".anchor("") : string +->"".anchor : (name: string) => string ++>testStringAnchor : any ++>"".anchor("") : any ++>"".anchor : any + >"" : "" +->anchor : (name: string) => string ++>anchor : any + >"" : "" + + const testStringBig = "".big(); +->testStringBig : string +->"".big() : string +->"".big : () => string ++>testStringBig : any ++>"".big() : any ++>"".big : any + >"" : "" +->big : () => string ++>big : any + + const testStringBlink = "".blink(); +->testStringBlink : string +->"".blink() : string +->"".blink : () => string ++>testStringBlink : any ++>"".blink() : any ++>"".blink : any + >"" : "" +->blink : () => string ++>blink : any + + const testStringBold = "".bold(); +->testStringBold : string +->"".bold() : string +->"".bold : () => string ++>testStringBold : any ++>"".bold() : any ++>"".bold : any + >"" : "" +->bold : () => string ++>bold : any + + const testStringFixed = "".fixed(); +->testStringFixed : string +->"".fixed() : string +->"".fixed : () => string ++>testStringFixed : any ++>"".fixed() : any ++>"".fixed : any + >"" : "" +->fixed : () => string ++>fixed : any + + const testStringFontColor = "".fontcolor("blue"); +->testStringFontColor : string +->"".fontcolor("blue") : string +->"".fontcolor : (color: string) => string ++>testStringFontColor : any ++>"".fontcolor("blue") : any ++>"".fontcolor : any + >"" : "" +->fontcolor : (color: string) => string ++>fontcolor : any + >"blue" : "blue" + + const testStringFontSize = "".fontsize(0); +->testStringFontSize : string +->"".fontsize(0) : string +->"".fontsize : { (size: number): string; (size: string): string; } ++>testStringFontSize : any ++>"".fontsize(0) : any ++>"".fontsize : any + >"" : "" +->fontsize : { (size: number): string; (size: string): string; } ++>fontsize : any + >0 : 0 + + const testStringItalics = "".italics(); +->testStringItalics : string +->"".italics() : string +->"".italics : () => string ++>testStringItalics : any ++>"".italics() : any ++>"".italics : any + >"" : "" +->italics : () => string ++>italics : any + + const testStringLink = "".link(""); +->testStringLink : string +->"".link("") : string +->"".link : (url: string) => string ++>testStringLink : any ++>"".link("") : any ++>"".link : any + >"" : "" +->link : (url: string) => string ++>link : any + >"" : "" + + const testStringSmall = "".small(); +->testStringSmall : string +->"".small() : string +->"".small : () => string ++>testStringSmall : any ++>"".small() : any ++>"".small : any + >"" : "" +->small : () => string ++>small : any + + const testStringStrike = "".strike(); +->testStringStrike : string +->"".strike() : string +->"".strike : () => string ++>testStringStrike : any ++>"".strike() : any ++>"".strike : any + >"" : "" +->strike : () => string ++>strike : any + + const testStringSub = "".sub(); +->testStringSub : string +->"".sub() : string +->"".sub : () => string ++>testStringSub : any ++>"".sub() : any ++>"".sub : any + >"" : "" +->sub : () => string ++>sub : any + + const testStringSup = "".sup(); +->testStringSup : string +->"".sup() : string +->"".sup : () => string ++>testStringSup : any ++>"".sup() : any ++>"".sup : any + >"" : "" +->sup : () => string ++>sup : any + + const testStringConstructorFromCodePoint = String.fromCodePoint(); +->testStringConstructorFromCodePoint : string +->String.fromCodePoint() : string +->String.fromCodePoint : (...codePoints: number[]) => string ++>testStringConstructorFromCodePoint : any ++>String.fromCodePoint() : any ++>String.fromCodePoint : any + >String : StringConstructor +->fromCodePoint : (...codePoints: number[]) => string ++>fromCodePoint : any + + const testStringConstructorRaw = String.raw``; +->testStringConstructorRaw : string +->String.raw`` : string +->String.raw : (template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]) => string ++>testStringConstructorRaw : any ++>String.raw`` : any ++>String.raw : any + >String : StringConstructor +->raw : (template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]) => string ++>raw : any + >`` : "" + + const testRegExpFlags = /abc/g.flags; +->testRegExpFlags : string +->/abc/g.flags : string ++>testRegExpFlags : any ++>/abc/g.flags : any + >/abc/g : RegExp +->flags : string ++>flags : any + + const testRegExpSticky = /abc/g.sticky; +->testRegExpSticky : boolean +->/abc/g.sticky : boolean ++>testRegExpSticky : any ++>/abc/g.sticky : any + >/abc/g : RegExp +->sticky : boolean ++>sticky : any + + const testRegExpUnicode = /abc/g.unicode; +->testRegExpUnicode : boolean +->/abc/g.unicode : boolean ++>testRegExpUnicode : any ++>/abc/g.unicode : any + >/abc/g : RegExp +->unicode : boolean ++>unicode : any diff --git a/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.js.diff b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.js.diff new file mode 100644 index 0000000000..054fac2dcd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/doYouNeedToChangeYourTargetLibraryES2016Plus.js.diff @@ -0,0 +1,78 @@ +--- old.doYouNeedToChangeYourTargetLibraryES2016Plus.js ++++ new.doYouNeedToChangeYourTargetLibraryES2016Plus.js +@@= skipped -50, +50 lines =@@ + + //// [doYouNeedToChangeYourTargetLibraryES2016Plus.js] + // es2016 +-var testIncludes = ["hello"].includes("world"); ++const testIncludes = ["hello"].includes("world"); + // es2017 +-var testStringPadStart = "".padStart(2); +-var testStringPadEnd = "".padEnd(2); +-var testObjectConstructorValues = Object.values({}); +-var testObjectConstructorEntries = Object.entries({}); +-var testObjectConstructorGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors({}); +-var testIntlFormatToParts = new Intl.DateTimeFormat("en-US").formatToParts(); +-var testAtomics = Atomics.add(new Uint8Array(0), 0, 0); +-var testSharedArrayBuffer = new SharedArrayBuffer(5); ++const testStringPadStart = "".padStart(2); ++const testStringPadEnd = "".padEnd(2); ++const testObjectConstructorValues = Object.values({}); ++const testObjectConstructorEntries = Object.entries({}); ++const testObjectConstructorGetOwnPropertyDescriptors = Object.getOwnPropertyDescriptors({}); ++const testIntlFormatToParts = new Intl.DateTimeFormat("en-US").formatToParts(); ++const testAtomics = Atomics.add(new Uint8Array(0), 0, 0); ++const testSharedArrayBuffer = new SharedArrayBuffer(5); + // es2018 +-var testPromiseFinally = new Promise(function () { }).finally(); +-var testRegExpMatchArrayGroups = "2019-04-30".match(/(?[0-9]{4})-(?[0-9]{2})-(?[0-9]{2})/g).groups; +-var testRegExpExecArrayGroups = /(?[0-9]{4})-(?[0-9]{2})-(?[0-9]{2})/g.exec("2019-04-30").groups; +-var testRegExpDotAll = /foo/g.dotAll; +-var testIntlPluralRules = new Intl.PluralRules("ar-EG").select(0); +-var testAsyncGenerator = null; +-var testAsyncGeneratorFunction = null; +-var testAsyncIterable = null; +-var testAsyncIterableIterator = null; +-var testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); ++const testPromiseFinally = new Promise(() => { }).finally(); ++const testRegExpMatchArrayGroups = "2019-04-30".match(/(?[0-9]{4})-(?[0-9]{2})-(?[0-9]{2})/g).groups; ++const testRegExpExecArrayGroups = /(?[0-9]{4})-(?[0-9]{2})-(?[0-9]{2})/g.exec("2019-04-30").groups; ++const testRegExpDotAll = /foo/g.dotAll; ++const testIntlPluralRules = new Intl.PluralRules("ar-EG").select(0); ++const testAsyncGenerator = null; ++const testAsyncGeneratorFunction = null; ++const testAsyncIterable = null; ++const testAsyncIterableIterator = null; ++const testNumberFormatFormatToParts = new Intl.NumberFormat("en-US").formatToParts(); + // es2019 +-var testArrayFlat = [].flat(); +-var testArrayFlatMap = [].flatMap(); +-var testObjectConstructorFromEntries = Object.fromEntries({}); +-var testStringTrimStart = "".trimStart(); +-var testStringTrimEnd = "".trimEnd(); +-var testStringTrimLeft = "".trimLeft(); +-var testStringTrimRight = "".trimRight(); +-var testSymbolDescription = Symbol("foo").description; ++const testArrayFlat = [].flat(); ++const testArrayFlatMap = [].flatMap(); ++const testObjectConstructorFromEntries = Object.fromEntries({}); ++const testStringTrimStart = "".trimStart(); ++const testStringTrimEnd = "".trimEnd(); ++const testStringTrimLeft = "".trimLeft(); ++const testStringTrimRight = "".trimRight(); ++const testSymbolDescription = Symbol("foo").description; + // es2020 +-var testPromiseAllSettled = Promise.allSettled([]); +-var testStringMatchAll = "".matchAll(); +-var testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); +-var testBigInt = BigInt(123); ++const testPromiseAllSettled = Promise.allSettled([]); ++const testStringMatchAll = "".matchAll(); ++const testRegExpMatchAll = /matchAll/g[Symbol.matchAll]("matchAll"); ++const testBigInt = BigInt(123); + // es2021 +-var testPromiseAny = Promise.any([]); +-var testStringReplaceAll = "".replaceAll(); ++const testPromiseAny = Promise.any([]); ++const testStringReplaceAll = "".replaceAll(); + // esnext \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/doesNotNarrowUnionOfConstructorsWithInstanceof.js.diff b/testdata/baselines/reference/submodule/compiler/doesNotNarrowUnionOfConstructorsWithInstanceof.js.diff index 047c4a6f39..fef8ce5eb8 100644 --- a/testdata/baselines/reference/submodule/compiler/doesNotNarrowUnionOfConstructorsWithInstanceof.js.diff +++ b/testdata/baselines/reference/submodule/compiler/doesNotNarrowUnionOfConstructorsWithInstanceof.js.diff @@ -1,16 +1,39 @@ --- old.doesNotNarrowUnionOfConstructorsWithInstanceof.js +++ new.doesNotNarrowUnionOfConstructorsWithInstanceof.js -@@= skipped -30, +30 lines =@@ +@@= skipped -29, +29 lines =@@ + //// [doesNotNarrowUnionOfConstructorsWithInstanceof.js] - class A { +-var A = /** @class */ (function () { +- function A() { ++class A { + length; - constructor() { ++ constructor() { this.length = 1; } - } - class B { +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { ++} ++class B { + length; - constructor() { ++ constructor() { this.length = 2; - } \ No newline at end of file + } +- return B; +-}()); ++} + function getTypedArray(flag) { + return flag ? new A() : new B(); + } + function getTypedArrayConstructor(flag) { + return flag ? A : B; + } +-var a = getTypedArray(true); // A | B +-var b = getTypedArrayConstructor(false); // A constructor | B constructor ++const a = getTypedArray(true); // A | B ++const b = getTypedArrayConstructor(false); // A constructor | B constructor + if (!(a instanceof b)) { + console.log(a.length); // Used to be property 'length' does not exist on type 'never'. + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt b/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt index f60c698a5e..ecfde23a43 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.errors.txt @@ -3,14 +3,14 @@ dottedModuleName.ts(3,33): error TS2552: Cannot find name 'x'. Did you mean 'X'? ==== dottedModuleName.ts (2 errors) ==== - module M { - export module N { + namespace M { + export namespace N { export function f(x:number)=>2*x; ~~ !!! error TS1144: '{' or ';' expected. ~ !!! error TS2552: Cannot find name 'x'. Did you mean 'X'? - export module X.Y.Z { + export namespace X.Y.Z { export var v2=f(v); } } @@ -18,9 +18,9 @@ dottedModuleName.ts(3,33): error TS2552: Cannot find name 'x'. Did you mean 'X'? - module M.N { - export module X { - export module Y.Z { + namespace M.N { + export namespace X { + export namespace Y.Z { export var v=f(10); } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.js b/testdata/baselines/reference/submodule/compiler/dottedModuleName.js index 7a2d513d12..c509fa16de 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.js +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.js @@ -1,10 +1,10 @@ //// [tests/cases/compiler/dottedModuleName.ts] //// //// [dottedModuleName.ts] -module M { - export module N { +namespace M { + export namespace N { export function f(x:number)=>2*x; - export module X.Y.Z { + export namespace X.Y.Z { export var v2=f(v); } } @@ -12,9 +12,9 @@ module M { -module M.N { - export module X { - export module Y.Z { +namespace M.N { + export namespace X { + export namespace Y.Z { export var v=f(10); } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.js.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName.js.diff index c9b4e92b0a..41246a7dc8 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.js.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.js.diff @@ -1,17 +1,23 @@ --- old.dottedModuleName.js +++ new.dottedModuleName.js -@@= skipped -25, +25 lines =@@ +@@= skipped -23, +23 lines =@@ + //// [dottedModuleName.js] + var M; (function (M) { - let N; +- var N; ++ let N; (function (N) { + function f(x) { } + N.f = f; 2 * x; - let X; +- var X; ++ let X; (function (X) { -@@= skipped -7, +9 lines =@@ +- var Y; ++ let Y; (function (Y) { - let Z; +- var Z; ++ let Z; (function (Z) { - Z.v2 = f(Z.v); + Z.v2 = f(v); @@ -24,11 +30,14 @@ - var N; + let N; (function (N) { - let X; +- var X; ++ let X; (function (X) { -@@= skipped -15, +15 lines =@@ +- var Y; ++ let Y; (function (Y) { - let Z; +- var Z; ++ let Z; (function (Z) { - Z.v = N.f(10); + Z.v = f(10); diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols b/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols index f35c1db757..0d5e30919a 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/dottedModuleName.ts] //// === dottedModuleName.ts === -module M { +namespace M { >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) - export module N { ->N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) + export namespace N { +>N : Symbol(N, Decl(dottedModuleName.ts, 0, 13), Decl(dottedModuleName.ts, 11, 12)) export function f(x:number)=>2*x; ->f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) +>f : Symbol(f, Decl(dottedModuleName.ts, 1, 24)) >x : Symbol(x, Decl(dottedModuleName.ts, 2, 19)) - export module X.Y.Z { ->X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) ->Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) ->Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) + export namespace X.Y.Z { +>X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 15)) +>Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 20), Decl(dottedModuleName.ts, 12, 24)) +>Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 22), Decl(dottedModuleName.ts, 13, 20)) export var v2=f(v); >v2 : Symbol(v2, Decl(dottedModuleName.ts, 4, 15)) ->f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) +>f : Symbol(f, Decl(dottedModuleName.ts, 1, 24)) >v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) } } @@ -26,20 +26,20 @@ module M { -module M.N { +namespace M.N { >M : Symbol(M, Decl(dottedModuleName.ts, 0, 0), Decl(dottedModuleName.ts, 7, 1)) ->N : Symbol(N, Decl(dottedModuleName.ts, 0, 10), Decl(dottedModuleName.ts, 11, 9)) +>N : Symbol(N, Decl(dottedModuleName.ts, 0, 13), Decl(dottedModuleName.ts, 11, 12)) - export module X { ->X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 12)) + export namespace X { +>X : Symbol(X, Decl(dottedModuleName.ts, 2, 34), Decl(dottedModuleName.ts, 11, 15)) - export module Y.Z { ->Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 17), Decl(dottedModuleName.ts, 12, 21)) ->Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 19), Decl(dottedModuleName.ts, 13, 17)) + export namespace Y.Z { +>Y : Symbol(Y, Decl(dottedModuleName.ts, 3, 20), Decl(dottedModuleName.ts, 12, 24)) +>Z : Symbol(Z, Decl(dottedModuleName.ts, 3, 22), Decl(dottedModuleName.ts, 13, 20)) export var v=f(10); >v : Symbol(v, Decl(dottedModuleName.ts, 14, 15)) ->f : Symbol(f, Decl(dottedModuleName.ts, 1, 21)) +>f : Symbol(f, Decl(dottedModuleName.ts, 1, 24)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types b/testdata/baselines/reference/submodule/compiler/dottedModuleName.types index c186ffc3ae..e105ed6042 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName.types +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/dottedModuleName.ts] //// === dottedModuleName.ts === -module M { +namespace M { >M : typeof M - export module N { + export namespace N { >N : typeof N export function f(x:number)=>2*x; @@ -14,7 +14,7 @@ module M { >2 : 2 >x : any - export module X.Y.Z { + export namespace X.Y.Z { >X : typeof X >Y : typeof Y >Z : typeof Z @@ -30,14 +30,14 @@ module M { -module M.N { +namespace M.N { >M : typeof M >N : typeof N - export module X { + export namespace X { >X : typeof X - export module Y.Z { + export namespace Y.Z { >Y : typeof Y >Z : typeof Z diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js index c037fadcdd..995cc87b9f 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/dottedModuleName2.ts] //// //// [dottedModuleName2.ts] -module A.B { +namespace A.B { export var x = 1; @@ -9,7 +9,7 @@ module A.B { -module AA { export module B { +namespace AA { export namespace B { export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js.diff index 9017b7875f..d12ac2afee 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.js.diff @@ -9,6 +9,14 @@ (function (B) { B.x = 1; })(B = A.B || (A.B = {})); + })(A || (A = {})); + var AA; + (function (AA) { +- var B; ++ let B; + (function (B) { + B.x = 1; + })(B = AA.B || (AA.B = {})); @@= skipped -15, +15 lines =@@ var tmpOK = AA.B.x; var tmpError = A.B.x; diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols index 4137712651..4504dd7604 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols @@ -1,9 +1,9 @@ //// [tests/cases/compiler/dottedModuleName2.ts] //// === dottedModuleName2.ts === -module A.B { +namespace A.B { >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) export var x = 1; >x : Symbol(x, Decl(dottedModuleName2.ts, 2, 12)) @@ -12,9 +12,9 @@ module A.B { -module AA { export module B { +namespace AA { export namespace B { >AA : Symbol(AA, Decl(dottedModuleName2.ts, 4, 1)) ->B : Symbol(B, Decl(dottedModuleName2.ts, 8, 11)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 8, 14)) export var x = 1; >x : Symbol(x, Decl(dottedModuleName2.ts, 10, 12)) @@ -26,23 +26,23 @@ module AA { export module B { var tmpOK = AA.B.x; >tmpOK : Symbol(tmpOK, Decl(dottedModuleName2.ts, 16, 3)) >AA.B.x : Symbol(AA.B.x, Decl(dottedModuleName2.ts, 10, 12)) ->AA.B : Symbol(AA.B, Decl(dottedModuleName2.ts, 8, 11)) +>AA.B : Symbol(AA.B, Decl(dottedModuleName2.ts, 8, 14)) >AA : Symbol(AA, Decl(dottedModuleName2.ts, 4, 1)) ->B : Symbol(AA.B, Decl(dottedModuleName2.ts, 8, 11)) +>B : Symbol(AA.B, Decl(dottedModuleName2.ts, 8, 14)) >x : Symbol(AA.B.x, Decl(dottedModuleName2.ts, 10, 12)) var tmpError = A.B.x; >tmpError : Symbol(tmpError, Decl(dottedModuleName2.ts, 18, 3)) >A.B.x : Symbol(A.B.x, Decl(dottedModuleName2.ts, 2, 12)) ->A.B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>A.B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(A.B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) >x : Symbol(A.B.x, Decl(dottedModuleName2.ts, 2, 12)) module A.B.C >A : Symbol(A, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) >C : Symbol(C, Decl(dottedModuleName2.ts, 21, 11)) { @@ -66,12 +66,12 @@ module M import X2 = A.B; >X2 : Symbol(X2, Decl(dottedModuleName2.ts, 35, 18)) >A : Symbol(X1, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) import X3 = A.B.C; >X3 : Symbol(X3, Decl(dottedModuleName2.ts, 37, 20)) >A : Symbol(X1, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) ->B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) >C : Symbol(X3, Decl(dottedModuleName2.ts, 21, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff index 050eb56078..bff35c7461 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.symbols.diff @@ -4,15 +4,15 @@ import X2 = A.B; >X2 : Symbol(X2, Decl(dottedModuleName2.ts, 35, 18)) >A : Symbol(X1, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) -->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) -+>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) ++>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) import X3 = A.B.C; >X3 : Symbol(X3, Decl(dottedModuleName2.ts, 37, 20)) >A : Symbol(X1, Decl(dottedModuleName2.ts, 0, 0), Decl(dottedModuleName2.ts, 18, 21)) -->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) +->B : Symbol(X1.B, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) ->C : Symbol(X2.C, Decl(dottedModuleName2.ts, 21, 11)) -+>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 9), Decl(dottedModuleName2.ts, 21, 9)) ++>B : Symbol(X2, Decl(dottedModuleName2.ts, 0, 12), Decl(dottedModuleName2.ts, 21, 9)) +>C : Symbol(X3, Decl(dottedModuleName2.ts, 21, 11)) } diff --git a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types index 830c28a2d0..f0e6dd24bb 100644 --- a/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types +++ b/testdata/baselines/reference/submodule/compiler/dottedModuleName2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/dottedModuleName2.ts] //// === dottedModuleName2.ts === -module A.B { +namespace A.B { >A : typeof A >B : typeof B @@ -13,7 +13,7 @@ module A.B { -module AA { export module B { +namespace AA { export namespace B { >AA : typeof AA >B : typeof B diff --git a/testdata/baselines/reference/submodule/compiler/dottedSymbolResolution1.js.diff b/testdata/baselines/reference/submodule/compiler/dottedSymbolResolution1.js.diff new file mode 100644 index 0000000000..b873837fed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/dottedSymbolResolution1.js.diff @@ -0,0 +1,18 @@ +--- old.dottedSymbolResolution1.js ++++ new.dottedSymbolResolution1.js +@@= skipped -27, +27 lines =@@ + } + + //// [dottedSymbolResolution1.js] +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.foo = function () { }; +- return Base; +-}()); ++class Base { ++ foo() { } ++} + function each(collection, callback) { + return null; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/doubleMixinConditionalTypeBaseClassWorks.js.diff b/testdata/baselines/reference/submodule/compiler/doubleMixinConditionalTypeBaseClassWorks.js.diff index 0b6bb5e3de..a98c64c8ca 100644 --- a/testdata/baselines/reference/submodule/compiler/doubleMixinConditionalTypeBaseClassWorks.js.diff +++ b/testdata/baselines/reference/submodule/compiler/doubleMixinConditionalTypeBaseClassWorks.js.diff @@ -1,10 +1,49 @@ --- old.doubleMixinConditionalTypeBaseClassWorks.js +++ new.doubleMixinConditionalTypeBaseClassWorks.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + class C extends Mixin2(Mixin1(Object)) {} //// [doubleMixinConditionalTypeBaseClassWorks.js] - const Mixin1 = (Base) => class extends Base { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Mixin1 = function (Base) { return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return class_1; +-}(Base)); }; +-var Mixin2 = function (Base) { return /** @class */ (function (_super) { +- __extends(class_2, _super); +- function class_2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return class_2; +-}(Base)); }; +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(Mixin2(Mixin1(Object)))); ++const Mixin1 = (Base) => class extends Base { + _fooPrivate; - }; - const Mixin2 = (Base) => class extends Base { - }; \ No newline at end of file ++}; ++const Mixin2 = (Base) => class extends Base { ++}; ++class C extends Mixin2(Mixin1(Object)) { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/doubleUnderscoreLabels.js.diff b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreLabels.js.diff new file mode 100644 index 0000000000..cf390ee92d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreLabels.js.diff @@ -0,0 +1,11 @@ +--- old.doubleUnderscoreLabels.js ++++ new.doubleUnderscoreLabels.js +@@= skipped -17, +17 lines =@@ + //// [doubleUnderscoreLabels.js] + function doThing() { + __call: while (true) { +- aLabel: for (var i = 0; i < 10; i++) { ++ aLabel: for (let i = 0; i < 10; i++) { + if (i === 3) { + break __call; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/doubleUnderscoreMappedTypes.js.diff b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreMappedTypes.js.diff new file mode 100644 index 0000000000..69513cb43e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreMappedTypes.js.diff @@ -0,0 +1,19 @@ +--- old.doubleUnderscoreMappedTypes.js ++++ new.doubleUnderscoreMappedTypes.js +@@= skipped -27, +27 lines =@@ + + //// [doubleUnderscoreMappedTypes.js] + // As expected, I can make an object satisfying this interface +-var ok = { ++const ok = { + property1: "", + __property2: "" + }; +-var k = "__property2"; // ok ++const k = "__property2"; // ok + // And should work with partial +-var partial = { ++const partial = { + property1: "", + __property2: "" + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/doubleUnderscoreReactNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreReactNamespace.js.diff new file mode 100644 index 0000000000..ba6e31f118 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/doubleUnderscoreReactNamespace.js.diff @@ -0,0 +1,8 @@ +--- old.doubleUnderscoreReactNamespace.js ++++ new.doubleUnderscoreReactNamespace.js +@@= skipped -14, +14 lines =@@ + //// [index.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var thing = __make(__foot, null); ++const thing = __make(__foot, null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst1.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst1.js.diff new file mode 100644 index 0000000000..b99f6024be --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst1.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst1.js ++++ new.downlevelLetConst1.js +@@= skipped -3, +3 lines =@@ + const + + //// [downlevelLetConst1.js] +-var ; ++const ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst10.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst10.js.diff new file mode 100644 index 0000000000..b5629e5613 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst10.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst10.js ++++ new.downlevelLetConst10.js +@@= skipped -3, +3 lines =@@ + let a: number = 1 + + //// [downlevelLetConst10.js] +-var a = 1; ++let a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst12.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst12.js.diff new file mode 100644 index 0000000000..0937e022fa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst12.js.diff @@ -0,0 +1,18 @@ +--- old.downlevelLetConst12.js ++++ new.downlevelLetConst12.js +@@= skipped -14, +14 lines =@@ + //// [downlevelLetConst12.js] + 'use strict'; + // top level let\const should not be renamed +-var foo; +-var bar = 1; +-var baz = [][0]; +-var baz2 = { a: 1 }.a; +-var baz3 = [][0]; +-var baz4 = { a: 1 }.a; ++let foo; ++const bar = 1; ++let [baz] = []; ++let { a: baz2 } = { a: 1 }; ++const [baz3] = []; ++const { a: baz4 } = { a: 1 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.js b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.js index 0c1d0a21a0..a826db8157 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.js +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.js @@ -11,7 +11,7 @@ export const [bar2] = [2]; export let {a: bar3} = { a: 1 }; export const {a: bar4} = { a: 1 }; -export module M { +export namespace M { export let baz = 100; export const baz2 = true; export let [bar5] = [1]; diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.symbols b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.symbols index 4f2a715622..feff5dcd65 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.symbols +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.symbols @@ -26,7 +26,7 @@ export const {a: bar4} = { a: 1 }; >bar4 : Symbol(bar4, Decl(downlevelLetConst13.ts, 8, 14)) >a : Symbol(a, Decl(downlevelLetConst13.ts, 8, 26)) -export module M { +export namespace M { >M : Symbol(M, Decl(downlevelLetConst13.ts, 8, 34)) export let baz = 100; diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.types b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.types index 794f6856c6..16fa00a22f 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.types +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst13.types @@ -38,7 +38,7 @@ export const {a: bar4} = { a: 1 }; >a : number >1 : 1 -export module M { +export namespace M { >M : typeof M export let baz = 100; diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst14.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst14.js.diff new file mode 100644 index 0000000000..5d615bd2d6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst14.js.diff @@ -0,0 +1,73 @@ +--- old.downlevelLetConst14.js ++++ new.downlevelLetConst14.js +@@= skipped -60, +60 lines =@@ + var x = 10; + var z0, z1, z2, z3; + { +- var x_1 = 20; +- use(x_1); +- var z0_1 = [1][0]; +- use(z0_1); +- var z1_1 = [1][0]; +- use(z1_1); +- var z2_1 = { a: 1 }.a; +- use(z2_1); +- var z3_1 = { a: 1 }.a; +- use(z3_1); ++ let x = 20; ++ use(x); ++ let [z0] = [1]; ++ use(z0); ++ let [z1] = [1]; ++ use(z1); ++ let { a: z2 } = { a: 1 }; ++ use(z2); ++ let { a: z3 } = { a: 1 }; ++ use(z3); + } + use(x); + use(z0); +@@= skipped -19, +19 lines =@@ + var z6; + var y = true; + { +- var y_1 = ""; +- var z6_1 = [true][0]; ++ let y = ""; ++ let [z6] = [true]; + { +- var y_2 = 1; +- var z6_2 = { a: 1 }.a; +- use(y_2); +- use(z6_2); ++ let y = 1; ++ let { a: z6 } = { a: 1 }; ++ use(y); ++ use(z6); + } +- use(y_1); +- use(z6_1); ++ use(y); ++ use(z6); + } + use(y); + use(z6); + var z = false; + var z5 = 1; + { +- var z_1 = ""; +- var z5_1 = [5][0]; ++ let z = ""; ++ let [z5] = [5]; + { +- var _z = 1; +- var _z5 = { a: 1 }.a; ++ let _z = 1; ++ let { a: _z5 } = { a: 1 }; + // try to step on generated name + use(_z); + } +- use(z_1); ++ use(z); + } + use(y); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst15.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst15.js.diff new file mode 100644 index 0000000000..a636028f32 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst15.js.diff @@ -0,0 +1,73 @@ +--- old.downlevelLetConst15.js ++++ new.downlevelLetConst15.js +@@= skipped -60, +60 lines =@@ + var x = 10; + var z0, z1, z2, z3; + { +- var x_1 = 20; +- use(x_1); +- var z0_1 = [1][0]; +- use(z0_1); +- var z1_1 = [{ a: 1 }][0].a; +- use(z1_1); +- var z2_1 = { a: 1 }.a; +- use(z2_1); +- var z3_1 = { a: { b: 1 } }.a.b; +- use(z3_1); ++ const x = 20; ++ use(x); ++ const [z0] = [1]; ++ use(z0); ++ const [{ a: z1 }] = [{ a: 1 }]; ++ use(z1); ++ const { a: z2 } = { a: 1 }; ++ use(z2); ++ const { a: { b: z3 } } = { a: { b: 1 } }; ++ use(z3); + } + use(x); + use(z0); +@@= skipped -19, +19 lines =@@ + var z6; + var y = true; + { +- var y_1 = ""; +- var z6_1 = [true][0]; ++ const y = ""; ++ const [z6] = [true]; + { +- var y_2 = 1; +- var z6_2 = { a: 1 }.a; +- use(y_2); +- use(z6_2); ++ const y = 1; ++ const { a: z6 } = { a: 1 }; ++ use(y); ++ use(z6); + } +- use(y_1); +- use(z6_1); ++ use(y); ++ use(z6); + } + use(y); + use(z6); + var z = false; + var z5 = 1; + { +- var z_1 = ""; +- var z5_1 = [5][0]; ++ const z = ""; ++ const [z5] = [5]; + { +- var _z = 1; +- var _z5 = { a: 1 }.a; ++ const _z = 1; ++ const { a: _z5 } = { a: 1 }; + // try to step on generated name + use(_z); + } +- use(z_1); ++ use(z); + } + use(y); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.errors.txt b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.errors.txt index fe8ff968d7..3e52673380 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.errors.txt @@ -107,7 +107,7 @@ downlevelLetConst16.ts(223,17): error TS2339: Property 'a' does not exist on typ use(x); } - module M1 { + namespace M1 { let x = 1; use(x); let [y] = [1]; @@ -116,7 +116,7 @@ downlevelLetConst16.ts(223,17): error TS2339: Property 'a' does not exist on typ use(z); } - module M2 { + namespace M2 { { let x = 1; use(x); @@ -128,7 +128,7 @@ downlevelLetConst16.ts(223,17): error TS2339: Property 'a' does not exist on typ use(x); } - module M3 { + namespace M3 { const x = 1; use(x); const [y] = [1]; @@ -138,7 +138,7 @@ downlevelLetConst16.ts(223,17): error TS2339: Property 'a' does not exist on typ } - module M4 { + namespace M4 { { const x = 1; use(x); diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js index d32be884d9..c3a34fd8ee 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js @@ -101,7 +101,7 @@ function bar2() { use(x); } -module M1 { +namespace M1 { let x = 1; use(x); let [y] = [1]; @@ -110,7 +110,7 @@ module M1 { use(z); } -module M2 { +namespace M2 { { let x = 1; use(x); @@ -122,7 +122,7 @@ module M2 { use(x); } -module M3 { +namespace M3 { const x = 1; use(x); const [y] = [1]; @@ -132,7 +132,7 @@ module M3 { } -module M4 { +namespace M4 { { const x = 1; use(x); diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js.diff new file mode 100644 index 0000000000..d8e8eb19a5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.js.diff @@ -0,0 +1,323 @@ +--- old.downlevelLetConst16.js ++++ new.downlevelLetConst16.js +@@= skipped -237, +237 lines =@@ + use(y); + use(z); + function foo1() { +- var x = 1; ++ let x = 1; + use(x); +- var y = [1][0]; ++ let [y] = [1]; + use(y); +- var z = { a: 1 }.a; ++ let { a: z } = { a: 1 }; + use(z); + } + function foo2() { + { +- var x_1 = 1; +- use(x_1); +- var y_1 = [1][0]; +- use(y_1); +- var z_1 = { a: 1 }.a; +- use(z_1); ++ let x = 1; ++ use(x); ++ let [y] = [1]; ++ use(y); ++ let { a: z } = { a: 1 }; ++ use(z); + } + use(x); + } +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.m1 = function () { +- var x = 1; +- use(x); +- var y = [1][0]; +- use(y); +- var z = { a: 1 }.a; +- use(z); +- }; +- A.prototype.m2 = function () { +- { +- var x_2 = 1; +- use(x_2); +- var y_2 = [1][0]; +- use(y_2); +- var z_2 = { a: 1 }.a; +- use(z_2); +- } +- use(x); +- }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.m1 = function () { +- var x = 1; +- use(x); +- var y = [1][0]; +- use(y); +- var z = { a: 1 }.a; +- use(z); +- }; +- B.prototype.m2 = function () { +- { +- var x_3 = 1; +- use(x_3); +- var y_3 = [1][0]; +- use(y_3); +- var z_3 = { a: 1 }.a; +- use(z_3); +- } +- use(x); +- }; +- return B; +-}()); ++class A { ++ m1() { ++ let x = 1; ++ use(x); ++ let [y] = [1]; ++ use(y); ++ let { a: z } = { a: 1 }; ++ use(z); ++ } ++ m2() { ++ { ++ let x = 1; ++ use(x); ++ let [y] = [1]; ++ use(y); ++ let { a: z } = { a: 1 }; ++ use(z); ++ } ++ use(x); ++ } ++} ++class B { ++ m1() { ++ const x = 1; ++ use(x); ++ const [y] = [1]; ++ use(y); ++ const { a: z } = { a: 1 }; ++ use(z); ++ } ++ m2() { ++ { ++ const x = 1; ++ use(x); ++ const [y] = [1]; ++ use(y); ++ const { a: z } = { a: 1 }; ++ use(z); ++ } ++ use(x); ++ } ++} + function bar1() { +- var x = 1; ++ const x = 1; + use(x); +- var y = [1][0]; ++ const [y] = [1]; + use(y); +- var z = { a: 1 }.a; ++ const { a: z } = { a: 1 }; + use(z); + } + function bar2() { + { +- var x_4 = 1; +- use(x_4); +- var y_4 = [1][0]; +- use(y_4); +- var z_4 = { a: 1 }.a; +- use(z_4); ++ const x = 1; ++ use(x); ++ const [y] = [1]; ++ use(y); ++ const { a: z } = { a: 1 }; ++ use(z); + } + use(x); + } + var M1; + (function (M1) { +- var x = 1; ++ let x = 1; + use(x); +- var y = [1][0]; ++ let [y] = [1]; + use(y); +- var z = { a: 1 }.a; ++ let { a: z } = { a: 1 }; + use(z); + })(M1 || (M1 = {})); + var M2; + (function (M2) { + { +- var x_5 = 1; +- use(x_5); +- var y_5 = [1][0]; +- use(y_5); +- var z_5 = { a: 1 }.a; +- use(z_5); ++ let x = 1; ++ use(x); ++ let [y] = [1]; ++ use(y); ++ let { a: z } = { a: 1 }; ++ use(z); + } + use(x); + })(M2 || (M2 = {})); + var M3; + (function (M3) { +- var x = 1; ++ const x = 1; + use(x); +- var y = [1][0]; ++ const [y] = [1]; + use(y); +- var z = { a: 1 }.a; ++ const { a: z } = { a: 1 }; + use(z); + })(M3 || (M3 = {})); + var M4; + (function (M4) { + { +- var x_6 = 1; +- use(x_6); +- var y_6 = [1][0]; +- use(y_6); +- var z_6 = { a: 1 }.a; +- use(z_6); ++ const x = 1; ++ use(x); ++ const [y] = [1]; ++ use(y); ++ const { a: z } = { a: 1 }; ++ use(z); + } + use(x); + use(y); + use(z); + })(M4 || (M4 = {})); + function foo3() { +- for (var x_7;;) { +- use(x_7); +- } +- for (var y_7 = [][0];;) { +- use(y_7); +- } +- for (var z_7 = { a: 1 }.a;;) { +- use(z_7); ++ for (let x;;) { ++ use(x); ++ } ++ for (let [y] = [];;) { ++ use(y); ++ } ++ for (let { a: z } = { a: 1 };;) { ++ use(z); + } + use(x); + } + function foo4() { +- for (var x_8 = 1;;) { +- use(x_8); +- } +- for (var y_8 = [][0];;) { +- use(y_8); +- } +- for (var z_8 = { a: 1 }.a;;) { +- use(z_8); ++ for (const x = 1;;) { ++ use(x); ++ } ++ for (const [y] = [];;) { ++ use(y); ++ } ++ for (const { a: z } = { a: 1 };;) { ++ use(z); + } + use(x); + } + function foo5() { +- for (var x_9 in []) { +- use(x_9); ++ for (let x in []) { ++ use(x); + } + use(x); + } + function foo6() { +- for (var x_10 in []) { +- use(x_10); ++ for (const x in []) { ++ use(x); + } + use(x); + } + function foo7() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_11 = _a[_i]; +- use(x_11); ++ for (let x of []) { ++ use(x); + } + use(x); + } + function foo8() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_12 = _a[_i][0]; +- use(x_12); ++ for (let [x] of []) { ++ use(x); + } + use(x); + } + function foo9() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_13 = _a[_i].a; +- use(x_13); ++ for (let { a: x } of []) { ++ use(x); + } + use(x); + } + function foo10() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_14 = _a[_i]; +- use(x_14); ++ for (const x of []) { ++ use(x); + } + use(x); + } + function foo11() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_15 = _a[_i][0]; +- use(x_15); ++ for (const [x] of []) { ++ use(x); + } + use(x); + } + function foo12() { +- for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_16 = _a[_i].a; +- use(x_16); ++ for (const { a: x } of []) { ++ use(x); + } + use(x); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.symbols b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.symbols index 1e99ea1d78..12377de81c 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.symbols +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.symbols @@ -270,7 +270,7 @@ function bar2() { >x : Symbol(x, Decl(downlevelLetConst16.ts, 4, 3)) } -module M1 { +namespace M1 { >M1 : Symbol(M1, Decl(downlevelLetConst16.ts, 98, 1)) let x = 1; @@ -297,7 +297,7 @@ module M1 { >z : Symbol(z, Decl(downlevelLetConst16.ts, 105, 9)) } -module M2 { +namespace M2 { >M2 : Symbol(M2, Decl(downlevelLetConst16.ts, 107, 1)) { let x = 1; @@ -328,7 +328,7 @@ module M2 { >x : Symbol(x, Decl(downlevelLetConst16.ts, 4, 3)) } -module M3 { +namespace M3 { >M3 : Symbol(M3, Decl(downlevelLetConst16.ts, 119, 1)) const x = 1; @@ -356,7 +356,7 @@ module M3 { } -module M4 { +namespace M4 { >M4 : Symbol(M4, Decl(downlevelLetConst16.ts, 129, 1)) { const x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.types b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.types index b227f57dc8..39f32f8954 100644 --- a/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.types +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst16.types @@ -343,7 +343,7 @@ function bar2() { >x : number } -module M1 { +namespace M1 { >M1 : typeof M1 let x = 1; @@ -378,7 +378,7 @@ module M1 { >z : number } -module M2 { +namespace M2 { >M2 : typeof M2 { let x = 1; @@ -418,7 +418,7 @@ module M2 { >x : number } -module M3 { +namespace M3 { >M3 : typeof M3 const x = 1; @@ -454,7 +454,7 @@ module M3 { } -module M4 { +namespace M4 { >M4 : typeof M4 { const x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst17.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst17.js.diff new file mode 100644 index 0000000000..21d4cde7fa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst17.js.diff @@ -0,0 +1,104 @@ +--- old.downlevelLetConst17.js ++++ new.downlevelLetConst17.js +@@= skipped -71, +71 lines =@@ + //// [downlevelLetConst17.js] + 'use strict'; + var x; +-for (var x_1 = 10;;) { +- use(x_1); ++for (let x = 10;;) { ++ use(x); + } + use(x); +-for (var x_2 = 10;;) { +- use(x_2); +-} +-for (;;) { +- var x_3 = 10; +- use(x_3); +- x_3 = 1; +-} +-for (;;) { +- var x_4 = 10; +- use(x_4); +-} +-for (var x_5;;) { +- use(x_5); +- x_5 = 1; +-} +-for (;;) { +- var x_6 = void 0; +- use(x_6); +- x_6 = 1; +-} +-while (true) { +- var x_7 = void 0; +- use(x_7); +-} +-while (true) { +- var x_8 = true; +- use(x_8); +-} +-do { +- var x_9 = void 0; +- use(x_9); +-} while (true); +-do { +- var x_10 = void 0; +- use(x_10); +-} while (true); +-for (var x_11 in []) { +- use(x_11); +-} +-for (var x_12 in []) { +- use(x_12); +-} +-for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var x_13 = _a[_i]; +- use(x_13); ++for (const x = 10;;) { ++ use(x); ++} ++for (;;) { ++ let x = 10; ++ use(x); ++ x = 1; ++} ++for (;;) { ++ const x = 10; ++ use(x); ++} ++for (let x;;) { ++ use(x); ++ x = 1; ++} ++for (;;) { ++ let x; ++ use(x); ++ x = 1; ++} ++while (true) { ++ let x; ++ use(x); ++} ++while (true) { ++ const x = true; ++ use(x); ++} ++do { ++ let x; ++ use(x); ++} while (true); ++do { ++ let x; ++ use(x); ++} while (true); ++for (let x in []) { ++ use(x); ++} ++for (const x in []) { ++ use(x); ++} ++for (const x of []) { ++ use(x); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst18.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst18.js.diff new file mode 100644 index 0000000000..1d8dca1fe1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst18.js.diff @@ -0,0 +1,64 @@ +--- old.downlevelLetConst18.js ++++ new.downlevelLetConst18.js +@@= skipped -33, +33 lines =@@ + + //// [downlevelLetConst18.js] + 'use strict'; +-var _loop_1 = function (x) { ++for (let x;;) { + function foo() { x; } + ; +-}; +-for (var x = void 0;;) { +- _loop_1(x); + } +-var _loop_2 = function (x) { ++for (let x;;) { + function foo1() { x; } + ; +-}; +-for (var x = void 0;;) { +- _loop_2(x); +-} +-var _loop_3 = function (x) { +- (function () { x; })(); +-}; +-for (var x = void 0;;) { +- _loop_3(x); +-} +-var _loop_4 = function (x) { +- (function () { x; })(); +-}; +-for (var x = 1;;) { +- _loop_4(x); +-} +-var _loop_5 = function (x) { +- ({ foo: function () { x; } }); +-}; +-for (var x = void 0;;) { +- _loop_5(x); +-} +-var _loop_6 = function (x) { ++} ++for (let x;;) { ++ (() => { x; })(); ++} ++for (const x = 1;;) { ++ (() => { x; })(); ++} ++for (let x;;) { ++ ({ foo() { x; } }); ++} ++for (let x;;) { + ({ get foo() { return x; } }); +-}; +-for (var x = void 0;;) { +- _loop_6(x); + } +-var _loop_7 = function (x) { ++for (let x;;) { + ({ set foo(v) { x; } }); +-}; +-for (var x = void 0;;) { +- _loop_7(x); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst19.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst19.js.diff new file mode 100644 index 0000000000..2770f4d1a6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst19.js.diff @@ -0,0 +1,22 @@ +--- old.downlevelLetConst19.js ++++ new.downlevelLetConst19.js +@@= skipped -25, +25 lines =@@ + var x; + function a() { + { +- var x_1; +- use(x_1); ++ let x; ++ use(x); + function b() { + { +- var x_2; +- use(x_2); ++ let x; ++ use(x); + } +- use(x_1); ++ use(x); + } + } + use(x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst2.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst2.js.diff new file mode 100644 index 0000000000..27cff34b62 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst2.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst2.js ++++ new.downlevelLetConst2.js +@@= skipped -3, +3 lines =@@ + const a + + //// [downlevelLetConst2.js] +-var a; ++const a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst3.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst3.js.diff new file mode 100644 index 0000000000..4100c9ace1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst3.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst3.js ++++ new.downlevelLetConst3.js +@@= skipped -3, +3 lines =@@ + const a = 1 + + //// [downlevelLetConst3.js] +-var a = 1; ++const a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst4.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst4.js.diff new file mode 100644 index 0000000000..0179ed6dcf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst4.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst4.js ++++ new.downlevelLetConst4.js +@@= skipped -3, +3 lines =@@ + const a: number + + //// [downlevelLetConst4.js] +-var a; ++const a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst5.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst5.js.diff new file mode 100644 index 0000000000..13d5864bf6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst5.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst5.js ++++ new.downlevelLetConst5.js +@@= skipped -3, +3 lines =@@ + const a: number = 1 + + //// [downlevelLetConst5.js] +-var a = 1; ++const a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst7.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst7.js.diff new file mode 100644 index 0000000000..ca3aadb1af --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst7.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst7.js ++++ new.downlevelLetConst7.js +@@= skipped -3, +3 lines =@@ + let a + + //// [downlevelLetConst7.js] +-var a; ++let a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst8.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst8.js.diff new file mode 100644 index 0000000000..6fe979dcd4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst8.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst8.js ++++ new.downlevelLetConst8.js +@@= skipped -3, +3 lines =@@ + let a = 1 + + //// [downlevelLetConst8.js] +-var a = 1; ++let a = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/downlevelLetConst9.js.diff b/testdata/baselines/reference/submodule/compiler/downlevelLetConst9.js.diff new file mode 100644 index 0000000000..537c61d63a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/downlevelLetConst9.js.diff @@ -0,0 +1,8 @@ +--- old.downlevelLetConst9.js ++++ new.downlevelLetConst9.js +@@= skipped -3, +3 lines =@@ + let a: number + + //// [downlevelLetConst9.js] +-var a; ++let a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js index a003f5ac65..09cf378fa7 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/duplicateAnonymousInners1.ts] //// //// [duplicateAnonymousInners1.ts] -module Foo { +namespace Foo { class Helper { @@ -14,7 +14,7 @@ module Foo { } -module Foo { +namespace Foo { // Should not be an error class Helper { diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js.diff new file mode 100644 index 0000000000..29846826d9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.js.diff @@ -0,0 +1,35 @@ +--- old.duplicateAnonymousInners1.js ++++ new.duplicateAnonymousInners1.js +@@= skipped -29, +29 lines =@@ + //// [duplicateAnonymousInners1.js] + var Foo; + (function (Foo) { +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); +- var Inner = /** @class */ (function () { +- function Inner() { +- } +- return Inner; +- }()); ++ class Helper { ++ } ++ class Inner { ++ } + // Inner should show up in intellisense + Foo.Outer = 0; + })(Foo || (Foo = {})); + (function (Foo) { + // Should not be an error +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + // Inner should not show up in intellisense + // Outer should show up in intellisense + })(Foo || (Foo = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.symbols b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.symbols index 80deb473ac..664020249f 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/duplicateAnonymousInners1.ts] //// === duplicateAnonymousInners1.ts === -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(duplicateAnonymousInners1.ts, 0, 0), Decl(duplicateAnonymousInners1.ts, 10, 1)) class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousInners1.ts, 0, 12)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousInners1.ts, 0, 15)) } @@ -19,12 +19,12 @@ module Foo { } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(duplicateAnonymousInners1.ts, 0, 0), Decl(duplicateAnonymousInners1.ts, 10, 1)) // Should not be an error class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousInners1.ts, 13, 12)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousInners1.ts, 13, 15)) } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.types b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.types index 2bf64a3bb0..85521caeac 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousInners1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/duplicateAnonymousInners1.ts] //// === duplicateAnonymousInners1.ts === -module Foo { +namespace Foo { >Foo : typeof Foo class Helper { @@ -20,7 +20,7 @@ module Foo { } -module Foo { +namespace Foo { >Foo : typeof Foo // Should not be an error diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js index 23590137cd..44c0f68386 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/duplicateAnonymousModuleClasses.ts] //// //// [duplicateAnonymousModuleClasses.ts] -module F { +namespace F { class Helper { @@ -10,7 +10,7 @@ module F { } -module F { +namespace F { // Should not be an error class Helper { @@ -19,7 +19,7 @@ module F { } -module Foo { +namespace Foo { class Helper { @@ -28,7 +28,7 @@ module Foo { } -module Foo { +namespace Foo { // Should not be an error class Helper { @@ -37,8 +37,8 @@ module Foo { } -module Gar { - module Foo { +namespace Gar { + namespace Foo { class Helper { @@ -47,7 +47,7 @@ module Gar { } - module Foo { + namespace Foo { // Should not be an error class Helper { diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js.diff new file mode 100644 index 0000000000..b73aa50950 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.js.diff @@ -0,0 +1,68 @@ +--- old.duplicateAnonymousModuleClasses.js ++++ new.duplicateAnonymousModuleClasses.js +@@= skipped -60, +60 lines =@@ + //// [duplicateAnonymousModuleClasses.js] + var F; + (function (F) { +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(F || (F = {})); + (function (F) { + // Should not be an error +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(F || (F = {})); + var Foo; + (function (Foo) { +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(Foo || (Foo = {})); + (function (Foo) { + // Should not be an error +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(Foo || (Foo = {})); + var Gar; + (function (Gar) { +- var Foo; ++ let Foo; + (function (Foo) { +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(Foo || (Foo = {})); + (function (Foo) { + // Should not be an error +- var Helper = /** @class */ (function () { +- function Helper() { +- } +- return Helper; +- }()); ++ class Helper { ++ } + })(Foo || (Foo = {})); + })(Gar || (Gar = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.symbols b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.symbols index 22f290010b..bcf1a0324e 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.symbols @@ -1,70 +1,70 @@ //// [tests/cases/compiler/duplicateAnonymousModuleClasses.ts] //// === duplicateAnonymousModuleClasses.ts === -module F { +namespace F { >F : Symbol(F, Decl(duplicateAnonymousModuleClasses.ts, 0, 0), Decl(duplicateAnonymousModuleClasses.ts, 6, 1)) class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 0, 10)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 0, 13)) } } -module F { +namespace F { >F : Symbol(F, Decl(duplicateAnonymousModuleClasses.ts, 0, 0), Decl(duplicateAnonymousModuleClasses.ts, 6, 1)) // Should not be an error class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 9, 10)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 9, 13)) } } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 16, 1), Decl(duplicateAnonymousModuleClasses.ts, 24, 1)) class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 18, 12)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 18, 15)) } } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 16, 1), Decl(duplicateAnonymousModuleClasses.ts, 24, 1)) // Should not be an error class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 27, 12)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 27, 15)) } } -module Gar { +namespace Gar { >Gar : Symbol(Gar, Decl(duplicateAnonymousModuleClasses.ts, 34, 1)) - module Foo { ->Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 36, 12), Decl(duplicateAnonymousModuleClasses.ts, 43, 5)) + namespace Foo { +>Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 36, 15), Decl(duplicateAnonymousModuleClasses.ts, 43, 5)) class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 37, 16)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 37, 19)) } } - module Foo { ->Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 36, 12), Decl(duplicateAnonymousModuleClasses.ts, 43, 5)) + namespace Foo { +>Foo : Symbol(Foo, Decl(duplicateAnonymousModuleClasses.ts, 36, 15), Decl(duplicateAnonymousModuleClasses.ts, 43, 5)) // Should not be an error class Helper { ->Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 46, 16)) +>Helper : Symbol(Helper, Decl(duplicateAnonymousModuleClasses.ts, 46, 19)) } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.types b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.types index 5f8e621d35..2a69a7d4b3 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateAnonymousModuleClasses.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/duplicateAnonymousModuleClasses.ts] //// === duplicateAnonymousModuleClasses.ts === -module F { +namespace F { >F : typeof F class Helper { @@ -12,7 +12,7 @@ module F { } -module F { +namespace F { >F : typeof F // Should not be an error @@ -23,7 +23,7 @@ module F { } -module Foo { +namespace Foo { >Foo : typeof Foo class Helper { @@ -34,7 +34,7 @@ module Foo { } -module Foo { +namespace Foo { >Foo : typeof Foo // Should not be an error @@ -45,10 +45,10 @@ module Foo { } -module Gar { +namespace Gar { >Gar : typeof Gar - module Foo { + namespace Foo { >Foo : typeof Foo class Helper { @@ -59,7 +59,7 @@ module Gar { } - module Foo { + namespace Foo { >Foo : typeof Foo // Should not be an error diff --git a/testdata/baselines/reference/submodule/compiler/duplicateClassElements.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateClassElements.js.diff index d11ea59e0d..254bd56691 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateClassElements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateClassElements.js.diff @@ -1,13 +1,68 @@ --- old.duplicateClassElements.js +++ new.duplicateClassElements.js -@@= skipped -47, +47 lines =@@ +@@= skipped -46, +46 lines =@@ + } //// [duplicateClassElements.js] - class a { -- b() { -- } -- b() { +-var a = /** @class */ (function () { +- function a() { - } +- a.prototype.b = function () { +- }; +- a.prototype.b = function () { +- }; +- Object.defineProperty(a.prototype, "x", { +- get: function () { +- return 10; +- }, +- set: function (_x) { +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(a.prototype, "y", { +- get: function () { +- return "Hello"; +- }, +- set: function (_y) { +- }, +- enumerable: false, +- configurable: true +- }); +- a.prototype.z = function () { +- }; +- Object.defineProperty(a.prototype, "z", { +- get: function () { +- return "Hello"; +- }, +- set: function (_y) { +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(a.prototype, "x2", { +- get: function () { +- return 10; +- }, +- set: function (_x) { +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(a.prototype, "z2", { +- get: function () { +- return "Hello"; +- }, +- set: function (_y) { +- }, +- enumerable: false, +- configurable: true +- }); +- a.prototype.z2 = function () { +- }; +- return a; +-}()); ++class a { + a; + a; + b() { @@ -15,14 +70,34 @@ + b() { + } + x; - get x() { - return 10; - } -@@= skipped -26, +29 lines =@@ - } - set x2(_x) { - } ++ get x() { ++ return 10; ++ } ++ set x(_x) { ++ } ++ get y() { ++ return "Hello"; ++ } ++ set y(_y) { ++ } ++ z() { ++ } ++ get z() { ++ return "Hello"; ++ } ++ set z(_y) { ++ } ++ get x2() { ++ return 10; ++ } ++ set x2(_x) { ++ } + x2; - get z2() { - return "Hello"; - } \ No newline at end of file ++ get z2() { ++ return "Hello"; ++ } ++ set z2(_y) { ++ } ++ z2() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature.js.diff new file mode 100644 index 0000000000..ea2cd9a531 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature.js.diff @@ -0,0 +1,14 @@ +--- old.duplicateConstructorOverloadSignature.js ++++ new.duplicateConstructorOverloadSignature.js +@@= skipped -7, +7 lines =@@ + } + + //// [duplicateConstructorOverloadSignature.js] +-var C = /** @class */ (function () { +- function C(x) { +- } +- return C; +-}()); ++class C { ++ constructor(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature2.js.diff new file mode 100644 index 0000000000..36e689df44 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateConstructorOverloadSignature2.js.diff @@ -0,0 +1,14 @@ +--- old.duplicateConstructorOverloadSignature2.js ++++ new.duplicateConstructorOverloadSignature2.js +@@= skipped -7, +7 lines =@@ + } + + //// [duplicateConstructorOverloadSignature2.js] +-var C = /** @class */ (function () { +- function C(x) { +- } +- return C; +-}()); ++class C { ++ constructor(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateErrorAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateErrorAssignability.js.diff index 7cc8df4aa7..b8982ef528 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateErrorAssignability.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateErrorAssignability.js.diff @@ -5,6 +5,8 @@ //// [duplicateErrorAssignability.js] -"use strict"; - const x = a = b; - let obj = { 3: "three" }; +-var x = a = b; +-var obj = { 3: "three" }; ++const x = a = b; ++let obj = { 3: "three" }; obj[x]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateErrorClassExpression.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateErrorClassExpression.js.diff index d6f782811e..08f8cb86f7 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateErrorClassExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateErrorClassExpression.js.diff @@ -5,11 +5,39 @@ //// [duplicateErrorClassExpression.js] -"use strict"; - class Base { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var x = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(Base)); +-var obj = { 3: "three" }; ++class Base { + foo; - } - const x = class Derived extends Base { ++} ++const x = class Derived extends Base { + foo; - }; - let obj = { 3: "three" }; ++}; ++let obj = { 3: "three" }; obj[x]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration1.js.diff new file mode 100644 index 0000000000..c5e065b5cc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration1.js.diff @@ -0,0 +1,46 @@ +--- old.duplicateIdentifierBindingElementInParameterDeclaration1.js ++++ new.duplicateIdentifierBindingElementInParameterDeclaration1.js +@@= skipped -10, +10 lines =@@ + function f7(a, func = (a) => { return 1 }) { } // not error + + //// [duplicateIdentifierBindingElementInParameterDeclaration1.js] +-function f0(a, _a, _b) { +- var a = _a[0], b = _a[1][0]; +- var b = _b.b; +-} +-function f1(_a) { +- var a = _a[0], a = _a[1]; +-} +-function f2(_a, _b) { +- var b = _a.b; +- var b = _b.b; +-} +-function f3(_a) { +- var c = _a[0], c = _a[1][0], c = _a[2][0][0]; +-} +-function f4(_a) { +- var d = _a.d, d = _a.d.d; +-} +-function f5(_a, _b, _c) { +- var e = _a.e, e = _a.e.e; +- var e = _b.e; +- var d = _c[0], e = _c[1], e = _c[2][0][0]; +- var e = []; +- for (var _i = 3; _i < arguments.length; _i++) { +- e[_i - 3] = arguments[_i]; +- } +-} +-function f6(_a) { +- var f = _a[0], f = _a.slice(1); +-} +-function f7(a, func) { +- if (func === void 0) { func = function (a) { return 1; }; } +-} // not error ++function f0(a, [a, [b]], { b }) { } ++function f1([a, a]) { } ++function f2({ b }, { b }) { } ++function f3([c, [c], [[c]]]) { } ++function f4({ d, d: { d } }) { } ++function f5({ e, e: { e } }, { e }, [d, e, [[e]]], ...e) { } ++function f6([f, ...f]) { } ++function f7(a, func = (a) => { return 1; }) { } // not error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration2.js.diff new file mode 100644 index 0000000000..de28159ef8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierBindingElementInParameterDeclaration2.js.diff @@ -0,0 +1,46 @@ +--- old.duplicateIdentifierBindingElementInParameterDeclaration2.js ++++ new.duplicateIdentifierBindingElementInParameterDeclaration2.js +@@= skipped -12, +12 lines =@@ + + //// [duplicateIdentifierBindingElementInParameterDeclaration2.js] + "use strict"; +-function f0(a, _a, _b) { +- var a = _a[0], b = _a[1][0]; +- var b = _b.b; +-} +-function f1(_a) { +- var a = _a[0], a = _a[1]; +-} +-function f2(_a, _b) { +- var b = _a.b; +- var b = _b.b; +-} +-function f3(_a) { +- var c = _a[0], c = _a[1][0], c = _a[2][0][0]; +-} +-function f4(_a) { +- var d = _a.d, d = _a.d.d; +-} +-function f5(_a, _b, _c) { +- var e = _a.e, e = _a.e.e; +- var e = _b.e; +- var d = _c[0], e = _c[1], e = _c[2][0][0]; +- var e = []; +- for (var _i = 3; _i < arguments.length; _i++) { +- e[_i - 3] = arguments[_i]; +- } +-} +-function f6(_a) { +- var f = _a[0], f = _a.slice(1); +-} +-function f7(a, func) { +- if (func === void 0) { func = function (a) { return 1; }; } +-} // not error ++function f0(a, [a, [b]], { b }) { } ++function f1([a, a]) { } ++function f2({ b }, { b }) { } ++function f3([c, [c], [[c]]]) { } ++function f4({ d, d: { d } }) { } ++function f5({ e, e: { e } }, { e }, [d, e, [[e]]], ...e) { } ++function f6([f, ...f]) { } ++function f7(a, func = (a) => { return 1; }) { } // not error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierComputedName.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierComputedName.js.diff index 2f0a335446..123dad42d9 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierComputedName.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierComputedName.js.diff @@ -1,9 +1,15 @@ --- old.duplicateIdentifierComputedName.js +++ new.duplicateIdentifierComputedName.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [duplicateIdentifierComputedName.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + ["a"]; + ["a"]; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentModifiers.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentModifiers.js.diff index e088da8fa9..6b3ee83a03 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentModifiers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentModifiers.js.diff @@ -1,12 +1,23 @@ --- old.duplicateIdentifierDifferentModifiers.js +++ new.duplicateIdentifierDifferentModifiers.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + //// [duplicateIdentifierDifferentModifiers.js] // OK - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + y; - } ++} // Not OK - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + y; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentSpelling.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentSpelling.js.diff index f23b078423..ff0edb22c1 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentSpelling.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentSpelling.js.diff @@ -1,14 +1,19 @@ --- old.duplicateIdentifierDifferentSpelling.js +++ new.duplicateIdentifierDifferentSpelling.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + //// [duplicateIdentifierDifferentSpelling.js] - class A { -- constructor() { -- this[0b11] = ''; +-var A = /** @class */ (function () { +- function A() { +- this[3] = ''; - this[3] = ''; - } +- return A; +-}()); +-var X = { 3: '', 3: '' }; ++class A { + 0b11 = ''; + 3 = ''; - } - var X = { 0b11: '', 3: '' }; \ No newline at end of file ++} ++var X = { 0b11: '', 3: '' }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.js.diff index 36895feaeb..dae7843fec 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierEnum.js.diff @@ -1,18 +1,32 @@ --- old.duplicateIdentifierEnum.js +++ new.duplicateIdentifierEnum.js -@@= skipped -42, +42 lines =@@ +@@= skipped -41, +41 lines =@@ + (function (A) { A[A["bar"] = 0] = "bar"; })(A || (A = {})); - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + foo; - } ++} function C() { return 0; -@@= skipped -9, +10 lines =@@ + } +@@= skipped -12, +10 lines =@@ + (function (D) { D[D["bar"] = 0] = "bar"; })(D || (D = {})); - class E { +-var E = /** @class */ (function () { +- function E() { +- } +- return E; +-}()); ++class E { + foo; - } ++} // also make sure the error appears when trying to merge an enum in a separate file. - //// [duplicateIdentifierEnum_B.js] \ No newline at end of file + //// [duplicateIdentifierEnum_B.js] + function D() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans1.js.diff new file mode 100644 index 0000000000..9fe72f22dd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans1.js.diff @@ -0,0 +1,26 @@ +--- old.duplicateIdentifierRelatedSpans1.js ++++ new.duplicateIdentifierRelatedSpans1.js +@@= skipped -11, +11 lines =@@ + + + //// [file1.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = 3; ++class Foo { ++} ++const Bar = 3; + //// [file2.js] +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); ++class Bar { ++} + //// [file3.js] +-var Bar = 42; ++let Bar = 42; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.js.diff new file mode 100644 index 0000000000..e25acc10e8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifierRelatedSpans2.js.diff @@ -0,0 +1,133 @@ +--- old.duplicateIdentifierRelatedSpans2.js ++++ new.duplicateIdentifierRelatedSpans2.js +@@= skipped -22, +22 lines =@@ + + + //// [file1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); +-var E = /** @class */ (function () { +- function E() { +- } +- return E; +-}()); +-var F = /** @class */ (function () { +- function F() { +- } +- return F; +-}()); +-var G = /** @class */ (function () { +- function G() { +- } +- return G; +-}()); +-var H = /** @class */ (function () { +- function H() { +- } +- return H; +-}()); +-var I = /** @class */ (function () { +- function I() { +- } +- return I; +-}()); ++class A { ++} ++class B { ++} ++class C { ++} ++class D { ++} ++class E { ++} ++class F { ++} ++class G { ++} ++class H { ++} ++class I { ++} + //// [file2.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); +-var E = /** @class */ (function () { +- function E() { +- } +- return E; +-}()); +-var F = /** @class */ (function () { +- function F() { +- } +- return F; +-}()); +-var G = /** @class */ (function () { +- function G() { +- } +- return G; +-}()); +-var H = /** @class */ (function () { +- function H() { +- } +- return H; +-}()); +-var I = /** @class */ (function () { +- function I() { +- } +- return I; +-}()); ++class A { ++} ++class B { ++} ++class C { ++} ++class D { ++} ++class E { ++} ++class F { ++} ++class G { ++} ++class H { ++} ++class I { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.errors.txt index f3b0a7b9c1..fba1ab1b48 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.errors.txt @@ -5,44 +5,44 @@ duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): error TS2300: Duplicate ==== duplicateIdentifiersAcrossContainerBoundaries.ts (4 errors) ==== - module M { + namespace M { export interface I { } } - module M { + namespace M { export class I { } } - module M { + namespace M { export function f() { } ~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. !!! related TS6506 duplicateIdentifiersAcrossContainerBoundaries.ts:12:18: Consider adding a 'declare' modifier to this class. } - module M { + namespace M { export class f { } // error ~ !!! error TS2813: Class declaration cannot implement overload list for 'f'. !!! related TS6506 duplicateIdentifiersAcrossContainerBoundaries.ts:12:18: Consider adding a 'declare' modifier to this class. } - module M { + namespace M { function g() { } } - module M { + namespace M { export class g { } // no error } - module M { + namespace M { export class C { } } - module M { + namespace M { function C() { } // no error } - module M { + namespace M { export var v = 3; } - module M { + namespace M { export var v = 3; // error for redeclaring var in a different parent } @@ -52,18 +52,18 @@ duplicateIdentifiersAcrossContainerBoundaries.ts(41,16): error TS2300: Duplicate !!! error TS2300: Duplicate identifier 'x'. } - module Foo { + namespace Foo { export var x: number; // error for redeclaring var in a different parent ~ !!! error TS2300: Duplicate identifier 'x'. } - module N { - export module F { + namespace N { + export namespace F { var t; } } - declare module N { + declare namespace N { export function F(); // no error because function is ambient } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js index b3bf5186b0..504ca73dcd 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js @@ -1,38 +1,38 @@ //// [tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts] //// //// [duplicateIdentifiersAcrossContainerBoundaries.ts] -module M { +namespace M { export interface I { } } -module M { +namespace M { export class I { } } -module M { +namespace M { export function f() { } } -module M { +namespace M { export class f { } // error } -module M { +namespace M { function g() { } } -module M { +namespace M { export class g { } // no error } -module M { +namespace M { export class C { } } -module M { +namespace M { function C() { } // no error } -module M { +namespace M { export var v = 3; } -module M { +namespace M { export var v = 3; // error for redeclaring var in a different parent } @@ -40,16 +40,16 @@ class Foo { static x: number; } -module Foo { +namespace Foo { export var x: number; // error for redeclaring var in a different parent } -module N { - export module F { +namespace N { + export namespace F { var t; } } -declare module N { +declare namespace N { export function F(); // no error because function is ambient } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js.diff index 68d2fb5b2a..247375367c 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.js.diff @@ -1,14 +1,77 @@ --- old.duplicateIdentifiersAcrossContainerBoundaries.js +++ new.duplicateIdentifiersAcrossContainerBoundaries.js -@@= skipped -89, +89 lines =@@ +@@= skipped -56, +56 lines =@@ + //// [duplicateIdentifiersAcrossContainerBoundaries.js] + var M; + (function (M) { +- var I = /** @class */ (function () { +- function I() { +- } +- return I; +- }()); ++ class I { ++ } + M.I = I; + })(M || (M = {})); + (function (M) { +@@= skipped -12, +9 lines =@@ + M.f = f; + })(M || (M = {})); + (function (M) { +- var f = /** @class */ (function () { +- function f() { +- } +- return f; +- }()); // error ++ class f { ++ } // error + M.f = f; + })(M || (M = {})); + (function (M) { + function g() { } + })(M || (M = {})); + (function (M) { +- var g = /** @class */ (function () { +- function g() { +- } +- return g; +- }()); // no error ++ class g { ++ } // no error + M.g = g; + })(M || (M = {})); + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + M.C = C; + })(M || (M = {})); + (function (M) { +@@= skipped -33, +24 lines =@@ M.v = 3; })(M || (M = {})); (function (M) { - M.v = 3; // error for redeclaring var in a different parent + v = 3; // error for redeclaring var in a different parent })(M || (M = {})); - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { + static x; - } ++} (function (Foo) { - })(Foo || (Foo = {})); \ No newline at end of file + })(Foo || (Foo = {})); + var N; + (function (N) { +- var F; ++ let F; + (function (F) { + var t; + })(F = N.F || (N.F = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.symbols b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.symbols index 16f9a8791d..df243aa163 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.symbols @@ -1,65 +1,65 @@ //// [tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts] //// === duplicateIdentifiersAcrossContainerBoundaries.ts === -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export interface I { } ->I : Symbol(I, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 3, 10)) +>I : Symbol(I, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 3, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export class I { } ->I : Symbol(I, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 3, 10)) +>I : Symbol(I, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 3, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export function f() { } ->f : Symbol(f, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 7, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 10, 10)) +>f : Symbol(f, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 7, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 10, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export class f { } // error ->f : Symbol(f, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 7, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 10, 10)) +>f : Symbol(f, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 7, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 10, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) function g() { } ->g : Symbol(g, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 14, 10)) +>g : Symbol(g, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 14, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export class g { } // no error ->g : Symbol(g, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 17, 10)) +>g : Symbol(g, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 17, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export class C { } ->C : Symbol(C, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 21, 10)) +>C : Symbol(C, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 21, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) function C() { } // no error ->C : Symbol(C, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 24, 10)) +>C : Symbol(C, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 24, 13)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export var v = 3; >v : Symbol(v, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 29, 14), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 32, 14)) } -module M { +namespace M { >M : Symbol(M, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 0, 0), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 2, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 5, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 9, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 12, 1) ... and 5 more) export var v = 3; // error for redeclaring var in a different parent @@ -73,27 +73,27 @@ class Foo { >x : Symbol(Foo.x, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 35, 11)) } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 33, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 37, 1)) export var x: number; // error for redeclaring var in a different parent >x : Symbol(x, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 40, 14)) } -module N { +namespace N { >N : Symbol(N, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 41, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 47, 1)) - export module F { ->F : Symbol(F, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 43, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 48, 18)) + export namespace F { +>F : Symbol(F, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 43, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 48, 21)) var t; >t : Symbol(t, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 45, 11)) } } -declare module N { +declare namespace N { >N : Symbol(N, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 41, 1), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 47, 1)) export function F(); // no error because function is ambient ->F : Symbol(F, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 43, 10), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 48, 18)) +>F : Symbol(F, Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 43, 13), Decl(duplicateIdentifiersAcrossContainerBoundaries.ts, 48, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.types b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.types index fec59a9523..11282dac79 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossContainerBoundaries.types @@ -1,63 +1,63 @@ //// [tests/cases/compiler/duplicateIdentifiersAcrossContainerBoundaries.ts] //// === duplicateIdentifiersAcrossContainerBoundaries.ts === -module M { +namespace M { export interface I { } } -module M { +namespace M { >M : typeof M export class I { } >I : I } -module M { +namespace M { >M : typeof M export function f() { } >f : typeof f } -module M { +namespace M { >M : typeof M export class f { } // error >f : f } -module M { +namespace M { >M : typeof M function g() { } >g : () => void } -module M { +namespace M { >M : typeof M export class g { } // no error >g : g } -module M { +namespace M { >M : typeof M export class C { } >C : C } -module M { +namespace M { >M : typeof M function C() { } // no error >C : () => void } -module M { +namespace M { >M : typeof M export var v = 3; >v : number >3 : 3 } -module M { +namespace M { >M : typeof M export var v = 3; // error for redeclaring var in a different parent @@ -72,24 +72,24 @@ class Foo { >x : number } -module Foo { +namespace Foo { >Foo : typeof Foo export var x: number; // error for redeclaring var in a different parent >x : number } -module N { +namespace N { >N : typeof N - export module F { + export namespace F { >F : typeof F var t; >t : any } } -declare module N { +declare namespace N { >N : typeof N export function F(); // no error because function is ambient diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.errors.txt index 808860e9fe..7c703c1c7e 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.errors.txt @@ -3,7 +3,7 @@ file1.ts(4,10): error TS2814: Function with bodies can only merge with classes t file1.ts(8,12): error TS2300: Duplicate identifier 'x'. file2.ts(3,10): error TS2814: Function with bodies can only merge with classes that are ambient. file2.ts(4,7): error TS2813: Class declaration cannot implement overload list for 'f'. -file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +file2.ts(7,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. file2.ts(8,16): error TS2300: Duplicate identifier 'x'. @@ -27,8 +27,8 @@ file2.ts(8,16): error TS2300: Duplicate identifier 'x'. !!! related TS6203 file2.ts:8:16: 'x' was also declared here. } - module N { - export module F { + namespace N { + export namespace F { var t; } } @@ -46,8 +46,8 @@ file2.ts(8,16): error TS2300: Duplicate identifier 'x'. !!! related TS6506 file2.ts:4:7: Consider adding a 'declare' modifier to this class. var v = 3; - module Foo { - ~~~ + namespace Foo { + ~~~ !!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var x: number; // error for redeclaring var in a different parent ~ @@ -55,7 +55,7 @@ file2.ts(8,16): error TS2300: Duplicate identifier 'x'. !!! related TS6203 file1.ts:8:12: 'x' was also declared here. } - declare module N { + declare namespace N { export function F(); // no error because function is ambient } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js index f395db6ef7..7d71512f90 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js @@ -11,8 +11,8 @@ class Foo { static x: number; } -module N { - export module F { +namespace N { + export namespace F { var t; } } @@ -24,11 +24,11 @@ function C2() { } // error -- cannot merge function with non-ambient class class f { } // error -- cannot merge function with non-ambient class var v = 3; -module Foo { +namespace Foo { export var x: number; // error for redeclaring var in a different parent } -declare module N { +declare namespace N { export function F(); // no error because function is ambient } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js.diff index d1cfe8bdab..1fef4ae184 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.js.diff @@ -1,10 +1,57 @@ --- old.duplicateIdentifiersAcrossFileBoundaries.js +++ new.duplicateIdentifiersAcrossFileBoundaries.js -@@= skipped -40, +40 lines =@@ +@@= skipped -33, +33 lines =@@ + + + //// [file1.js] +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C1 { ++} ++class C2 { ++} function f() { } var v = 3; - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { + static x; - } ++} var N; - (function (N) { \ No newline at end of file + (function (N) { +- var F; ++ let F; + (function (F) { + var t; + })(F = N.F || (N.F = {})); + })(N || (N = {})); + //// [file2.js] +-var I = /** @class */ (function () { +- function I() { +- } +- return I; +-}()); // error -- cannot merge interface with non-ambient class ++class I { ++} // error -- cannot merge interface with non-ambient class + function C2() { } // error -- cannot merge function with non-ambient class +-var f = /** @class */ (function () { +- function f() { +- } +- return f; +-}()); // error -- cannot merge function with non-ambient class ++class f { ++} // error -- cannot merge function with non-ambient class + var v = 3; + var Foo; + (function (Foo) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.symbols b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.symbols index ff53fa13f0..873482354b 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.symbols @@ -23,11 +23,11 @@ class Foo { >x : Symbol(Foo.x, Decl(file1.ts, 6, 11)) } -module N { +namespace N { >N : Symbol(N, Decl(file1.ts, 8, 1), Decl(file2.ts, 8, 1)) - export module F { ->F : Symbol(F, Decl(file1.ts, 10, 10), Decl(file2.ts, 10, 18)) + export namespace F { +>F : Symbol(F, Decl(file1.ts, 10, 13), Decl(file2.ts, 10, 21)) var t; >t : Symbol(t, Decl(file1.ts, 12, 11)) @@ -50,17 +50,17 @@ class f { } // error -- cannot merge function with non-ambient class var v = 3; >v : Symbol(v, Decl(file1.ts, 4, 3), Decl(file2.ts, 4, 3)) -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(file1.ts, 4, 10), Decl(file2.ts, 4, 10)) export var x: number; // error for redeclaring var in a different parent >x : Symbol(x, Decl(file2.ts, 7, 14)) } -declare module N { +declare namespace N { >N : Symbol(N, Decl(file1.ts, 8, 1), Decl(file2.ts, 8, 1)) export function F(); // no error because function is ambient ->F : Symbol(F, Decl(file1.ts, 10, 10), Decl(file2.ts, 10, 18)) +>F : Symbol(F, Decl(file1.ts, 10, 13), Decl(file2.ts, 10, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.types b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.types index d8139e89ff..bcad2421d2 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateIdentifiersAcrossFileBoundaries.types @@ -22,10 +22,10 @@ class Foo { >x : number } -module N { +namespace N { >N : typeof N - export module F { + export namespace F { >F : typeof F var t; @@ -48,14 +48,14 @@ var v = 3; >v : number >3 : 3 -module Foo { +namespace Foo { >Foo : typeof Foo export var x: number; // error for redeclaring var in a different parent >x : number } -declare module N { +declare namespace N { >N : typeof N export function F(); // no error because function is ambient diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff index 62371627fa..1e262aabc2 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.js.diff @@ -9,21 +9,51 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.tests = exports.TestRunner = exports.TestCase = void 0; var TestFileDir = ".\\TempTestFiles"; - class TestCase { +-var TestCase = /** @class */ (function () { +- function TestCase(name, test, errorMessageRegEx) { ++class TestCase { + name; + test; + errorMessageRegEx; - constructor(name, test, errorMessageRegEx) { ++ constructor(name, test, errorMessageRegEx) { this.name = name; this.test = test; -@@= skipped -14, +15 lines =@@ - } + this.errorMessageRegEx = errorMessageRegEx; + } +- return TestCase; +-}()); ++} exports.TestCase = TestCase; - class TestRunner { -- constructor() { +-var TestRunner = /** @class */ (function () { +- function TestRunner() { - this.tests = []; - } +- TestRunner.arrayCompare = function (arg1, arg2) { ++class TestRunner { + tests = []; - static arrayCompare(arg1, arg2) { ++ static arrayCompare(arg1, arg2) { return (arg1.every(function (val, index) { return val === arg2[index]; })); - } \ No newline at end of file +- }; +- TestRunner.prototype.addTest = function (test) { ++ } ++ addTest(test) { + this.tests.push(test); +- }; +- TestRunner.prototype.run = function () { ++ } ++ run() { + var success = true; + for (var test in this.tests) { + var exception = false; +@@= skipped -60, +58 lines =@@ + } + else { + } +- }; +- return TestRunner; +-}()); ++ } ++} + exports.TestRunner = TestRunner; + exports.tests = (function () { + var testRunner = new TestRunner(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.symbols.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.symbols.diff new file mode 100644 index 0000000000..bfc4be6db9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.symbols.diff @@ -0,0 +1,11 @@ +--- old.duplicateLocalVariable1.symbols ++++ new.duplicateLocalVariable1.symbols +@@= skipped -117, +117 lines =@@ + + var regex = new RegExp(testcase.errorMessageRegEx); + >regex : Symbol(regex, Decl(duplicateLocalVariable1.ts, 38, 27)) +->RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>RegExp : Symbol(RegExp, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >testcase.errorMessageRegEx : Symbol(TestCase.errorMessageRegEx, Decl(duplicateLocalVariable1.ts, 9, 63)) + >testcase : Symbol(testcase, Decl(duplicateLocalVariable1.ts, 26, 15)) + >errorMessageRegEx : Symbol(TestCase.errorMessageRegEx, Decl(duplicateLocalVariable1.ts, 9, 63)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.types.diff new file mode 100644 index 0000000000..8ee61a732e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateLocalVariable1.types.diff @@ -0,0 +1,11 @@ +--- old.duplicateLocalVariable1.types ++++ new.duplicateLocalVariable1.types +@@= skipped -117, +117 lines =@@ + + if (typeof testcase.errorMessageRegEx === "string") { + >typeof testcase.errorMessageRegEx === "string" : boolean +->typeof testcase.errorMessageRegEx : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof testcase.errorMessageRegEx : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >testcase.errorMessageRegEx : string + >testcase : TestCase + >errorMessageRegEx : string \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName1.js.diff new file mode 100644 index 0000000000..b580d81e82 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName1.js.diff @@ -0,0 +1,77 @@ +--- old.duplicateObjectLiteralProperty_computedName1.js ++++ new.duplicateObjectLiteralProperty_computedName1.js +@@= skipped -37, +37 lines =@@ + + + //// [duplicateObjectLiteralProperty_computedName1.js] +-var _a, _b, _c, _d, _e, _f, _g; +-var t1 = (_a = { +- 1: 1 +- }, +- _a[1] = 0 // duplicate +-, +- _a); +-var t2 = (_b = { +- 1: 1 +- }, +- _b[+1] = 0 // duplicate +-, +- _b); +-var t3 = (_c = { +- "1": 1 +- }, +- _c[+1] = 0 // duplicate +-, +- _c); +-var t4 = (_d = { +- "+1": 1 +- }, +- _d[+1] = 0 // two different keys, "+1", "1" +-, +- _d); +-var t5 = (_e = { +- "+1": 1 +- }, +- _e["+1"] = 0 // duplicate +-, +- _e); +-var t6 = (_f = { +- "-1": 1 +- }, +- _f[-1] = 0 // duplicate +-, +- _f); +-var t7 = (_g = { +- "-1": 1 +- }, +- _g["-1"] = 0 // duplicate +-, +- _g); ++const t1 = { ++ 1: 1, ++ [1]: 0 // duplicate ++}; ++const t2 = { ++ 1: 1, ++ [+1]: 0 // duplicate ++}; ++const t3 = { ++ "1": 1, ++ [+1]: 0 // duplicate ++}; ++const t4 = { ++ "+1": 1, ++ [+1]: 0 // two different keys, "+1", "1" ++}; ++const t5 = { ++ "+1": 1, ++ ["+1"]: 0 // duplicate ++}; ++const t6 = { ++ "-1": 1, ++ [-1]: 0 // duplicate ++}; ++const t7 = { ++ "-1": 1, ++ ["-1"]: 0 // duplicate ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.js.diff new file mode 100644 index 0000000000..df9af7c213 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName2.js.diff @@ -0,0 +1,50 @@ +--- old.duplicateObjectLiteralProperty_computedName2.js ++++ new.duplicateObjectLiteralProperty_computedName2.js +@@= skipped -27, +27 lines =@@ + + + //// [duplicateObjectLiteralProperty_computedName2.js] +-var _a, _b, _c, _d; +-var n = 1; +-var s = "s"; ++const n = 1; ++const s = "s"; + var E1; + (function (E1) { + E1["A"] = "ENUM_KEY"; +@@= skipped -11, +10 lines =@@ + (function (E2) { + E2[E2["B"] = 0] = "B"; + })(E2 || (E2 = {})); +-var t1 = (_a = {}, +- _a[n] = 1, +- _a[n] = 1, +- _a); +-var t2 = (_b = {}, +- _b[s] = 1, +- _b[s] = 1, +- _b); +-var t3 = (_c = {}, +- _c[E1.A] = 1, +- _c[E1.A] = 1, +- _c); +-var t4 = (_d = {}, +- _d[E2.B] = 1, +- _d[E2.B] = 1, +- _d); ++const t1 = { ++ [n]: 1, ++ [n]: 1, // duplicate ++}; ++const t2 = { ++ [s]: 1, ++ [s]: 1, // duplicate ++}; ++const t3 = { ++ [E1.A]: 1, ++ [E1.A]: 1, // duplicate ++}; ++const t4 = { ++ [E2.B]: 1, ++ [E2.B]: 1, // duplicate ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.js.diff index 23e0b62965..26ad6aa1de 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateObjectLiteralProperty_computedName3.js.diff @@ -1,11 +1,42 @@ --- old.duplicateObjectLiteralProperty_computedName3.js +++ new.duplicateObjectLiteralProperty_computedName3.js -@@= skipped -46, +46 lines =@@ +@@= skipped -45, +45 lines =@@ + })(E2 || (exports.E2 = E2 = {})); //// [b.js] "use strict"; +-var _a, _b, _c, _d; Object.defineProperty(exports, "__esModule", { value: true }); -var keys = require("./a"); +-var t1 = (_a = {}, +- _a[keys.n] = 1, +- _a[keys.n] = 1, +- _a); +-var t2 = (_b = {}, +- _b[keys.s] = 1, +- _b[keys.s] = 1, +- _b); +-var t3 = (_c = {}, +- _c[keys.E1.A] = 1, +- _c[keys.E1.A] = 1, +- _c); +-var t4 = (_d = {}, +- _d[keys.E2.B] = 1, +- _d[keys.E2.B] = 1, +- _d); +const keys = require("./a"); - const t1 = { - [keys.n]: 1, - [keys.n]: 1, // duplicate \ No newline at end of file ++const t1 = { ++ [keys.n]: 1, ++ [keys.n]: 1, // duplicate ++}; ++const t2 = { ++ [keys.s]: 1, ++ [keys.s]: 1, // duplicate ++}; ++const t3 = { ++ [keys.E1.A]: 1, ++ [keys.E1.A]: 1, // duplicate ++}; ++const t4 = { ++ [keys.E2.B]: 1, ++ [keys.E2.B]: 1, // duplicate ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.js.diff new file mode 100644 index 0000000000..2dd5159477 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.js.diff @@ -0,0 +1,8 @@ +--- old.duplicateOverloadInTypeAugmentation1.js ++++ new.duplicateOverloadInTypeAugmentation1.js +@@= skipped -11, +11 lines =@@ + + //// [duplicateOverloadInTypeAugmentation1.js] + var a; +-var r5 = a.reduce(function (x, y) { return x + y; }); ++var r5 = a.reduce((x, y) => x + y); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.symbols.diff b/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.symbols.diff new file mode 100644 index 0000000000..8e35c12393 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateOverloadInTypeAugmentation1.symbols.diff @@ -0,0 +1,58 @@ +--- old.duplicateOverloadInTypeAugmentation1.symbols ++++ new.duplicateOverloadInTypeAugmentation1.symbols +@@= skipped -1, +1 lines =@@ + + === duplicateOverloadInTypeAugmentation1.ts === + interface Array { +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + + reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, + >reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) + >callbackfn : Symbol(callbackfn, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 11)) + >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 24)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + >currentValue : Symbol(currentValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 41)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + >currentIndex : Symbol(currentIndex, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 58)) + >array : Symbol(array, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 80)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + + initialValue?: T): T; + >initialValue : Symbol(initialValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 1, 98)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + + reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, + >reduce : Symbol(Array.reduce, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 20), Decl(duplicateOverloadInTypeAugmentation1.ts, 2, 29)) +@@= skipped -27, +27 lines =@@ + >previousValue : Symbol(previousValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 27)) + >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) + >currentValue : Symbol(currentValue, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 44)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + >currentIndex : Symbol(currentIndex, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 61)) + >array : Symbol(array, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 83)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 16)) + >U : Symbol(U, Decl(duplicateOverloadInTypeAugmentation1.ts, 3, 11)) + + initialValue: U): U; +@@= skipped -13, +13 lines =@@ + } + var a: Array; + >a : Symbol(a, Decl(duplicateOverloadInTypeAugmentation1.ts, 6, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(duplicateOverloadInTypeAugmentation1.ts, 0, 0)) + + var r5 = a.reduce((x, y) => x + y); + >r5 : Symbol(r5, Decl(duplicateOverloadInTypeAugmentation1.ts, 7, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.js.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.js.diff index 8741077cda..b035f304a5 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_referenceTypes.js.diff @@ -5,5 +5,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var a = require("a"); +-var foo = a.foo; +const a = require("a"); - let foo = a.foo; \ No newline at end of file ++let foo = a.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.js.diff b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.js.diff index f1568fbcc2..86ff5ba370 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicatePackage_subModule.js.diff @@ -5,5 +5,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var a = require("a"); +-var o = a.o; +const a = require("a"); - const o = a.o; \ No newline at end of file ++const o = a.o; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateTypeParameters2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateTypeParameters2.js.diff new file mode 100644 index 0000000000..6b8964cf40 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateTypeParameters2.js.diff @@ -0,0 +1,24 @@ +--- old.duplicateTypeParameters2.js ++++ new.duplicateTypeParameters2.js +@@= skipped -6, +6 lines =@@ + interface I {} + + //// [duplicateTypeParameters2.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); ++class A { ++ foo() { } ++} ++class B { ++ bar() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.js b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.js index 0d5a9c4188..d387c69916 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.js @@ -4,7 +4,7 @@ // no error since module is not instantiated var a; -module M { } +namespace M { } import a = M; //// [duplicateVarAndImport.js] diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.symbols b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.symbols index 455f0509f1..9c2948a11d 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.symbols @@ -4,12 +4,12 @@ // no error since module is not instantiated var a; ->a : Symbol(a, Decl(duplicateVarAndImport.ts, 2, 3), Decl(duplicateVarAndImport.ts, 3, 12)) +>a : Symbol(a, Decl(duplicateVarAndImport.ts, 2, 3), Decl(duplicateVarAndImport.ts, 3, 15)) -module M { } +namespace M { } >M : Symbol(M, Decl(duplicateVarAndImport.ts, 2, 6)) import a = M; ->a : Symbol(a, Decl(duplicateVarAndImport.ts, 2, 3), Decl(duplicateVarAndImport.ts, 3, 12)) +>a : Symbol(a, Decl(duplicateVarAndImport.ts, 2, 3), Decl(duplicateVarAndImport.ts, 3, 15)) >M : Symbol(M, Decl(duplicateVarAndImport.ts, 2, 6)) diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types index 9550f52512..9df2eb7adf 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types @@ -6,7 +6,7 @@ var a; >a : any -module M { } +namespace M { } import a = M; >a : any >M : any diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types.diff b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types.diff index dc602f0413..30c429f086 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types.diff +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport.types.diff @@ -1,7 +1,7 @@ --- old.duplicateVarAndImport.types +++ new.duplicateVarAndImport.types @@= skipped -8, +8 lines =@@ - module M { } + namespace M { } import a = M; >a : any ->M : error diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.errors.txt index 343834034a..7afd8c1489 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.errors.txt @@ -4,7 +4,7 @@ duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with ==== duplicateVarAndImport2.ts (1 errors) ==== // error since module is instantiated var a; - module M { export var x = 1; } + namespace M { export var x = 1; } import a = M; ~~~~~~~~~~~~~ !!! error TS2440: Import declaration conflicts with local declaration of 'a'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js index 61391fad5a..1adde00e02 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js @@ -3,7 +3,7 @@ //// [duplicateVarAndImport2.ts] // error since module is instantiated var a; -module M { export var x = 1; } +namespace M { export var x = 1; } import a = M; //// [duplicateVarAndImport2.js] diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.symbols b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.symbols index 9ebb242341..bf2c4d32eb 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.symbols @@ -3,13 +3,13 @@ === duplicateVarAndImport2.ts === // error since module is instantiated var a; ->a : Symbol(a, Decl(duplicateVarAndImport2.ts, 1, 3), Decl(duplicateVarAndImport2.ts, 2, 30)) +>a : Symbol(a, Decl(duplicateVarAndImport2.ts, 1, 3), Decl(duplicateVarAndImport2.ts, 2, 33)) -module M { export var x = 1; } +namespace M { export var x = 1; } >M : Symbol(M, Decl(duplicateVarAndImport2.ts, 1, 6)) ->x : Symbol(x, Decl(duplicateVarAndImport2.ts, 2, 21)) +>x : Symbol(x, Decl(duplicateVarAndImport2.ts, 2, 24)) import a = M; ->a : Symbol(a, Decl(duplicateVarAndImport2.ts, 1, 3), Decl(duplicateVarAndImport2.ts, 2, 30)) +>a : Symbol(a, Decl(duplicateVarAndImport2.ts, 1, 3), Decl(duplicateVarAndImport2.ts, 2, 33)) >M : Symbol(M, Decl(duplicateVarAndImport2.ts, 1, 6)) diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.types b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.types index 87d78291c3..8f8691443e 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.types @@ -5,7 +5,7 @@ var a; >a : any -module M { export var x = 1; } +namespace M { export var x = 1; } >M : typeof M >x : number >1 : 1 diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js index 1efecc031a..f1c997132c 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js @@ -3,7 +3,7 @@ //// [duplicateVariablesByScope.ts] // duplicate local variables are only reported at global scope -module M { +namespace M { for (var j = 0; j < 10; j++) { } diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js.diff new file mode 100644 index 0000000000..f819c62525 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.js.diff @@ -0,0 +1,23 @@ +--- old.duplicateVariablesByScope.js ++++ new.duplicateVariablesByScope.js +@@= skipped -51, +51 lines =@@ + var result = 2; + } + } +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class C { ++ foo() { + try { + var x = 1; + } + catch (e) { + var x = 2; + } +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.symbols b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.symbols index 3c118ea309..9a302f5cdf 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.symbols @@ -3,7 +3,7 @@ === duplicateVariablesByScope.ts === // duplicate local variables are only reported at global scope -module M { +namespace M { >M : Symbol(M, Decl(duplicateVariablesByScope.ts, 0, 0)) for (var j = 0; j < 10; j++) { diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.types b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.types index 2ae3d26adb..82f299bb43 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesByScope.types @@ -3,7 +3,7 @@ === duplicateVariablesByScope.ts === // duplicate local variables are only reported at global scope -module M { +namespace M { >M : typeof M for (var j = 0; j < 10; j++) { diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.errors.txt index 0752acccdf..aacd053336 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.errors.txt @@ -18,7 +18,7 @@ duplicateVariablesWithAny.ts(13,9): error TS2403: Subsequent variable declaratio !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'any'. !!! related TS6203 duplicateVariablesWithAny.ts:5:5: 'y' was also declared here. - module N { + namespace N { var x: any; var x = 2; //error ~ diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.js b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.js index 1590ab8893..a343053bee 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.js @@ -8,7 +8,7 @@ var x = 2; //error var y = ""; var y; //error -module N { +namespace N { var x: any; var x = 2; //error diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.symbols b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.symbols index e5539679d6..c0b3c39a56 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.symbols @@ -14,7 +14,7 @@ var y = ""; var y; //error >y : Symbol(y, Decl(duplicateVariablesWithAny.ts, 4, 3), Decl(duplicateVariablesWithAny.ts, 5, 3)) -module N { +namespace N { >N : Symbol(N, Decl(duplicateVariablesWithAny.ts, 5, 6)) var x: any; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.types b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.types index 21651e8380..981095e325 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateVariablesWithAny.types @@ -16,7 +16,7 @@ var y = ""; var y; //error >y : string -module N { +namespace N { >N : typeof N var x: any; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.errors.txt b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.errors.txt index a5f612ce70..ebe80ab2ae 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.errors.txt @@ -35,11 +35,11 @@ duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable d var z = 0; ==== duplicateVarsAcrossFileBoundaries_4.ts (0 errors) ==== - module P { } + namespace P { } import p = P; var q; ==== duplicateVarsAcrossFileBoundaries_5.ts (0 errors) ==== - module Q { } + namespace Q { } import q = Q; var p; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js index f26b866991..d23df89c2f 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js @@ -19,12 +19,12 @@ var y = ""; var z = 0; //// [duplicateVarsAcrossFileBoundaries_4.ts] -module P { } +namespace P { } import p = P; var q; //// [duplicateVarsAcrossFileBoundaries_5.ts] -module Q { } +namespace Q { } import q = Q; var p; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.symbols b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.symbols index 895101b57e..7d66162cd1 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.symbols +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.symbols @@ -35,22 +35,22 @@ var z = 0; >z : Symbol(z, Decl(duplicateVarsAcrossFileBoundaries_1.ts, 1, 3), Decl(duplicateVarsAcrossFileBoundaries_2.ts, 2, 3), Decl(duplicateVarsAcrossFileBoundaries_3.ts, 2, 3)) === duplicateVarsAcrossFileBoundaries_4.ts === -module P { } +namespace P { } >P : Symbol(P, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 0, 0), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 2, 3)) import p = P; ->p : Symbol(p, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 0, 12)) +>p : Symbol(p, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 0, 15)) >P : Symbol(P, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 0, 0), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 2, 3)) var q; ->q : Symbol(q, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 2, 3), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 12)) +>q : Symbol(q, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 2, 3), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 15)) === duplicateVarsAcrossFileBoundaries_5.ts === -module Q { } +namespace Q { } >Q : Symbol(Q, Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 0)) import q = Q; ->q : Symbol(q, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 2, 3), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 12)) +>q : Symbol(q, Decl(duplicateVarsAcrossFileBoundaries_4.ts, 2, 3), Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 15)) >Q : Symbol(Q, Decl(duplicateVarsAcrossFileBoundaries_5.ts, 0, 0)) var p; diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.types b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.types index 6ef0a9cb4a..d1e6c510d2 100644 --- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.types +++ b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.types @@ -45,7 +45,7 @@ var z = 0; >0 : 0 === duplicateVarsAcrossFileBoundaries_4.ts === -module P { } +namespace P { } import p = P; >p : any >P : any @@ -54,7 +54,7 @@ var q; >q : any === duplicateVarsAcrossFileBoundaries_5.ts === -module Q { } +namespace Q { } import q = Q; >q : any >Q : any diff --git a/testdata/baselines/reference/submodule/compiler/dynamicImportTrailingComma.js.diff b/testdata/baselines/reference/submodule/compiler/dynamicImportTrailingComma.js.diff index 147468858b..1f135ce2ee 100644 --- a/testdata/baselines/reference/submodule/compiler/dynamicImportTrailingComma.js.diff +++ b/testdata/baselines/reference/submodule/compiler/dynamicImportTrailingComma.js.diff @@ -1,8 +1,10 @@ --- old.dynamicImportTrailingComma.js +++ new.dynamicImportTrailingComma.js -@@= skipped -5, +5 lines =@@ +@@= skipped -4, +4 lines =@@ + import(path,); //// [dynamicImportTrailingComma.js] - const path = './foo'; +-var path = './foo'; -Promise.resolve("".concat(path)).then(function (s) { return require(s); }); ++const path = './foo'; +Promise.resolve(`${path}`).then(s => require(s)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elaboratedErrors.js.diff b/testdata/baselines/reference/submodule/compiler/elaboratedErrors.js.diff index 931564e81d..3da69b9844 100644 --- a/testdata/baselines/reference/submodule/compiler/elaboratedErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/elaboratedErrors.js.diff @@ -1,10 +1,17 @@ --- old.elaboratedErrors.js +++ new.elaboratedErrors.js -@@= skipped -31, +31 lines =@@ +@@= skipped -30, +30 lines =@@ + //// [elaboratedErrors.js] function fn(s) { } // This should issue a large error, not a small one - class WorkerFS { +-var WorkerFS = /** @class */ (function () { +- function WorkerFS() { +- } +- return WorkerFS; +-}()); ++class WorkerFS { + read; - } ++} var x; - var y; \ No newline at end of file + var y; + // Only one of these errors should be large \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elementAccessExpressionInternalComments.symbols.diff b/testdata/baselines/reference/submodule/compiler/elementAccessExpressionInternalComments.symbols.diff new file mode 100644 index 0000000000..a56ba30bd8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/elementAccessExpressionInternalComments.symbols.diff @@ -0,0 +1,16 @@ +--- old.elementAccessExpressionInternalComments.symbols ++++ new.elementAccessExpressionInternalComments.symbols +@@= skipped -1, +1 lines =@@ + + === elementAccessExpressionInternalComments.ts === + /*0*/ Array /*1*/[ /*2*/ "toString" /*3*/ ] /*4*/; /*5*/ +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >"toString" : Symbol(Function.toString, Decl(lib.es5.d.ts, --, --)) + + /*0*/ Array +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + // single line + /*1*/[ /*2*/ "toString" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.js.diff b/testdata/baselines/reference/submodule/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.js.diff new file mode 100644 index 0000000000..52e7a1de61 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/elidedEmbeddedStatementsReplacedWithSemicolon.js.diff @@ -0,0 +1,19 @@ +--- old.elidedEmbeddedStatementsReplacedWithSemicolon.js ++++ new.elidedEmbeddedStatementsReplacedWithSemicolon.js +@@= skipped -37, +37 lines =@@ + ; + for (; 0;) + ; +-for (var _ in []) +- ; +-for (var _i = 0, _a = []; _i < _a.length; _i++) { +- var _ = _a[_i]; +- ; +-} ++for (let _ in []) ++ ; ++for (let _ of []) ++ ; + // @ts-ignore suppress `with` statement error + with (window) + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).js.diff index 5568f5f597..eecb36a8fb 100644 --- a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).js.diff +++ b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=commonjs).js.diff @@ -7,26 +7,36 @@ -var other_js_1 = require("./other.js"); -var other = __importStar(require("./other.js")); -var other_js_2 = __importDefault(require("./other.js")); +-var x = new other_js_1.Foo(); +-var y = other.Foo(); +-var z = new other_js_2.default(); +const other_js_1 = require("./other.js"); +const other = __importStar(require("./other.js")); +const other_js_2 = __importDefault(require("./other.js")); - const x = new other_js_1.Foo(); - const y = other.Foo(); - const z = new other_js_2.default(); -@@= skipped -11, +11 lines =@@ ++const x = new other_js_1.Foo(); ++const y = other.Foo(); ++const z = new other_js_2.default(); + //// [other.js] + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Foo = void 0; - class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.bar = 2.4; - } +- return Foo; +-}()); ++class Foo { + bar = 2.4; - } ++} exports.Foo = Foo; - class Bar { -- constructor() { +-var Bar = /** @class */ (function () { +- function Bar() { - this.foo = 1.2; - } +- return Bar; +-}()); ++class Bar { + foo = 1.2; - } ++} exports.default = Bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).js.diff b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).js.diff index b51f16292c..a5db7c052d 100644 --- a/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).js.diff +++ b/testdata/baselines/reference/submodule/compiler/elidedJSImport2(module=es2022).js.diff @@ -1,17 +1,33 @@ --- old.elidedJSImport2(module=es2022).js +++ new.elidedJSImport2(module=es2022).js -@@= skipped -36, +36 lines =@@ - const z = new defaultFoo(); +@@= skipped -31, +31 lines =@@ + import { Foo } from "./other.js"; + import * as other from "./other.js"; + import defaultFoo from "./other.js"; +-var x = new Foo(); +-var y = other.Foo(); +-var z = new defaultFoo(); ++const x = new Foo(); ++const y = other.Foo(); ++const z = new defaultFoo(); //// [other.js] - export class Foo { -- constructor() { +-var Foo = /** @class */ (function () { +- function Foo() { - this.bar = 2.4; - } -+ bar = 2.4; - } - export default class Bar { -- constructor() { +- return Foo; +-}()); +-export { Foo }; +-var Bar = /** @class */ (function () { +- function Bar() { - this.foo = 1.2; - } +- return Bar; +-}()); +-export default Bar; ++export class Foo { ++ bar = 2.4; ++} ++export default class Bar { + foo = 1.2; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js.diff b/testdata/baselines/reference/submodule/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js.diff new file mode 100644 index 0000000000..399abf4a3d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js.diff @@ -0,0 +1,10 @@ +--- old.emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js ++++ new.emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js +@@= skipped -4, +4 lines =@@ + (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; + + //// [emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.js] +-(function (x) { return ({ "1": "one", "2": "two" }[x]); }); +-(function (x) { return ({ "1": "one", "2": "two" }.x); }); ++(x) => ({ "1": "one", "2": "two" }[x]); ++(x) => ({ "1": "one", "2": "two" }.x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring1.js.diff b/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring1.js.diff new file mode 100644 index 0000000000..9d7019deec --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring1.js.diff @@ -0,0 +1,12 @@ +--- old.emitCapturingThisInTupleDestructuring1.js ++++ new.emitCapturingThisInTupleDestructuring1.js +@@= skipped -6, +6 lines =@@ + }); + + //// [emitCapturingThisInTupleDestructuring1.js] +-var _this = this; +-wrapper(function (array) { +- _this.test = array[0], _this.test1 = array[1], _this.test2 = array[2]; // even though there is a compiler error, we should still emit lexical capture for "this" ++wrapper((array) => { ++ [this.test, this.test1, this.test2] = array; // even though there is a compiler error, we should still emit lexical capture for "this" + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring2.js.diff b/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring2.js.diff index 018323c60c..6bafde7075 100644 --- a/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitCapturingThisInTupleDestructuring2.js.diff @@ -1,12 +1,22 @@ --- old.emitCapturingThisInTupleDestructuring2.js +++ new.emitCapturingThisInTupleDestructuring2.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + //// [emitCapturingThisInTupleDestructuring2.js] var array1 = [1, 2]; - class B { +-var B = /** @class */ (function () { +- function B() { ++class B { + test; + test1; + test2; - method() { - () => [this.test, this.test1, this.test2] = array1; // even though there is a compiler error, we should still emit lexical capture for "this" - } \ No newline at end of file ++ method() { ++ () => [this.test, this.test1, this.test2] = array1; // even though there is a compiler error, we should still emit lexical capture for "this" + } +- B.prototype.method = function () { +- var _this = this; +- (function () { return _this.test = array1[0], _this.test1 = array1[1], _this.test2 = array1[2], array1; }); // even though there is a compiler error, we should still emit lexical capture for "this" +- }; +- return B; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff index 93a883c6db..392c0fd577 100644 --- a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff @@ -1,23 +1,94 @@ --- old.emitClassExpressionInDeclarationFile.js +++ new.emitClassExpressionInDeclarationFile.js -@@= skipped -41, +41 lines =@@ - tags() { } - }; - exports.simpleExample = simpleExample; --var circularReference = class C { +@@= skipped -33, +33 lines =@@ + + //// [emitClassExpressionInDeclarationFile.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Test = exports.FooItem = exports.circularReference = exports.simpleExample = void 0; + exports.WithTags = WithTags; +-exports.simpleExample = /** @class */ (function () { +- function simpleExample() { +- } +- simpleExample.getTags = function () { }; +- simpleExample.prototype.tags = function () { }; +- return simpleExample; +-}()); +-exports.circularReference = /** @class */ (function () { +- function C() { +- } +- C.getTags = function (c) { return c; }; +- C.prototype.tags = function (c) { return c; }; +- return C; +-}()); ++var simpleExample = class { ++ static getTags() { } ++ tags() { } ++}; ++exports.simpleExample = simpleExample; +exports.circularReference = class C { - static getTags(c) { return c; } - tags(c) { return c; } - }; --exports.circularReference = circularReference; ++ static getTags(c) { return c; } ++ tags(c) { return c; } ++}; // repro from #15066 - class FooItem { - foo() { } +-var FooItem = /** @class */ (function () { +- function FooItem() { +- } +- FooItem.prototype.foo = function () { }; +- return FooItem; +-}()); ++class FooItem { ++ foo() { } + name; - } ++} exports.FooItem = FooItem; function WithTags(Base) { -@@= skipped -38, +38 lines =@@ +- return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- class_1.getTags = function () { }; +- class_1.prototype.tags = function () { }; +- return class_1; +- }(Base)); +-} +-var Test = /** @class */ (function (_super) { +- __extends(Test, _super); +- function Test() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Test; +-}(WithTags(FooItem))); ++ return class extends Base { ++ static getTags() { } ++ tags() { } ++ }; ++} ++class Test extends WithTags(FooItem) { ++} + exports.Test = Test; +-var test = new Test(); ++const test = new Test(); + Test.getTags(); + test.tags(); + +@@= skipped -78, +46 lines =@@ getTags(c: { tags(c: /*elided*/ any): /*elided*/ any; }): { @@ -25,4 +96,24 @@ + tags(c: any): any; }; }; - export declare class FooItem { \ No newline at end of file + export declare class FooItem { +@@= skipped -10, +10 lines =@@ + export type Constructor = new (...args: any[]) => T; + export declare function WithTags>(Base: T): { + new (...args: any[]): { +- tags(): void; + foo(): void; + name?: string; ++ tags(): void; + }; + getTags(): void; + } & T; + declare const Test_base: { + new (...args: any[]): { +- tags(): void; + foo(): void; + name?: string; ++ tags(): void; + }; + getTags(): void; + } & typeof FooItem; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.types.diff b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.types.diff index 0e0a174e1b..4a5af324ea 100644 --- a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.types.diff +++ b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.types.diff @@ -4,12 +4,12 @@ >args : any[] export function WithTags>(Base: T) { -->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >Base : T return class extends Base { -->class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >Base : FooItem @@ -19,7 +19,7 @@ export class Test extends WithTags(FooItem) {} >Test : Test ->WithTags(FooItem) : WithTags.(Anonymous class) & FooItem -->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>WithTags(FooItem) : WithTags.(Anonymous class) & FooItem +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >FooItem : typeof FooItem diff --git a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.js.diff b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.js.diff index 70ffad67fd..e2e74768b7 100644 --- a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.js.diff @@ -4,6 +4,21 @@ //// [emitClassExpressionInDeclarationFile2.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); @@ -12,16 +27,25 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Test = exports.FooItem = exports.noPrivates = void 0; exports.WithTags = WithTags; --exports.noPrivates = (_a = class { -- constructor() { +-exports.noPrivates = (_a = /** @class */ (function () { +- function class_1() { - this.p = 12; - } -- static getTags() { } -- tags() { } -- }, +- class_1.getTags = function () { }; +- class_1.prototype.tags = function () { }; +- return class_1; +- }()), - __setFunctionName(_a, "noPrivates"), - _a.ps = -1, - _a); +-// altered repro from #15066 to add private property +-var FooItem = /** @class */ (function () { +- function FooItem() { +- this.property = "capitalism"; +- } +- FooItem.prototype.foo = function () { }; +- return FooItem; +-}()); +var noPrivates = class { + static getTags() { } + tags() { } @@ -31,19 +55,41 @@ +// altered repro from #15066 to add private property +; +exports.noPrivates = noPrivates; - // altered repro from #15066 to add private property - class FooItem { -- constructor() { -- this.property = "capitalism"; -- } - foo() { } ++// altered repro from #15066 to add private property ++class FooItem { ++ foo() { } + name; + property = "capitalism"; - } ++} exports.FooItem = FooItem; function WithTags(Base) { -@@= skipped -38, +31 lines =@@ - const test = new Test(); +- return /** @class */ (function (_super) { +- __extends(class_2, _super); +- function class_2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- class_2.getTags = function () { }; +- class_2.prototype.tags = function () { }; +- return class_2; +- }(Base)); +-} +-var Test = /** @class */ (function (_super) { +- __extends(Test, _super); +- function Test() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Test; +-}(WithTags(FooItem))); ++ return class extends Base { ++ static getTags() { } ++ tags() { } ++ }; ++} ++class Test extends WithTags(FooItem) { ++} + exports.Test = Test; +-var test = new Test(); ++const test = new Test(); Test.getTags(); test.tags(); + diff --git a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.types.diff b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.types.diff index 001fabb62f..3f50fc2607 100644 --- a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile2.types.diff @@ -4,12 +4,12 @@ >args : any[] export function WithTags>(Base: T) { -->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >Base : T return class extends Base { -->class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >Base : FooItem @@ -19,7 +19,7 @@ export class Test extends WithTags(FooItem) {} >Test : Test ->WithTags(FooItem) : WithTags.(Anonymous class) & FooItem -->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T +->WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>WithTags(FooItem) : WithTags.(Anonymous class) & FooItem +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); getTags(): void; prototype: WithTags.(Anonymous class); } & T >FooItem : typeof FooItem diff --git a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=commonjs).js.diff index 2fc9e41e26..10cf4bbeb0 100644 --- a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=commonjs).js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=commonjs).js.diff @@ -1,6 +1,16 @@ --- old.emitDecoratorMetadata_isolatedModules(module=commonjs).js +++ new.emitDecoratorMetadata_isolatedModules(module=commonjs).js -@@= skipped -52, +52 lines =@@ +@@= skipped -47, +47 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.C3 = void 0; +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); ++class C3 { ++} exports.C3 = C3; //// [index.js] "use strict"; @@ -16,12 +26,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var t1 = require("./type1"); -var class3_1 = require("./class3"); --let HelloWorld = (() => { -- class HelloWorld { -- handleEvent1(event) { } // Error -- handleEvent2(event) { } // Ok -- handleEvent3(event) { return undefined; } // Ok, Error +-var HelloWorld = /** @class */ (function () { +- function HelloWorld() { - } +- HelloWorld.prototype.handleEvent1 = function (event) { }; // Error +- HelloWorld.prototype.handleEvent2 = function (event) { }; // Ok +- HelloWorld.prototype.handleEvent3 = function (event) { return undefined; }; // Ok, Error - __decorate([ - EventListener('1'), - __metadata("design:type", Function), @@ -53,7 +63,7 @@ - __metadata("design:returntype", Object) - ], HelloWorld.prototype, "handleEvent3", null); - return HelloWorld; --})(); +-}()); +class HelloWorld { + @EventListener('1') + handleEvent1(event) { } // Error diff --git a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=esnext).js.diff b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=esnext).js.diff index d6e0b1b851..48a99aaed1 100644 --- a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=esnext).js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_isolatedModules(module=esnext).js.diff @@ -1,8 +1,17 @@ --- old.emitDecoratorMetadata_isolatedModules(module=esnext).js +++ new.emitDecoratorMetadata_isolatedModules(module=esnext).js -@@= skipped -45, +45 lines =@@ - export class C3 { - } +@@= skipped -42, +42 lines =@@ + //// [type2.js] + export {}; + //// [class3.js] +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); +-export { C3 }; ++export class C3 { ++} //// [index.js] -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; @@ -15,12 +24,12 @@ -}; -import * as t1 from "./type1"; -import { C3 } from "./class3"; --let HelloWorld = (() => { -- class HelloWorld { -- handleEvent1(event) { } // Error -- handleEvent2(event) { } // Ok -- handleEvent3(event) { return undefined; } // Ok, Error +-var HelloWorld = /** @class */ (function () { +- function HelloWorld() { - } +- HelloWorld.prototype.handleEvent1 = function (event) { }; // Error +- HelloWorld.prototype.handleEvent2 = function (event) { }; // Ok +- HelloWorld.prototype.handleEvent3 = function (event) { return undefined; }; // Ok, Error - __decorate([ - EventListener('1'), - __metadata("design:type", Function), @@ -52,7 +61,7 @@ - __metadata("design:returntype", Object) - ], HelloWorld.prototype, "handleEvent3", null); - return HelloWorld; --})(); +-}()); +class HelloWorld { + @EventListener('1') + handleEvent1(event) { } // Error diff --git a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_object.js.diff b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_object.js.diff index 0da589efcf..85053f553c 100644 --- a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_object.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_object.js.diff @@ -13,11 +13,10 @@ -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; --let A = (() => { -- let A = class A { -- constructor(hi) { } -- method(there) { } -- }; +-var A = /** @class */ (function () { +- function A(hi) { +- } +- A.prototype.method = function (there) { }; - __decorate([ - MyMethodDecorator, - __metadata("design:type", Function), @@ -29,7 +28,7 @@ - __metadata("design:paramtypes", [Object]) - ], A); - return A; --})(); +-}()); +@MyClassDecorator +class A { + constructor(hi) { } diff --git a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_restArgs.js.diff b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_restArgs.js.diff index 279f00977e..bcb5161e1d 100644 --- a/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_restArgs.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitDecoratorMetadata_restArgs.js.diff @@ -13,10 +13,18 @@ -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; --let A = (() => { -- let A = class A { -- constructor(...args) { } -- method(...args) { } +-var A = /** @class */ (function () { +- function A() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- } +- A.prototype.method = function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } - }; - __decorate([ - MyMethodDecorator, @@ -29,11 +37,19 @@ - __metadata("design:paramtypes", [Object]) - ], A); - return A; --})(); --let B = (() => { -- let B = class B { -- constructor(...args) { } -- method(...args) { } +-}()); +-var B = /** @class */ (function () { +- function B() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- } +- B.prototype.method = function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } - }; - __decorate([ - MyMethodDecorator, @@ -46,7 +62,7 @@ - __metadata("design:paramtypes", [Number]) - ], B); - return B; --})(); +-}()); +@MyClassDecorator +class A { + constructor(...args) { } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js index 53fde9b752..71973e19e9 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js @@ -7,7 +7,7 @@ //// [emitMemberAccessExpression_file2.ts] /// "use strict"; -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { export class _Person { public populate(raw: any) { var res = Model.KnockoutExtentions; @@ -19,7 +19,7 @@ module Microsoft.PeopleAtWork.Model { /// /// declare var OData: any; -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { export class KnockoutExtentions { } } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js.diff b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js.diff index 128f7dff18..262d81f77a 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.js.diff @@ -10,9 +10,22 @@ - var Model; + let Model; (function (Model) { - class _Person { - populate(raw) { -@@= skipped -21, +21 lines =@@ +- var _Person = /** @class */ (function () { +- function _Person() { +- } +- _Person.prototype.populate = function (raw) { ++ class _Person { ++ populate(raw) { + var res = Model.KnockoutExtentions; +- }; +- return _Person; +- }()); ++ } ++ } + Model._Person = _Person; + })(Model = PeopleAtWork.Model || (PeopleAtWork.Model = {})); + })(PeopleAtWork = Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); +@@= skipped -24, +21 lines =@@ /// var Microsoft; (function (Microsoft) { @@ -22,5 +35,13 @@ - var Model; + let Model; (function (Model) { - class KnockoutExtentions { - } \ No newline at end of file +- var KnockoutExtentions = /** @class */ (function () { +- function KnockoutExtentions() { +- } +- return KnockoutExtentions; +- }()); ++ class KnockoutExtentions { ++ } + Model.KnockoutExtentions = KnockoutExtentions; + })(Model = PeopleAtWork.Model || (PeopleAtWork.Model = {})); + })(PeopleAtWork = Microsoft.PeopleAtWork || (Microsoft.PeopleAtWork = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols index ef1232c5e9..7c033b204b 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.symbols @@ -6,13 +6,13 @@ declare var OData: any; >OData : Symbol(OData, Decl(emitMemberAccessExpression_file3.ts, 2, 11)) -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) ->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) +>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 20), Decl(emitMemberAccessExpression_file3.ts, 3, 20)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 33), Decl(emitMemberAccessExpression_file3.ts, 3, 33)) export class KnockoutExtentions { ->KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) +>KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 40)) } } === emitMemberAccessExpression_file1.ts === @@ -23,13 +23,13 @@ module Microsoft.PeopleAtWork.Model { === emitMemberAccessExpression_file2.ts === /// "use strict"; -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { >Microsoft : Symbol(Microsoft, Decl(emitMemberAccessExpression_file2.ts, 1, 13), Decl(emitMemberAccessExpression_file3.ts, 2, 23)) ->PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 17), Decl(emitMemberAccessExpression_file3.ts, 3, 17)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) +>PeopleAtWork : Symbol(PeopleAtWork, Decl(emitMemberAccessExpression_file2.ts, 2, 20), Decl(emitMemberAccessExpression_file3.ts, 3, 20)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 33), Decl(emitMemberAccessExpression_file3.ts, 3, 33)) export class _Person { ->_Person : Symbol(_Person, Decl(emitMemberAccessExpression_file2.ts, 2, 37)) +>_Person : Symbol(_Person, Decl(emitMemberAccessExpression_file2.ts, 2, 40)) public populate(raw: any) { >populate : Symbol(_Person.populate, Decl(emitMemberAccessExpression_file2.ts, 3, 26)) @@ -37,9 +37,9 @@ module Microsoft.PeopleAtWork.Model { var res = Model.KnockoutExtentions; >res : Symbol(res, Decl(emitMemberAccessExpression_file2.ts, 5, 15)) ->Model.KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) ->Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 30), Decl(emitMemberAccessExpression_file3.ts, 3, 30)) ->KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 37)) +>Model.KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 40)) +>Model : Symbol(Model, Decl(emitMemberAccessExpression_file2.ts, 2, 33), Decl(emitMemberAccessExpression_file3.ts, 3, 33)) +>KnockoutExtentions : Symbol(KnockoutExtentions, Decl(emitMemberAccessExpression_file3.ts, 3, 40)) } } } diff --git a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types index 5e78324365..59d66b12c4 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types +++ b/testdata/baselines/reference/submodule/compiler/emitMemberAccessExpression.types @@ -6,7 +6,7 @@ declare var OData: any; >OData : any -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { >Microsoft : typeof Microsoft >PeopleAtWork : typeof PeopleAtWork >Model : typeof Model @@ -25,7 +25,7 @@ module Microsoft.PeopleAtWork.Model { "use strict"; >"use strict" : "use strict" -module Microsoft.PeopleAtWork.Model { +namespace Microsoft.PeopleAtWork.Model { >Microsoft : typeof Microsoft >PeopleAtWork : typeof PeopleAtWork >Model : typeof Model diff --git a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff b/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff index 3acf938c2e..bcc86c614d 100644 --- a/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js.diff @@ -5,9 +5,25 @@ //// [emitMethodCalledNew.js] "use strict"; -// https://github.com/microsoft/TypeScript/issues/55075 +-var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.c = exports.b = exports.a = void 0; +// https://github.com/microsoft/TypeScript/issues/55075 exports.a = { - new(x) { return x + 1; } - }; \ No newline at end of file +- new: function (x) { return x + 1; } ++ new(x) { return x + 1; } + }; + exports.b = { +- "new": function (x) { return x + 1; } +-}; +-exports.c = (_a = {}, +- _a["new"] = function (x) { return x + 1; }, +- _a); ++ "new"(x) { return x + 1; } ++}; ++exports.c = { ++ ["new"](x) { return x + 1; } ++}; + + + //// [emitMethodCalledNew.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitOneLineVariableDeclarationRemoveCommentsFalse.js.diff b/testdata/baselines/reference/submodule/compiler/emitOneLineVariableDeclarationRemoveCommentsFalse.js.diff index 227efecf76..37f2bb0f39 100644 --- a/testdata/baselines/reference/submodule/compiler/emitOneLineVariableDeclarationRemoveCommentsFalse.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitOneLineVariableDeclarationRemoveCommentsFalse.js.diff @@ -1,16 +1,20 @@ --- old.emitOneLineVariableDeclarationRemoveCommentsFalse.js +++ new.emitOneLineVariableDeclarationRemoveCommentsFalse.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + //// [emitOneLineVariableDeclarationRemoveCommentsFalse.js] - let a = /*[[${something}]]*/ {}; --let b = /*[[${something}]]*/ {}; --let c = /*[[${something}]]*/ { hoge: true }; --let d /*[[${something}]]*/ = {}; +-var a = /*[[${something}]]*/ {}; +-var b = /*[[${something}]]*/ {}; +-var c = /*[[${something}]]*/ { hoge: true }; +-var d /*[[${something}]]*/ = {}; +-var e /*[[${something}]]*/ = {}; +-var f = /* comment1 */ d(e); +-var g = /* comment2 */ d(e); ++let a = /*[[${something}]]*/ {}; +let b = {}; +let c = { hoge: true }; +let d = {}; - let e /*[[${something}]]*/ = {}; - let f = /* comment1 */ d(e); --let g = /* comment2 */ d(e); ++let e /*[[${something}]]*/ = {}; ++let f = /* comment1 */ d(e); +let g = d(e); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitSkipsThisWithRestParameter.js.diff b/testdata/baselines/reference/submodule/compiler/emitSkipsThisWithRestParameter.js.diff new file mode 100644 index 0000000000..a62c73dc51 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitSkipsThisWithRestParameter.js.diff @@ -0,0 +1,15 @@ +--- old.emitSkipsThisWithRestParameter.js ++++ new.emitSkipsThisWithRestParameter.js +@@= skipped -9, +9 lines =@@ + + //// [emitSkipsThisWithRestParameter.js] + function rebase(fn) { +- return function () { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } ++ return function (...args) { + return fn.apply(this, [this].concat(args)); + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js.diff b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js.diff index 6f1e0e132d..085fd32052 100644 --- a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitParameterPropertyDeclaration1.js.diff @@ -1,19 +1,52 @@ --- old.emitSuperCallBeforeEmitParameterPropertyDeclaration1.js +++ new.emitSuperCallBeforeEmitParameterPropertyDeclaration1.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [emitSuperCallBeforeEmitParameterPropertyDeclaration1.js] - class A { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { - this.blub = 6; - } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B(x) { +- "use strict"; +- 'someStringForEgngInject'; +- var _this = _super.call(this) || this; +- _this.x = x; +- return _this; +- } +- return B; +-}(A)); ++class A { + blub = 6; - } - class B extends A { ++} ++class B extends A { + x; - constructor(x) { ++ constructor(x) { ++ "use strict"; ++ 'someStringForEgngInject'; + "use strict"; + 'someStringForEgngInject'; - "use strict"; - 'someStringForEgngInject'; - super(); \ No newline at end of file ++ super(); ++ this.x = x; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclaration1.js.diff b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclaration1.js.diff index 24edb87295..c55c687deb 100644 --- a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclaration1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclaration1.js.diff @@ -1,22 +1,51 @@ --- old.emitSuperCallBeforeEmitPropertyDeclaration1.js +++ new.emitSuperCallBeforeEmitPropertyDeclaration1.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + } //// [emitSuperCallBeforeEmitPropertyDeclaration1.js] - class A { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { - this.blub = 6; - } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- "use strict"; +- 'someStringForEgngInject'; +- var _this = _super.call(this) || this; +- _this.blub = 12; +- return _this; +- } +- return B; +-}(A)); ++class A { + blub = 6; - } - class B extends A { ++} ++class B extends A { + blub = 12; - constructor() { ++ constructor() { ++ "use strict"; ++ 'someStringForEgngInject'; + "use strict"; + 'someStringForEgngInject'; - "use strict"; - 'someStringForEgngInject'; - super(); -- this.blub = 12; - } - } \ No newline at end of file ++ super(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js.diff b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js.diff index ab9d334c74..7d24bd7b28 100644 --- a/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js.diff @@ -1,24 +1,54 @@ --- old.emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js +++ new.emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + } //// [emitSuperCallBeforeEmitPropertyDeclarationAndParameterPropertyDeclaration1.js] - class A { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { - this.blub = 6; - } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B(x) { +- "use strict"; +- 'someStringForEgngInject'; +- var _this = _super.call(this) || this; +- _this.x = x; +- _this.blah = 2; +- return _this; +- } +- return B; +-}(A)); ++class A { + blub = 6; - } - class B extends A { ++} ++class B extends A { + x; + blah = 2; - constructor(x) { - "use strict"; - 'someStringForEgngInject'; ++ constructor(x) { ++ "use strict"; ++ 'someStringForEgngInject'; + "use strict"; + 'someStringForEgngInject'; - super(); - this.x = x; -- this.blah = 2; - } - } \ No newline at end of file ++ super(); ++ this.x = x; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitThisInObjectLiteralGetter.js.diff b/testdata/baselines/reference/submodule/compiler/emitThisInObjectLiteralGetter.js.diff new file mode 100644 index 0000000000..874299703c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitThisInObjectLiteralGetter.js.diff @@ -0,0 +1,14 @@ +--- old.emitThisInObjectLiteralGetter.js ++++ new.emitThisInObjectLiteralGetter.js +@@= skipped -8, +8 lines =@@ + + + //// [emitThisInObjectLiteralGetter.js] +-var example = { ++const example = { + get foo() { +- var _this = this; +- return function (item) { return _this.bar(item); }; ++ return item => this.bar(item); + } + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitThisInSuperMethodCall.js.diff b/testdata/baselines/reference/submodule/compiler/emitThisInSuperMethodCall.js.diff new file mode 100644 index 0000000000..84eaeafc9c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emitThisInSuperMethodCall.js.diff @@ -0,0 +1,78 @@ +--- old.emitThisInSuperMethodCall.js ++++ new.emitThisInSuperMethodCall.js +@@= skipped -29, +29 lines =@@ + + + //// [emitThisInSuperMethodCall.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var User = /** @class */ (function () { +- function User() { +- } +- User.prototype.sayHello = function () { +- }; +- return User; +-}()); +-var RegisteredUser = /** @class */ (function (_super) { +- __extends(RegisteredUser, _super); +- function RegisteredUser() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- RegisteredUser.prototype.f = function () { +- (function () { ++class User { ++ sayHello() { ++ } ++} ++class RegisteredUser extends User { ++ f() { ++ () => { + function inner() { +- _super.sayHello.call(this); ++ super.sayHello(); + } +- }); +- }; +- RegisteredUser.prototype.g = function () { +- function inner() { +- var _this = this; +- (function () { +- _super.sayHello.call(_this); +- }); +- } +- }; +- RegisteredUser.prototype.h = function () { +- function inner() { +- _super.sayHello.call(this); +- } +- }; +- return RegisteredUser; +-}(User)); ++ }; ++ } ++ g() { ++ function inner() { ++ () => { ++ super.sayHello(); ++ }; ++ } ++ } ++ h() { ++ function inner() { ++ super.sayHello(); ++ } ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).js.diff b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).js.diff new file mode 100644 index 0000000000..156e714989 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).js.diff @@ -0,0 +1,11 @@ +--- old.emptyAnonymousObjectNarrowing(strictnullchecks=false).js ++++ new.emptyAnonymousObjectNarrowing(strictnullchecks=false).js +@@= skipped -129, +129 lines =@@ + nonNull; + } + // Repro from #50567 +-var foo = function (value) { ++const foo = (value) => { + if (!value) { + return 'foo'; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).types.diff b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).types.diff new file mode 100644 index 0000000000..099388f2e6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=false).types.diff @@ -0,0 +1,18 @@ +--- old.emptyAnonymousObjectNarrowing(strictnullchecks=false).types ++++ new.emptyAnonymousObjectNarrowing(strictnullchecks=false).types +@@= skipped -70, +70 lines =@@ + } + + declare let union: "xyz" | { a: string } | undefined; +->union : { a: string; } | "xyz" ++>union : "xyz" | { a: string; } + >a : string + + if (nonNull === union) { + >nonNull === union : boolean + >nonNull : {} +->union : { a: string; } | "xyz" ++>union : "xyz" | { a: string; } + + nonNull; + >nonNull : {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).js.diff b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).js.diff new file mode 100644 index 0000000000..2efdeb82b1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).js.diff @@ -0,0 +1,11 @@ +--- old.emptyAnonymousObjectNarrowing(strictnullchecks=true).js ++++ new.emptyAnonymousObjectNarrowing(strictnullchecks=true).js +@@= skipped -129, +129 lines =@@ + nonNull; + } + // Repro from #50567 +-var foo = function (value) { ++const foo = (value) => { + if (!value) { + return 'foo'; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).types.diff b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).types.diff new file mode 100644 index 0000000000..a3ff4b5063 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyAnonymousObjectNarrowing(strictnullchecks=true).types.diff @@ -0,0 +1,18 @@ +--- old.emptyAnonymousObjectNarrowing(strictnullchecks=true).types ++++ new.emptyAnonymousObjectNarrowing(strictnullchecks=true).types +@@= skipped -70, +70 lines =@@ + } + + declare let union: "xyz" | { a: string } | undefined; +->union : { a: string; } | "xyz" | undefined ++>union : "xyz" | { a: string; } | undefined + >a : string + + if (nonNull === union) { + >nonNull === union : boolean + >nonNull : {} +->union : { a: string; } | "xyz" | undefined ++>union : "xyz" | { a: string; } | undefined + + nonNull; + >nonNull : {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyArrayDestructuringExpressionVisitedByTransformer.js.diff b/testdata/baselines/reference/submodule/compiler/emptyArrayDestructuringExpressionVisitedByTransformer.js.diff new file mode 100644 index 0000000000..757fc7b911 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyArrayDestructuringExpressionVisitedByTransformer.js.diff @@ -0,0 +1,10 @@ +--- old.emptyArrayDestructuringExpressionVisitedByTransformer.js ++++ new.emptyArrayDestructuringExpressionVisitedByTransformer.js +@@= skipped -4, +4 lines =@@ + var b = [1].map(_ => _); + + //// [emptyArrayDestructuringExpressionVisitedByTransformer.js] +-var a = [1].map(function (_) { return _; }); +-var b = [1].map(function (_) { return _; }); ++var a = [] = [1].map(_ => _); ++var b = [1].map(_ => _); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyDeclarationEmitIsModule.js.diff b/testdata/baselines/reference/submodule/compiler/emptyDeclarationEmitIsModule.js.diff new file mode 100644 index 0000000000..c89b363db0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyDeclarationEmitIsModule.js.diff @@ -0,0 +1,16 @@ +--- old.emptyDeclarationEmitIsModule.js ++++ new.emptyDeclarationEmitIsModule.js +@@= skipped -14, +14 lines =@@ + //// [module.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + + + //// [index.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyGenericParamList.js.diff b/testdata/baselines/reference/submodule/compiler/emptyGenericParamList.js.diff new file mode 100644 index 0000000000..64cb4f2fb7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyGenericParamList.js.diff @@ -0,0 +1,14 @@ +--- old.emptyGenericParamList.js ++++ new.emptyGenericParamList.js +@@= skipped -4, +4 lines =@@ + var x: I<>; + + //// [emptyGenericParamList.js] +-var I = /** @class */ (function () { +- function I() { +- } +- return I; +-}()); ++class I { ++} + var x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyModuleName.js.diff b/testdata/baselines/reference/submodule/compiler/emptyModuleName.js.diff index a390512c39..7e8886933b 100644 --- a/testdata/baselines/reference/submodule/compiler/emptyModuleName.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emptyModuleName.js.diff @@ -1,10 +1,33 @@ --- old.emptyModuleName.js +++ new.emptyModuleName.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + //// [emptyModuleName.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var A = require(""); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +const A = require(""); - class B extends A { - } \ No newline at end of file ++class B extends A { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js.diff b/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js.diff new file mode 100644 index 0000000000..59d0bde0ed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js.diff @@ -0,0 +1,11 @@ +--- old.emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js ++++ new.emptyObjectNotSubtypeOfIndexSignatureContainingObject1.js +@@= skipped -53, +53 lines =@@ + return null; + } + function fooToBar(foos) { +- var result = foos == null ? {} : mapValues(foos, function (f) { return f.foo; }); ++ const result = foos == null ? {} : mapValues(foos, f => f.foo); + // This line _should_ fail, because `result` is not the right type. + return result; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js.diff b/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js.diff new file mode 100644 index 0000000000..1fb563c11d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js.diff @@ -0,0 +1,13 @@ +--- old.emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js ++++ new.emptyObjectNotSubtypeOfIndexSignatureContainingObject2.js +@@= skipped -54, +54 lines =@@ + return null; + } + function fooToBar(foos) { +- var wat = mapValues(foos, function (f) { return f.foo; }); +- var result = foos == null ? {} : mapValues(foos, function (f) { return f.foo; }); ++ const wat = mapValues(foos, f => f.foo); ++ const result = foos == null ? {} : mapValues(foos, f => f.foo); + // This line _should_ fail, because `result` is not the right type. + return result; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyThenWarning.js.diff b/testdata/baselines/reference/submodule/compiler/emptyThenWarning.js.diff new file mode 100644 index 0000000000..8a1853eb37 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyThenWarning.js.diff @@ -0,0 +1,11 @@ +--- old.emptyThenWarning.js ++++ new.emptyThenWarning.js +@@= skipped -10, +10 lines =@@ + //// [emptyThenWarning.js] + if (1) + ; +-var x = 0; ++let x = 0; + if (true === true) + ; + { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyThenWithoutWarning.js.diff b/testdata/baselines/reference/submodule/compiler/emptyThenWithoutWarning.js.diff new file mode 100644 index 0000000000..3aa3ec0f47 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyThenWithoutWarning.js.diff @@ -0,0 +1,14 @@ +--- old.emptyThenWithoutWarning.js ++++ new.emptyThenWithoutWarning.js +@@= skipped -9, +9 lines =@@ + } + + //// [emptyThenWithoutWarning.js] +-var a = 4; ++let a = 4; + if (a === 1 || a === 2 || a === 3) { + } + else { +- var message = "Ooops"; ++ let message = "Ooops"; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emptyTypeArgumentListWithNew.js.diff b/testdata/baselines/reference/submodule/compiler/emptyTypeArgumentListWithNew.js.diff new file mode 100644 index 0000000000..de1ab6f10d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/emptyTypeArgumentListWithNew.js.diff @@ -0,0 +1,23 @@ +--- old.emptyTypeArgumentListWithNew.js ++++ new.emptyTypeArgumentListWithNew.js +@@= skipped -8, +8 lines =@@ + new noParams<>(); + + //// [emptyTypeArgumentListWithNew.js] +-var foo = /** @class */ (function () { +- function foo() { +- } +- return foo; +-}()); ++class foo { ++} + new foo(); + // https://github.com/microsoft/TypeScript/issues/33041 +-var noParams = /** @class */ (function () { +- function noParams() { +- } +- return noParams; +-}()); ++class noParams { ++} + new noParams(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.errors.txt index 277f7a39c7..12f9134868 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.errors.txt @@ -8,7 +8,7 @@ enumAssignmentCompat.ts(34,5): error TS2322: Type '3' is not assignable to type ==== enumAssignmentCompat.ts (7 errors) ==== - module W { + namespace W { export class D { } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js index 3238559321..bd06719158 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumAssignmentCompat.ts] //// //// [enumAssignmentCompat.ts] -module W { +namespace W { export class D { } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js.diff new file mode 100644 index 0000000000..27b9902731 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.js.diff @@ -0,0 +1,16 @@ +--- old.enumAssignmentCompat.js ++++ new.enumAssignmentCompat.js +@@= skipped -42, +42 lines =@@ + //// [enumAssignmentCompat.js] + var W; + (function (W) { +- var D = /** @class */ (function () { +- function D() { +- } +- return D; +- }()); ++ class D { ++ } + W.D = D; + })(W || (W = {})); + (function (W) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.symbols b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.symbols index 8975e39e1f..aacf299627 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/enumAssignmentCompat.ts] //// === enumAssignmentCompat.ts === -module W { +namespace W { >W : Symbol(W, Decl(enumAssignmentCompat.ts, 0, 0), Decl(enumAssignmentCompat.ts, 2, 1)) export class D { } ->D : Symbol(D, Decl(enumAssignmentCompat.ts, 0, 10)) +>D : Symbol(D, Decl(enumAssignmentCompat.ts, 0, 13)) } enum W { @@ -113,12 +113,12 @@ i = W.a; >a : Symbol(W.a, Decl(enumAssignmentCompat.ts, 4, 8)) W.D; ->W.D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 10)) +>W.D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 13)) >W : Symbol(W, Decl(enumAssignmentCompat.ts, 0, 0), Decl(enumAssignmentCompat.ts, 2, 1)) ->D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 10)) +>D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 13)) var p: W.D; >p : Symbol(p, Decl(enumAssignmentCompat.ts, 37, 3)) >W : Symbol(W, Decl(enumAssignmentCompat.ts, 0, 0), Decl(enumAssignmentCompat.ts, 2, 1)) ->D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 10)) +>D : Symbol(W.D, Decl(enumAssignmentCompat.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.types b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.types index 0dfcd59c10..ae9a7604bb 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.types +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumAssignmentCompat.ts] //// === enumAssignmentCompat.ts === -module W { +namespace W { >W : typeof W export class D { } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.errors.txt index 1921f57eb3..ceac94ac5d 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.errors.txt @@ -14,7 +14,7 @@ enumAssignmentCompat2.ts(33,5): error TS2322: Type '3' is not assignable to type } - module W { + namespace W { export class D { } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js index 6a9b5a5388..3d1c9b6867 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js @@ -7,7 +7,7 @@ enum W { } -module W { +namespace W { export class D { } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js.diff new file mode 100644 index 0000000000..6ba94b7dca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.js.diff @@ -0,0 +1,16 @@ +--- old.enumAssignmentCompat2.js ++++ new.enumAssignmentCompat2.js +@@= skipped -46, +46 lines =@@ + W[W["c"] = 2] = "c"; + })(W || (W = {})); + (function (W) { +- var D = /** @class */ (function () { +- function D() { +- } +- return D; +- }()); ++ class D { ++ } + W.D = D; + })(W || (W = {})); + var x = W; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.symbols b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.symbols index 78a66eafa4..91165d835b 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.symbols @@ -11,11 +11,11 @@ enum W { } -module W { +namespace W { >W : Symbol(W, Decl(enumAssignmentCompat2.ts, 0, 0), Decl(enumAssignmentCompat2.ts, 4, 1)) export class D { } ->D : Symbol(D, Decl(enumAssignmentCompat2.ts, 6, 10)) +>D : Symbol(D, Decl(enumAssignmentCompat2.ts, 6, 13)) } interface WStatic { @@ -112,12 +112,12 @@ i = W.a; >a : Symbol(W.a, Decl(enumAssignmentCompat2.ts, 0, 8)) W.D; ->W.D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 10)) +>W.D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 13)) >W : Symbol(W, Decl(enumAssignmentCompat2.ts, 0, 0), Decl(enumAssignmentCompat2.ts, 4, 1)) ->D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 10)) +>D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 13)) var p: W.D; >p : Symbol(p, Decl(enumAssignmentCompat2.ts, 36, 3)) >W : Symbol(W, Decl(enumAssignmentCompat2.ts, 0, 0), Decl(enumAssignmentCompat2.ts, 4, 1)) ->D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 10)) +>D : Symbol(W.D, Decl(enumAssignmentCompat2.ts, 6, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.types b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.types index 6c36e1b154..6cd0f031dd 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.types +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat2.types @@ -11,7 +11,7 @@ enum W { } -module W { +namespace W { >W : typeof W export class D { } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt index 77801be402..6c5d9688a5 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.errors.txt @@ -72,7 +72,7 @@ enumAssignmentCompat3.ts(87,1): error TS2322: Type 'First.E' is not assignable t export enum E { a, b, c } - export module E { + export namespace E { export let d = 5; } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js index 6a8800121e..2ec2230e47 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js @@ -52,7 +52,7 @@ namespace Merged2 { export enum E { a, b, c } - export module E { + export namespace E { export let d = 5; } } diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js.diff new file mode 100644 index 0000000000..64bfc63e69 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.js.diff @@ -0,0 +1,72 @@ +--- old.enumAssignmentCompat3.js ++++ new.enumAssignmentCompat3.js +@@= skipped -93, +93 lines =@@ + //// [enumAssignmentCompat3.js] + var First; + (function (First) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +@@= skipped -9, +9 lines =@@ + })(First || (First = {})); + var Abc; + (function (Abc) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; + E[E["c"] = 2] = "c"; + })(E = Abc.E || (Abc.E = {})); +- var Nope; ++ let Nope; + (function (Nope) { + Nope[Nope["a"] = 0] = "a"; + Nope[Nope["b"] = 1] = "b"; +@@= skipped -15, +15 lines =@@ + })(Abc || (Abc = {})); + var Abcd; + (function (Abcd) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +@@= skipped -10, +10 lines =@@ + })(Abcd || (Abcd = {})); + var Ab; + (function (Ab) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +@@= skipped -8, +8 lines =@@ + })(Ab || (Ab = {})); + var Cd; + (function (Cd) { +- var E; ++ let E; + (function (E) { + E[E["c"] = 0] = "c"; + E[E["d"] = 1] = "d"; +@@= skipped -11, +11 lines =@@ + })(Decl || (Decl = {})); + var Merged; + (function (Merged) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; +@@= skipped -12, +12 lines =@@ + })(Merged || (Merged = {})); + var Merged2; + (function (Merged2) { +- var E; ++ let E; + (function (E) { + E[E["a"] = 0] = "a"; + E[E["b"] = 1] = "b"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.symbols b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.symbols index 00ee430fc6..7b8ff5fc9e 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.symbols @@ -122,7 +122,7 @@ namespace Merged2 { >b : Symbol(E.b, Decl(enumAssignmentCompat3.ts, 49, 10)) >c : Symbol(E.c, Decl(enumAssignmentCompat3.ts, 49, 13)) } - export module E { + export namespace E { >E : Symbol(E, Decl(enumAssignmentCompat3.ts, 47, 19), Decl(enumAssignmentCompat3.ts, 50, 5)) export let d = 5; diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.types b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.types index e1f98a739c..46dd3d4839 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.types +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat3.types @@ -122,7 +122,7 @@ namespace Merged2 { >b : E.b >c : E.c } - export module E { + export namespace E { >E : typeof E export let d = 5; diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.js.diff new file mode 100644 index 0000000000..ba826d238d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat4.js.diff @@ -0,0 +1,29 @@ +--- old.enumAssignmentCompat4.js ++++ new.enumAssignmentCompat4.js +@@= skipped -27, +27 lines =@@ + //// [enumAssignmentCompat4.js] + var M; + (function (M) { +- var MyEnum; ++ let MyEnum; + (function (MyEnum) { + MyEnum[MyEnum["BAR"] = 0] = "BAR"; + })(MyEnum = M.MyEnum || (M.MyEnum = {})); +@@= skipped -10, +10 lines =@@ + })(M || (M = {})); + var N; + (function (N) { +- var MyEnum; ++ let MyEnum; + (function (MyEnum) { + MyEnum[MyEnum["FOO"] = 0] = "FOO"; + })(MyEnum = N.MyEnum || (N.MyEnum = {})); +@@= skipped -9, +9 lines =@@ + foo: MyEnum.FOO + }; + })(N || (N = {})); +-var broken = [ ++let broken = [ + N.object1, + M.object2 + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat5.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat5.js.diff new file mode 100644 index 0000000000..a2c2d9d01d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat5.js.diff @@ -0,0 +1,22 @@ +--- old.enumAssignmentCompat5.js ++++ new.enumAssignmentCompat5.js +@@= skipped -38, +38 lines =@@ + Computed[Computed["B"] = 4] = "B"; + Computed[Computed["C"] = 8] = "C"; + })(Computed || (Computed = {})); +-var n; +-var e = n; // ok because it's too inconvenient otherwise ++let n; ++let e = n; // ok because it's too inconvenient otherwise + e = 0; // ok, in range + e = 4; // ok, out of range, but allowed computed enums don't have all members +-var a = 0; // ok, A === 0 ++let a = 0; // ok, A === 0 + a = 2; // error, 2 !== 0 + a = n; // ok +-var c = n; // ok ++let c = n; // ok + c = n; // ok + c = 4; // ok +-var ca = 1; // error, Computed.A isn't a literal type because Computed has no enum literals ++let ca = 1; // error, Computed.A isn't a literal type because Computed has no enum literals \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.js.diff new file mode 100644 index 0000000000..9bf328c4e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat6.js.diff @@ -0,0 +1,39 @@ +--- old.enumAssignmentCompat6.js ++++ new.enumAssignmentCompat6.js +@@= skipped -80, +80 lines =@@ + //// [a.js] + var numerics; + (function (numerics) { +- var DiagnosticCategory; ++ let DiagnosticCategory; + (function (DiagnosticCategory) { + DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; + DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; + })(DiagnosticCategory = numerics.DiagnosticCategory || (numerics.DiagnosticCategory = {})); +- var DiagnosticCategory2; ++ let DiagnosticCategory2; + (function (DiagnosticCategory2) { + DiagnosticCategory2[DiagnosticCategory2["Warning"] = 0] = "Warning"; + DiagnosticCategory2[DiagnosticCategory2["Error"] = 1] = "Error"; +@@= skipped -17, +17 lines =@@ + })(numerics || (numerics = {})); + var strings; + (function (strings) { +- var DiagnosticCategory; ++ let DiagnosticCategory; + (function (DiagnosticCategory) { + DiagnosticCategory["Warning"] = "Warning"; + DiagnosticCategory["Error"] = "Error"; +@@= skipped -35, +35 lines =@@ + DiagnosticCategory[DiagnosticCategory["Suggestion"] = 2] = "Suggestion"; + DiagnosticCategory[DiagnosticCategory["Message"] = 3] = "Message"; + })(DiagnosticCategory || (exports.DiagnosticCategory = DiagnosticCategory = {})); +-(function () { +- var DiagnosticCategory; ++(() => { ++ let DiagnosticCategory; + (function (DiagnosticCategory) { + DiagnosticCategory["Warning"] = "Warning"; + DiagnosticCategory["Error"] = "Error"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.js.diff b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.js.diff index 469f25365b..2379a21137 100644 --- a/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/enumAssignmentCompat7.js.diff @@ -5,6 +5,61 @@ //// [enumAssignmentCompat7.js] -"use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var first; (function (first) { - let E; \ No newline at end of file +- var E; ++ let E; + (function (E) { + E[E["A"] = 1] = "A"; + })(E = first.E || (first.E = {})); + })(first || (first = {})); + var second; + (function (second) { +- var E; ++ let E; + (function (E) { + E[E["A"] = 2] = "A"; + })(E = second.E || (second.E = {})); + })(second || (second = {})); +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.method = function (param) { +- }; +- return Base; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Derived.prototype.method = function (param) { +- }; +- return Derived; +-}(Base)); ++class Base { ++ method(param) { ++ } ++} ++class Derived extends Base { ++ method(param) { ++ } ++} + function overloadingFunction() { + return second.E.B; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumBasics3.errors.txt b/testdata/baselines/reference/submodule/compiler/enumBasics3.errors.txt index 5342340500..31477d2ee6 100644 --- a/testdata/baselines/reference/submodule/compiler/enumBasics3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumBasics3.errors.txt @@ -3,7 +3,7 @@ enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. ==== enumBasics3.ts (2 errors) ==== - module M { + namespace M { export namespace N { export enum E1 { a = 1, @@ -14,7 +14,7 @@ enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. } } - module M { + namespace M { export namespace N { export enum E2 { b = M.N.E1.a, diff --git a/testdata/baselines/reference/submodule/compiler/enumBasics3.js b/testdata/baselines/reference/submodule/compiler/enumBasics3.js index 4f87ae6fb9..30f16de792 100644 --- a/testdata/baselines/reference/submodule/compiler/enumBasics3.js +++ b/testdata/baselines/reference/submodule/compiler/enumBasics3.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumBasics3.ts] //// //// [enumBasics3.ts] -module M { +namespace M { export namespace N { export enum E1 { a = 1, @@ -10,7 +10,7 @@ module M { } } -module M { +namespace M { export namespace N { export enum E2 { b = M.N.E1.a, diff --git a/testdata/baselines/reference/submodule/compiler/enumBasics3.js.diff b/testdata/baselines/reference/submodule/compiler/enumBasics3.js.diff index 26b73e2291..cd9f78d88a 100644 --- a/testdata/baselines/reference/submodule/compiler/enumBasics3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/enumBasics3.js.diff @@ -1,7 +1,14 @@ --- old.enumBasics3.js +++ new.enumBasics3.js -@@= skipped -27, +27 lines =@@ - let E1; +@@= skipped -22, +22 lines =@@ + //// [enumBasics3.js] + var M; + (function (M) { +- var N; ++ let N; + (function (N) { +- var E1; ++ let E1; (function (E1) { E1[E1["a"] = 1] = "a"; - E1[E1["b"] = E1.a.a] = "b"; @@ -10,9 +17,12 @@ })(E1 = N.E1 || (N.E1 = {})); })(N = M.N || (M.N = {})); })(M || (M = {})); -@@= skipped -9, +10 lines =@@ + (function (M) { +- var N; ++ let N; (function (N) { - let E2; +- var E2; ++ let E2; (function (E2) { - E2[E2["b"] = 1] = "b"; - E2[E2["c"] = M.N.E1.a.a] = "c"; diff --git a/testdata/baselines/reference/submodule/compiler/enumBasics3.symbols b/testdata/baselines/reference/submodule/compiler/enumBasics3.symbols index c8636ab5a3..99cefe0fea 100644 --- a/testdata/baselines/reference/submodule/compiler/enumBasics3.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumBasics3.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/enumBasics3.ts] //// === enumBasics3.ts === -module M { +namespace M { >M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1)) export namespace N { ->N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) export enum E1 { >E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22)) @@ -20,11 +20,11 @@ module M { } } -module M { +namespace M { >M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1)) export namespace N { ->N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) export enum E2 { >E2 : Symbol(E2, Decl(enumBasics3.ts, 10, 22)) @@ -33,9 +33,9 @@ module M { >b : Symbol(E2.b, Decl(enumBasics3.ts, 11, 20)) >M.N.E1.a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20)) >M.N.E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22)) ->M.N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>M.N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) >M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1)) ->N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) >E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22)) >a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20)) @@ -43,9 +43,9 @@ module M { >c : Symbol(E2.c, Decl(enumBasics3.ts, 12, 19)) >M.N.E1.a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20)) >M.N.E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22)) ->M.N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>M.N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) >M : Symbol(M, Decl(enumBasics3.ts, 0, 0), Decl(enumBasics3.ts, 7, 1)) ->N : Symbol(N, Decl(enumBasics3.ts, 0, 10), Decl(enumBasics3.ts, 9, 10)) +>N : Symbol(N, Decl(enumBasics3.ts, 0, 13), Decl(enumBasics3.ts, 9, 13)) >E1 : Symbol(E1, Decl(enumBasics3.ts, 1, 22)) >a : Symbol(E1.a, Decl(enumBasics3.ts, 2, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/enumBasics3.types b/testdata/baselines/reference/submodule/compiler/enumBasics3.types index ab3fd9b135..74bb7b64ff 100644 --- a/testdata/baselines/reference/submodule/compiler/enumBasics3.types +++ b/testdata/baselines/reference/submodule/compiler/enumBasics3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumBasics3.ts] //// === enumBasics3.ts === -module M { +namespace M { >M : typeof M export namespace N { @@ -23,7 +23,7 @@ module M { } } -module M { +namespace M { >M : typeof M export namespace N { diff --git a/testdata/baselines/reference/submodule/compiler/enumDecl1.js b/testdata/baselines/reference/submodule/compiler/enumDecl1.js index 65680b23e5..5d90868cbd 100644 --- a/testdata/baselines/reference/submodule/compiler/enumDecl1.js +++ b/testdata/baselines/reference/submodule/compiler/enumDecl1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumDecl1.ts] //// //// [enumDecl1.ts] -declare module mAmbient { +declare namespace mAmbient { enum e { x, y, diff --git a/testdata/baselines/reference/submodule/compiler/enumDecl1.symbols b/testdata/baselines/reference/submodule/compiler/enumDecl1.symbols index b9085e522e..75717ff64c 100644 --- a/testdata/baselines/reference/submodule/compiler/enumDecl1.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumDecl1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/enumDecl1.ts] //// === enumDecl1.ts === -declare module mAmbient { +declare namespace mAmbient { >mAmbient : Symbol(mAmbient, Decl(enumDecl1.ts, 0, 0)) enum e { ->e : Symbol(e, Decl(enumDecl1.ts, 0, 25)) +>e : Symbol(e, Decl(enumDecl1.ts, 0, 28)) x, >x : Symbol(e.x, Decl(enumDecl1.ts, 1, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/enumDecl1.types b/testdata/baselines/reference/submodule/compiler/enumDecl1.types index 361a8618c0..fed17988de 100644 --- a/testdata/baselines/reference/submodule/compiler/enumDecl1.types +++ b/testdata/baselines/reference/submodule/compiler/enumDecl1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumDecl1.ts] //// === enumDecl1.ts === -declare module mAmbient { +declare namespace mAmbient { >mAmbient : typeof mAmbient enum e { diff --git a/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.js.diff b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.js.diff new file mode 100644 index 0000000000..c01f7e7b11 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumGenericTypeClash.js.diff @@ -0,0 +1,16 @@ +--- old.enumGenericTypeClash.js ++++ new.enumGenericTypeClash.js +@@= skipped -5, +5 lines =@@ + + + //// [enumGenericTypeClash.js] +-var X = /** @class */ (function () { +- function X() { +- } +- return X; +-}()); ++class X { ++} + (function (X) { + X[X["MyVal"] = 0] = "MyVal"; + })(X || (X = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumIndexer.js.diff b/testdata/baselines/reference/submodule/compiler/enumIndexer.js.diff new file mode 100644 index 0000000000..dc7df46161 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumIndexer.js.diff @@ -0,0 +1,8 @@ +--- old.enumIndexer.js ++++ new.enumIndexer.js +@@= skipped -16, +16 lines =@@ + })(MyEnumType || (MyEnumType = {})); + var _arr = [{ key: 'foo' }, { key: 'bar' }]; + var enumValue = MyEnumType.foo; +-var x = _arr.map(function (o) { return MyEnumType[o.key] === enumValue; }); // these are not same type ++var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.errors.txt b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.errors.txt index f33a845975..b74001920c 100644 --- a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.errors.txt @@ -6,23 +6,23 @@ enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is n ==== enumLiteralAssignableToEnumInsideUnion.ts (5 errors) ==== - module X { + namespace X { export enum Foo { A, B } } - module Y { + namespace Y { export enum Foo { A, B } } - module Z { + namespace Z { export enum Foo { A = 1 << 1, B = 1 << 2, } } - module Ka { + namespace Ka { export enum Foo { A = 1 << 10, B = 1 << 11, diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js index a7b1563231..15022f8ec9 100644 --- a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js @@ -1,23 +1,23 @@ //// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// //// [enumLiteralAssignableToEnumInsideUnion.ts] -module X { +namespace X { export enum Foo { A, B } } -module Y { +namespace Y { export enum Foo { A, B } } -module Z { +namespace Z { export enum Foo { A = 1 << 1, B = 1 << 2, } } -module Ka { +namespace Ka { export enum Foo { A = 1 << 10, B = 1 << 11, diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js.diff b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js.diff new file mode 100644 index 0000000000..5585e1758a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.js.diff @@ -0,0 +1,52 @@ +--- old.enumLiteralAssignableToEnumInsideUnion.js ++++ new.enumLiteralAssignableToEnumInsideUnion.js +@@= skipped -33, +33 lines =@@ + //// [enumLiteralAssignableToEnumInsideUnion.js] + var X; + (function (X) { +- var Foo; ++ let Foo; + (function (Foo) { + Foo[Foo["A"] = 0] = "A"; + Foo[Foo["B"] = 1] = "B"; +@@= skipped -8, +8 lines =@@ + })(X || (X = {})); + var Y; + (function (Y) { +- var Foo; ++ let Foo; + (function (Foo) { + Foo[Foo["A"] = 0] = "A"; + Foo[Foo["B"] = 1] = "B"; +@@= skipped -8, +8 lines =@@ + })(Y || (Y = {})); + var Z; + (function (Z) { +- var Foo; ++ let Foo; + (function (Foo) { + Foo[Foo["A"] = 2] = "A"; + Foo[Foo["B"] = 4] = "B"; +@@= skipped -8, +8 lines =@@ + })(Z || (Z = {})); + var Ka; + (function (Ka) { +- var Foo; ++ let Foo; + (function (Foo) { + Foo[Foo["A"] = 1024] = "A"; + Foo[Foo["B"] = 2048] = "B"; + })(Foo = Ka.Foo || (Ka.Foo = {})); + })(Ka || (Ka = {})); +-var e0 = Y.Foo.A; // ok +-var e1 = Z.Foo.A; // not legal, Z is computed +-var e2 = Z.Foo.A; // still not legal +-var e3 = Z.Foo.A; // not legal +-var e4 = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A +-var e5 = Z.Foo.A; // ok ++const e0 = Y.Foo.A; // ok ++const e1 = Z.Foo.A; // not legal, Z is computed ++const e2 = Z.Foo.A; // still not legal ++const e3 = Z.Foo.A; // not legal ++const e4 = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A ++const e5 = Z.Foo.A; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.symbols b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.symbols index 3255742fdb..e60faeb949 100644 --- a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.symbols @@ -1,33 +1,33 @@ //// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// === enumLiteralAssignableToEnumInsideUnion.ts === -module X { +namespace X { >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) export enum Foo { ->Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) A, B >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 1, 21)) >B : Symbol(Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 2, 10)) } } -module Y { +namespace Y { >Y : Symbol(Y, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 4, 1)) export enum Foo { ->Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 10)) +>Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 13)) A, B >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 6, 21)) >B : Symbol(Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 7, 10)) } } -module Z { +namespace Z { >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) export enum Foo { ->Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) A = 1 << 1, >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) @@ -36,11 +36,11 @@ module Z { >B : Symbol(Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 12, 19)) } } -module Ka { +namespace Ka { >Ka : Symbol(Ka, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 15, 1)) export enum Foo { ->Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 16, 11)) +>Foo : Symbol(Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 16, 14)) A = 1 << 10, >A : Symbol(Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 17, 21)) @@ -52,66 +52,66 @@ module Ka { const e0: X.Foo | boolean = Y.Foo.A; // ok >e0 : Symbol(e0, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 22, 5)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >Y.Foo.A : Symbol(Y.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 6, 21)) ->Y.Foo : Symbol(Y.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 10)) +>Y.Foo : Symbol(Y.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 13)) >Y : Symbol(Y, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 4, 1)) ->Foo : Symbol(Y.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 10)) +>Foo : Symbol(Y.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 5, 13)) >A : Symbol(Y.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 6, 21)) const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed >e1 : Symbol(e1, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 23, 5)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >Z.Foo.A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) ->Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) ->Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal >e2 : Symbol(e2, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 24, 5)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >A : Symbol(X.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 1, 21)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >B : Symbol(X.Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 2, 10)) >Z.Foo.A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) ->Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) ->Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) const e3: X.Foo.B | boolean = Z.Foo.A; // not legal >e3 : Symbol(e3, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 25, 5)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >B : Symbol(X.Foo.B, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 2, 10)) >Z.Foo.A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) ->Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) ->Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A >e4 : Symbol(e4, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 26, 5)) >X : Symbol(X, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 0)) ->Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 10)) +>Foo : Symbol(X.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 0, 13)) >A : Symbol(X.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 1, 21)) >Z.Foo.A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) ->Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) ->Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) const e5: Ka.Foo | boolean = Z.Foo.A; // ok >e5 : Symbol(e5, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 27, 5)) >Ka : Symbol(Ka, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 15, 1)) ->Foo : Symbol(Ka.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 16, 11)) +>Foo : Symbol(Ka.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 16, 14)) >Z.Foo.A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) ->Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Z.Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >Z : Symbol(Z, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 9, 1)) ->Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 10)) +>Foo : Symbol(Z.Foo, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 10, 13)) >A : Symbol(Z.Foo.A, Decl(enumLiteralAssignableToEnumInsideUnion.ts, 11, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.types b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.types index 80329c4f2c..0e828e9354 100644 --- a/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.types +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralAssignableToEnumInsideUnion.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// === enumLiteralAssignableToEnumInsideUnion.ts === -module X { +namespace X { >X : typeof X export enum Foo { @@ -12,7 +12,7 @@ module X { >B : Foo.B } } -module Y { +namespace Y { >Y : typeof Y export enum Foo { @@ -23,7 +23,7 @@ module Y { >B : Foo.B } } -module Z { +namespace Z { >Z : typeof Z export enum Foo { @@ -42,7 +42,7 @@ module Z { >2 : 2 } } -module Ka { +namespace Ka { >Ka : typeof Ka export enum Foo { diff --git a/testdata/baselines/reference/submodule/compiler/enumLiteralUnionNotWidened.js.diff b/testdata/baselines/reference/submodule/compiler/enumLiteralUnionNotWidened.js.diff index c7c28e969f..a75dcc73f6 100644 --- a/testdata/baselines/reference/submodule/compiler/enumLiteralUnionNotWidened.js.diff +++ b/testdata/baselines/reference/submodule/compiler/enumLiteralUnionNotWidened.js.diff @@ -1,13 +1,18 @@ --- old.enumLiteralUnionNotWidened.js +++ new.enumLiteralUnionNotWidened.js -@@= skipped -36, +36 lines =@@ +@@= skipped -35, +35 lines =@@ + B["bar"] = "bar"; })(B || (B = {})); ; - class List { -- constructor() { +-var List = /** @class */ (function () { +- function List() { - this.items = []; - } +- return List; +-}()); ++class List { + items = []; - } ++} function asList(arg) { return new List(); } - // TypeScript incorrectly infers the return type of "asList(x)" to be "List" \ No newline at end of file + // TypeScript incorrectly infers the return type of "asList(x)" to be "List" + // The correct type is "List" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumNumbering1.symbols.diff b/testdata/baselines/reference/submodule/compiler/enumNumbering1.symbols.diff new file mode 100644 index 0000000000..dd2bf3df1a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumNumbering1.symbols.diff @@ -0,0 +1,15 @@ +--- old.enumNumbering1.symbols ++++ new.enumNumbering1.symbols +@@= skipped -12, +12 lines =@@ + C = Math.floor(Math.random() * 1000), + >C : Symbol(Test.C, Decl(enumNumbering1.ts, 2, 6)) + >Math.floor : Symbol(Math.floor, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >floor : Symbol(Math.floor, Decl(lib.es5.d.ts, --, --)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + D = 10, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumUsedBeforeDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/enumUsedBeforeDeclaration.js.diff new file mode 100644 index 0000000000..91df3b9529 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/enumUsedBeforeDeclaration.js.diff @@ -0,0 +1,13 @@ +--- old.enumUsedBeforeDeclaration.js ++++ new.enumUsedBeforeDeclaration.js +@@= skipped -8, +8 lines =@@ + + + //// [enumUsedBeforeDeclaration.js] +-var v = Color.Green; +-var v2 = 1 /* ConstColor.Green */; ++const v = Color.Green; ++const v2 = 1 /* ConstColor.Green */; + var Color; + (function (Color) { + Color[Color["Red"] = 0] = "Red"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.js b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.js index dd4ba6cb79..d230174594 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.js +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumsWithMultipleDeclarations3.ts] //// //// [enumsWithMultipleDeclarations3.ts] -module E { +namespace E { } enum E { diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.symbols b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.symbols index a0121d3158..cf8886cba9 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.symbols +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumsWithMultipleDeclarations3.ts] //// === enumsWithMultipleDeclarations3.ts === -module E { +namespace E { >E : Symbol(E, Decl(enumsWithMultipleDeclarations3.ts, 0, 0), Decl(enumsWithMultipleDeclarations3.ts, 1, 1)) } diff --git a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types index ff21c0b3a2..8bc0f2fab3 100644 --- a/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types +++ b/testdata/baselines/reference/submodule/compiler/enumsWithMultipleDeclarations3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/enumsWithMultipleDeclarations3.ts] //// === enumsWithMultipleDeclarations3.ts === -module E { +namespace E { } enum E { diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.errors.txt.diff new file mode 100644 index 0000000000..49e1a0b100 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.erasableSyntaxOnly.errors.txt ++++ new.erasableSyntaxOnly.errors.txt +@@= skipped -0, +0 lines =@@ ++error TS2318: Cannot find global type 'IterableIterator'. + commonjs.cts(1,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. + commonjs.cts(2,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. + index.ts(3,17): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. +@@= skipped -21, +22 lines =@@ + index.ts(94,1): error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. + + ++!!! error TS2318: Cannot find global type 'IterableIterator'. + ==== index.ts (20 errors) ==== + class MyClassErr { + // No parameter properties \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff index 2a89f2735f..539c0e7294 100644 --- a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff +++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff @@ -1,43 +1,113 @@ --- old.erasableSyntaxOnly.js +++ new.erasableSyntaxOnly.js -@@= skipped -112, +112 lines =@@ +@@= skipped -111, +111 lines =@@ + //// [index.js] - class MyClassErr { +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-var MyClassErr = /** @class */ (function () { ++class MyClassErr { + foo; // No parameter properties - constructor(foo) { +- function MyClassErr(foo) { ++ constructor(foo) { this.foo = foo; -@@= skipped -25, +26 lines =@@ + } +- return MyClassErr; +-}()); ++} + var IllegalBecauseInstantiated; + (function (IllegalBecauseInstantiated) { + IllegalBecauseInstantiated.m = 1; + })(IllegalBecauseInstantiated || (IllegalBecauseInstantiated = {})); + var AlsoIllegalBecauseInstantiated; + (function (AlsoIllegalBecauseInstantiated) { +- var PrivateClass = /** @class */ (function () { +- function PrivateClass() { +- } +- return PrivateClass; +- }()); ++ class PrivateClass { ++ } + })(AlsoIllegalBecauseInstantiated || (AlsoIllegalBecauseInstantiated = {})); + var IllegalBecauseNestedInstantiated; + (function (IllegalBecauseNestedInstantiated) { +- var Nested; ++ let Nested; + (function (Nested) { + Nested.m = 1; + })(Nested || (Nested = {})); +@@= skipped -57, +27 lines =@@ (function (NotLegalEnum) { NotLegalEnum[NotLegalEnum["B"] = 1] = "B"; })(NotLegalEnum || (NotLegalEnum = {})); -var NoGoodAlias = NotLegalEnum.B; // No errors after this point - class MyClassOk { +-var MyClassOk = /** @class */ (function () { ++class MyClassOk { // Not a parameter property, ok - constructor(foo) { } - } +- function MyClassOk(foo) { +- } +- return MyClassOk; +-}()); ++ constructor(foo) { } ++} // Not erasable --(() => ({}))(); --(() => ({}))(); --(() => ({}))(); +-(function () { return ({}); })(); +-(function () { return ({}); })(); +-(function () { return ({}); })(); +(() => (({})))(); +(() => (({})))(); +(() => (({})))(); // Erasable - (() => ({}))(); --(() => ({}))(); +-(function () { return ({}); })(); +-(function () { return ({}); })(); -({}); ++(() => ({}))(); +(() => (({})))(); +(({})); // return and yield ASI - function* gen() { - yield 1; - return 1; +-function gen() { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, 1]; +- case 1: +- _a.sent(); +- return [2 /*return*/, 1]; +- } +- }); ++function* gen() { ++ yield 1; ++ return 1; } // at the start of an ExpressionStatement if followed by an object literal; though I'm not sure why one would use it there --({ foo() { } }.foo()); +-({ foo: function () { } }.foo()); +(({ foo() { } }.foo())); // at the start of an ExpressionStatement if followed by function keyword -(function () { })(); @@ -46,8 +116,11 @@ +((function () { })); // at the start of an ExpressionStatement if followed by an anonymous class expression // note that this exact syntax currently emits invalid JS (no parenthesis added like for function above) --class { --}; +-/** @class */ (function () { +- function class_1() { +- } +- return class_1; +-}()); +((class { +})); //// [commonjs.cjs] @@ -56,4 +129,6 @@ +const foo = require("./other.cjs"); module.exports = foo; //// [esm.mjs] - const foo = 1234; \ No newline at end of file +-var foo = 1234; ++const foo = 1234; + export default foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.types.diff b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.types.diff new file mode 100644 index 0000000000..3586b3160e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.types.diff @@ -0,0 +1,11 @@ +--- old.erasableSyntaxOnly.types ++++ new.erasableSyntaxOnly.types +@@= skipped -165, +165 lines =@@ + + // return and yield ASI + function *gen() { +->gen : () => Generator ++>gen : () => {} + + yield + >yield 1 : any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly2.js.diff b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly2.js.diff new file mode 100644 index 0000000000..e85dd39532 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly2.js.diff @@ -0,0 +1,12 @@ +--- old.erasableSyntaxOnly2.js ++++ new.erasableSyntaxOnly2.js +@@= skipped -5, +5 lines =@@ + let c = targetObject : Symbol(targetObject, Decl(errorConstructorSubtypes.ts, 2, 20)) + >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >constructorOpt : Symbol(constructorOpt, Decl(errorConstructorSubtypes.ts, 2, 41)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + declare var x: ErrorConstructor \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorElaboration.js.diff b/testdata/baselines/reference/submodule/compiler/errorElaboration.js.diff index fea4b6e979..5e399b5cbd 100644 --- a/testdata/baselines/reference/submodule/compiler/errorElaboration.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorElaboration.js.diff @@ -5,6 +5,18 @@ //// [errorElaboration.js] -// Repro for #5712 - let a; +-var a; ++let a; foo(a); - // Repro for #25498 \ No newline at end of file + // Repro for #25498 + function test() { + return { foo: "bar" }; + } + // Repro for #32358 +-var foo = { bar: 'a' }; +-var x = function (_a) { +- var _b = foo.bar, c = _a[_b]; +- return undefined; +-}; ++const foo = { bar: 'a' }; ++const x = ({ [foo.bar]: c }) => undefined; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff index a2653054c6..98051063e9 100644 --- a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff @@ -1,14 +1,21 @@ --- old.errorForUsingPropertyOfTypeAsType01.js +++ new.errorForUsingPropertyOfTypeAsType01.js -@@= skipped -54, +54 lines =@@ +@@= skipped -53, +53 lines =@@ + })(Test1 || (Test1 = {})); var Test2; (function (Test2) { - class Foo { +- var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +- }()); ++ class Foo { + bar; - } ++ } Test2.Foo = Foo; var x = ""; -@@= skipped -20, +21 lines =@@ + var y = ""; +@@= skipped -24, +22 lines =@@ var x = ""; var y = ""; })(Test5 || (Test5 = {})); diff --git a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType02.js.diff b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType02.js.diff new file mode 100644 index 0000000000..ae52cf1f5b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType02.js.diff @@ -0,0 +1,10 @@ +--- old.errorForUsingPropertyOfTypeAsType02.js ++++ new.errorForUsingPropertyOfTypeAsType02.js +@@= skipped -10, +10 lines =@@ + var Test1; + (function (Test1) { + function foo(x) { +- var a = x.abc; ++ let a = x.abc; + } + })(Test1 || (Test1 = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType03.js.diff b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType03.js.diff new file mode 100644 index 0000000000..3f8e7c5e6d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType03.js.diff @@ -0,0 +1,36 @@ +--- old.errorForUsingPropertyOfTypeAsType03.js ++++ new.errorForUsingPropertyOfTypeAsType03.js +@@= skipped -30, +30 lines =@@ + //// [errorForUsingPropertyOfTypeAsType03.js] + var Test1; + (function (Test1) { +- var Color; ++ let Color; + (function (Color) { + Color[Color["Red"] = 0] = "Red"; + Color[Color["Green"] = 1] = "Green"; + Color[Color["Blue"] = 2] = "Blue"; + })(Color || (Color = {})); +- var a1; +- var a2; +- var a3; ++ let a1; ++ let a2; ++ let a3; + //let b1: (typeof Color).Red.toString; + //let b2: (typeof Color).Red["toString"]; +- var b3; +- var c1; +- var c2; +- var c3; +- var d1; +- var d2; +- var d3; ++ let b3; ++ let c1; ++ let c2; ++ let c3; ++ let d1; ++ let d2; ++ let d3; + })(Test1 || (Test1 = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorForwardReferenceForwadingConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/errorForwardReferenceForwadingConstructor.js.diff index a3645dea75..b9a73bde6a 100644 --- a/testdata/baselines/reference/submodule/compiler/errorForwardReferenceForwadingConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorForwardReferenceForwadingConstructor.js.diff @@ -1,10 +1,44 @@ --- old.errorForwardReferenceForwadingConstructor.js +++ new.errorForwardReferenceForwadingConstructor.js -@@= skipped -18, +18 lines =@@ +@@= skipped -13, +13 lines =@@ + + //// [errorForwardReferenceForwadingConstructor.js] + // Error forward referencing derived class with forwarding constructor +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function f() { + var d1 = new derived(); var d2 = new derived(4); } - class base { +-var base = /** @class */ (function () { +- function base(n) { ++class base { + n; - constructor(n) { ++ constructor(n) { this.n = n; - } \ No newline at end of file + } +- return base; +-}()); +-var derived = /** @class */ (function (_super) { +- __extends(derived, _super); +- function derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return derived; +-}(base)); ++} ++class derived extends base { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorHandlingInInstanceOf.symbols.diff b/testdata/baselines/reference/submodule/compiler/errorHandlingInInstanceOf.symbols.diff new file mode 100644 index 0000000000..925f17c927 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorHandlingInInstanceOf.symbols.diff @@ -0,0 +1,11 @@ +--- old.errorHandlingInInstanceOf.symbols ++++ new.errorHandlingInInstanceOf.symbols +@@= skipped -1, +1 lines =@@ + + === errorHandlingInInstanceOf.ts === + if (x instanceof String) { +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + var y: any; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorInfoForRelatedIndexTypesNoConstraintElaboration.js.diff b/testdata/baselines/reference/submodule/compiler/errorInfoForRelatedIndexTypesNoConstraintElaboration.js.diff new file mode 100644 index 0000000000..8ee7988079 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorInfoForRelatedIndexTypesNoConstraintElaboration.js.diff @@ -0,0 +1,20 @@ +--- old.errorInfoForRelatedIndexTypesNoConstraintElaboration.js ++++ new.errorInfoForRelatedIndexTypesNoConstraintElaboration.js +@@= skipped -11, +11 lines =@@ + + //// [errorInfoForRelatedIndexTypesNoConstraintElaboration.js] + /// +-var I = /** @class */ (function () { +- function I() { ++class I { ++ M() { ++ let c1 = {}; ++ const c2 = c1; + } +- I.prototype.M = function () { +- var c1 = {}; +- var c2 = c1; +- }; +- return I; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes01.js.diff b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes01.js.diff new file mode 100644 index 0000000000..10f440cd92 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes01.js.diff @@ -0,0 +1,10 @@ +--- old.errorMessagesIntersectionTypes01.js ++++ new.errorMessagesIntersectionTypes01.js +@@= skipped -18, +18 lines =@@ + }); + + //// [errorMessagesIntersectionTypes01.js] +-var fooBar = mixBar({ ++let fooBar = mixBar({ + fooProp: "frizzlebizzle" + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes02.js.diff b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes02.js.diff new file mode 100644 index 0000000000..9111f015e9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes02.js.diff @@ -0,0 +1,10 @@ +--- old.errorMessagesIntersectionTypes02.js ++++ new.errorMessagesIntersectionTypes02.js +@@= skipped -18, +18 lines =@@ + }); + + //// [errorMessagesIntersectionTypes02.js] +-var fooBar = mixBar({ ++let fooBar = mixBar({ + fooProp: "frizzlebizzle" + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes03.js.diff b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes03.js.diff new file mode 100644 index 0000000000..e8b1af2e24 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes03.js.diff @@ -0,0 +1,19 @@ +--- old.errorMessagesIntersectionTypes03.js ++++ new.errorMessagesIntersectionTypes03.js +@@= skipped -27, +27 lines =@@ + + //// [errorMessagesIntersectionTypes03.js] + function f() { +- var t; +- var u; +- var v; +- var a_and_b; +- var t_and_b; ++ let t; ++ let u; ++ let v; ++ let a_and_b; ++ let t_and_b; + t = a_and_b; + u = a_and_b; + v = a_and_b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes04.js.diff b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes04.js.diff new file mode 100644 index 0000000000..03866bfcb8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorMessagesIntersectionTypes04.js.diff @@ -0,0 +1,19 @@ +--- old.errorMessagesIntersectionTypes04.js ++++ new.errorMessagesIntersectionTypes04.js +@@= skipped -25, +25 lines =@@ + + //// [errorMessagesIntersectionTypes04.js] + function f() { +- var num; +- var bool; +- var str; +- var a_and_b; +- var num_and_bool; ++ let num; ++ let bool; ++ let str; ++ let a_and_b; ++ let num_and_bool; + num = a_and_b; + bool = a_and_b; + str = a_and_b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnEnumReferenceInCondition.js.diff b/testdata/baselines/reference/submodule/compiler/errorOnEnumReferenceInCondition.js.diff index 24c4ab5208..1030cc7343 100644 --- a/testdata/baselines/reference/submodule/compiler/errorOnEnumReferenceInCondition.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorOnEnumReferenceInCondition.js.diff @@ -7,4 +7,24 @@ -"use strict"; var Nums; (function (Nums) { - Nums[Nums["Zero"] = 0] = "Zero"; \ No newline at end of file + Nums[Nums["Zero"] = 0] = "Zero"; + Nums[Nums["One"] = 1] = "One"; + })(Nums || (Nums = {})); +-var a = Nums.Zero ? "a" : "b"; +-var b = Nums.One ? "a" : "b"; ++const a = Nums.Zero ? "a" : "b"; ++const b = Nums.One ? "a" : "b"; + if (Nums.Zero) { + Nums; + } +@@= skipped -25, +24 lines =@@ + Strs["Empty"] = ""; + Strs["A"] = "A"; + })(Strs || (Strs = {})); +-var c = Strs.Empty ? "a" : "b"; +-var d = Strs.A ? "a" : "b"; ++const c = Strs.Empty ? "a" : "b"; ++const d = Strs.A ? "a" : "b"; + if (Strs.Empty) { + Strs; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.js.diff b/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.js.diff new file mode 100644 index 0000000000..5b2090f3a9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnInitializerInObjectTypeLiteralProperty.js.diff @@ -0,0 +1,8 @@ +--- old.errorOnInitializerInObjectTypeLiteralProperty.js ++++ new.errorOnInitializerInObjectTypeLiteralProperty.js +@@= skipped -11, +11 lines =@@ + + //// [errorOnInitializerInObjectTypeLiteralProperty.js] + var Foo; +-var Bar; ++let Bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt.diff new file mode 100644 index 0000000000..d582e57363 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate.errors.txt +@@= skipped -0, +0 lines =@@ + errorOnUnionVsObjectShouldDeeplyDisambiguate.ts(17,7): error TS2322: Type '() => number[]' is not assignable to type '() => Promise'. +- Type 'number[]' is missing the following properties from type 'Promise': then, catch, [Symbol.toStringTag] ++ Type 'number[]' is missing the following properties from type 'Promise': then, catch + errorOnUnionVsObjectShouldDeeplyDisambiguate.ts(18,16): error TS2322: Type 'string' is not assignable to type 'Promise'. + errorOnUnionVsObjectShouldDeeplyDisambiguate.ts(19,16): error TS2322: Type 'string' is not assignable to type 'Promise'. + errorOnUnionVsObjectShouldDeeplyDisambiguate.ts(20,16): error TS2322: Type 'string' is not assignable to type 'Promise'. +@@= skipped -31, +31 lines =@@ + a() { return [123] }, + ~ + !!! error TS2322: Type '() => number[]' is not assignable to type '() => Promise'. +-!!! error TS2322: Type 'number[]' is missing the following properties from type 'Promise': then, catch, [Symbol.toStringTag] ++!!! error TS2322: Type 'number[]' is missing the following properties from type 'Promise': then, catch + b: () => "hello", + ~~~~~~~ + !!! error TS2322: Type 'string' is not assignable to type 'Promise'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.js.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.js.diff new file mode 100644 index 0000000000..9f28062743 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.js.diff @@ -0,0 +1,30 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate.js ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate.js +@@= skipped -33, +33 lines =@@ + //// [errorOnUnionVsObjectShouldDeeplyDisambiguate.js] + function foo() { + return { +- a: function () { return [123]; }, +- b: function () { return "hello"; }, +- c: function () { return "hello"; }, +- d: function () { return "hello"; }, +- e: function () { return "hello"; }, +- f: function () { return "hello"; }, +- g: function () { return "hello"; }, +- h: function () { return "hello"; }, +- i: function () { return "hello"; }, +- j: function () { return "hello"; }, +- k: function () { return 123; } ++ a() { return [123]; }, ++ b: () => "hello", ++ c: () => "hello", ++ d: () => "hello", ++ e: () => "hello", ++ f: () => "hello", ++ g: () => "hello", ++ h: () => "hello", ++ i: () => "hello", ++ j: () => "hello", ++ k: () => 123 + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols.diff new file mode 100644 index 0000000000..b314a3cd68 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols.diff @@ -0,0 +1,61 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate.symbols +@@= skipped -5, +5 lines =@@ + + a?: () => Promise; + >a : Symbol(Stuff.a, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 0, 17)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + b: () => Promise; + >b : Symbol(Stuff.b, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 1, 32)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + c: () => Promise; + >c : Symbol(Stuff.c, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 2, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + d: () => Promise; + >d : Symbol(Stuff.d, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 3, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + e: () => Promise; + >e : Symbol(Stuff.e, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 4, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + f: () => Promise; + >f : Symbol(Stuff.f, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 5, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + g: () => Promise; + >g : Symbol(Stuff.g, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 6, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + h: () => Promise; + >h : Symbol(Stuff.h, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 7, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + i: () => Promise; + >i : Symbol(Stuff.i, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 8, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + j: () => Promise; + >j : Symbol(Stuff.j, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 9, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + k: () => Promise; + >k : Symbol(Stuff.k, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate.ts, 10, 29)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + } + + function foo(): Stuff | string { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt.diff new file mode 100644 index 0000000000..3125004d85 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt.diff @@ -0,0 +1,18 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate2.errors.txt +@@= skipped -0, +0 lines =@@ + errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts(17,5): error TS2322: Type '() => number[]' is not assignable to type '() => Promise'. +- Type 'number[]' is missing the following properties from type 'Promise': then, catch, [Symbol.toStringTag] ++ Type 'number[]' is missing the following properties from type 'Promise': then, catch + errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts(18,14): error TS2322: Type 'string' is not assignable to type 'Promise'. + errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts(19,14): error TS2322: Type 'string' is not assignable to type 'Promise'. + errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts(20,14): error TS2322: Type 'string' is not assignable to type 'Promise'. +@@= skipped -31, +31 lines =@@ + a() { return [123] }, + ~ + !!! error TS2322: Type '() => number[]' is not assignable to type '() => Promise'. +-!!! error TS2322: Type 'number[]' is missing the following properties from type 'Promise': then, catch, [Symbol.toStringTag] ++!!! error TS2322: Type 'number[]' is missing the following properties from type 'Promise': then, catch + b: () => "hello", + ~~~~~~~ + !!! error TS2322: Type 'string' is not assignable to type 'Promise'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.js.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.js.diff new file mode 100644 index 0000000000..33193f47ea --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.js.diff @@ -0,0 +1,30 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate2.js ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate2.js +@@= skipped -33, +33 lines =@@ + //// [errorOnUnionVsObjectShouldDeeplyDisambiguate2.js] + function foo() { + return { +- a: function () { return [123]; }, +- b: function () { return "hello"; }, +- c: function () { return "hello"; }, +- d: function () { return "hello"; }, +- e: function () { return "hello"; }, +- f: function () { return "hello"; }, +- g: function () { return "hello"; }, +- h: function () { return "hello"; }, +- i: function () { return "hello"; }, +- j: function () { return "hello"; }, +- k: function () { return 123; } ++ a() { return [123]; }, ++ b: () => "hello", ++ c: () => "hello", ++ d: () => "hello", ++ e: () => "hello", ++ f: () => "hello", ++ g: () => "hello", ++ h: () => "hello", ++ i: () => "hello", ++ j: () => "hello", ++ k: () => 123 + }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols.diff b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols.diff new file mode 100644 index 0000000000..148597a840 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols.diff @@ -0,0 +1,68 @@ +--- old.errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols ++++ new.errorOnUnionVsObjectShouldDeeplyDisambiguate2.symbols +@@= skipped -5, +5 lines =@@ + + a?: () => Promise; + >a : Symbol(Stuff.a, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 0, 17)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + b: () => Promise; + >b : Symbol(Stuff.b, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 1, 30)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + c: () => Promise; + >c : Symbol(Stuff.c, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 2, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + d: () => Promise; + >d : Symbol(Stuff.d, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 3, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + e: () => Promise; + >e : Symbol(Stuff.e, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 4, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + f: () => Promise; + >f : Symbol(Stuff.f, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 5, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + g: () => Promise; + >g : Symbol(Stuff.g, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 6, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + h: () => Promise; + >h : Symbol(Stuff.h, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 7, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + i: () => Promise; + >i : Symbol(Stuff.i, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 8, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + j: () => Promise; + >j : Symbol(Stuff.j, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 9, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + k: () => Promise; + >k : Symbol(Stuff.k, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 10, 27)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + } + + function foo(): Stuff | Date { + >foo : Symbol(foo, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 12, 1)) + >Stuff : Symbol(Stuff, Decl(errorOnUnionVsObjectShouldDeeplyDisambiguate2.ts, 0, 0)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + return { + a() { return [123] }, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorRecoveryInClassDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/errorRecoveryInClassDeclaration.js.diff new file mode 100644 index 0000000000..b72418173b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorRecoveryInClassDeclaration.js.diff @@ -0,0 +1,18 @@ +--- old.errorRecoveryInClassDeclaration.js ++++ new.errorRecoveryInClassDeclaration.js +@@= skipped -9, +9 lines =@@ + } + + //// [errorRecoveryInClassDeclaration.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function () { ++class C { ++ bar() { + var v = foo(public, blaz(), {}); +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.js.diff b/testdata/baselines/reference/submodule/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.js.diff new file mode 100644 index 0000000000..3d9f2ae933 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorRecoveryWithDotFollowedByNamespaceKeyword.js.diff @@ -0,0 +1,11 @@ +--- old.errorRecoveryWithDotFollowedByNamespaceKeyword.js ++++ new.errorRecoveryWithDotFollowedByNamespaceKeyword.js +@@= skipped -17, +17 lines =@@ + if (true) { + B. + ; +- var B = void 0; ++ let B; + (function (B) { + function baz() { } + B.baz = baz; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorSpanForUnclosedJsxTag.js.diff b/testdata/baselines/reference/submodule/compiler/errorSpanForUnclosedJsxTag.js.diff index d071260647..b7a38099f6 100644 --- a/testdata/baselines/reference/submodule/compiler/errorSpanForUnclosedJsxTag.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorSpanForUnclosedJsxTag.js.diff @@ -1,10 +1,17 @@ --- old.errorSpanForUnclosedJsxTag.js +++ new.errorSpanForUnclosedJsxTag.js -@@= skipped -17, +17 lines =@@ - Bar() { } +@@= skipped -13, +13 lines =@@ + let y = < Baz >Hello + + //// [errorSpanForUnclosedJsxTag.js] +-var Foo = { +- Bar: function () { } ++let Foo = { ++ Bar() { } }; - let Baz = () => { }; --let x = React.createElement(Foo.Bar, null, +-var Baz = function () { }; +-var x = React.createElement(Foo.Bar, null, - "Hello let y = ", - React.createElement(Baz, null, "Hello")); ++let Baz = () => { }; +let x = React.createElement(Foo.Bar, null, "Hello let y = ", React.createElement(Baz, null, "Hello")); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorSupression1.js.diff b/testdata/baselines/reference/submodule/compiler/errorSupression1.js.diff new file mode 100644 index 0000000000..4b899660a0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorSupression1.js.diff @@ -0,0 +1,18 @@ +--- old.errorSupression1.js ++++ new.errorSupression1.js +@@= skipped -9, +9 lines =@@ + // So we don't want an error on 'concat'. + + //// [errorSupression1.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.bar = function () { return "x"; }; +- return Foo; +-}()); ++class Foo { ++ static bar() { return "x"; } ++} + var baz = Foo.b; + // Foo.b won't bind. + baz.concat("y"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.js.diff b/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.js.diff new file mode 100644 index 0000000000..14e4ccabdb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorWithSameNameType.js.diff @@ -0,0 +1,13 @@ +--- old.errorWithSameNameType.js ++++ new.errorWithSameNameType.js +@@= skipped -32, +32 lines =@@ + //// [c.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var a; +-var b; ++let a; ++let b; + if (a === b) { + } + a = b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.errors.txt.diff new file mode 100644 index 0000000000..ce9d44df0f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.errors.txt.diff @@ -0,0 +1,28 @@ +--- old.errorsForCallAndAssignmentAreSimilar.errors.txt ++++ new.errorsForCallAndAssignmentAreSimilar.errors.txt +@@= skipped -0, +0 lines =@@ +-errorsForCallAndAssignmentAreSimilar.ts(11,11): error TS2820: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. Did you mean '"hddvd"'? +-errorsForCallAndAssignmentAreSimilar.ts(16,11): error TS2820: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. Did you mean '"hddvd"'? ++errorsForCallAndAssignmentAreSimilar.ts(11,11): error TS2820: Type '"hdpvd"' is not assignable to type '"bluray" | "hddvd"'. Did you mean '"hddvd"'? ++errorsForCallAndAssignmentAreSimilar.ts(16,11): error TS2820: Type '"hdpvd"' is not assignable to type '"bluray" | "hddvd"'. Did you mean '"hddvd"'? + + + ==== errorsForCallAndAssignmentAreSimilar.ts (2 errors) ==== +@@= skipped -14, +14 lines =@@ + { kind: "bluray", }, + { kind: "hdpvd", } + ~~~~ +-!!! error TS2820: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. Did you mean '"hddvd"'? ++!!! error TS2820: Type '"hdpvd"' is not assignable to type '"bluray" | "hddvd"'. Did you mean '"hddvd"'? + !!! related TS6500 errorsForCallAndAssignmentAreSimilar.ts:3:13: The expected type comes from property 'kind' which is declared here on type 'Disc' + ]); + +@@= skipped -8, +8 lines =@@ + { kind: "bluray", }, + { kind: "hdpvd", } + ~~~~ +-!!! error TS2820: Type '"hdpvd"' is not assignable to type '"hddvd" | "bluray"'. Did you mean '"hddvd"'? ++!!! error TS2820: Type '"hdpvd"' is not assignable to type '"bluray" | "hddvd"'. Did you mean '"hddvd"'? + !!! related TS6500 errorsForCallAndAssignmentAreSimilar.ts:3:13: The expected type comes from property 'kind' which is declared here on type 'Disc' + ]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.js.diff b/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.js.diff new file mode 100644 index 0000000000..f133d93c17 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorsForCallAndAssignmentAreSimilar.js.diff @@ -0,0 +1,11 @@ +--- old.errorsForCallAndAssignmentAreSimilar.js ++++ new.errorsForCallAndAssignmentAreSimilar.js +@@= skipped -27, +27 lines =@@ + { kind: "bluray", }, + { kind: "hdpvd", } + ]); +- var ds = [ ++ const ds = [ + { kind: "bluray", }, + { kind: "hdpvd", } + ]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorsInGenericTypeReference.js.diff b/testdata/baselines/reference/submodule/compiler/errorsInGenericTypeReference.js.diff index b153727bcd..2a3146ecc8 100644 --- a/testdata/baselines/reference/submodule/compiler/errorsInGenericTypeReference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorsInGenericTypeReference.js.diff @@ -1,10 +1,110 @@ --- old.errorsInGenericTypeReference.js +++ new.errorsInGenericTypeReference.js -@@= skipped -90, +90 lines =@@ - testMethod1() { return null; } // error: could not find symbol V - static testMethod2() { return null; } // error: could not find symbol V - set a(value) { } // error: could not find symbol V +@@= skipped -73, +73 lines =@@ + + + //// [errorsInGenericTypeReference.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + // in call type arguments +-var testClass1 = /** @class */ (function () { +- function testClass1() { +- } +- testClass1.prototype.method = function () { }; +- return testClass1; +-}()); ++class testClass1 { ++ method() { } ++} + var tc1 = new testClass1(); + tc1.method(); // error: could not find symbol V + // in constructor type arguments +-var testClass2 = /** @class */ (function () { +- function testClass2() { +- } +- return testClass2; +-}()); ++class testClass2 { ++} + var tc2 = new testClass2(); // error: could not find symbol V + // in method return type annotation +-var testClass3 = /** @class */ (function () { +- function testClass3() { +- } +- testClass3.prototype.testMethod1 = function () { return null; }; // error: could not find symbol V +- testClass3.testMethod2 = function () { return null; }; // error: could not find symbol V +- Object.defineProperty(testClass3.prototype, "a", { +- set: function (value) { } // error: could not find symbol V +- , +- enumerable: false, +- configurable: true +- }); +- return testClass3; +-}()); ++class testClass3 { ++ testMethod1() { return null; } // error: could not find symbol V ++ static testMethod2() { return null; } // error: could not find symbol V ++ set a(value) { } // error: could not find symbol V + property; // error: could not find symbol V - } ++} // in function return type annotation - function testFunction1() { return null; } // error: could not find symbol V \ No newline at end of file + function testFunction1() { return null; } // error: could not find symbol V + // in paramter types +@@= skipped -57, +26 lines =@@ + // in var type annotation + var f; // error: could not find symbol V + // in constraints +-var testClass4 = /** @class */ (function () { +- function testClass4() { +- } +- return testClass4; +-}()); // error: could not find symbol V +-var testClass6 = /** @class */ (function () { +- function testClass6() { +- } +- testClass6.prototype.method = function () { }; // error: could not find symbol V +- return testClass6; +-}()); ++class testClass4 { ++} // error: could not find symbol V ++class testClass6 { ++ method() { } // error: could not find symbol V ++} + // in extends clause +-var testClass7 = /** @class */ (function (_super) { +- __extends(testClass7, _super); +- function testClass7() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return testClass7; +-}(Foo)); // error: could not find symbol V ++class testClass7 extends Foo { ++} // error: could not find symbol V + // in implements clause +-var testClass8 = /** @class */ (function () { +- function testClass8() { +- } +- return testClass8; +-}()); // error: could not find symbol V ++class testClass8 { ++} // error: could not find symbol V \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.js.diff b/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.js.diff new file mode 100644 index 0000000000..276736ecd7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.js.diff @@ -0,0 +1,10 @@ +--- old.errorsOnUnionsOfOverlappingObjects01.js ++++ new.errorsOnUnionsOfOverlappingObjects01.js +@@= skipped -62, +62 lines =@@ + h({ a: '', b: '' }); + addToZoo({ dog: "Barky McBarkface" }); + addToZoo({ man: "Manny", bear: "Coffee" }); +-var manBeer = { man: "Manny", beer: "Coffee" }; ++const manBeer = { man: "Manny", beer: "Coffee" }; + addToZoo({ man: "Manny", beer: "Coffee" }); + addToZoo(manBeer); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.types.diff b/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.types.diff index 9a9f5001de..13358340f5 100644 --- a/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.types.diff +++ b/testdata/baselines/reference/submodule/compiler/errorsOnUnionsOfOverlappingObjects01.types.diff @@ -5,8 +5,9 @@ declare function h(x: Foo | Bar | Other): any; ->h : (x: Foo | Bar | Other) => any +->x : Foo | Bar | Other +>h : (x: Bar | Foo | Other) => any - >x : Bar | Foo | Other ++>x : Bar | Foo | Other h(x); >h(x) : any diff --git a/testdata/baselines/reference/submodule/compiler/errorsWithInvokablesInUnions01.js.diff b/testdata/baselines/reference/submodule/compiler/errorsWithInvokablesInUnions01.js.diff index 77978f9417..31bfa1da49 100644 --- a/testdata/baselines/reference/submodule/compiler/errorsWithInvokablesInUnions01.js.diff +++ b/testdata/baselines/reference/submodule/compiler/errorsWithInvokablesInUnions01.js.diff @@ -1,9 +1,18 @@ --- old.errorsWithInvokablesInUnions01.js +++ new.errorsWithInvokablesInUnions01.js -@@= skipped -27, +27 lines =@@ - let blah = (x) => { }; +@@= skipped -24, +24 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.ctor = exports.blah = void 0; +-var blah = function (x) { }; ++let blah = (x) => { }; exports.blah = blah; - let ctor = class { +-exports.ctor = /** @class */ (function () { +- function class_1() { +- } +- return class_1; +-}()); ++let ctor = class { + someUnaccountedProp; - }; - exports.ctor = ctor; \ No newline at end of file ++}; ++exports.ctor = ctor; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunction.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunction.js.diff index 31c37a0295..b5f50f6885 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunction.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunction.js.diff @@ -13,14 +13,51 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -function empty() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/]; +- }); - }); +async function empty() { } -function singleAwait() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); +async function singleAwait() { + await x; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionArrayLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionArrayLiterals.js.diff index aa28444d1f..6c505306fa 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionArrayLiterals.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionArrayLiterals.js.diff @@ -5,43 +5,118 @@ //// [es5-asyncFunctionArrayLiterals.js] -function arrayLiteral0() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [yield y, z]; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- x = [_a.sent(), z]; +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral1() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [y, yield z]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = [y]; +- return [4 /*yield*/, z]; +- case 1: +- x = _a.concat([_b.sent()]); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral2() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [...(yield y), z]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = [[]]; +- return [4 /*yield*/, y]; +- case 1: +- x = __spreadArray.apply(void 0, [__spreadArray.apply(void 0, _a.concat([(_b.sent()), true])), [z], false]); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral3() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [...y, yield z]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = [__spreadArray([], y, true)]; +- return [4 /*yield*/, z]; +- case 1: +- x = __spreadArray.apply(void 0, _a.concat([[_b.sent()], false])); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral4() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [yield y, ...z]; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- x = __spreadArray.apply(void 0, [[_a.sent()], z, true]); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral5() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [y, ...(yield z)]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = [[y]]; +- return [4 /*yield*/, z]; +- case 1: +- x = __spreadArray.apply(void 0, _a.concat([(_b.sent()), true])); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral6() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [y, yield z, a]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = [y]; +- return [4 /*yield*/, z]; +- case 1: +- x = _a.concat([_b.sent(), a]); +- return [2 /*return*/]; +- } +- }); - }); -} -function arrayLiteral7() { -- return __awaiter(this, void 0, void 0, function* () { -- x = [yield y, z, yield a]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- _a = [_b.sent(), z]; +- return [4 /*yield*/, a]; +- case 2: +- x = _a.concat([_b.sent()]); +- return [2 /*return*/]; +- } +- }); - }); +async function arrayLiteral0() { + x = [await y, z]; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionBinaryExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionBinaryExpressions.js.diff index 2007ce20c6..13e444e7ba 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionBinaryExpressions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionBinaryExpressions.js.diff @@ -5,154 +5,438 @@ //// [es5-asyncFunctionBinaryExpressions.js] -function binaryPlus0() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x) + y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()) + y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryPlus1() { -- return __awaiter(this, void 0, void 0, function* () { -- x + (yield y); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- _a + (_b.sent()); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryLogicalAnd0() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x) && y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()) && y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryLogicalAnd1() { -- return __awaiter(this, void 0, void 0, function* () { -- x && (yield y); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- if (!_a) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a = (_b.sent()); +- _b.label = 2; +- case 2: +- _a; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment0() { -- return __awaiter(this, void 0, void 0, function* () { -- x = yield y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- x = _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment1() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a = yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- _a.a = _b.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment2() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a.b = yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x.a; +- return [4 /*yield*/, y]; +- case 1: +- _a.b = _b.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment3() { -- return __awaiter(this, void 0, void 0, function* () { -- x[z] = yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x; +- _b = z; +- return [4 /*yield*/, y]; +- case 1: +- _a[_b] = _c.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment4() { -- return __awaiter(this, void 0, void 0, function* () { -- x[z].b = yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x[z]; +- return [4 /*yield*/, y]; +- case 1: +- _a.b = _b.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment5() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a[z] = yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x.a; +- _b = z; +- return [4 /*yield*/, y]; +- case 1: +- _a[_b] = _c.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment6() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x).a = y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()).a = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment7() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x.a).b = y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a]; +- case 1: +- (_a.sent()).b = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment8() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)[z] = y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent())[z] = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment9() { -- return __awaiter(this, void 0, void 0, function* () { -- x[yield z] = y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, z]; +- case 1: +- _a[_b.sent()] = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment10() { -- return __awaiter(this, void 0, void 0, function* () { -- x[yield z].b = y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, z]; +- case 1: +- _a[_b.sent()].b = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment11() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x[z]).b = y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x[z]]; +- case 1: +- (_a.sent()).b = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment12() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a[yield z] = y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x.a; +- return [4 /*yield*/, z]; +- case 1: +- _a[_b.sent()] = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryAssignment13() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x.a)[z] = y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a]; +- case 1: +- (_a.sent())[z] = y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment0() { -- return __awaiter(this, void 0, void 0, function* () { -- x += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- x = _a + _b.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment1() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x; +- _b = _a.a; +- return [4 /*yield*/, y]; +- case 1: +- _a.a = _b + _c.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment2() { -- return __awaiter(this, void 0, void 0, function* () { -- x[a] += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = x; +- _b = a; +- _c = _a[_b]; +- return [4 /*yield*/, y]; +- case 1: +- _a[_b] = _c + _d.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment3() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x).a += y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()).a += y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment4() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)[a] += y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent())[a] += y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment5() { -- return __awaiter(this, void 0, void 0, function* () { -- x[yield a] += y; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, a]; +- case 1: +- _a[_b.sent()] += y; +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment6() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x).a += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a = (_c.sent()); +- _b = _a.a; +- return [4 /*yield*/, y]; +- case 2: +- _a.a = _b + _c.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment7() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)[a] += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a = (_d.sent()); +- _b = a; +- _c = _a[_b]; +- return [4 /*yield*/, y]; +- case 2: +- _a[_b] = _c + _d.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryCompoundAssignment8() { -- return __awaiter(this, void 0, void 0, function* () { -- x[yield a] += yield y; +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, a]; +- case 1: +- _b = _d.sent(); +- _c = _a[_b]; +- return [4 /*yield*/, y]; +- case 2: +- _a[_b] = _c + _d.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryExponentiation() { -- return __awaiter(this, void 0, void 0, function* () { -- Math.pow((yield x), y); -- Math.pow(x, yield y); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d, _e; +- return __generator(this, function (_f) { +- switch (_f.label) { +- case 0: +- _b = (_a = Math).pow; +- return [4 /*yield*/, x]; +- case 1: +- _b.apply(_a, [(_f.sent()), y]); +- _d = (_c = Math).pow; +- _e = [x]; +- return [4 /*yield*/, y]; +- case 2: +- _d.apply(_c, _e.concat([_f.sent()])); +- return [2 /*return*/]; +- } +- }); - }); -} -function binaryComma0() { -- return __awaiter(this, void 0, void 0, function* () { -- return (yield x), y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: return [2 /*return*/, ((_a.sent()), y)]; +- } +- }); - }); -} -function binaryComma1() { -- return __awaiter(this, void 0, void 0, function* () { -- return x, yield y; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- x; +- return [4 /*yield*/, y]; +- case 1: return [2 /*return*/, _a.sent()]; +- } +- }); - }); +async function binaryPlus0() { + (await x) + y; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionCallExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionCallExpressions.js.diff index 97db82a59c..d538421cd5 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionCallExpressions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionCallExpressions.js.diff @@ -5,108 +5,298 @@ //// [es5-asyncFunctionCallExpressions.js] -function callExpression0() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x(y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression1() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression2() { -- return __awaiter(this, void 0, void 0, function* () { -- x(yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- _a.apply(void 0, [_b.sent(), z]); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression3() { -- return __awaiter(this, void 0, void 0, function* () { -- x(y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x; +- _b = [y]; +- return [4 /*yield*/, z]; +- case 1: +- _a.apply(void 0, _b.concat([_c.sent()])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression4() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x(...y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.apply(void 0, __spreadArray(__spreadArray([], y, false), [z], false))]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression5() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)(...y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()).apply(void 0, __spreadArray(__spreadArray([], y, false), [z], false)); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression6() { -- return __awaiter(this, void 0, void 0, function* () { -- x(...(yield y), z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x).apply; +- _c = [void 0]; +- _d = [[]]; +- return [4 /*yield*/, y]; +- case 1: +- _b.apply(_a, _c.concat([__spreadArray.apply(void 0, [__spreadArray.apply(void 0, _d.concat([(_e.sent()), false])), [z], false])])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression7() { -- return __awaiter(this, void 0, void 0, function* () { -- x(...y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x).apply; +- _c = [void 0]; +- _d = [__spreadArray([], y, false)]; +- return [4 /*yield*/, z]; +- case 1: +- _b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([[_e.sent()], false]))])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression8() { -- return __awaiter(this, void 0, void 0, function* () { -- x(yield y, ...z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = (_a = x).apply; +- _c = [void 0]; +- return [4 /*yield*/, y]; +- case 1: +- _b.apply(_a, _c.concat([__spreadArray.apply(void 0, [[_d.sent()], z, false])])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression9() { -- return __awaiter(this, void 0, void 0, function* () { -- x(y, ...(yield z)); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x).apply; +- _c = [void 0]; +- _d = [[y]]; +- return [4 /*yield*/, z]; +- case 1: +- _b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([(_e.sent()), false]))])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression10() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x.a(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a(y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression11() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x.a)(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a]; +- case 1: +- (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression12() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x).a(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent()).a(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression13() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a(yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = (_a = x).a; +- return [4 /*yield*/, y]; +- case 1: +- _b.apply(_a, [_c.sent(), z]); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression14() { -- return __awaiter(this, void 0, void 0, function* () { -- x.a(y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = (_a = x).a; +- _c = [y]; +- return [4 /*yield*/, z]; +- case 1: +- _b.apply(_a, _c.concat([_d.sent()])); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression15() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x[a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x[a](y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression16() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x[a])(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x[a]]; +- case 1: +- (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression17() { -- return __awaiter(this, void 0, void 0, function* () { -- (yield x)[a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- (_a.sent())[a](y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression18() { -- return __awaiter(this, void 0, void 0, function* () { -- x[yield a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, a]; +- case 1: +- _a[_b.sent()](y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression19() { -- return __awaiter(this, void 0, void 0, function* () { -- x[a](yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = (_a = x)[a]; +- return [4 /*yield*/, y]; +- case 1: +- _b.apply(_a, [_c.sent(), z]); +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression20() { -- return __awaiter(this, void 0, void 0, function* () { -- x[a](y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = (_a = x)[a]; +- _c = [y]; +- return [4 /*yield*/, z]; +- case 1: +- _b.apply(_a, _c.concat([_d.sent()])); +- return [2 /*return*/]; +- } +- }); - }); +async function callExpression0() { + await x(y, z); diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionConditionals.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionConditionals.js.diff index a3dbebba11..f745b7a920 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionConditionals.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionConditionals.js.diff @@ -5,18 +5,56 @@ //// [es5-asyncFunctionConditionals.js] -function conditional0() { -- return __awaiter(this, void 0, void 0, function* () { -- a = (yield x) ? y : z; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- a = (_a.sent()) ? y : z; +- return [2 /*return*/]; +- } +- }); - }); -} -function conditional1() { -- return __awaiter(this, void 0, void 0, function* () { -- a = x ? yield y : z; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- return [3 /*break*/, 3]; +- case 2: +- _a = z; +- _b.label = 3; +- case 3: +- a = _a; +- return [2 /*return*/]; +- } +- }); - }); -} -function conditional2() { -- return __awaiter(this, void 0, void 0, function* () { -- a = x ? y : yield z; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- if (!x) return [3 /*break*/, 1]; +- _a = y; +- return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, z]; +- case 2: +- _a = _b.sent(); +- _b.label = 3; +- case 3: +- a = _a; +- return [2 /*return*/]; +- } +- }); - }); +async function conditional0() { + a = (await x) ? y : z; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionDoStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionDoStatements.js.diff index 862a803d3b..d8327db001 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionDoStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionDoStatements.js.diff @@ -5,148 +5,281 @@ //// [es5-asyncFunctionDoStatements.js] -function doStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- do { +- x; +- } while (y); +- return [2 /*return*/]; +- }); - }); -} -function doStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- yield x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- x; -- } while (yield y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- x; +- _a.label = 1; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (_a.sent()) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- continue; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- do { +- continue; +- } while (y); +- return [2 /*return*/]; +- }); - }); -} -function doStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- yield x; -- continue; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 2]; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- if (1) -- continue; -- yield x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (1) +- return [3 /*break*/, 2]; +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- continue; -- } while (yield y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [3 /*break*/, 1]; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (_a.sent()) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement7() { -- return __awaiter(this, void 0, void 0, function* () { -- A: do { -- continue A; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- A: do { +- continue A; +- } while (y); +- return [2 /*return*/]; +- }); - }); -} -function doStatement8() { -- return __awaiter(this, void 0, void 0, function* () { -- B: do { -- yield x; -- continue B; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 2]; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement9() { -- return __awaiter(this, void 0, void 0, function* () { -- C: do { -- if (1) -- continue C; -- yield x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (1) +- return [3 /*break*/, 2]; +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement10() { -- return __awaiter(this, void 0, void 0, function* () { -- D: do { -- continue D; -- } while (yield y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [3 /*break*/, 1]; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (_a.sent()) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement11() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- break; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- do { +- break; +- } while (y); +- return [2 /*return*/]; +- }); - }); -} -function doStatement12() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- yield x; -- break; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement13() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- if (1) -- break; -- yield x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (1) +- return [3 /*break*/, 3]; +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement14() { -- return __awaiter(this, void 0, void 0, function* () { -- do { -- break; -- } while (yield y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (_a.sent()) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement15() { -- return __awaiter(this, void 0, void 0, function* () { -- E: do { -- break E; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- E: do { +- break E; +- } while (y); +- return [2 /*return*/]; +- }); - }); -} -function doStatement16() { -- return __awaiter(this, void 0, void 0, function* () { -- F: do { -- yield x; -- break F; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement17() { -- return __awaiter(this, void 0, void 0, function* () { -- G: do { -- if (1) -- break G; -- yield x; -- } while (y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (1) +- return [3 /*break*/, 3]; +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (y) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function doStatement18() { -- return __awaiter(this, void 0, void 0, function* () { -- H: do { -- break H; -- } while (yield y); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (_a.sent()) return [3 /*break*/, 0]; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); +async function doStatement0() { + do { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionElementAccess.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionElementAccess.js.diff index a7c437d31e..9fe66c293f 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionElementAccess.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionElementAccess.js.diff @@ -5,18 +5,42 @@ //// [es5-asyncFunctionElementAccess.js] -function elementAccess0() { -- return __awaiter(this, void 0, void 0, function* () { -- z = yield x[y]; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x[y]]; +- case 1: +- z = _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function elementAccess1() { -- return __awaiter(this, void 0, void 0, function* () { -- z = (yield x)[y]; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- z = (_a.sent())[y]; +- return [2 /*return*/]; +- } +- }); - }); -} -function elementAccess2() { -- return __awaiter(this, void 0, void 0, function* () { -- z = x[yield y]; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- z = _a[_b.sent()]; +- return [2 /*return*/]; +- } +- }); - }); +async function elementAccess0() { + z = await x[y]; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForInStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForInStatements.js.diff index 0405971e02..c733861463 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForInStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForInStatements.js.diff @@ -5,66 +5,224 @@ //// [es5-asyncFunctionForInStatements.js] -function forInStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x in y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- for (x in y) { +- z; +- } +- return [2 /*return*/]; +- }); - }); -} -function forInStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x in yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- _a = _d.sent(); +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 2; +- case 2: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- x = _c; +- z; +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x in y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = y; +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 1; +- case 1: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- x = _c; +- return [4 /*yield*/, z]; +- case 2: +- _d.sent(); +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- for ((yield x).a in y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = y; +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 1; +- case 1: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- return [4 /*yield*/, x]; +- case 2: +- (_d.sent()).a = _c; +- z; +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x.a in yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- _a = _d.sent(); +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 2; +- case 2: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- x.a = _c; +- z; +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x.a in y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = y; +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 1; +- case 1: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- x.a = _c; +- return [4 /*yield*/, z]; +- case 2: +- _d.sent(); +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var a in y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var a; +- return __generator(this, function (_a) { +- for (a in y) { +- z; +- } +- return [2 /*return*/]; +- }); - }); -} -function forInStatement7() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var b in yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i, b; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: return [4 /*yield*/, y]; +- case 1: +- _a = _d.sent(); +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 2; +- case 2: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- b = _c; +- z; +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forInStatement8() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var c in y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _i, c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _a = y; +- _b = []; +- for (_c in _a) +- _b.push(_c); +- _i = 0; +- _d.label = 1; +- case 1: +- if (!(_i < _b.length)) return [3 /*break*/, 4]; +- _c = _b[_i]; +- if (!(_c in _a)) return [3 /*break*/, 3]; +- c = _c; +- return [4 /*yield*/, z]; +- case 2: +- _d.sent(); +- _d.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); +async function forInStatement0() { + for (x in y) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForOfStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForOfStatements.js.diff index 015466f8ec..24568c024b 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForOfStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForOfStatements.js.diff @@ -5,136 +5,447 @@ //// [es5-asyncFunctionForOfStatements.js] -function forOfStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x of y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_1; +- return __generator(this, function (_a) { +- for (_i = 0, y_1 = y; _i < y_1.length; _i++) { +- x = y_1[_i]; +- z; +- } +- return [2 /*return*/]; +- }); - }); -} -function forOfStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- x = _a[_i]; +- z; +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_2; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_2 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_2.length)) return [3 /*break*/, 4]; +- x = y_2[_i]; +- return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- for ((yield x).a of y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_3; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_3 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_3.length)) return [3 /*break*/, 4]; +- return [4 /*yield*/, x]; +- case 2: +- (_a.sent()).a = y_3[_i]; +- z; +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x.a of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- x.a = _a[_i]; +- z; +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x.a of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_4; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_4 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_4.length)) return [3 /*break*/, 4]; +- x.a = y_4[_i]; +- return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var b of y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_5, b; +- return __generator(this, function (_a) { +- for (_i = 0, y_5 = y; _i < y_5.length; _i++) { +- b = y_5[_i]; +- z; +- } +- return [2 /*return*/]; +- }); - }); -} -function forOfStatement7() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var c of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a, c; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- c = _a[_i]; +- z; +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement8() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var d of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_6, d; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_6 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_6.length)) return [3 /*break*/, 4]; +- d = y_6[_i]; +- return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement9() { -- return __awaiter(this, void 0, void 0, function* () { -- for ([x] of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- x = _a[_i][0]; +- z; +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement10() { -- return __awaiter(this, void 0, void 0, function* () { -- for ([x] of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_7; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_7 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_7.length)) return [3 /*break*/, 4]; +- x = y_7[_i][0]; +- return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement11() { -- return __awaiter(this, void 0, void 0, function* () { -- for ([x = yield a] of y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_8, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _i = 0, y_8 = y; +- _c.label = 1; +- case 1: +- if (!(_i < y_8.length)) return [3 /*break*/, 6]; +- _b = y_8[_i][0]; +- if (!(_b === void 0)) return [3 /*break*/, 3]; +- return [4 /*yield*/, a]; +- case 2: +- _a = _c.sent(); +- return [3 /*break*/, 4]; +- case 3: +- _a = _b; +- _c.label = 4; +- case 4: +- x = _a; +- z; +- _c.label = 5; +- case 5: +- _i++; +- return [3 /*break*/, 1]; +- case 6: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement12() { -- return __awaiter(this, void 0, void 0, function* () { -- for ([x = a] of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _c.sent(); +- _c.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- _b = _a[_i][0], x = _b === void 0 ? a : _b; +- z; +- _c.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement13() { -- return __awaiter(this, void 0, void 0, function* () { -- for ([x = a] of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_9; +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0, y_9 = y; +- _b.label = 1; +- case 1: +- if (!(_i < y_9.length)) return [3 /*break*/, 4]; +- _a = y_9[_i][0], x = _a === void 0 ? a : _a; +- return [4 /*yield*/, z]; +- case 2: +- _b.sent(); +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement14() { -- return __awaiter(this, void 0, void 0, function* () { -- for ({ x } of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- x = _a[_i].x; +- z; +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement15() { -- return __awaiter(this, void 0, void 0, function* () { -- for ({ x } of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_10; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _i = 0, y_10 = y; +- _a.label = 1; +- case 1: +- if (!(_i < y_10.length)) return [3 /*break*/, 4]; +- x = y_10[_i].x; +- return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement16() { -- return __awaiter(this, void 0, void 0, function* () { -- for ({ x = yield a } of y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_11, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _i = 0, y_11 = y; +- _c.label = 1; +- case 1: +- if (!(_i < y_11.length)) return [3 /*break*/, 6]; +- _b = y_11[_i].x; +- if (!(_b === void 0)) return [3 /*break*/, 3]; +- return [4 /*yield*/, a]; +- case 2: +- _a = _c.sent(); +- return [3 /*break*/, 4]; +- case 3: +- _a = _b; +- _c.label = 4; +- case 4: +- x = _a; +- z; +- _c.label = 5; +- case 5: +- _i++; +- return [3 /*break*/, 1]; +- case 6: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement17() { -- return __awaiter(this, void 0, void 0, function* () { -- for ({ x = a } of yield y) { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _i = 0; +- return [4 /*yield*/, y]; +- case 1: +- _a = _c.sent(); +- _c.label = 2; +- case 2: +- if (!(_i < _a.length)) return [3 /*break*/, 4]; +- _b = _a[_i].x, x = _b === void 0 ? a : _b; +- z; +- _c.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forOfStatement18() { -- return __awaiter(this, void 0, void 0, function* () { -- for ({ x = a } of y) { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _i, y_12; +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _i = 0, y_12 = y; +- _b.label = 1; +- case 1: +- if (!(_i < y_12.length)) return [3 /*break*/, 4]; +- _a = y_12[_i].x, x = _a === void 0 ? a : _a; +- return [4 /*yield*/, z]; +- case 2: +- _b.sent(); +- _b.label = 3; +- case 3: +- _i++; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); +async function forOfStatement0() { + for (x of y) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForStatements.js.diff index 7a1c879c60..35620c1c36 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionForStatements.js.diff @@ -5,52 +5,116 @@ //// [es5-asyncFunctionForStatements.js] -function forStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x; y; z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- for (x; y; z) { +- a; +- } +- return [2 /*return*/]; +- }); - }); -} -function forStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- for (yield x; y; z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- _a.label = 2; +- case 2: +- if (!y) return [3 /*break*/, 4]; +- a; +- _a.label = 3; +- case 3: +- z; +- return [3 /*break*/, 2]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x; yield y; z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- x; +- _a.label = 1; +- case 1: return [4 /*yield*/, y]; +- case 2: +- if (!_a.sent()) return [3 /*break*/, 4]; +- a; +- _a.label = 3; +- case 3: +- z; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x; y; yield z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- x; +- _a.label = 1; +- case 1: +- if (!y) return [3 /*break*/, 4]; +- a; +- _a.label = 2; +- case 2: return [4 /*yield*/, z]; +- case 3: +- _a.sent(); +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- for (x; y; z) { -- yield a; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- x; +- _a.label = 1; +- case 1: +- if (!y) return [3 /*break*/, 4]; +- return [4 /*yield*/, a]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: +- z; +- return [3 /*break*/, 1]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function forStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var b; y; z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- var b; +- return __generator(this, function (_a) { +- for (; y; z) { +- a; +- } +- return [2 /*return*/]; +- }); - }); -} -function forStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- for (var c = x; y; z) { -- a; -- } +- return __awaiter(this, void 0, void 0, function () { +- var c; +- return __generator(this, function (_a) { +- for (c = x; y; z) { +- a; +- } +- return [2 /*return*/]; +- }); - }); +async function forStatement0() { + for (x; y; z) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionHoisting.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionHoisting.js.diff index 5d0e6bf9a1..3ba433279e 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionHoisting.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionHoisting.js.diff @@ -5,20 +5,25 @@ //// [es5-asyncFunctionHoisting.js] -function hoisting() { -- return __awaiter(this, void 0, void 0, function* () { -- var a0, a1 = 1; +- return __awaiter(this, void 0, void 0, function () { - function z() { - var b0, b1 = 1; - } -- if (true) { -- var c0, c1 = 1; -- } -- for (var a = 0; y;) { -- } -- for (var b in y) { -- } -- for (var c of y) { -- } +- var a0, a1, c0, c1, a, b, _i, y_1, c; +- return __generator(this, function (_a) { +- a1 = 1; +- if (true) { +- c1 = 1; +- } +- for (a = 0; y;) { +- } +- for (b in y) { +- } +- for (_i = 0, y_1 = y; _i < y_1.length; _i++) { +- c = y_1[_i]; +- } +- return [2 /*return*/]; +- }); - }); +async function hoisting() { + var a0, a1 = 1; @@ -36,21 +41,31 @@ + } } -function hoistingWithAwait() { -- return __awaiter(this, void 0, void 0, function* () { -- var a0, a1 = 1; +- return __awaiter(this, void 0, void 0, function () { - function z() { - var b0, b1 = 1; - } -- yield 0; -- if (true) { -- var c0, c1 = 1; -- } -- for (var a = 0; y;) { -- } -- for (var b in y) { -- } -- for (var c of y) { -- } +- var a0, a1, c0, c1, a, b, _i, y_2, c; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- a1 = 1; +- return [4 /*yield*/, 0]; +- case 1: +- _a.sent(); +- if (true) { +- c1 = 1; +- } +- for (a = 0; y;) { +- } +- for (b in y) { +- } +- for (_i = 0, y_2 = y; _i < y_2.length; _i++) { +- c = y_2[_i]; +- } +- return [2 /*return*/]; +- } +- }); - }); +async function hoistingWithAwait() { + var a0, a1 = 1; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionIfStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionIfStatements.js.diff index 072b2d63e7..5dcf2ef4dc 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionIfStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionIfStatements.js.diff @@ -5,33 +5,55 @@ //// [es5-asyncFunctionIfStatements.js] -function ifStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- if (yield x) { -- y; -- } -- else { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (_a.sent()) { +- y; +- } +- else { +- z; +- } +- return [2 /*return*/]; +- } +- }); - }); -} -function ifStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- if (x) { -- yield y; -- } -- else { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- z; +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function ifStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- if (x) { -- y; -- } -- else { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 1]; +- y; +- return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, z]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); +async function ifStatement1() { + if (await x) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionLongObjectLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionLongObjectLiteral.js.diff index 943f331ce5..c59c59948e 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionLongObjectLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionLongObjectLiteral.js.diff @@ -13,29 +13,97 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; --const fooShort = () => __awaiter(this, void 0, void 0, function* () { -- return { -- a: yield Promise.resolve(0), -- b: yield Promise.resolve(1), -- c: yield Promise.resolve(2), -- d: yield Promise.resolve(3), -- e: yield Promise.resolve(4), -- }; --}); --const fooLong = () => __awaiter(this, void 0, void 0, function* () { -- return { -- a: yield Promise.resolve(0), -- b: yield Promise.resolve(1), -- c: yield Promise.resolve(2), -- d: yield Promise.resolve(3), -- e: yield Promise.resolve(4), -- f: yield Promise.resolve(5), -- g: yield Promise.resolve(6), -- h: yield Promise.resolve(7), -- i: yield Promise.resolve(8), -- j: yield Promise.resolve(9), -- }; --}); +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; +-var _this = this; +-var fooShort = function () { return __awaiter(_this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = {}; +- return [4 /*yield*/, Promise.resolve(0)]; +- case 1: +- _a.a = _b.sent(); +- return [4 /*yield*/, Promise.resolve(1)]; +- case 2: +- _a.b = _b.sent(); +- return [4 /*yield*/, Promise.resolve(2)]; +- case 3: +- _a.c = _b.sent(); +- return [4 /*yield*/, Promise.resolve(3)]; +- case 4: +- _a.d = _b.sent(); +- return [4 /*yield*/, Promise.resolve(4)]; +- case 5: return [2 /*return*/, (_a.e = _b.sent(), +- _a)]; +- } +- }); +-}); }; +-var fooLong = function () { return __awaiter(_this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = {}; +- return [4 /*yield*/, Promise.resolve(0)]; +- case 1: +- _a.a = _b.sent(); +- return [4 /*yield*/, Promise.resolve(1)]; +- case 2: +- _a.b = _b.sent(); +- return [4 /*yield*/, Promise.resolve(2)]; +- case 3: +- _a.c = _b.sent(); +- return [4 /*yield*/, Promise.resolve(3)]; +- case 4: +- _a.d = _b.sent(); +- return [4 /*yield*/, Promise.resolve(4)]; +- case 5: +- _a.e = _b.sent(); +- return [4 /*yield*/, Promise.resolve(5)]; +- case 6: +- _a.f = _b.sent(); +- return [4 /*yield*/, Promise.resolve(6)]; +- case 7: +- _a.g = _b.sent(); +- return [4 /*yield*/, Promise.resolve(7)]; +- case 8: +- _a.h = _b.sent(); +- return [4 /*yield*/, Promise.resolve(8)]; +- case 9: +- _a.i = _b.sent(); +- return [4 /*yield*/, Promise.resolve(9)]; +- case 10: return [2 /*return*/, (_a.j = _b.sent(), +- _a)]; +- } +- }); +-}); }; +const fooShort = async () => { + return { + a: await Promise.resolve(0), diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNestedLoops.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNestedLoops.js.diff index 8287d8381b..89205ca1e2 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNestedLoops.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNestedLoops.js.diff @@ -5,16 +5,24 @@ //// [es5-asyncFunctionNestedLoops.js] -function nestedLoops() { -- return __awaiter(this, void 0, void 0, function* () { -- A: while (x) { -- yield y; -- while (z) { -- continue A; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- while (z) { +- return [3 /*break*/, 0]; +- } +- while (a) { +- continue; +- } +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; - } -- while (a) { -- continue; -- } -- } +- }); - }); +async function nestedLoops() { + A: while (x) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNewExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNewExpressions.js.diff index 77c35996d8..a6f2192e85 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNewExpressions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionNewExpressions.js.diff @@ -5,108 +5,300 @@ //// [es5-asyncFunctionNewExpressions.js] -function newExpression0() { -- return __awaiter(this, void 0, void 0, function* () { -- yield new x(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, new x(y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression1() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x)(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- new (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression2() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x.bind; +- return [4 /*yield*/, y]; +- case 1: +- new (_a.apply(x, [void 0, _b.sent(), z]))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression3() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x.bind; +- _b = [void 0, y]; +- return [4 /*yield*/, z]; +- case 1: +- new (_a.apply(x, _b.concat([_c.sent()])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression4() { -- return __awaiter(this, void 0, void 0, function* () { -- yield new x(...y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, new (x.bind.apply(x, __spreadArray(__spreadArray([void 0], y, false), [z], false)))()]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression5() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x)(...y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- new ((_a = (_b.sent())).bind.apply(_a, __spreadArray(__spreadArray([void 0], y, false), [z], false)))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression6() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(...(yield y), z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x.bind).apply; +- _c = [x]; +- _d = [[void 0]]; +- return [4 /*yield*/, y]; +- case 1: +- new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [__spreadArray.apply(void 0, _d.concat([(_e.sent()), false])), [z], false])])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression7() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(...y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x.bind).apply; +- _c = [x]; +- _d = [__spreadArray([void 0], y, false)]; +- return [4 /*yield*/, z]; +- case 1: +- new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([[_e.sent()], false]))])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression8() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(yield y, ...z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x.bind).apply; +- _c = [x]; +- _d = [void 0]; +- return [4 /*yield*/, y]; +- case 1: +- new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, [_d.concat([_e.sent()]), z, false])])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression9() { -- return __awaiter(this, void 0, void 0, function* () { -- new x(y, ...(yield z)); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _b = (_a = x.bind).apply; +- _c = [x]; +- _d = [[void 0, y]]; +- return [4 /*yield*/, z]; +- case 1: +- new (_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([(_e.sent()), false]))])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression10() { -- return __awaiter(this, void 0, void 0, function* () { -- yield new x.a(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, new x.a(y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression11() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x.a)(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a]; +- case 1: +- new (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression12() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x).a(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- new (_a.sent()).a(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression13() { -- return __awaiter(this, void 0, void 0, function* () { -- new x.a(yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = (_a = x.a).bind; +- return [4 /*yield*/, y]; +- case 1: +- new (_b.apply(_a, [void 0, _c.sent(), z]))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression14() { -- return __awaiter(this, void 0, void 0, function* () { -- new x.a(y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = (_a = x.a).bind; +- _c = [void 0, y]; +- return [4 /*yield*/, z]; +- case 1: +- new (_b.apply(_a, _c.concat([_d.sent()])))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression15() { -- return __awaiter(this, void 0, void 0, function* () { -- yield new x[a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, new x[a](y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression16() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x[a])(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x[a]]; +- case 1: +- new (_a.sent())(y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression17() { -- return __awaiter(this, void 0, void 0, function* () { -- new (yield x)[a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- new (_a.sent())[a](y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression18() { -- return __awaiter(this, void 0, void 0, function* () { -- new x[yield a](y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, a]; +- case 1: +- new _a[_b.sent()](y, z); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression19() { -- return __awaiter(this, void 0, void 0, function* () { -- new x[a](yield y, z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = (_a = x[a]).bind; +- return [4 /*yield*/, y]; +- case 1: +- new (_b.apply(_a, [void 0, _c.sent(), z]))(); +- return [2 /*return*/]; +- } +- }); - }); -} -function newExpression20() { -- return __awaiter(this, void 0, void 0, function* () { -- new x[a](y, yield z); +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = (_a = x[a]).bind; +- _c = [void 0, y]; +- return [4 /*yield*/, z]; +- case 1: +- new (_b.apply(_a, _c.concat([_d.sent()])))(); +- return [2 /*return*/]; +- } +- }); - }); +async function newExpression0() { + await new x(y, z); diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionObjectLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionObjectLiterals.js.diff index 7d223b3af6..8196c74d6d 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionObjectLiterals.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionObjectLiterals.js.diff @@ -5,59 +5,129 @@ //// [es5-asyncFunctionObjectLiterals.js] -function objectLiteral0() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- a: yield y, -- b: z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = {}; +- return [4 /*yield*/, y]; +- case 1: +- x = (_a.a = _b.sent(), +- _a.b = z, +- _a); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral1() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- a: y, -- b: yield z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = { +- a: y +- }; +- return [4 /*yield*/, z]; +- case 1: +- x = (_a.b = _b.sent(), +- _a); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral2() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- [yield a]: y, -- b: z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = {}; +- return [4 /*yield*/, a]; +- case 1: +- x = (_a[_b.sent()] = y, +- _a.b = z, +- _a); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral3() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- [a]: yield y, -- b: z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = {}; +- _a = a; +- return [4 /*yield*/, y]; +- case 1: +- x = (_b[_a] = _c.sent(), +- _b.b = z, +- _b); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral4() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- a: yield y, -- [b]: z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = {}; +- return [4 /*yield*/, y]; +- case 1: +- x = (_a.a = _b.sent(), +- _a[b] = z, +- _a); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral5() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- a: y, -- [yield b]: z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = { +- a: y +- }; +- return [4 /*yield*/, b]; +- case 1: +- x = (_a[_b.sent()] = z, +- _a); +- return [2 /*return*/]; +- } +- }); - }); -} -function objectLiteral6() { -- return __awaiter(this, void 0, void 0, function* () { -- x = { -- a: y, -- [b]: yield z -- }; +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = { +- a: y +- }; +- _a = b; +- return [4 /*yield*/, z]; +- case 1: +- x = (_b[_a] = _c.sent(), +- _b); +- return [2 /*return*/]; +- } +- }); - }); +async function objectLiteral0() { + x = { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionPropertyAccess.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionPropertyAccess.js.diff index 6774a38c6f..db7f5b0aa1 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionPropertyAccess.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionPropertyAccess.js.diff @@ -5,18 +5,39 @@ //// [es5-asyncFunctionPropertyAccess.js] -function propertyAccess0() { -- return __awaiter(this, void 0, void 0, function* () { -- y = yield x.a; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x.a]; +- case 1: +- y = _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); -} -function propertyAccess1() { -- return __awaiter(this, void 0, void 0, function* () { -- y = (yield x).a; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- y = (_a.sent()).a; +- return [2 /*return*/]; +- } +- }); - }); -} -function callExpression0() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x(y, z); +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x(y, z)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); +async function propertyAccess0() { + y = await x.a; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionReturnStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionReturnStatements.js.diff index 910f12ce51..d97b8b6317 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionReturnStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionReturnStatements.js.diff @@ -5,40 +5,62 @@ //// [es5-asyncFunctionReturnStatements.js] -function returnStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- return; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/]; +- }); - }); -} -function returnStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- return x; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/, x]; +- }); - }); -} -function returnStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- return yield x; +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: return [2 /*return*/, _a.sent()]; +- } +- }); - }); -} -function returnStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- { -- return; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- { +- return [2 /*return*/]; +- } +- return [2 /*return*/]; +- }); - }); -} -function returnStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- yield x; -- { -- return; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- { +- return [2 /*return*/]; +- } +- return [2 /*return*/]; +- } +- }); - }); -} -function returnStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- { -- return yield x; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: return [2 /*return*/, _a.sent()]; +- } +- }); - }); +async function returnStatement0() { + return; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionSwitchStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionSwitchStatements.js.diff index afac4f7e0a..b84c044571 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionSwitchStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionSwitchStatements.js.diff @@ -5,118 +5,222 @@ //// [es5-asyncFunctionSwitchStatements.js] -function switchStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- case y: -- a; -- break; -- default: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (x) { +- case y: +- a; +- break; +- default: +- b; +- break; +- } +- return [2 /*return*/]; +- }); - }); -} -function switchStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (yield x) { -- case y: -- a; -- break; -- default: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- switch (_a.sent()) { +- case y: +- a; +- break; +- default: +- b; +- break; +- } +- return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- case yield y: -- a; -- break; -- default: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- switch (_a) { +- case _b.sent(): return [3 /*break*/, 2]; +- } +- return [3 /*break*/, 3]; +- case 2: +- a; +- return [3 /*break*/, 4]; +- case 3: +- b; +- return [3 /*break*/, 4]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- case y: -- yield a; -- break; -- default: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- switch (_a) { +- case y: return [3 /*break*/, 1]; +- } +- return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, a]; +- case 2: +- _b.sent(); +- return [3 /*break*/, 4]; +- case 3: +- b; +- return [3 /*break*/, 4]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- case y: -- a; -- break; -- default: -- yield b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- switch (_a) { +- case y: return [3 /*break*/, 1]; +- } +- return [3 /*break*/, 2]; +- case 1: +- a; +- return [3 /*break*/, 4]; +- case 2: return [4 /*yield*/, b]; +- case 3: +- _b.sent(); +- return [3 /*break*/, 4]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- case y: -- a; -- break; -- case yield z: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- switch (_a) { +- case y: return [3 /*break*/, 2]; +- } +- return [4 /*yield*/, z]; +- case 1: +- switch (_a) { +- case _b.sent(): return [3 /*break*/, 3]; +- } +- return [3 /*break*/, 4]; +- case 2: +- a; +- return [3 /*break*/, 4]; +- case 3: +- b; +- return [3 /*break*/, 4]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- default: -- c; -- break; -- case yield y: -- a; -- break; -- case z: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- return [4 /*yield*/, y]; +- case 1: +- switch (_a) { +- case _b.sent(): return [3 /*break*/, 3]; +- case z: return [3 /*break*/, 4]; +- } +- return [3 /*break*/, 2]; +- case 2: +- c; +- return [3 /*break*/, 5]; +- case 3: +- a; +- return [3 /*break*/, 5]; +- case 4: +- b; +- return [3 /*break*/, 5]; +- case 5: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement7() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- default: -- c; -- break; -- case y: -- a; -- break; -- case yield z: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- switch (_a) { +- case y: return [3 /*break*/, 3]; +- } +- return [4 /*yield*/, z]; +- case 1: +- switch (_a) { +- case _b.sent(): return [3 /*break*/, 4]; +- } +- return [3 /*break*/, 2]; +- case 2: +- c; +- return [3 /*break*/, 5]; +- case 3: +- a; +- return [3 /*break*/, 5]; +- case 4: +- b; +- return [3 /*break*/, 5]; +- case 5: return [2 /*return*/]; +- } +- }); - }); -} -function switchStatement8() { -- return __awaiter(this, void 0, void 0, function* () { -- switch (x) { -- default: c; -- case y: -- a; -- break; -- case yield z: -- b; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- switch (_a) { +- case y: return [3 /*break*/, 3]; +- } +- return [4 /*yield*/, z]; +- case 1: +- switch (_a) { +- case _b.sent(): return [3 /*break*/, 4]; +- } +- return [3 /*break*/, 2]; +- case 2: +- c; +- _b.label = 3; +- case 3: +- a; +- return [3 /*break*/, 5]; +- case 4: +- b; +- return [3 /*break*/, 5]; +- case 5: return [2 /*return*/]; +- } +- }); - }); +async function switchStatement0() { + switch (x) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionTryStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionTryStatements.js.diff index 916972e992..1e8a86eba7 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionTryStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionTryStatements.js.diff @@ -5,136 +5,212 @@ //// [es5-asyncFunctionTryStatements.js] -function tryCatch0() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { - var x, y; -- try { -- x; -- } -- catch (e) { -- y; -- } +- return __generator(this, function (_a) { +- try { +- x; +- } +- catch (e) { +- y; +- } +- return [2 /*return*/]; +- }); - }); -} -function tryCatch1() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y; -- try { -- yield x; -- } -- catch (e) { -- y; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, e_1; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 2, , 3]); +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- e_1 = _a.sent(); +- y; +- return [3 /*break*/, 3]; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function tryCatch2() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y; -- try { -- x; -- } -- catch (e) { -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, e_2; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 1, , 3]); +- x; +- return [3 /*break*/, 3]; +- case 1: +- e_2 = _a.sent(); +- return [4 /*yield*/, y]; +- case 2: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function tryCatch3() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y; -- try { -- yield x; -- } -- catch (e) { -- return () => e; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, e_3; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 2, , 3]); +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- e_3 = _a.sent(); +- return [2 /*return*/, function () { return e_3; }]; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function tryFinally0() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { - var x, y; -- try { -- x; -- } -- finally { -- y; -- } +- return __generator(this, function (_a) { +- try { +- x; +- } +- finally { +- y; +- } +- return [2 /*return*/]; +- }); - }); -} -function tryFinally1() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { - var x, y; -- try { -- yield x; -- } -- finally { -- y; -- } +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, , 2, 3]); +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: +- y; +- return [7 /*endfinally*/]; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function tryFinally2() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { - var x, y; -- try { -- x; -- } -- finally { -- yield y; -- } +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, , 1, 3]); +- x; +- return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, y]; +- case 2: +- _a.sent(); +- return [7 /*endfinally*/]; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function tryCatchFinally0() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { - var x, y, z; -- try { -- x; -- } -- catch (e) { -- y; -- } -- finally { -- z; -- } +- return __generator(this, function (_a) { +- try { +- x; +- } +- catch (e) { +- y; +- } +- finally { +- z; +- } +- return [2 /*return*/]; +- }); - }); -} -function tryCatchFinally1() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y, z; -- try { -- yield x; -- } -- catch (e) { -- y; -- } -- finally { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, z, e_4; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 2, 3, 4]); +- return [4 /*yield*/, x]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 4]; +- case 2: +- e_4 = _a.sent(); +- y; +- return [3 /*break*/, 4]; +- case 3: +- z; +- return [7 /*endfinally*/]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function tryCatchFinally2() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y, z; -- try { -- x; -- } -- catch (e) { -- yield y; -- } -- finally { -- z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, z, e_5; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 1, 3, 4]); +- x; +- return [3 /*break*/, 4]; +- case 1: +- e_5 = _a.sent(); +- return [4 /*yield*/, y]; +- case 2: +- _a.sent(); +- return [3 /*break*/, 4]; +- case 3: +- z; +- return [7 /*endfinally*/]; +- case 4: return [2 /*return*/]; +- } +- }); - }); -} -function tryCatchFinally3() { -- return __awaiter(this, void 0, void 0, function* () { -- var x, y, z; -- try { -- x; -- } -- catch (e) { -- y; -- } -- finally { -- yield z; -- } +- return __awaiter(this, void 0, void 0, function () { +- var x, y, z, e_6; +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- _a.trys.push([0, 1, 2, 4]); +- x; +- return [3 /*break*/, 4]; +- case 1: +- e_6 = _a.sent(); +- y; +- return [3 /*break*/, 4]; +- case 2: return [4 /*yield*/, z]; +- case 3: +- _a.sent(); +- return [7 /*endfinally*/]; +- case 4: return [2 /*return*/]; +- } +- }); - }); +async function tryCatch0() { + var x, y; diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWhileStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWhileStatements.js.diff index 151e0d3327..dcb3fbe3df 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWhileStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWhileStatements.js.diff @@ -5,148 +5,262 @@ //// [es5-asyncFunctionWhileStatements.js] -function whileStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- while (x) { +- y; +- } +- return [2 /*return*/]; +- }); - }); -} -function whileStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- while (yield x) { -- y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (!_a.sent()) return [3 /*break*/, 2]; +- y; +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- continue; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- while (x) { +- continue; +- } +- return [2 /*return*/]; +- }); - }); -} -function whileStatement4() { -- return __awaiter(this, void 0, void 0, function* () { -- while (yield x) { -- continue; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (!_a.sent()) return [3 /*break*/, 2]; +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement5() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- yield y; -- continue; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement6() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- if (1) -- continue; -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- if (1) +- return [3 /*break*/, 0]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement7() { -- return __awaiter(this, void 0, void 0, function* () { -- A: while (x) { -- continue A; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- A: while (x) { +- continue A; +- } +- return [2 /*return*/]; +- }); - }); -} -function whileStatement8() { -- return __awaiter(this, void 0, void 0, function* () { -- B: while (yield x) { -- continue B; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (!_a.sent()) return [3 /*break*/, 2]; +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement9() { -- return __awaiter(this, void 0, void 0, function* () { -- C: while (x) { -- yield y; -- continue C; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement10() { -- return __awaiter(this, void 0, void 0, function* () { -- D: while (x) { -- if (1) -- continue D; -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- if (1) +- return [3 /*break*/, 0]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement11() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- while (x) { +- break; +- } +- return [2 /*return*/]; +- }); - }); -} -function whileStatement12() { -- return __awaiter(this, void 0, void 0, function* () { -- while (yield x) { -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (!_a.sent()) return [3 /*break*/, 2]; +- return [3 /*break*/, 2]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement13() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- yield y; -- break; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 2]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement14() { -- return __awaiter(this, void 0, void 0, function* () { -- while (x) { -- if (1) -- break; -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- if (1) +- return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement15() { -- return __awaiter(this, void 0, void 0, function* () { -- E: while (x) { -- break E; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- E: while (x) { +- break E; +- } +- return [2 /*return*/]; +- }); - }); -} -function whileStatement16() { -- return __awaiter(this, void 0, void 0, function* () { -- F: while (yield x) { -- break F; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- if (!_a.sent()) return [3 /*break*/, 2]; +- return [3 /*break*/, 2]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement17() { -- return __awaiter(this, void 0, void 0, function* () { -- G: while (x) { -- yield y; -- break G; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 2]; +- case 2: return [2 /*return*/]; +- } +- }); - }); -} -function whileStatement18() { -- return __awaiter(this, void 0, void 0, function* () { -- H: while (x) { -- if (1) -- break H; -- yield y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!x) return [3 /*break*/, 2]; +- if (1) +- return [3 /*break*/, 2]; +- return [4 /*yield*/, y]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 0]; +- case 2: return [2 /*return*/]; +- } +- }); - }); +async function whileStatement0() { + while (x) { diff --git a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWithStatements.js.diff b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWithStatements.js.diff index 977d69144e..b5361f1888 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWithStatements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-asyncFunctionWithStatements.js.diff @@ -5,22 +5,88 @@ //// [es5-asyncFunctionWithStatements.js] -function withStatement0() { -- return __awaiter(this, void 0, void 0, function* () { -- with (x) { -- y; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- with (x) { +- y; +- } +- return [2 /*return*/]; +- }); - }); -} -function withStatement1() { -- return __awaiter(this, void 0, void 0, function* () { -- with (yield x) { -- y; -- } +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: return [4 /*yield*/, x]; +- case 1: +- _a = _b.sent(); +- _b.label = 2; +- case 2: +- with (_a) { +- y; +- } +- _b.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); -} -function withStatement2() { -- return __awaiter(this, void 0, void 0, function* () { -- with (x) { +- return __awaiter(this, void 0, void 0, function () { +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = x; +- _b.label = 1; +- case 1: with (_a) { +- a; +- return [4 /*yield*/, y]; +- } +- case 2: +- with (_a) { +- _b.sent(); +- b; +- } +- _b.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); +- }); +-} +-function withStatement3() { +- return __awaiter(this, void 0, void 0, function () { +- var _a, _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = x; +- _c.label = 1; +- case 1: +- with (_a) { +- _b = z; +- } +- _c.label = 2; +- case 2: with (_a) { +- with (_b) { +- a; +- return [4 /*yield*/, y]; +- } +- } +- case 3: +- with (_a) { +- with (_b) { +- _c.sent(); +- b; +- } +- } +- _c.label = 4; +- case 4: return [2 /*return*/]; +- } +- }); +- }); +async function withStatement0() { + with (x) { + y; @@ -41,22 +107,9 @@ +async function withStatement3() { + with (x) { + with (z) { - a; -- yield y; ++ a; + await y; - b; - } -- }); --} --function withStatement3() { -- return __awaiter(this, void 0, void 0, function* () { -- with (x) { -- with (z) { -- a; -- yield y; -- b; -- } -- } -- }); ++ b; ++ } + } } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5-commonjs.js.diff b/testdata/baselines/reference/submodule/compiler/es5-commonjs.js.diff new file mode 100644 index 0000000000..a46290e5b0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5-commonjs.js.diff @@ -0,0 +1,20 @@ +--- old.es5-commonjs.js ++++ new.es5-commonjs.js +@@= skipped -17, +17 lines =@@ + //// [es5-commonjs.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + } +- A.prototype.B = function () { ++ B() { + return 42; +- }; +- return A; +-}()); ++ } ++} + exports.default = A; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5-commonjs4.js.diff b/testdata/baselines/reference/submodule/compiler/es5-commonjs4.js.diff new file mode 100644 index 0000000000..774e767080 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5-commonjs4.js.diff @@ -0,0 +1,21 @@ +--- old.es5-commonjs4.js ++++ new.es5-commonjs4.js +@@= skipped -19, +19 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.__esModule = void 0; +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + } +- A.prototype.B = function () { ++ B() { + return 42; +- }; +- return A; +-}()); ++ } ++} + exports.default = A; + exports.__esModule = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5-importHelpersAsyncFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/es5-importHelpersAsyncFunctions.js.diff index ec23565193..7613ee5758 100644 --- a/testdata/baselines/reference/submodule/compiler/es5-importHelpersAsyncFunctions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5-importHelpersAsyncFunctions.js.diff @@ -6,7 +6,10 @@ exports.foo = foo; -var tslib_1 = require("tslib"); -function foo() { -- return tslib_1.__awaiter(this, void 0, void 0, function* () { +- return tslib_1.__awaiter(this, void 0, void 0, function () { +- return tslib_1.__generator(this, function (_a) { +- return [2 /*return*/]; +- }); - }); +async function foo() { } @@ -20,8 +23,38 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -function foo() { -- return __awaiter(this, void 0, void 0, function* () { +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- return [2 /*return*/]; +- }); - }); +async function foo() { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5-yieldFunctionObjectLiterals.js.diff b/testdata/baselines/reference/submodule/compiler/es5-yieldFunctionObjectLiterals.js.diff new file mode 100644 index 0000000000..3849276a03 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5-yieldFunctionObjectLiterals.js.diff @@ -0,0 +1,189 @@ +--- old.es5-yieldFunctionObjectLiterals.js ++++ new.es5-yieldFunctionObjectLiterals.js +@@= skipped -66, +66 lines =@@ + //// [es5-yieldFunctionObjectLiterals.js] + // mainly to verify indentation of emitted code + function g() { return "g"; } +-function objectLiteral1() { +- var x, _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = { +- a: 1 +- }; +- return [4 /*yield*/, 2]; +- case 1: +- x = (_a.b = _b.sent(), +- _a.c = 3, +- _a); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral2() { +- var x, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = { +- a: 1 +- }; +- _a = g(); +- return [4 /*yield*/, 2]; +- case 1: +- x = (_b[_a] = _c.sent(), +- _b.c = 3, +- _b); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral3() { +- var x, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _a = { +- a: 1 +- }; +- return [4 /*yield*/, 2]; +- case 1: +- x = (_b = (_a.b = _c.sent(), +- _a), +- _b[g()] = 3, +- _b.c = 4, +- _b); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral4() { +- var x; +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = { +- a: 1 +- }, +- _a[g()] = 2; +- return [4 /*yield*/, 3]; +- case 1: +- x = (_a.b = _b.sent(), +- _a.c = 4, +- _a); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral5() { +- var x, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = { +- a: 1 +- }; +- _a = g(); +- return [4 /*yield*/, 2]; +- case 1: +- x = (_b[_a] = _c.sent(), +- _b.c = 4, +- _b); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral6() { +- var x; +- var _a; +- return __generator(this, function (_b) { +- switch (_b.label) { +- case 0: +- _a = { +- a: 1 +- }; +- return [4 /*yield*/]; +- case 1: +- x = (_a[_b.sent()] = 2, +- _a.c = 4, +- _a); +- return [2 /*return*/]; +- } +- }); +-} +-function objectLiteral7() { +- var x, _a; +- var _b; +- return __generator(this, function (_c) { +- switch (_c.label) { +- case 0: +- _b = { +- a: 1 +- }; +- return [4 /*yield*/]; +- case 1: +- _a = _c.sent(); +- return [4 /*yield*/, 2]; +- case 2: +- x = (_b[_a] = _c.sent(), +- _b.c = 4, +- _b); +- return [2 /*return*/]; +- } +- }); ++function* objectLiteral1() { ++ const x = { ++ a: 1, ++ b: yield 2, ++ c: 3, ++ }; ++} ++function* objectLiteral2() { ++ const x = { ++ a: 1, ++ [g()]: yield 2, ++ c: 3, ++ }; ++} ++function* objectLiteral3() { ++ const x = { ++ a: 1, ++ b: yield 2, ++ [g()]: 3, ++ c: 4, ++ }; ++} ++function* objectLiteral4() { ++ const x = { ++ a: 1, ++ [g()]: 2, ++ b: yield 3, ++ c: 4, ++ }; ++} ++function* objectLiteral5() { ++ const x = { ++ a: 1, ++ [g()]: yield 2, ++ c: 4, ++ }; ++} ++function* objectLiteral6() { ++ const x = { ++ a: 1, ++ [yield]: 2, ++ c: 4, ++ }; ++} ++function* objectLiteral7() { ++ const x = { ++ a: 1, ++ [yield]: yield 2, ++ c: 4, ++ }; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration.js.diff new file mode 100644 index 0000000000..e80c68a62b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration.js.diff @@ -0,0 +1,17 @@ +--- old.es5ExportDefaultClassDeclaration.js ++++ new.es5ExportDefaultClassDeclaration.js +@@= skipped -8, +8 lines =@@ + //// [es5ExportDefaultClassDeclaration.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function () { }; +- return C; +-}()); ++class C { ++ method() { } ++} + exports.default = C; + diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration2.js.diff b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration2.js.diff new file mode 100644 index 0000000000..2ea91998a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration2.js.diff @@ -0,0 +1,17 @@ +--- old.es5ExportDefaultClassDeclaration2.js ++++ new.es5ExportDefaultClassDeclaration2.js +@@= skipped -8, +8 lines =@@ + //// [es5ExportDefaultClassDeclaration2.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var default_1 = /** @class */ (function () { +- function default_1() { +- } +- default_1.prototype.method = function () { }; +- return default_1; +-}()); ++class default_1 { ++ method() { } ++} + exports.default = default_1; + diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration3.js.diff b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration3.js.diff new file mode 100644 index 0000000000..ac2d84d00a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5ExportDefaultClassDeclaration3.js.diff @@ -0,0 +1,21 @@ +--- old.es5ExportDefaultClassDeclaration3.js ++++ new.es5ExportDefaultClassDeclaration3.js +@@= skipped -18, +18 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var before = new C(); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function () { ++class C { ++ method() { + return new C(); +- }; +- return C; +-}()); ++ } ++} + exports.default = C; + var after = new C(); + var t = C; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js index 2d74826fc9..60d6e2580c 100644 --- a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js +++ b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js @@ -8,7 +8,7 @@ class A { } } -module A { +namespace A { export interface B { } } diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js.diff b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js.diff index 9b20b16a39..49a3b67713 100644 --- a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.js.diff @@ -1,6 +1,24 @@ --- old.es5ExportEqualsDts.js +++ new.es5ExportEqualsDts.js -@@= skipped -26, +26 lines =@@ +@@= skipped -15, +15 lines =@@ + + //// [es5ExportEqualsDts.js] + "use strict"; +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { ++class A { ++ foo() { + var aVal; + return aVal; +- }; +- return A; +-}()); ++ } ++} + module.exports = A; + //// [es5ExportEqualsDts.d.ts] declare class A { diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.symbols b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.symbols index f7370baf3d..7ed6986e62 100644 --- a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.symbols +++ b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.symbols @@ -10,18 +10,18 @@ class A { var aVal: A.B; >aVal : Symbol(aVal, Decl(es5ExportEqualsDts.ts, 2, 11)) >A : Symbol(A, Decl(es5ExportEqualsDts.ts, 0, 0), Decl(es5ExportEqualsDts.ts, 5, 1)) ->B : Symbol(A.B, Decl(es5ExportEqualsDts.ts, 7, 10)) +>B : Symbol(A.B, Decl(es5ExportEqualsDts.ts, 7, 13)) return aVal; >aVal : Symbol(aVal, Decl(es5ExportEqualsDts.ts, 2, 11)) } } -module A { +namespace A { >A : Symbol(A, Decl(es5ExportEqualsDts.ts, 0, 0), Decl(es5ExportEqualsDts.ts, 5, 1)) export interface B { } ->B : Symbol(B, Decl(es5ExportEqualsDts.ts, 7, 10)) +>B : Symbol(B, Decl(es5ExportEqualsDts.ts, 7, 13)) } export = A diff --git a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.types b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.types index df3a05d0ab..f564fdb2f1 100644 --- a/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.types +++ b/testdata/baselines/reference/submodule/compiler/es5ExportEqualsDts.types @@ -16,7 +16,7 @@ class A { } } -module A { +namespace A { export interface B { } } diff --git a/testdata/baselines/reference/submodule/compiler/es5ModuleWithModuleGenCommonjs.js.diff b/testdata/baselines/reference/submodule/compiler/es5ModuleWithModuleGenCommonjs.js.diff new file mode 100644 index 0000000000..51caec2ee0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5ModuleWithModuleGenCommonjs.js.diff @@ -0,0 +1,20 @@ +--- old.es5ModuleWithModuleGenCommonjs.js ++++ new.es5ModuleWithModuleGenCommonjs.js +@@= skipped -16, +16 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.A = void 0; +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + } +- A.prototype.B = function () { ++ B() { + return 42; +- }; +- return A; +-}()); ++ } ++} + exports.A = A; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5ModuleWithoutModuleGenTarget.js.diff b/testdata/baselines/reference/submodule/compiler/es5ModuleWithoutModuleGenTarget.js.diff new file mode 100644 index 0000000000..8a8c694615 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5ModuleWithoutModuleGenTarget.js.diff @@ -0,0 +1,20 @@ +--- old.es5ModuleWithoutModuleGenTarget.js ++++ new.es5ModuleWithoutModuleGenTarget.js +@@= skipped -16, +16 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.A = void 0; +-var A = /** @class */ (function () { +- function A() { ++class A { ++ constructor() { + } +- A.prototype.B = function () { ++ B() { + return 42; +- }; +- return A; +-}()); ++ } ++} + exports.A = A; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5SetterparameterDestructuringNotElided.js.diff b/testdata/baselines/reference/submodule/compiler/es5SetterparameterDestructuringNotElided.js.diff new file mode 100644 index 0000000000..3cfe422854 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5SetterparameterDestructuringNotElided.js.diff @@ -0,0 +1,14 @@ +--- old.es5SetterparameterDestructuringNotElided.js ++++ new.es5SetterparameterDestructuringNotElided.js +@@= skipped -8, +8 lines =@@ + }; + + //// [es5SetterparameterDestructuringNotElided.js] +-var foo = { +- set foo(_a) { +- var start = _a[0], end = _a[1]; ++const foo = { ++ set foo([start, end]) { + void start; + void end; + }, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es5andes6module.js.diff b/testdata/baselines/reference/submodule/compiler/es5andes6module.js.diff new file mode 100644 index 0000000000..6d9ed36c6a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es5andes6module.js.diff @@ -0,0 +1,20 @@ +--- old.es5andes6module.js ++++ new.es5andes6module.js +@@= skipped -15, +15 lines =@@ + + + //// [es5andes6module.js] +-var A = /** @class */ (function () { +- function A() { ++export default class A { ++ constructor() { + } +- A.prototype.B = function () { ++ B() { + return 42; +- }; +- return A; +-}()); +-export default A; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassSuperCodegenBug.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassSuperCodegenBug.js.diff new file mode 100644 index 0000000000..07e32be2e4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ClassSuperCodegenBug.js.diff @@ -0,0 +1,48 @@ +--- old.es6ClassSuperCodegenBug.js ++++ new.es6ClassSuperCodegenBug.js +@@= skipped -15, +15 lines =@@ + + + //// [es6ClassSuperCodegenBug.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A(str1, str2) { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- var _this = this; ++class A { ++ constructor(str1, str2) { } ++} ++class B extends A { ++ constructor() { + if (true) { +- _this = _super.call(this, 'a1', 'b1') || this; ++ super('a1', 'b1'); + } + else { +- _this = _super.call(this, 'a2', 'b2') || this; ++ super('a2', 'b2'); + } +- return _this; + } +- return B; +-}(A)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ClassTest.errors.txt index 22547bed6d..d95cc9d466 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest.errors.txt @@ -37,7 +37,7 @@ es6ClassTest.ts(25,44): error TS1015: Parameter cannot have question mark and in var f = new Foo(); - declare module AmbientMod { + declare namespace AmbientMod { export class Provide { foo:number; zoo:string; diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest.js b/testdata/baselines/reference/submodule/compiler/es6ClassTest.js index 63613680e5..29ad5e7e66 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest.js +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest.js @@ -34,7 +34,7 @@ class Foo extends Bar { var f = new Foo(); -declare module AmbientMod { +declare namespace AmbientMod { export class Provide { foo:number; zoo:string; diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest.js.diff index ed56937c71..bd1548f017 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest.js.diff @@ -1,29 +1,51 @@ --- old.es6ClassTest.js +++ new.es6ClassTest.js -@@= skipped -87, +87 lines =@@ +@@= skipped -86, +86 lines =@@ + //// [es6ClassTest.js] - class Bar { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Bar = /** @class */ (function () { +- function Bar(n) { +- } +- Bar.prototype.prop1 = function (x) { ++class Bar { + goo; - prop1(x) { ++ prop1(x) { return x; - } - constructor(n) { } - } +- }; +- return Bar; +-}()); ++ } ++ constructor(n) { } ++} // new-style class --let Foo = (() => { -- class Foo extends Bar { -- bar() { return 0; } -- boo(x) { return x; } -- constructor(x, y, z = 0) { -- super(x); -- this.y = y; -- this.z = z; -- this.gar = 0; -- this.zoo = "zoo"; -- this.x = x; -- this.gar = 5; -- } +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo(x, y, z) { +- if (z === void 0) { z = 0; } +- var _this = _super.call(this, x) || this; +- _this.y = y; +- _this.z = z; +- _this.gar = 0; +- _this.zoo = "zoo"; +- _this.x = x; +- _this.gar = 5; +- return _this; +class Foo extends Bar { + y; + z; @@ -41,9 +63,11 @@ + this.x = x; + this.gar = 5; } +- Foo.prototype.bar = function () { return 0; }; +- Foo.prototype.boo = function (x) { return x; }; - Foo.statVal = 0; - return Foo; --})(); +-}(Bar)); +} var f = new Foo(); //class GetSetMonster { diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest.symbols b/testdata/baselines/reference/submodule/compiler/es6ClassTest.symbols index 2ee5ab99cb..81f483d6c4 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest.symbols @@ -77,11 +77,11 @@ var f = new Foo(); >f : Symbol(f, Decl(es6ClassTest.ts, 31, 3)) >Foo : Symbol(Foo, Decl(es6ClassTest.ts, 7, 1)) -declare module AmbientMod { +declare namespace AmbientMod { >AmbientMod : Symbol(AmbientMod, Decl(es6ClassTest.ts, 31, 18)) export class Provide { ->Provide : Symbol(Provide, Decl(es6ClassTest.ts, 33, 27)) +>Provide : Symbol(Provide, Decl(es6ClassTest.ts, 33, 30)) foo:number; >foo : Symbol(Provide.foo, Decl(es6ClassTest.ts, 34, 23)) diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest.types b/testdata/baselines/reference/submodule/compiler/es6ClassTest.types index 137e087e96..86cc21bc75 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest.types +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest.types @@ -87,7 +87,7 @@ var f = new Foo(); >new Foo() : Foo >Foo : typeof Foo -declare module AmbientMod { +declare namespace AmbientMod { >AmbientMod : typeof AmbientMod export class Provide { diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest2.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest2.js.diff index 0615839804..735fceec54 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest2.js.diff @@ -1,105 +1,266 @@ --- old.es6ClassTest2.js +++ new.es6ClassTest2.js -@@= skipped -161, +161 lines =@@ +@@= skipped -160, +160 lines =@@ + //// [es6ClassTest2.js] - class BasicMonster { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var BasicMonster = /** @class */ (function () { +- function BasicMonster(name, health) { ++class BasicMonster { + name; + health; - constructor(name, health) { ++ constructor(name, health) { this.name = name; this.health = health; - this.isAlive = true; } - attack(target) { +- BasicMonster.prototype.attack = function (target) { ++ attack(target) { // WScript.Echo("Attacks " + target); - } +- }; +- return BasicMonster; +-}()); ++ } + isAlive = true; - } ++} var m1 = new BasicMonster("1", 100); var m2 = new BasicMonster("2", 100); -@@= skipped -15, +17 lines =@@ + m1.attack(m2); m1.health = 0; console.log(m5.isAlive.toString()); - class GetSetMonster { +-var GetSetMonster = /** @class */ (function () { +- function GetSetMonster(name, _health) { ++class GetSetMonster { + name; + _health; - constructor(name, _health) { ++ constructor(name, _health) { this.name = name; this._health = _health; -@@= skipped -27, +29 lines =@@ + } +- GetSetMonster.prototype.attack = function (target) { ++ attack(target) { + // WScript.Echo("Attacks " + target); +- }; +- Object.defineProperty(GetSetMonster.prototype, "isAlive", { +- // The contextual keyword "get" followed by an identifier and +- // a curly body defines a getter in the same way that "get" +- // defines one in an object literal. +- get: function () { +- return this._health > 0; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(GetSetMonster.prototype, "health", { +- // Likewise, "set" can be used to define setters. +- set: function (value) { +- if (value < 0) { +- throw new Error('Health must be non-negative.'); +- } +- this._health = value; +- }, +- enumerable: false, +- configurable: true +- }); +- return GetSetMonster; +-}()); ++ } ++ // The contextual keyword "get" followed by an identifier and ++ // a curly body defines a getter in the same way that "get" ++ // defines one in an object literal. ++ get isAlive() { ++ return this._health > 0; ++ } ++ // Likewise, "set" can be used to define setters. ++ set health(value) { ++ if (value < 0) { ++ throw new Error('Health must be non-negative.'); ++ } ++ this._health = value; ++ } ++} + var m3 = new BasicMonster("1", 100); + var m4 = new BasicMonster("2", 100); + m3.attack(m4); m3.health = 0; var x = m5.isAlive.toString(); - class OverloadedMonster { +-var OverloadedMonster = /** @class */ (function () { +- function OverloadedMonster(name, health) { ++class OverloadedMonster { + name; + health; - constructor(name, health) { ++ constructor(name, health) { this.name = name; this.health = health; - this.isAlive = true; } - attack(target) { +- OverloadedMonster.prototype.attack = function (target) { ++ attack(target) { //WScript.Echo("Attacks " + target); - } +- }; +- return OverloadedMonster; +-}()); ++ } + isAlive = true; - } ++} var m5 = new OverloadedMonster("1"); var m6 = new OverloadedMonster("2"); -@@= skipped -20, +22 lines =@@ - } + m5.attack(m6); + m5.health = 0; + var y = m5.isAlive.toString(); +-var SplatMonster = /** @class */ (function () { +- function SplatMonster() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +- } +- SplatMonster.prototype.roar = function (name) { +- var args = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- args[_i - 1] = arguments[_i]; +- } +- }; +- return SplatMonster; +-}()); ++class SplatMonster { ++ constructor(...args) { } ++ roar(name, ...args) { } ++} function foo() { return true; } - class PrototypeMonster { -- constructor() { +-var PrototypeMonster = /** @class */ (function () { +- function PrototypeMonster() { - this.age = 1; - this.b = foo(); - } +- return PrototypeMonster; +-}()); +-var SuperParent = /** @class */ (function () { +- function SuperParent(a) { +- } +- SuperParent.prototype.b = function (b) { +- }; +- SuperParent.prototype.c = function () { +- }; +- return SuperParent; +-}()); +-var SuperChild = /** @class */ (function (_super) { +- __extends(SuperChild, _super); +- function SuperChild() { +- return _super.call(this, 1) || this; +- } +- SuperChild.prototype.b = function () { +- _super.prototype.b.call(this, 'str'); +- }; +- SuperChild.prototype.c = function () { +- _super.prototype.c.call(this); +- }; +- return SuperChild; +-}(SuperParent)); +-var Statics = /** @class */ (function () { +- function Statics() { +- } +- Statics.baz = function () { ++class PrototypeMonster { + age = 1; + name; + b = foo(); - } - class SuperParent { - constructor(a) { -@@= skipped -24, +23 lines =@@ - super.c(); - } - } --let Statics = (() => { -- class Statics { -- static baz() { -- return ""; -- } ++} ++class SuperParent { ++ constructor(a) { ++ } ++ b(b) { ++ } ++ c() { ++ } ++} ++class SuperChild extends SuperParent { ++ constructor() { ++ super(1); ++ } ++ b() { ++ super.b('str'); ++ } ++ c() { ++ super.c(); ++ } ++} +class Statics { + static foo = 1; + static bar; + static baz() { -+ return ""; - } + return ""; +- }; - Statics.foo = 1; - return Statics; --})(); +-}()); ++ } +} var stat = new Statics(); - class ImplementsInterface { +-var ImplementsInterface = /** @class */ (function () { +- function ImplementsInterface() { ++class ImplementsInterface { + x; + z; - constructor() { ++ constructor() { this.x = 1; this.z = "foo"; -@@= skipped -19, +19 lines =@@ - class Visibility { - foo() { } - bar() { } + } +- return ImplementsInterface; +-}()); +-var Visibility = /** @class */ (function () { +- function Visibility() { ++} ++class Visibility { ++ foo() { } ++ bar() { } + x; + y; + z; - constructor() { ++ constructor() { this.x = 1; this.y = 2; } - } - class BaseClassWithConstructor { +- Visibility.prototype.foo = function () { }; +- Visibility.prototype.bar = function () { }; +- return Visibility; +-}()); +-var BaseClassWithConstructor = /** @class */ (function () { +- function BaseClassWithConstructor(x, s) { ++} ++class BaseClassWithConstructor { + x; + s; - constructor(x, s) { ++ constructor(x, s) { this.x = x; - this.s = s; \ No newline at end of file + this.s = s; + } +- return BaseClassWithConstructor; +-}()); ++} + // used to test codegen +-var ChildClassWithoutConstructor = /** @class */ (function (_super) { +- __extends(ChildClassWithoutConstructor, _super); +- function ChildClassWithoutConstructor() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ChildClassWithoutConstructor; +-}(BaseClassWithConstructor)); ++class ChildClassWithoutConstructor extends BaseClassWithConstructor { ++} + var ccwc = new ChildClassWithoutConstructor(1, "s"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js index 207f2e5368..7f7ffab738 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ClassTest3.ts] //// //// [es6ClassTest3.ts] -module M { +namespace M { class Visibility { public foo() { }; private bar() { }; diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js.diff index 0fc3bdeb3a..fc12acdaf5 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.js.diff @@ -1,12 +1,28 @@ --- old.es6ClassTest3.js +++ new.es6ClassTest3.js -@@= skipped -23, +23 lines =@@ - ; - bar() { } - ; +@@= skipped -18, +18 lines =@@ + //// [es6ClassTest3.js] + var M; + (function (M) { +- var Visibility = /** @class */ (function () { +- function Visibility() { ++ class Visibility { ++ foo() { } ++ ; ++ bar() { } ++ ; + x; + y; + z; - constructor() { ++ constructor() { this.x = 1; - this.y = 2; \ No newline at end of file + this.y = 2; + } +- Visibility.prototype.foo = function () { }; +- ; +- Visibility.prototype.bar = function () { }; +- ; +- return Visibility; +- }()); ++ } + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.symbols b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.symbols index c1d74722ea..673ea5577b 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/es6ClassTest3.ts] //// === es6ClassTest3.ts === -module M { +namespace M { >M : Symbol(M, Decl(es6ClassTest3.ts, 0, 0)) class Visibility { ->Visibility : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 10)) +>Visibility : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 13)) public foo() { }; >foo : Symbol(Visibility.foo, Decl(es6ClassTest3.ts, 1, 19)) @@ -25,12 +25,12 @@ module M { constructor() { this.x = 1; >this.x : Symbol(Visibility.x, Decl(es6ClassTest3.ts, 3, 23)) ->this : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 10)) +>this : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 13)) >x : Symbol(Visibility.x, Decl(es6ClassTest3.ts, 3, 23)) this.y = 2; >this.y : Symbol(Visibility.y, Decl(es6ClassTest3.ts, 4, 26)) ->this : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 10)) +>this : Symbol(Visibility, Decl(es6ClassTest3.ts, 0, 13)) >y : Symbol(Visibility.y, Decl(es6ClassTest3.ts, 4, 26)) } } diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.types b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.types index 7eeaedddc8..abc649049b 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest3.types +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ClassTest3.ts] //// === es6ClassTest3.ts === -module M { +namespace M { >M : typeof M class Visibility { diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js index 5b82512b0c..04d082f6cb 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js @@ -7,7 +7,7 @@ class C1T5 { return i; } } -module C2T5 {} +namespace C2T5 {} class bigClass { public break = 1; diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js.diff index 2170e4d0f4..c319f57292 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.js.diff @@ -1,21 +1,28 @@ --- old.es6ClassTest5.js +++ new.es6ClassTest5.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [es6ClassTest5.js] - class C1T5 { -- constructor() { -- this.foo = (i) => { +-var C1T5 = /** @class */ (function () { +- function C1T5() { +- this.foo = function (i) { - return i; - }; - } +- return C1T5; +-}()); +-var bigClass = /** @class */ (function () { +- function bigClass() { +- this.break = 1; +- } +- return bigClass; +-}()); ++class C1T5 { + foo = (i) => { + return i; + }; - } - class bigClass { -- constructor() { -- this.break = 1; -- } ++} ++class bigClass { + break = 1; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.symbols b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.symbols index 342c66ef27..73da74a358 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.symbols @@ -16,11 +16,11 @@ class C1T5 { >i : Symbol(i, Decl(es6ClassTest5.ts, 2, 6)) } } -module C2T5 {} +namespace C2T5 {} >C2T5 : Symbol(C2T5, Decl(es6ClassTest5.ts, 5, 1)) class bigClass { ->bigClass : Symbol(bigClass, Decl(es6ClassTest5.ts, 6, 14)) +>bigClass : Symbol(bigClass, Decl(es6ClassTest5.ts, 6, 17)) public break = 1; >break : Symbol(bigClass.break, Decl(es6ClassTest5.ts, 8, 17)) diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.types b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.types index 51976f83cf..5bfc75d62a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest5.types +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest5.types @@ -17,7 +17,7 @@ class C1T5 { >i : number } } -module C2T5 {} +namespace C2T5 {} class bigClass { >bigClass : bigClass diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js index f02912e404..8a444b0460 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ClassTest7.ts] //// //// [es6ClassTest7.ts] -declare module M { +declare namespace M { export class Foo { } } diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js.diff new file mode 100644 index 0000000000..392a289446 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.js.diff @@ -0,0 +1,30 @@ +--- old.es6ClassTest7.js ++++ new.es6ClassTest7.js +@@= skipped -10, +10 lines =@@ + + + //// [es6ClassTest7.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Bar; +-}(M.Foo)); ++class Bar extends M.Foo { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.symbols b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.symbols index 8ed13daa18..e21d3e9a25 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.symbols @@ -1,18 +1,18 @@ //// [tests/cases/compiler/es6ClassTest7.ts] //// === es6ClassTest7.ts === -declare module M { +declare namespace M { >M : Symbol(M, Decl(es6ClassTest7.ts, 0, 0)) export class Foo { ->Foo : Symbol(Foo, Decl(es6ClassTest7.ts, 0, 18)) +>Foo : Symbol(Foo, Decl(es6ClassTest7.ts, 0, 21)) } } class Bar extends M.Foo { >Bar : Symbol(Bar, Decl(es6ClassTest7.ts, 3, 1)) ->M.Foo : Symbol(M.Foo, Decl(es6ClassTest7.ts, 0, 18)) +>M.Foo : Symbol(M.Foo, Decl(es6ClassTest7.ts, 0, 21)) >M : Symbol(M, Decl(es6ClassTest7.ts, 0, 0)) ->Foo : Symbol(M.Foo, Decl(es6ClassTest7.ts, 0, 18)) +>Foo : Symbol(M.Foo, Decl(es6ClassTest7.ts, 0, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.types b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.types index 158ab621de..fda05ee7ae 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest7.types +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest7.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ClassTest7.ts] //// === es6ClassTest7.ts === -declare module M { +declare namespace M { >M : typeof M export class Foo { diff --git a/testdata/baselines/reference/submodule/compiler/es6ClassTest8.js.diff b/testdata/baselines/reference/submodule/compiler/es6ClassTest8.js.diff index 908c4a020a..36429f1f47 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ClassTest8.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ClassTest8.js.diff @@ -1,23 +1,59 @@ --- old.es6ClassTest8.js +++ new.es6ClassTest8.js -@@= skipped -52, +52 lines =@@ +@@= skipped -43, +43 lines =@@ + + //// [es6ClassTest8.js] + function f1(x) { return x; } +-var C = /** @class */ (function () { +- function C() { ++class C { ++ constructor() { + var bar = (function () { + return bar; // 'bar' should be resolvable + }); + var b = f1(f1(bar)); } - } - class Vector { +- return C; +-}()); +-var Vector = /** @class */ (function () { +- function Vector(x, y, z) { ++} ++class Vector { + x; + y; + z; - static norm(v) { return null; } - static minus(v1, v2) { return null; } - static times(v1, v2) { return null; } -@@= skipped -12, +15 lines =@@ - static dot(v1, v2) { return null; } - } - class Camera { ++ static norm(v) { return null; } ++ static minus(v1, v2) { return null; } ++ static times(v1, v2) { return null; } ++ static cross(v1, v2) { return null; } ++ constructor(x, y, z) { + this.x = x; + this.y = y; + this.z = z; + } +- Vector.norm = function (v) { return null; }; +- Vector.minus = function (v1, v2) { return null; }; +- Vector.times = function (v1, v2) { return null; }; +- Vector.cross = function (v1, v2) { return null; }; +- Vector.dot = function (v1, v2) { return null; }; +- return Vector; +-}()); +-var Camera = /** @class */ (function () { +- function Camera(pos, lookAt) { ++ static dot(v1, v2) { return null; } ++} ++class Camera { + pos; + forward; + right; + up; - constructor(pos, lookAt) { ++ constructor(pos, lookAt) { this.pos = pos; - var down = new Vector(0.0, -1.0, 0.0); \ No newline at end of file + var down = new Vector(0.0, -1.0, 0.0); + this.forward = Vector.norm(Vector.minus(lookAt, this.pos)); + this.right = Vector.times(down, Vector.norm(Vector.cross(this.forward, down))); + this.up = Vector.times(down, Vector.norm(Vector.cross(this.forward, this.right))); + } +- return Camera; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.js.diff b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.js.diff new file mode 100644 index 0000000000..f5c88e3ad2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6DeclOrdering.js.diff @@ -0,0 +1,23 @@ +--- old.es6DeclOrdering.js ++++ new.es6DeclOrdering.js +@@= skipped -18, +18 lines =@@ + + + //// [es6DeclOrdering.js] +-var Bar = /** @class */ (function () { +- function Bar(store) { +- this._store = store; // this is an error for some reason? Unresolved symbol store +- } ++class Bar { + //public bar() { } +- Bar.prototype.foo = function () { ++ foo() { + return this._store.length; +- }; +- return Bar; +-}()); ++ } ++ constructor(store) { ++ this._store = store; // this is an error for some reason? Unresolved symbol store ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt index 7f82e0182c..b4a0ac07bb 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt @@ -6,11 +6,11 @@ client.ts(1,15): error TS2307: Cannot find module 'server' or its corresponding } export interface i { } - export module m { + export namespace m { export var x = 10; } export var x = 10; - export module uninstantiated { + export namespace uninstantiated { } ==== client.ts (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt.diff index f38a770b97..25929f2c15 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAll.errors.txt.diff @@ -10,11 +10,11 @@ + } + export interface i { + } -+ export module m { ++ export namespace m { + export var x = 10; + } + export var x = 10; -+ export module uninstantiated { ++ export namespace uninstantiated { + } + +==== client.ts (1 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAll.js b/testdata/baselines/reference/submodule/compiler/es6ExportAll.js index 3534e646cd..61cf782a5a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAll.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAll.js @@ -5,11 +5,11 @@ export class c { } export interface i { } -export module m { +export namespace m { export var x = 10; } export var x = 10; -export module uninstantiated { +export namespace uninstantiated { } //// [client.ts] diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAll.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportAll.symbols index 435c747b31..b9d7711aea 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAll.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAll.symbols @@ -7,7 +7,7 @@ export class c { export interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -export module m { +export namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ export module m { export var x = 10; >x : Symbol(x, Decl(server.ts, 7, 10)) -export module uninstantiated { +export namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 18)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAll.types b/testdata/baselines/reference/submodule/compiler/es6ExportAll.types index 9c0a7ec59f..817d2c3c4e 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAll.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAll.types @@ -6,7 +6,7 @@ export class c { } export interface i { } -export module m { +export namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ export var x = 10; >x : number >10 : 10 -export module uninstantiated { +export namespace uninstantiated { } === client.ts === diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js index dd05d03835..e04d79ecbc 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js @@ -5,11 +5,11 @@ export class c { } export interface i { } -export module m { +export namespace m { export var x = 10; } export var x = 10; -export module uninstantiated { +export namespace uninstantiated { } //// [client.ts] diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js.diff b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js.diff new file mode 100644 index 0000000000..964b336dc7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.js.diff @@ -0,0 +1,16 @@ +--- old.es6ExportAllInEs5.js ++++ new.es6ExportAllInEs5.js +@@= skipped -18, +18 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = exports.m = exports.c = void 0; +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + exports.c = c; + var m; + (function (m) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.symbols index 4a35fa83ae..c70c4328fa 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.symbols @@ -7,7 +7,7 @@ export class c { export interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -export module m { +export namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ export module m { export var x = 10; >x : Symbol(x, Decl(server.ts, 7, 10)) -export module uninstantiated { +export namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 18)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.types b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.types index 0be536f513..d99ccaa03f 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportAllInEs5.types @@ -6,7 +6,7 @@ export class c { } export interface i { } -export module m { +export namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ export var x = 10; >x : number >10 : 10 -export module uninstantiated { +export namespace uninstantiated { } === client.ts === diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClause.js b/testdata/baselines/reference/submodule/compiler/es6ExportClause.js index eaf6536aaf..4f2ce7f883 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClause.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClause.js @@ -5,11 +5,11 @@ class c { } interface i { } -module m { +namespace m { export var x = 10; } var x = 10; -module uninstantiated { +namespace uninstantiated { } export { c }; export { c as c2 }; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClause.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportClause.symbols index 42b9ebfc9b..5b56d00826 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClause.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClause.symbols @@ -7,7 +7,7 @@ class c { interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -module m { +namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ module m { var x = 10; >x : Symbol(x, Decl(server.ts, 7, 3)) -module uninstantiated { +namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 11)) } export { c }; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClause.types b/testdata/baselines/reference/submodule/compiler/es6ExportClause.types index 1e159656ed..94ad39d315 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClause.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClause.types @@ -6,7 +6,7 @@ class c { } interface i { } -module m { +namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ var x = 10; >x : number >10 : 10 -module uninstantiated { +namespace uninstantiated { } export { c }; >c : typeof c diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js index b2b6fdf9e5..c3af88b748 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js @@ -5,11 +5,11 @@ class c { } interface i { } -module m { +namespace m { export var x = 10; } var x = 10; -module uninstantiated { +namespace uninstantiated { } export { c }; export { c as c2 }; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js.diff b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js.diff new file mode 100644 index 0000000000..7b9c098db9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.js.diff @@ -0,0 +1,16 @@ +--- old.es6ExportClauseInEs5.js ++++ new.es6ExportClauseInEs5.js +@@= skipped -20, +20 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = exports.instantiatedModule = exports.c2 = exports.c = void 0; +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + exports.c = c; + exports.c2 = c; + var m; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.symbols index 7b54ef2e69..3865533737 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.symbols @@ -7,7 +7,7 @@ class c { interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -module m { +namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ module m { var x = 10; >x : Symbol(x, Decl(server.ts, 7, 3)) -module uninstantiated { +namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 11)) } export { c }; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.types b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.types index 594b695c4e..f92651cdc3 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseInEs5.types @@ -6,7 +6,7 @@ class c { } interface i { } -module m { +namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ var x = 10; >x : number >10 : 10 -module uninstantiated { +namespace uninstantiated { } export { c }; >c : typeof c diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt index 2010b48604..2a92206382 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt @@ -10,11 +10,11 @@ client.ts(5,19): error TS2307: Cannot find module 'server' or its corresponding } export interface i { } - export module m { + export namespace m { export var x = 10; } export var x = 10; - export module uninstantiated { + export namespace uninstantiated { } ==== client.ts (5 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt.diff index c50824c998..3915cd7aa4 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.errors.txt.diff @@ -14,11 +14,11 @@ + } + export interface i { + } -+ export module m { ++ export namespace m { + export var x = 10; + } + export var x = 10; -+ export module uninstantiated { ++ export namespace uninstantiated { + } + +==== client.ts (5 errors) ==== diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.js b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.js index cb5bd291bf..aac9c271c4 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.js @@ -5,11 +5,11 @@ export class c { } export interface i { } -export module m { +export namespace m { export var x = 10; } export var x = 10; -export module uninstantiated { +export namespace uninstantiated { } //// [client.ts] diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.symbols index 61e90619f5..8a2a2cc1f5 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.symbols @@ -7,7 +7,7 @@ export class c { export interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -export module m { +export namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ export module m { export var x = 10; >x : Symbol(x, Decl(server.ts, 7, 10)) -export module uninstantiated { +export namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 18)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.types b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.types index a218c4c71c..ca5e9dea5e 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifier.types @@ -6,7 +6,7 @@ export class c { } export interface i { } -export module m { +export namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ export var x = 10; >x : number >10 : 10 -export module uninstantiated { +export namespace uninstantiated { } === client.ts === diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js index 8c8e9256a5..dd6370ac5f 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js @@ -5,11 +5,11 @@ export class c { } export interface i { } -export module m { +export namespace m { export var x = 10; } export var x = 10; -export module uninstantiated { +export namespace uninstantiated { } //// [client.ts] diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js.diff b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js.diff index aef2c82334..fbde80fa62 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.js.diff @@ -1,6 +1,20 @@ --- old.es6ExportClauseWithoutModuleSpecifierInEs5.js +++ new.es6ExportClauseWithoutModuleSpecifierInEs5.js -@@= skipped -34, +34 lines =@@ +@@= skipped -22, +22 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = exports.m = exports.c = void 0; +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + exports.c = c; + var m; + (function (m) { +@@= skipped -15, +12 lines =@@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = exports.instantiatedModule = exports.c2 = exports.c = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.symbols index 0bcee045a1..99e6cb5844 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.symbols @@ -7,7 +7,7 @@ export class c { export interface i { >i : Symbol(i, Decl(server.ts, 1, 1)) } -export module m { +export namespace m { >m : Symbol(m, Decl(server.ts, 3, 1)) export var x = 10; @@ -16,7 +16,7 @@ export module m { export var x = 10; >x : Symbol(x, Decl(server.ts, 7, 10)) -export module uninstantiated { +export namespace uninstantiated { >uninstantiated : Symbol(uninstantiated, Decl(server.ts, 7, 18)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.types b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.types index 891796acbe..25640f0b4b 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportClauseWithoutModuleSpecifierInEs5.types @@ -6,7 +6,7 @@ export class c { } export interface i { } -export module m { +export namespace m { >m : typeof m export var x = 10; @@ -17,7 +17,7 @@ export var x = 10; >x : number >10 : 10 -export module uninstantiated { +export namespace uninstantiated { } === client.ts === diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt index 5d34ca0b7f..0791e708a9 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt @@ -231,7 +231,7 @@ main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and canno } declare module "module" { - module Foo { + namespace Foo { export var a: number; export var b: number; } @@ -243,7 +243,7 @@ main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and canno x: number; y: number; } - module Foo { + namespace Foo { export var a: number; export var b: number; } @@ -251,7 +251,7 @@ main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and canno } declare module "variable-module" { - module Foo { + namespace Foo { interface Bar { x: number; y: number; @@ -271,7 +271,7 @@ main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and canno declare module "function-module" { function foo(); - module foo { + namespace foo { export var a: number; export var b: number; } @@ -291,7 +291,7 @@ main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and canno x: number; y: number; } - module Foo { + namespace Foo { export var a: number; export var b: number; } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff deleted file mode 100644 index 8120ad3982..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.errors.txt.diff +++ /dev/null @@ -1,74 +0,0 @@ ---- old.es6ExportEqualsInterop.errors.txt -+++ new.es6ExportEqualsInterop.errors.txt -@@= skipped -0, +0 lines =@@ - main.ts(15,1): error TS2693: 'z1' only refers to a type, but is being used as a value here. - main.ts(21,4): error TS2339: Property 'a' does not exist on type '() => any'. - main.ts(23,4): error TS2339: Property 'a' does not exist on type 'typeof Foo'. --main.ts(27,8): error TS1259: Module '"interface"' can only be default-imported using the 'esModuleInterop' flag --main.ts(28,8): error TS1259: Module '"variable"' can only be default-imported using the 'esModuleInterop' flag --main.ts(29,8): error TS1259: Module '"interface-variable"' can only be default-imported using the 'esModuleInterop' flag --main.ts(30,8): error TS1259: Module '"module"' can only be default-imported using the 'esModuleInterop' flag --main.ts(31,8): error TS1259: Module '"interface-module"' can only be default-imported using the 'esModuleInterop' flag --main.ts(32,8): error TS1259: Module '"variable-module"' can only be default-imported using the 'esModuleInterop' flag --main.ts(33,8): error TS1259: Module '"function"' can only be default-imported using the 'esModuleInterop' flag --main.ts(34,8): error TS1259: Module '"function-module"' can only be default-imported using the 'esModuleInterop' flag --main.ts(35,8): error TS1259: Module '"class"' can only be default-imported using the 'esModuleInterop' flag --main.ts(36,8): error TS1259: Module '"class-module"' can only be default-imported using the 'esModuleInterop' flag - main.ts(39,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export. - main.ts(45,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export. - main.ts(47,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export. -@@= skipped -40, +30 lines =@@ - main.ts(106,15): error TS2498: Module '"class-module"' uses 'export =' and cannot be used with 'export *'. - - --==== main.ts (41 errors) ==== -+==== main.ts (31 errors) ==== - /// - - // import-equals -@@= skipped -34, +34 lines =@@ - - // default import - import x1 from "interface"; -- ~~ --!!! error TS1259: Module '"interface"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:6:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x2 from "variable"; -- ~~ --!!! error TS1259: Module '"variable"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:14:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x3 from "interface-variable"; -- ~~ --!!! error TS1259: Module '"interface-variable"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:26:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x4 from "module"; -- ~~ --!!! error TS1259: Module '"module"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:34:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x5 from "interface-module"; -- ~~ --!!! error TS1259: Module '"interface-module"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:46:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x6 from "variable-module"; -- ~~ --!!! error TS1259: Module '"variable-module"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:60:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x7 from "function"; -- ~~ --!!! error TS1259: Module '"function"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:65:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x8 from "function-module"; -- ~~ --!!! error TS1259: Module '"function-module"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:74:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x9 from "class"; -- ~~ --!!! error TS1259: Module '"class"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:82:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - import x0 from "class-module"; -- ~~ --!!! error TS1259: Module '"class-module"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 modules.d.ts:94:5: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. - - // namespace import - import * as y1 from "interface"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js index 71125ca7fe..1a33128fe4 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.js @@ -30,7 +30,7 @@ declare module "interface-variable" { } declare module "module" { - module Foo { + namespace Foo { export var a: number; export var b: number; } @@ -42,7 +42,7 @@ declare module "interface-module" { x: number; y: number; } - module Foo { + namespace Foo { export var a: number; export var b: number; } @@ -50,7 +50,7 @@ declare module "interface-module" { } declare module "variable-module" { - module Foo { + namespace Foo { interface Bar { x: number; y: number; @@ -70,7 +70,7 @@ declare module "function" { declare module "function-module" { function foo(); - module foo { + namespace foo { export var a: number; export var b: number; } @@ -90,7 +90,7 @@ declare module "class-module" { x: number; y: number; } - module Foo { + namespace Foo { export var a: number; export var b: number; } diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.symbols b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.symbols index 57f1b4b935..44a55ac191 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.symbols @@ -359,7 +359,7 @@ declare module "interface-variable" { declare module "module" { >"module" : Symbol("module", Decl(modules.d.ts, 26, 1)) - module Foo { + namespace Foo { >Foo : Symbol(Foo, Decl(modules.d.ts, 28, 25)) export var a: number; @@ -384,7 +384,7 @@ declare module "interface-module" { y: number; >y : Symbol(Foo.y, Decl(modules.d.ts, 38, 18)) } - module Foo { + namespace Foo { >Foo : Symbol(Foo, Decl(modules.d.ts, 36, 35), Decl(modules.d.ts, 40, 5)) export var a: number; @@ -400,11 +400,11 @@ declare module "interface-module" { declare module "variable-module" { >"variable-module" : Symbol("variable-module", Decl(modules.d.ts, 46, 1)) - module Foo { + namespace Foo { >Foo : Symbol(Foo, Decl(modules.d.ts, 48, 34), Decl(modules.d.ts, 55, 7)) interface Bar { ->Bar : Symbol(Bar, Decl(modules.d.ts, 49, 16)) +>Bar : Symbol(Bar, Decl(modules.d.ts, 49, 19)) x: number; >x : Symbol(Bar.x, Decl(modules.d.ts, 50, 23)) @@ -442,7 +442,7 @@ declare module "function-module" { function foo(); >foo : Symbol(foo, Decl(modules.d.ts, 67, 34), Decl(modules.d.ts, 68, 19)) - module foo { + namespace foo { >foo : Symbol(foo, Decl(modules.d.ts, 67, 34), Decl(modules.d.ts, 68, 19)) export var a: number; @@ -483,7 +483,7 @@ declare module "class-module" { y: number; >y : Symbol(Foo.y, Decl(modules.d.ts, 86, 18)) } - module Foo { + namespace Foo { >Foo : Symbol(Foo, Decl(modules.d.ts, 84, 31), Decl(modules.d.ts, 88, 5)) export var a: number; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types index 6c7cac3c5a..8d7f0da7b9 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types +++ b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types @@ -377,7 +377,7 @@ declare module "interface-variable" { declare module "module" { >"module" : typeof import("module") - module Foo { + namespace Foo { >Foo : typeof Foo export var a: number; @@ -400,7 +400,7 @@ declare module "interface-module" { y: number; >y : number } - module Foo { + namespace Foo { >Foo : typeof Foo export var a: number; @@ -416,7 +416,7 @@ declare module "interface-module" { declare module "variable-module" { >"variable-module" : typeof import("variable-module") - module Foo { + namespace Foo { interface Bar { x: number; >x : number @@ -454,7 +454,7 @@ declare module "function-module" { function foo(); >foo : typeof foo - module foo { + namespace foo { >foo : typeof foo export var a: number; @@ -495,7 +495,7 @@ declare module "class-module" { y: number; >y : number } - module Foo { + namespace Foo { >Foo : typeof Foo export var a: number; diff --git a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff b/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff deleted file mode 100644 index d79de05db2..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6ExportEqualsInterop.types.diff +++ /dev/null @@ -1,43 +0,0 @@ ---- old.es6ExportEqualsInterop.types -+++ new.es6ExportEqualsInterop.types -@@= skipped -88, +88 lines =@@ - >x1 : any - - import x2 from "variable"; -->x2 : any -+>x2 : { a: number; b: number; } - - import x3 from "interface-variable"; -->x3 : any -+>x3 : { a: number; b: number; } - - import x4 from "module"; -->x4 : any -+>x4 : typeof z4 - - import x5 from "interface-module"; -->x5 : any -+>x5 : typeof z5 - - import x6 from "variable-module"; -->x6 : any -+>x6 : { a: number; b: number; } - - import x7 from "function"; -->x7 : any -+>x7 : () => any - - import x8 from "function-module"; -->x8 : any -+>x8 : typeof z8 - - import x9 from "class"; -->x9 : any -+>x9 : typeof z9 - - import x0 from "class-module"; -->x0 : any -+>x0 : typeof z0 - - // namespace import - import * as y1 from "interface"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingDts.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingDts.js.diff index e0d627696b..9e060fc53c 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingDts.js.diff @@ -1,6 +1,18 @@ --- old.es6ImportDefaultBindingDts.js +++ new.es6ImportDefaultBindingDts.js -@@= skipped -19, +19 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [server.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + exports.default = c; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.js.diff index b5b4c6dc24..de7f22dc98 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.js.diff @@ -1,6 +1,58 @@ --- old.es6ImportDefaultBindingFollowedWithNamedImportDts.js +++ new.es6ImportDefaultBindingFollowedWithNamedImportDts.js -@@= skipped -48, +48 lines =@@ +@@= skipped -26, +26 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x11 = exports.a12 = exports.a11 = exports.m = exports.x = exports.a = void 0; +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + exports.a = a; +-var x = /** @class */ (function () { +- function x() { +- } +- return x; +-}()); ++class x { ++} + exports.x = x; +-var m = /** @class */ (function () { +- function m() { +- } +- return m; +-}()); ++class m { ++} + exports.m = m; +-var a11 = /** @class */ (function () { +- function a11() { +- } +- return a11; +-}()); ++class a11 { ++} + exports.a11 = a11; +-var a12 = /** @class */ (function () { +- function a12() { +- } +- return a12; +-}()); ++class a12 { ++} + exports.a12 = a12; +-var x11 = /** @class */ (function () { +- function x11() { +- } +- return x11; +-}()); ++class x11 { ++} + exports.x11 = x11; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x6 = exports.x3 = exports.x5 = exports.x4 = exports.x2 = exports.x1 = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts1.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts1.js.diff index 0b3d243a82..061743b304 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts1.js.diff @@ -1,6 +1,18 @@ --- old.es6ImportDefaultBindingFollowedWithNamedImportDts1.js +++ new.es6ImportDefaultBindingFollowedWithNamedImportDts1.js -@@= skipped -27, +27 lines =@@ +@@= skipped -20, +20 lines =@@ + //// [server.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + exports.default = a; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x6 = exports.x5 = exports.x4 = exports.x3 = exports.x2 = exports.x1 = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js.diff index 879976f3f2..d578c9247c 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js.diff @@ -1,6 +1,18 @@ --- old.es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js +++ new.es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js -@@= skipped -17, +17 lines =@@ +@@= skipped -10, +10 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + exports.a = a; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff deleted file mode 100644 index 2e5b58dc1b..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.es6ImportDefaultBindingInEs5.errors.txt -+++ new.es6ImportDefaultBindingInEs5.errors.txt -@@= skipped -0, +0 lines =@@ --es6ImportDefaultBindingInEs5_1.ts(1,8): error TS1259: Module '"es6ImportDefaultBindingInEs5_0"' can only be default-imported using the 'esModuleInterop' flag -- -- --==== es6ImportDefaultBindingInEs5_0.ts (0 errors) ==== -- var a = 10; -- export = a; -- --==== es6ImportDefaultBindingInEs5_1.ts (1 errors) ==== -- import defaultBinding from "./es6ImportDefaultBindingInEs5_0"; -- ~~~~~~~~~~~~~~ --!!! error TS1259: Module '"es6ImportDefaultBindingInEs5_0"' can only be default-imported using the 'esModuleInterop' flag --!!! related TS2594 es6ImportDefaultBindingInEs5_0.ts:2:1: This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff b/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff deleted file mode 100644 index 2ba3f20ec6..0000000000 --- a/testdata/baselines/reference/submodule/compiler/es6ImportDefaultBindingInEs5.types.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- old.es6ImportDefaultBindingInEs5.types -+++ new.es6ImportDefaultBindingInEs5.types -@@= skipped -9, +9 lines =@@ - - === es6ImportDefaultBindingInEs5_1.ts === - import defaultBinding from "./es6ImportDefaultBindingInEs5_0"; -->defaultBinding : any -+>defaultBinding : number diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.js b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.js index 5458cf6b67..0fd5ed7b34 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.js +++ b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.js @@ -8,7 +8,7 @@ declare module "other" { declare module "server" { import events = require("other"); // Ambient declaration, no error expected. - module S { + namespace S { export var a: number; } diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.symbols b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.symbols index e92fb9c9bf..d7c915347f 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.symbols @@ -14,7 +14,7 @@ declare module "server" { import events = require("other"); // Ambient declaration, no error expected. >events : Symbol(events, Decl(server.d.ts, 4, 25)) - module S { + namespace S { >S : Symbol(S, Decl(server.d.ts, 5, 37)) export var a: number; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.types b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.types index 9125a2e7bd..44555ff748 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.types +++ b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsDeclaration2.types @@ -14,7 +14,7 @@ declare module "server" { import events = require("other"); // Ambient declaration, no error expected. >events : typeof events - module S { + namespace S { >S : typeof S export var a: number; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleCommonJsError.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleCommonJsError.js.diff index 7b1f4e4343..8c0bc5b8e8 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleCommonJsError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleCommonJsError.js.diff @@ -1,6 +1,17 @@ --- old.es6ImportEqualsExportModuleCommonJsError.js +++ new.es6ImportEqualsExportModuleCommonJsError.js -@@= skipped -18, +18 lines =@@ +@@= skipped -12, +12 lines =@@ + + //// [a.js] + "use strict"; +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + module.exports = a; //// [main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleEs2015Error.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleEs2015Error.js.diff new file mode 100644 index 0000000000..a3af84610e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ImportEqualsExportModuleEs2015Error.js.diff @@ -0,0 +1,16 @@ +--- old.es6ImportEqualsExportModuleEs2015Error.js ++++ new.es6ImportEqualsExportModuleEs2015Error.js +@@= skipped -11, +11 lines =@@ + + + //// [a.js] +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + export {}; + //// [main.js] + import * as a from "./a"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNameSpaceImportDts.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportNameSpaceImportDts.js.diff index fcb53273d5..1d198806e2 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNameSpaceImportDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNameSpaceImportDts.js.diff @@ -1,6 +1,19 @@ --- old.es6ImportNameSpaceImportDts.js +++ new.es6ImportNameSpaceImportDts.js -@@= skipped -19, +19 lines =@@ +@@= skipped -11, +11 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + exports.c = c; + ; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.x = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportDts.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportDts.js.diff index 26231b39d7..f9c77110b5 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportDts.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportDts.js.diff @@ -1,6 +1,122 @@ --- old.es6ImportNamedImportDts.js +++ new.es6ImportNamedImportDts.js -@@= skipped -94, +94 lines =@@ +@@= skipped -48, +48 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaaa1 = exports.aaaa = exports.z2 = exports.z1 = exports.x111 = exports.a111 = exports.x1 = exports.a1 = exports.m = exports.x11 = exports.x = exports.a12 = exports.a11 = exports.a = void 0; +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); ++class a { ++} + exports.a = a; +-var a11 = /** @class */ (function () { +- function a11() { +- } +- return a11; +-}()); ++class a11 { ++} + exports.a11 = a11; +-var a12 = /** @class */ (function () { +- function a12() { +- } +- return a12; +-}()); ++class a12 { ++} + exports.a12 = a12; +-var x = /** @class */ (function () { +- function x() { +- } +- return x; +-}()); ++class x { ++} + exports.x = x; +-var x11 = /** @class */ (function () { +- function x11() { +- } +- return x11; +-}()); ++class x11 { ++} + exports.x11 = x11; +-var m = /** @class */ (function () { +- function m() { +- } +- return m; +-}()); ++class m { ++} + exports.m = m; +-var a1 = /** @class */ (function () { +- function a1() { +- } +- return a1; +-}()); ++class a1 { ++} + exports.a1 = a1; +-var x1 = /** @class */ (function () { +- function x1() { +- } +- return x1; +-}()); ++class x1 { ++} + exports.x1 = x1; +-var a111 = /** @class */ (function () { +- function a111() { +- } +- return a111; +-}()); ++class a111 { ++} + exports.a111 = a111; +-var x111 = /** @class */ (function () { +- function x111() { +- } +- return x111; +-}()); ++class x111 { ++} + exports.x111 = x111; +-var z1 = /** @class */ (function () { +- function z1() { +- } +- return z1; +-}()); ++class z1 { ++} + exports.z1 = z1; +-var z2 = /** @class */ (function () { +- function z2() { +- } +- return z2; +-}()); ++class z2 { ++} + exports.z2 = z2; +-var aaaa = /** @class */ (function () { +- function aaaa() { +- } +- return aaaa; +-}()); ++class aaaa { ++} + exports.aaaa = aaaa; +-var aaaa1 = /** @class */ (function () { +- function aaaa1() { +- } +- return aaaa1; +-}()); ++class aaaa1 { ++} + exports.aaaa1 = aaaa1; + //// [client.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.z2 = exports.z111 = exports.xxxx9 = exports.xxxx8 = exports.xxxx7 = exports.xxxx6 = exports.xxxx5 = exports.xxxx4 = exports.xxxx3 = exports.xxxx2 = exports.xxxx1 = exports.xxxx = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js index ddbd45a1dc..435e82c71f 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts] //// //// [es6ImportNamedImportInIndirectExportAssignment_0.ts] -export module a { +export namespace a { export class c { } } diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff index 35e6767d87..bc3ff79a65 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff @@ -1,6 +1,17 @@ --- old.es6ImportNamedImportInIndirectExportAssignment.js +++ new.es6ImportNamedImportInIndirectExportAssignment.js -@@= skipped -22, +22 lines =@@ +@@= skipped -16, +16 lines =@@ + exports.a = void 0; + var a; + (function (a) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + a.c = c; })(a || (exports.a = a = {})); //// [es6ImportNamedImportInIndirectExportAssignment_1.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.symbols b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.symbols index 6451e09fca..dbb564d9de 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts] //// === es6ImportNamedImportInIndirectExportAssignment_0.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(es6ImportNamedImportInIndirectExportAssignment_0.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(es6ImportNamedImportInIndirectExportAssignment_0.ts, 0, 17)) +>c : Symbol(c, Decl(es6ImportNamedImportInIndirectExportAssignment_0.ts, 0, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.types b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.types index 1987fc76b4..a46b31d1ba 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.types +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts] //// === es6ImportNamedImportInIndirectExportAssignment_0.ts === -export module a { +export namespace a { >a : typeof a export class c { diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportWithTypesAndValues.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportWithTypesAndValues.js.diff index 5cb9073eb2..83bfe72eb4 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportWithTypesAndValues.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportWithTypesAndValues.js.diff @@ -1,21 +1,28 @@ --- old.es6ImportNamedImportWithTypesAndValues.js +++ new.es6ImportNamedImportWithTypesAndValues.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.C2 = exports.C = void 0; - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.prop = "hello"; - } +- return C; +-}()); ++class C { + prop = "hello"; - } ++} exports.C = C; - class C2 { -- constructor() { +-var C2 = /** @class */ (function () { +- function C2() { - this.prop2 = "world"; - } +- return C2; +-}()); ++class C2 { + prop2 = "world"; - } ++} exports.C2 = C2; //// [client.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseInEs5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseInEs5.errors.txt.diff new file mode 100644 index 0000000000..ccb72d5e13 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseInEs5.errors.txt.diff @@ -0,0 +1,14 @@ +--- old.es6ImportWithoutFromClauseInEs5.errors.txt ++++ new.es6ImportWithoutFromClauseInEs5.errors.txt +@@= skipped -0, +0 lines =@@ +-es6ImportWithoutFromClauseInEs5_1.ts(1,8): error TS2882: Cannot find module or type declarations for side-effect import of 'es6ImportWithoutFromClauseInEs5_0'. +- +- +-==== es6ImportWithoutFromClauseInEs5_0.ts (0 errors) ==== +- export var a = 10; +- +-==== es6ImportWithoutFromClauseInEs5_1.ts (1 errors) ==== +- import "es6ImportWithoutFromClauseInEs5_0"; +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS2882: Cannot find module or type declarations for side-effect import of 'es6ImportWithoutFromClauseInEs5_0'. ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseWithExport.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseWithExport.errors.txt.diff new file mode 100644 index 0000000000..bc05a471d6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/es6ImportWithoutFromClauseWithExport.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.es6ImportWithoutFromClauseWithExport.errors.txt ++++ new.es6ImportWithoutFromClauseWithExport.errors.txt +@@= skipped -0, +0 lines =@@ + client.ts(1,1): error TS1191: An import declaration cannot have modifiers. +-client.ts(1,15): error TS2882: Cannot find module or type declarations for side-effect import of 'server'. + + + ==== server.ts (0 errors) ==== + export var a = 10; + +-==== client.ts (2 errors) ==== ++==== client.ts (1 errors) ==== + export import "server"; + ~~~~~~ + !!! error TS1191: An import declaration cannot have modifiers. +- ~~~~~~~~ +-!!! error TS2882: Cannot find module or type declarations for side-effect import of 'server'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6MemberScoping.js.diff b/testdata/baselines/reference/submodule/compiler/es6MemberScoping.js.diff index 0eb2216020..4d8981f0a2 100644 --- a/testdata/baselines/reference/submodule/compiler/es6MemberScoping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/es6MemberScoping.js.diff @@ -1,17 +1,29 @@ --- old.es6MemberScoping.js +++ new.es6MemberScoping.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + //// [es6MemberScoping.js] - class Foo { -- constructor(store) { +-var Foo = /** @class */ (function () { +- function Foo(store) { - this._store = store; // should be an error. - } +- Foo.prototype.foo = function () { ++class Foo { + constructor(store) { } - foo() { ++ foo() { return this._store.length; +- }; +- return Foo; +-}()); +-var Foo2 = /** @class */ (function () { +- function Foo2() { } +- Foo2.Foo2 = function () { return 0; }; // should not be an error +- return Foo2; +-}()); + _store = store; // should be an error. - } - class Foo2 { - static Foo2() { return 0; } // should not be an error \ No newline at end of file ++} ++class Foo2 { ++ static Foo2() { return 0; } // should not be an error ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.js b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.js index 50c3adaca8..14a9e8a310 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.js @@ -36,7 +36,7 @@ class c2 { new c(); new c2(); -export module m1 { +export namespace m1 { export class c3 { constructor() { } @@ -74,7 +74,7 @@ export module m1 { new c3(); new c4(); } -module m2 { +namespace m2 { export class c3 { constructor() { } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.symbols index 3b3ef68128..d3b81991b0 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.symbols @@ -67,11 +67,11 @@ new c(); new c2(); >c2 : Symbol(c2, Decl(es6ModuleClassDeclaration.ts, 15, 1)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleClassDeclaration.ts, 33, 9)) export class c3 { ->c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 35, 18)) +>c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 35, 21)) constructor() { } @@ -137,16 +137,16 @@ export module m1 { >c2 : Symbol(c2, Decl(es6ModuleClassDeclaration.ts, 15, 1)) new c3(); ->c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 35, 18)) +>c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 35, 21)) new c4(); >c4 : Symbol(c4, Decl(es6ModuleClassDeclaration.ts, 51, 5)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleClassDeclaration.ts, 72, 1)) export class c3 { ->c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 73, 11)) +>c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 73, 14)) constructor() { } @@ -212,13 +212,13 @@ module m2 { >c2 : Symbol(c2, Decl(es6ModuleClassDeclaration.ts, 15, 1)) new c3(); ->c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 73, 11)) +>c3 : Symbol(c3, Decl(es6ModuleClassDeclaration.ts, 73, 14)) new c4(); >c4 : Symbol(c4, Decl(es6ModuleClassDeclaration.ts, 89, 5)) new m1.c3(); ->m1.c3 : Symbol(m1.c3, Decl(es6ModuleClassDeclaration.ts, 35, 18)) +>m1.c3 : Symbol(m1.c3, Decl(es6ModuleClassDeclaration.ts, 35, 21)) >m1 : Symbol(m1, Decl(es6ModuleClassDeclaration.ts, 33, 9)) ->c3 : Symbol(m1.c3, Decl(es6ModuleClassDeclaration.ts, 35, 18)) +>c3 : Symbol(m1.c3, Decl(es6ModuleClassDeclaration.ts, 35, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.types b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.types index 02899e364c..fc36f04312 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleClassDeclaration.types @@ -77,7 +77,7 @@ new c2(); >new c2() : c2 >c2 : typeof c2 -export module m1 { +export namespace m1 { >m1 : typeof m1 export class c3 { @@ -164,7 +164,7 @@ export module m1 { >new c4() : c4 >c4 : typeof c4 } -module m2 { +namespace m2 { >m2 : typeof m2 export class c3 { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.js b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.js index 2f1f2dab60..70e354505d 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.js @@ -5,13 +5,13 @@ export const a = "hello"; export const x: string = a, y = x; const b = y; const c: string = b, d = c; -export module m1 { +export namespace m1 { export const k = a; export const l: string = b, m = k; const n = m1.k; const o: string = n, p = k; } -module m2 { +namespace m2 { export const k = a; export const l: string = b, m = k; const n = m1.k; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.symbols index d8a57e84dd..eeb4e8868a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.symbols @@ -20,7 +20,7 @@ const c: string = b, d = c; >d : Symbol(d, Decl(es6ModuleConst.ts, 3, 20)) >c : Symbol(c, Decl(es6ModuleConst.ts, 3, 5)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleConst.ts, 3, 27)) export const k = a; @@ -45,7 +45,7 @@ export module m1 { >p : Symbol(p, Decl(es6ModuleConst.ts, 8, 24)) >k : Symbol(k, Decl(es6ModuleConst.ts, 5, 16)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleConst.ts, 9, 1)) export const k = a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.types b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.types index c725fbb6c2..bb0d153daa 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConst.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConst.types @@ -21,7 +21,7 @@ const c: string = b, d = c; >d : string >c : string -export module m1 { +export namespace m1 { >m1 : typeof m1 export const k = a; @@ -46,7 +46,7 @@ export module m1 { >p : "hello" >k : "hello" } -module m2 { +namespace m2 { >m2 : typeof m2 export const k = a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.js b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.js index 0ef96968a9..cb2f04c6fc 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.js @@ -13,7 +13,7 @@ const enum e2 { } var x = e1.a; var y = e2.x; -export module m1 { +export namespace m1 { export const enum e3 { a, b, @@ -29,7 +29,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export const enum e5 { a, b, diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.symbols index 02e5d21457..7e2c08ea82 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.symbols @@ -37,11 +37,11 @@ var y = e2.x; >e2 : Symbol(e2, Decl(es6ModuleConstEnumDeclaration.ts, 4, 1)) >x : Symbol(e2.x, Decl(es6ModuleConstEnumDeclaration.ts, 5, 15)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleConstEnumDeclaration.ts, 11, 13)) export const enum e3 { ->e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 21)) a, >a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration.ts, 13, 26)) @@ -79,7 +79,7 @@ export module m1 { var x2 = e3.a; >x2 : Symbol(x2, Decl(es6ModuleConstEnumDeclaration.ts, 25, 7)) >e3.a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration.ts, 13, 26)) ->e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 21)) >a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration.ts, 13, 26)) var y2 = e4.x; @@ -88,11 +88,11 @@ export module m1 { >e4 : Symbol(e4, Decl(es6ModuleConstEnumDeclaration.ts, 17, 5)) >x : Symbol(e4.x, Decl(es6ModuleConstEnumDeclaration.ts, 18, 19)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleConstEnumDeclaration.ts, 27, 1)) export const enum e5 { ->e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration.ts, 28, 14)) a, >a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration.ts, 29, 26)) @@ -130,7 +130,7 @@ module m2 { var x2 = e5.a; >x2 : Symbol(x2, Decl(es6ModuleConstEnumDeclaration.ts, 41, 7)) >e5.a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration.ts, 29, 26)) ->e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration.ts, 28, 14)) >a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration.ts, 29, 26)) var y2 = e6.x; @@ -142,8 +142,8 @@ module m2 { var x3 = m1.e3.a; >x3 : Symbol(x3, Decl(es6ModuleConstEnumDeclaration.ts, 43, 7)) >m1.e3.a : Symbol(m1.e3.a, Decl(es6ModuleConstEnumDeclaration.ts, 13, 26)) ->m1.e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 18)) +>m1.e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 21)) >m1 : Symbol(m1, Decl(es6ModuleConstEnumDeclaration.ts, 11, 13)) ->e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration.ts, 12, 21)) >a : Symbol(m1.e3.a, Decl(es6ModuleConstEnumDeclaration.ts, 13, 26)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.types b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.types index 466b1a8432..f9a9e17b9a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration.types @@ -37,7 +37,7 @@ var y = e2.x; >e2 : typeof e2 >x : e2.x -export module m1 { +export namespace m1 { >m1 : typeof m1 export const enum e3 { @@ -88,7 +88,7 @@ export module m1 { >e4 : typeof e4 >x : e4.x } -module m2 { +namespace m2 { >m2 : typeof m2 export const enum e5 { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.js b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.js index c6853805da..ebb22225f0 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.js @@ -13,7 +13,7 @@ const enum e2 { } var x = e1.a; var y = e2.x; -export module m1 { +export namespace m1 { export const enum e3 { a, b, @@ -29,7 +29,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export const enum e5 { a, b, diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.symbols index e6f7ecdda6..942f1e986d 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.symbols @@ -37,11 +37,11 @@ var y = e2.x; >e2 : Symbol(e2, Decl(es6ModuleConstEnumDeclaration2.ts, 4, 1)) >x : Symbol(e2.x, Decl(es6ModuleConstEnumDeclaration2.ts, 5, 15)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleConstEnumDeclaration2.ts, 11, 13)) export const enum e3 { ->e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 21)) a, >a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration2.ts, 13, 26)) @@ -79,7 +79,7 @@ export module m1 { var x2 = e3.a; >x2 : Symbol(x2, Decl(es6ModuleConstEnumDeclaration2.ts, 25, 7)) >e3.a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration2.ts, 13, 26)) ->e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 21)) >a : Symbol(e3.a, Decl(es6ModuleConstEnumDeclaration2.ts, 13, 26)) var y2 = e4.x; @@ -88,11 +88,11 @@ export module m1 { >e4 : Symbol(e4, Decl(es6ModuleConstEnumDeclaration2.ts, 17, 5)) >x : Symbol(e4.x, Decl(es6ModuleConstEnumDeclaration2.ts, 18, 19)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleConstEnumDeclaration2.ts, 27, 1)) export const enum e5 { ->e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration2.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration2.ts, 28, 14)) a, >a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration2.ts, 29, 26)) @@ -130,7 +130,7 @@ module m2 { var x2 = e5.a; >x2 : Symbol(x2, Decl(es6ModuleConstEnumDeclaration2.ts, 41, 7)) >e5.a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration2.ts, 29, 26)) ->e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration2.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleConstEnumDeclaration2.ts, 28, 14)) >a : Symbol(e5.a, Decl(es6ModuleConstEnumDeclaration2.ts, 29, 26)) var y2 = e6.x; @@ -142,8 +142,8 @@ module m2 { var x3 = m1.e3.a; >x3 : Symbol(x3, Decl(es6ModuleConstEnumDeclaration2.ts, 43, 7)) >m1.e3.a : Symbol(m1.e3.a, Decl(es6ModuleConstEnumDeclaration2.ts, 13, 26)) ->m1.e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 18)) +>m1.e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 21)) >m1 : Symbol(m1, Decl(es6ModuleConstEnumDeclaration2.ts, 11, 13)) ->e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 18)) +>e3 : Symbol(m1.e3, Decl(es6ModuleConstEnumDeclaration2.ts, 12, 21)) >a : Symbol(m1.e3.a, Decl(es6ModuleConstEnumDeclaration2.ts, 13, 26)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.types b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.types index d90904c865..6fc34e4688 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleConstEnumDeclaration2.types @@ -37,7 +37,7 @@ var y = e2.x; >e2 : typeof e2 >x : e2.x -export module m1 { +export namespace m1 { >m1 : typeof m1 export const enum e3 { @@ -88,7 +88,7 @@ export module m1 { >e4 : typeof e4 >x : e4.x } -module m2 { +namespace m2 { >m2 : typeof m2 export const enum e5 { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.js b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.js index 39a9d56b33..ee92f36705 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.js @@ -13,7 +13,7 @@ enum e2 { } var x = e1.a; var y = e2.x; -export module m1 { +export namespace m1 { export enum e3 { a, b, @@ -29,7 +29,7 @@ export module m1 { var x2 = e3.a; var y2 = e4.x; } -module m2 { +namespace m2 { export enum e5 { a, b, diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.symbols index ef7910d4a5..417cd31ac3 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.symbols @@ -37,11 +37,11 @@ var y = e2.x; >e2 : Symbol(e2, Decl(es6ModuleEnumDeclaration.ts, 4, 1)) >x : Symbol(e2.x, Decl(es6ModuleEnumDeclaration.ts, 5, 9)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleEnumDeclaration.ts, 11, 13)) export enum e3 { ->e3 : Symbol(e3, Decl(es6ModuleEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleEnumDeclaration.ts, 12, 21)) a, >a : Symbol(e3.a, Decl(es6ModuleEnumDeclaration.ts, 13, 20)) @@ -79,7 +79,7 @@ export module m1 { var x2 = e3.a; >x2 : Symbol(x2, Decl(es6ModuleEnumDeclaration.ts, 25, 7)) >e3.a : Symbol(e3.a, Decl(es6ModuleEnumDeclaration.ts, 13, 20)) ->e3 : Symbol(e3, Decl(es6ModuleEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(e3, Decl(es6ModuleEnumDeclaration.ts, 12, 21)) >a : Symbol(e3.a, Decl(es6ModuleEnumDeclaration.ts, 13, 20)) var y2 = e4.x; @@ -88,11 +88,11 @@ export module m1 { >e4 : Symbol(e4, Decl(es6ModuleEnumDeclaration.ts, 17, 5)) >x : Symbol(e4.x, Decl(es6ModuleEnumDeclaration.ts, 18, 13)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleEnumDeclaration.ts, 27, 1)) export enum e5 { ->e5 : Symbol(e5, Decl(es6ModuleEnumDeclaration.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleEnumDeclaration.ts, 28, 14)) a, >a : Symbol(e5.a, Decl(es6ModuleEnumDeclaration.ts, 29, 20)) @@ -130,7 +130,7 @@ module m2 { var x2 = e5.a; >x2 : Symbol(x2, Decl(es6ModuleEnumDeclaration.ts, 41, 7)) >e5.a : Symbol(e5.a, Decl(es6ModuleEnumDeclaration.ts, 29, 20)) ->e5 : Symbol(e5, Decl(es6ModuleEnumDeclaration.ts, 28, 11)) +>e5 : Symbol(e5, Decl(es6ModuleEnumDeclaration.ts, 28, 14)) >a : Symbol(e5.a, Decl(es6ModuleEnumDeclaration.ts, 29, 20)) var y2 = e6.x; @@ -142,8 +142,8 @@ module m2 { var x3 = m1.e3.a; >x3 : Symbol(x3, Decl(es6ModuleEnumDeclaration.ts, 43, 7)) >m1.e3.a : Symbol(m1.e3.a, Decl(es6ModuleEnumDeclaration.ts, 13, 20)) ->m1.e3 : Symbol(m1.e3, Decl(es6ModuleEnumDeclaration.ts, 12, 18)) +>m1.e3 : Symbol(m1.e3, Decl(es6ModuleEnumDeclaration.ts, 12, 21)) >m1 : Symbol(m1, Decl(es6ModuleEnumDeclaration.ts, 11, 13)) ->e3 : Symbol(m1.e3, Decl(es6ModuleEnumDeclaration.ts, 12, 18)) +>e3 : Symbol(m1.e3, Decl(es6ModuleEnumDeclaration.ts, 12, 21)) >a : Symbol(m1.e3.a, Decl(es6ModuleEnumDeclaration.ts, 13, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.types b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.types index 0cc4fcd044..7d7d44a595 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleEnumDeclaration.types @@ -37,7 +37,7 @@ var y = e2.x; >e2 : typeof e2 >x : e2.x -export module m1 { +export namespace m1 { >m1 : typeof m1 export enum e3 { @@ -88,7 +88,7 @@ export module m1 { >e4 : typeof e4 >x : e4.x } -module m2 { +namespace m2 { >m2 : typeof m2 export enum e5 { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.js b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.js index 541196f3ee..c9909822cb 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.js @@ -8,7 +8,7 @@ function foo2() { foo(); foo2(); -export module m1 { +export namespace m1 { export function foo3() { } function foo4() { @@ -18,7 +18,7 @@ export module m1 { foo3(); foo4(); } -module m2 { +namespace m2 { export function foo3() { } function foo4() { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.symbols index ff5845d2c9..0cc9e0c44a 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.symbols @@ -13,11 +13,11 @@ foo(); foo2(); >foo2 : Symbol(foo2, Decl(es6ModuleFunctionDeclaration.ts, 1, 1)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleFunctionDeclaration.ts, 5, 7)) export function foo3() { ->foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 18)) +>foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 21)) } function foo4() { >foo4 : Symbol(foo4, Decl(es6ModuleFunctionDeclaration.ts, 9, 5)) @@ -29,16 +29,16 @@ export module m1 { >foo2 : Symbol(foo2, Decl(es6ModuleFunctionDeclaration.ts, 1, 1)) foo3(); ->foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 18)) +>foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 21)) foo4(); >foo4 : Symbol(foo4, Decl(es6ModuleFunctionDeclaration.ts, 9, 5)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleFunctionDeclaration.ts, 16, 1)) export function foo3() { ->foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 17, 11)) +>foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 17, 14)) } function foo4() { >foo4 : Symbol(foo4, Decl(es6ModuleFunctionDeclaration.ts, 19, 5)) @@ -50,13 +50,13 @@ module m2 { >foo2 : Symbol(foo2, Decl(es6ModuleFunctionDeclaration.ts, 1, 1)) foo3(); ->foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 17, 11)) +>foo3 : Symbol(foo3, Decl(es6ModuleFunctionDeclaration.ts, 17, 14)) foo4(); >foo4 : Symbol(foo4, Decl(es6ModuleFunctionDeclaration.ts, 19, 5)) m1.foo3(); ->m1.foo3 : Symbol(m1.foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 18)) +>m1.foo3 : Symbol(m1.foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 21)) >m1 : Symbol(m1, Decl(es6ModuleFunctionDeclaration.ts, 5, 7)) ->foo3 : Symbol(m1.foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 18)) +>foo3 : Symbol(m1.foo3, Decl(es6ModuleFunctionDeclaration.ts, 7, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.types b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.types index 811f7c72dc..702cae95ff 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleFunctionDeclaration.types @@ -15,7 +15,7 @@ foo2(); >foo2() : void >foo2 : () => void -export module m1 { +export namespace m1 { >m1 : typeof m1 export function foo3() { @@ -40,7 +40,7 @@ export module m1 { >foo4() : void >foo4 : () => void } -module m2 { +namespace m2 { >m2 : typeof m2 export function foo3() { diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js index 91c06dd5b1..39f23f1ccc 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js @@ -1,19 +1,19 @@ //// [tests/cases/compiler/es6ModuleInternalImport.ts] //// //// [es6ModuleInternalImport.ts] -export module m { +export namespace m { export var a = 10; } export import a1 = m.a; import a2 = m.a; var x = a1 + a2; -export module m1 { +export namespace m1 { export import a3 = m.a; import a4 = m.a; var x = a1 + a2; var x2 = a3 + a4; } -module m2 { +namespace m2 { export import a3 = m.a; import a4 = m.a; var x = a1 + a2; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.symbols index d3cca56e1a..72a079fc86 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalImport.ts] //// === es6ModuleInternalImport.ts === -export module m { +export namespace m { >m : Symbol(m, Decl(es6ModuleInternalImport.ts, 0, 0)) export var a = 10; @@ -22,11 +22,11 @@ var x = a1 + a2; >a1 : Symbol(a1, Decl(es6ModuleInternalImport.ts, 2, 1)) >a2 : Symbol(a2, Decl(es6ModuleInternalImport.ts, 3, 23)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleInternalImport.ts, 5, 16)) export import a3 = m.a; ->a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 6, 18)) +>a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 6, 21)) >m : Symbol(m, Decl(es6ModuleInternalImport.ts, 0, 0)) >a : Symbol(a4, Decl(es6ModuleInternalImport.ts, 1, 14)) @@ -42,14 +42,14 @@ export module m1 { var x2 = a3 + a4; >x2 : Symbol(x2, Decl(es6ModuleInternalImport.ts, 10, 7)) ->a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 6, 18)) +>a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 6, 21)) >a4 : Symbol(a4, Decl(es6ModuleInternalImport.ts, 7, 27)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleInternalImport.ts, 11, 1)) export import a3 = m.a; ->a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 11)) +>a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 14)) >m : Symbol(m, Decl(es6ModuleInternalImport.ts, 0, 0)) >a : Symbol(a4, Decl(es6ModuleInternalImport.ts, 1, 14)) @@ -65,15 +65,15 @@ module m2 { var x2 = a3 + a4; >x2 : Symbol(x2, Decl(es6ModuleInternalImport.ts, 16, 7)) ->a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 11)) +>a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 14)) >a4 : Symbol(a4, Decl(es6ModuleInternalImport.ts, 13, 27)) var x4 = m1.a3 + m2.a3; >x4 : Symbol(x4, Decl(es6ModuleInternalImport.ts, 17, 7)) ->m1.a3 : Symbol(m1.a3, Decl(es6ModuleInternalImport.ts, 6, 18)) +>m1.a3 : Symbol(m1.a3, Decl(es6ModuleInternalImport.ts, 6, 21)) >m1 : Symbol(m1, Decl(es6ModuleInternalImport.ts, 5, 16)) ->a3 : Symbol(m1.a3, Decl(es6ModuleInternalImport.ts, 6, 18)) ->m2.a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 11)) +>a3 : Symbol(m1.a3, Decl(es6ModuleInternalImport.ts, 6, 21)) +>m2.a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 14)) >m2 : Symbol(m2, Decl(es6ModuleInternalImport.ts, 11, 1)) ->a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 11)) +>a3 : Symbol(a3, Decl(es6ModuleInternalImport.ts, 12, 14)) } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.types b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.types index 6762d61af8..e68d1055f3 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalImport.ts] //// === es6ModuleInternalImport.ts === -export module m { +export namespace m { >m : typeof m export var a = 10; @@ -24,7 +24,7 @@ var x = a1 + a2; >a1 : number >a2 : number -export module m1 { +export namespace m1 { >m1 : typeof m1 export import a3 = m.a; @@ -49,7 +49,7 @@ export module m1 { >a3 : number >a4 : number } -module m2 { +namespace m2 { >m2 : typeof m2 export import a3 = m.a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.errors.txt index 0d0a4fe07a..f9fd1209a1 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.errors.txt @@ -9,7 +9,7 @@ es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are no ==== es6ModuleInternalNamedImports.ts (8 errors) ==== - export module M { + export namespace M { // variable export var M_V = 0; // interface @@ -17,9 +17,9 @@ es6ModuleInternalNamedImports.ts(29,5): error TS1194: Export declarations are no //calss export class M_C { } // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } // enum diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.js b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.js index c007f4f912..d46720593f 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports.ts] //// //// [es6ModuleInternalNamedImports.ts] -export module M { +export namespace M { // variable export var M_V = 0; // interface @@ -9,9 +9,9 @@ export module M { //calss export class M_C { } // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } // enum diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.symbols index de9a1685a1..39c2eb2ed5 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports.ts] //// === es6ModuleInternalNamedImports.ts === -export module M { +export namespace M { >M : Symbol(M, Decl(es6ModuleInternalNamedImports.ts, 0, 0)) // variable @@ -17,17 +17,17 @@ export module M { >M_C : Symbol(M_C, Decl(es6ModuleInternalNamedImports.ts, 4, 28)) // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } >M_M : Symbol(M_M, Decl(es6ModuleInternalNamedImports.ts, 6, 24)) ->x : Symbol(x, Decl(es6ModuleInternalNamedImports.ts, 8, 27)) +>x : Symbol(x, Decl(es6ModuleInternalNamedImports.ts, 8, 30)) // uninstantiated module - export module M_MU { } ->M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports.ts, 8, 32)) + export namespace M_MU { } +>M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports.ts, 8, 35)) // function export function M_F() { } ->M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports.ts, 10, 26)) +>M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports.ts, 10, 29)) // enum export enum M_E { } @@ -60,11 +60,11 @@ export module M { >m : Symbol(m, Decl(es6ModuleInternalNamedImports.ts, 24, 12)) export {M_MU as mu}; ->M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports.ts, 8, 32)) +>M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports.ts, 8, 35)) >mu : Symbol(mu, Decl(es6ModuleInternalNamedImports.ts, 25, 12)) export {M_F as f}; ->M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports.ts, 10, 26)) +>M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports.ts, 10, 29)) >f : Symbol(f, Decl(es6ModuleInternalNamedImports.ts, 26, 12)) export {M_E as e}; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.types b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.types index a437f293ca..45937d4a29 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports.ts] //// === es6ModuleInternalNamedImports.ts === -export module M { +export namespace M { >M : typeof M // variable @@ -16,12 +16,12 @@ export module M { >M_C : M_C // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } >M_M : typeof M_M >x : any // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } >M_F : () => void diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.errors.txt b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.errors.txt index 5f8dde403e..cd7c5dc9d8 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.errors.txt @@ -9,7 +9,7 @@ es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are n ==== es6ModuleInternalNamedImports2.ts (8 errors) ==== - export module M { + export namespace M { // variable export var M_V = 0; // interface @@ -17,9 +17,9 @@ es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are n //calss export class M_C { } // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } // enum @@ -30,7 +30,7 @@ es6ModuleInternalNamedImports2.ts(31,5): error TS1194: Export declarations are n export import M_A = M_M; } - export module M { + export namespace M { // Reexports export {M_V as v}; ~~~~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.js b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.js index b0a488249d..071f85c556 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports2.ts] //// //// [es6ModuleInternalNamedImports2.ts] -export module M { +export namespace M { // variable export var M_V = 0; // interface @@ -9,9 +9,9 @@ export module M { //calss export class M_C { } // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } // enum @@ -22,7 +22,7 @@ export module M { export import M_A = M_M; } -export module M { +export namespace M { // Reexports export {M_V as v}; export {M_I as i}; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.symbols index f0e44b0e50..a0694bb661 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports2.ts] //// === es6ModuleInternalNamedImports2.ts === -export module M { +export namespace M { >M : Symbol(M, Decl(es6ModuleInternalNamedImports2.ts, 0, 0), Decl(es6ModuleInternalNamedImports2.ts, 19, 1)) // variable @@ -17,17 +17,17 @@ export module M { >M_C : Symbol(M_C, Decl(es6ModuleInternalNamedImports2.ts, 4, 28)) // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } >M_M : Symbol(M_M, Decl(es6ModuleInternalNamedImports2.ts, 6, 24)) ->x : Symbol(x, Decl(es6ModuleInternalNamedImports2.ts, 8, 27)) +>x : Symbol(x, Decl(es6ModuleInternalNamedImports2.ts, 8, 30)) // uninstantiated module - export module M_MU { } ->M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports2.ts, 8, 32)) + export namespace M_MU { } +>M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports2.ts, 8, 35)) // function export function M_F() { } ->M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports2.ts, 10, 26)) +>M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports2.ts, 10, 29)) // enum export enum M_E { } @@ -43,7 +43,7 @@ export module M { >M_M : Symbol(M_M, Decl(es6ModuleInternalNamedImports2.ts, 6, 24)) } -export module M { +export namespace M { >M : Symbol(M, Decl(es6ModuleInternalNamedImports2.ts, 0, 0), Decl(es6ModuleInternalNamedImports2.ts, 19, 1)) // Reexports @@ -64,11 +64,11 @@ export module M { >m : Symbol(m, Decl(es6ModuleInternalNamedImports2.ts, 26, 12)) export {M_MU as mu}; ->M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports2.ts, 8, 32)) +>M_MU : Symbol(M_MU, Decl(es6ModuleInternalNamedImports2.ts, 8, 35)) >mu : Symbol(mu, Decl(es6ModuleInternalNamedImports2.ts, 27, 12)) export {M_F as f}; ->M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports2.ts, 10, 26)) +>M_F : Symbol(M_F, Decl(es6ModuleInternalNamedImports2.ts, 10, 29)) >f : Symbol(f, Decl(es6ModuleInternalNamedImports2.ts, 28, 12)) export {M_E as e}; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.types b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.types index 7489e391ce..b5121aa207 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalNamedImports2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleInternalNamedImports2.ts] //// === es6ModuleInternalNamedImports2.ts === -export module M { +export namespace M { >M : typeof M // variable @@ -16,12 +16,12 @@ export module M { >M_C : M_C // instantiated module - export module M_M { var x; } + export namespace M_M { var x; } >M_M : typeof M_M >x : any // uninstantiated module - export module M_MU { } + export namespace M_MU { } // function export function M_F() { } >M_F : () => void @@ -40,7 +40,7 @@ export module M { >M_M : typeof M_M } -export module M { +export namespace M { >M : typeof M // Reexports diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.js b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.js index 40dda25300..6700934ef0 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.js @@ -5,13 +5,13 @@ export let a = "hello"; export let x: string = a, y = x; let b = y; let c: string = b, d = c; -export module m1 { +export namespace m1 { export let k = a; export let l: string = b, m = k; let n = m1.k; let o: string = n, p = k; } -module m2 { +namespace m2 { export let k = a; export let l: string = b, m = k; let n = m1.k; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.symbols index 2a778fc65d..36b289d792 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.symbols @@ -20,7 +20,7 @@ let c: string = b, d = c; >d : Symbol(d, Decl(es6ModuleLet.ts, 3, 18)) >c : Symbol(c, Decl(es6ModuleLet.ts, 3, 3)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleLet.ts, 3, 25)) export let k = a; @@ -45,7 +45,7 @@ export module m1 { >p : Symbol(p, Decl(es6ModuleLet.ts, 8, 22)) >k : Symbol(k, Decl(es6ModuleLet.ts, 5, 14)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleLet.ts, 9, 1)) export let k = a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.types b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.types index 40e98de597..5cbc6bab83 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleLet.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleLet.types @@ -21,7 +21,7 @@ let c: string = b, d = c; >d : string >c : string -export module m1 { +export namespace m1 { >m1 : typeof m1 export let k = a; @@ -46,7 +46,7 @@ export module m1 { >p : string >k : string } -module m2 { +namespace m2 { >m2 : typeof m2 export let k = a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.js b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.js index 90425f1832..18c7152737 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.js @@ -1,26 +1,26 @@ //// [tests/cases/compiler/es6ModuleModuleDeclaration.ts] //// //// [es6ModuleModuleDeclaration.ts] -export module m1 { +export namespace m1 { export var a = 10; var b = 10; - export module innerExportedModule { + export namespace innerExportedModule { export var k = 10; var l = 10; } - export module innerNonExportedModule { + export namespace innerNonExportedModule { export var x = 10; var y = 10; } } -module m2 { +namespace m2 { export var a = 10; var b = 10; - export module innerExportedModule { + export namespace innerExportedModule { export var k = 10; var l = 10; } - export module innerNonExportedModule { + export namespace innerNonExportedModule { export var x = 10; var y = 10; } diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.symbols index 7521b8f99d..58cb9f3030 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleModuleDeclaration.ts] //// === es6ModuleModuleDeclaration.ts === -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleModuleDeclaration.ts, 0, 0)) export var a = 10; @@ -10,7 +10,7 @@ export module m1 { var b = 10; >b : Symbol(b, Decl(es6ModuleModuleDeclaration.ts, 2, 7)) - export module innerExportedModule { + export namespace innerExportedModule { >innerExportedModule : Symbol(innerExportedModule, Decl(es6ModuleModuleDeclaration.ts, 2, 15)) export var k = 10; @@ -19,7 +19,7 @@ export module m1 { var l = 10; >l : Symbol(l, Decl(es6ModuleModuleDeclaration.ts, 5, 11)) } - export module innerNonExportedModule { + export namespace innerNonExportedModule { >innerNonExportedModule : Symbol(innerNonExportedModule, Decl(es6ModuleModuleDeclaration.ts, 6, 5)) export var x = 10; @@ -29,7 +29,7 @@ export module m1 { >y : Symbol(y, Decl(es6ModuleModuleDeclaration.ts, 9, 11)) } } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleModuleDeclaration.ts, 11, 1)) export var a = 10; @@ -38,7 +38,7 @@ module m2 { var b = 10; >b : Symbol(b, Decl(es6ModuleModuleDeclaration.ts, 14, 7)) - export module innerExportedModule { + export namespace innerExportedModule { >innerExportedModule : Symbol(innerExportedModule, Decl(es6ModuleModuleDeclaration.ts, 14, 15)) export var k = 10; @@ -47,7 +47,7 @@ module m2 { var l = 10; >l : Symbol(l, Decl(es6ModuleModuleDeclaration.ts, 17, 11)) } - export module innerNonExportedModule { + export namespace innerNonExportedModule { >innerNonExportedModule : Symbol(innerNonExportedModule, Decl(es6ModuleModuleDeclaration.ts, 18, 5)) export var x = 10; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.types b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.types index a9c1263fdc..862bf3b6e0 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleModuleDeclaration.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/es6ModuleModuleDeclaration.ts] //// === es6ModuleModuleDeclaration.ts === -export module m1 { +export namespace m1 { >m1 : typeof m1 export var a = 10; @@ -12,7 +12,7 @@ export module m1 { >b : number >10 : 10 - export module innerExportedModule { + export namespace innerExportedModule { >innerExportedModule : typeof innerExportedModule export var k = 10; @@ -23,7 +23,7 @@ export module m1 { >l : number >10 : 10 } - export module innerNonExportedModule { + export namespace innerNonExportedModule { >innerNonExportedModule : typeof innerNonExportedModule export var x = 10; @@ -35,7 +35,7 @@ export module m1 { >10 : 10 } } -module m2 { +namespace m2 { >m2 : typeof m2 export var a = 10; @@ -46,7 +46,7 @@ module m2 { >b : number >10 : 10 - export module innerExportedModule { + export namespace innerExportedModule { >innerExportedModule : typeof innerExportedModule export var k = 10; @@ -57,7 +57,7 @@ module m2 { >l : number >10 : 10 } - export module innerNonExportedModule { + export namespace innerNonExportedModule { >innerNonExportedModule : typeof innerNonExportedModule export var x = 10; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.js b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.js index b1be5fd4ae..b67baa22e5 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.js +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.js @@ -5,13 +5,13 @@ export var a = "hello"; export var x: string = a, y = x; var b = y; var c: string = b, d = c; -export module m1 { +export namespace m1 { export var k = a; export var l: string = b, m = k; var n = m1.k; var o: string = n, p = k; } -module m2 { +namespace m2 { export var k = a; export var l: string = b, m = k; var n = m1.k; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.symbols b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.symbols index 23b8b68f4d..d17e41e5e1 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.symbols +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.symbols @@ -20,7 +20,7 @@ var c: string = b, d = c; >d : Symbol(d, Decl(es6ModuleVariableStatement.ts, 3, 18)) >c : Symbol(c, Decl(es6ModuleVariableStatement.ts, 3, 3)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(es6ModuleVariableStatement.ts, 3, 25)) export var k = a; @@ -45,7 +45,7 @@ export module m1 { >p : Symbol(p, Decl(es6ModuleVariableStatement.ts, 8, 22)) >k : Symbol(k, Decl(es6ModuleVariableStatement.ts, 5, 14)) } -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(es6ModuleVariableStatement.ts, 9, 1)) export var k = a; diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.types b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.types index 4f04748e9b..09c953381e 100644 --- a/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.types +++ b/testdata/baselines/reference/submodule/compiler/es6ModuleVariableStatement.types @@ -21,7 +21,7 @@ var c: string = b, d = c; >d : string >c : string -export module m1 { +export namespace m1 { >m1 : typeof m1 export var k = a; @@ -46,7 +46,7 @@ export module m1 { >p : string >k : string } -module m2 { +namespace m2 { >m2 : typeof m2 export var k = a; diff --git a/testdata/baselines/reference/submodule/compiler/esModuleInteropDefaultMemberMustBeSyntacticallyDefaultExport.js.diff b/testdata/baselines/reference/submodule/compiler/esModuleInteropDefaultMemberMustBeSyntacticallyDefaultExport.js.diff index 265e37fbe9..5f53d4890b 100644 --- a/testdata/baselines/reference/submodule/compiler/esModuleInteropDefaultMemberMustBeSyntacticallyDefaultExport.js.diff +++ b/testdata/baselines/reference/submodule/compiler/esModuleInteropDefaultMemberMustBeSyntacticallyDefaultExport.js.diff @@ -5,6 +5,8 @@ }; Object.defineProperty(exports, "__esModule", { value: true }); -var point_1 = __importDefault(require("./point")); +-var C = point_1.default; +-var p = new C(1, 2); +const point_1 = __importDefault(require("./point")); - const C = point_1.default; - const p = new C(1, 2); \ No newline at end of file ++const C = point_1.default; ++const p = new C(1, 2); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/esModuleInteropImportCall.js.diff b/testdata/baselines/reference/submodule/compiler/esModuleInteropImportCall.js.diff index 558a6649b8..d3aee0c45b 100644 --- a/testdata/baselines/reference/submodule/compiler/esModuleInteropImportCall.js.diff +++ b/testdata/baselines/reference/submodule/compiler/esModuleInteropImportCall.js.diff @@ -4,7 +4,7 @@ return result; }; })(); --Promise.resolve().then(function () { return __importStar(require("./foo")); }).then(f => { +-Promise.resolve().then(function () { return __importStar(require("./foo")); }).then(function (f) { +Promise.resolve().then(() => __importStar(require("./foo"))).then(f => { f.default; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/esModuleInteropNamedDefaultImports.js.diff b/testdata/baselines/reference/submodule/compiler/esModuleInteropNamedDefaultImports.js.diff index 93eefcf4dc..e33de7b671 100644 --- a/testdata/baselines/reference/submodule/compiler/esModuleInteropNamedDefaultImports.js.diff +++ b/testdata/baselines/reference/submodule/compiler/esModuleInteropNamedDefaultImports.js.diff @@ -1,6 +1,28 @@ --- old.esModuleInteropNamedDefaultImports.js +++ new.esModuleInteropNamedDefaultImports.js -@@= skipped -60, +60 lines =@@ +@@= skipped -15, +15 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Bar = void 0; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.default = Foo; +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); ++class Bar { ++} + exports.Bar = Bar; + //// [idx.js] + "use strict"; +@@= skipped -51, +45 lines =@@ return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/esModuleInteropTslibHelpers.js.diff b/testdata/baselines/reference/submodule/compiler/esModuleInteropTslibHelpers.js.diff index 29b8bcd865..1afa9b2594 100644 --- a/testdata/baselines/reference/submodule/compiler/esModuleInteropTslibHelpers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/esModuleInteropTslibHelpers.js.diff @@ -9,9 +9,15 @@ +const tslib_1 = require("tslib"); +const path_1 = tslib_1.__importDefault(require("path")); path_1.default.resolve("", "../"); - class Foo { - } -@@= skipped -10, +10 lines =@@ +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.Foo = Foo; + //// [file2.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Foo2 = void 0; @@ -20,9 +26,15 @@ +const tslib_1 = require("tslib"); +const path = tslib_1.__importStar(require("path")); path.resolve("", "../"); - class Foo2 { - } -@@= skipped -10, +10 lines =@@ +-var Foo2 = /** @class */ (function () { +- function Foo2() { +- } +- return Foo2; +-}()); ++class Foo2 { ++} + exports.Foo2 = Foo2; + //// [file3.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Foo3 = void 0; @@ -31,9 +43,15 @@ +const tslib_1 = require("tslib"); +const path_1 = tslib_1.__importDefault(require("path")); (0, path_1.default)("", "../"); - class Foo3 { - } -@@= skipped -10, +10 lines =@@ +-var Foo3 = /** @class */ (function () { +- function Foo3() { +- } +- return Foo3; +-}()); ++class Foo3 { ++} + exports.Foo3 = Foo3; + //// [file4.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar = void 0; diff --git a/testdata/baselines/reference/submodule/compiler/esModuleIntersectionCrash.types.diff b/testdata/baselines/reference/submodule/compiler/esModuleIntersectionCrash.types.diff index 7b6f1d59de..a9959dd381 100644 --- a/testdata/baselines/reference/submodule/compiler/esModuleIntersectionCrash.types.diff +++ b/testdata/baselines/reference/submodule/compiler/esModuleIntersectionCrash.types.diff @@ -12,3 +12,22 @@ +>modObj : import("mod").A & import("mod").B >modObj : any >modObj : any + +@@= skipped -17, +17 lines =@@ + } + === idx.ts === + import * as mod from "./mod"; +->mod : { default: mod.A & mod.B; a: string; b: string; } ++>mod : { a: string; b: string; default: mod.A & mod.B; } + + mod.a; + >mod.a : string +->mod : { default: mod.A & mod.B; a: string; b: string; } ++>mod : { a: string; b: string; default: mod.A & mod.B; } + >a : string + + mod.b; + >mod.b : string +->mod : { default: mod.A & mod.B; a: string; b: string; } ++>mod : { a: string; b: string; default: mod.A & mod.B; } + >b : string diff --git a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js index 31c5676836..6583483ea7 100644 --- a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js +++ b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js @@ -22,7 +22,7 @@ b ++; \u0062 ++; // modules -module moduleType1 { +namespace moduleType1 { export var baz1: number; } module moduleType\u0032 { diff --git a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js.diff b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js.diff index da1124568a..be27264843 100644 --- a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.js.diff @@ -14,23 +14,53 @@ moduleType2.baz2 = 3; moduleType\u0032.baz2 = 3; // classes - class classType1 { +-var classType1 = /** @class */ (function () { +- function classType1() { +- } +- return classType1; +-}()); +-var classType\u0032 = /** @class */ (function () { +- function classType\u0032() { +- } +- return classType\u0032; +-}()); ++class classType1 { + foo1; - } - class classType\u0032 { ++} ++class classType\u0032 { + foo2; - } ++} var classType1Object1 = new classType1(); classType1Object1.foo1 = 2; -@@= skipped -39, +41 lines =@@ - } + var classType1Object2 = new classType\u0031(); +@@= skipped -35, +31 lines =@@ + var interfaceType2Object2 = { bar2: 0 }; + interfaceType2Object2.bar2 = 2; + // arguments +-var testClass = /** @class */ (function () { +- function testClass() { +- } +- testClass.prototype.func = function (arg1, arg\u0032, arg\u0033, arg4) { ++class testClass { ++ func(arg1, arg\u0032, arg\u0033, arg4) { + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; +- }; +- return testClass; +-}()); ++ } ++} // constructors - class constructorTestClass { +-var constructorTestClass = /** @class */ (function () { +- function constructorTestClass(arg1, arg\u0032, arg\u0033, arg4) { ++class constructorTestClass { + arg1; + arg2; + arg3; + arg4; - constructor(arg1, arg\u0032, arg\u0033, arg4) { ++ constructor(arg1, arg\u0032, arg\u0033, arg4) { this.arg1 = arg1; - this.arg\u0032 = arg\u0032; - this.arg\u0033 = arg\u0033; @@ -38,4 +68,9 @@ + this.arg3 = arg3; this.arg4 = arg4; } - } \ No newline at end of file +- return constructorTestClass; +-}()); ++} + var constructorTestObject = new constructorTestClass(1, 'string', true, 2); + constructorTestObject.arg\u0031 = 1; + constructorTestObject.arg2 = 'string'; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.symbols b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.symbols index 0ce7f60c2f..c2047676d6 100644 --- a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.symbols +++ b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.symbols @@ -32,7 +32,7 @@ b ++; >\u0062 : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3)) // modules -module moduleType1 { +namespace moduleType1 { >moduleType1 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10)) export var baz1: number; diff --git a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.types b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.types index a38da5f017..5ba314c198 100644 --- a/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.types +++ b/testdata/baselines/reference/submodule/compiler/escapedIdentifiers.types @@ -38,7 +38,7 @@ b ++; >\u0062 : number // modules -module moduleType1 { +namespace moduleType1 { >moduleType1 : typeof moduleType1 export var baz1: number; diff --git a/testdata/baselines/reference/submodule/compiler/eventEmitterPatternWithRecordOfFunction.symbols.diff b/testdata/baselines/reference/submodule/compiler/eventEmitterPatternWithRecordOfFunction.symbols.diff new file mode 100644 index 0000000000..34ea43b576 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/eventEmitterPatternWithRecordOfFunction.symbols.diff @@ -0,0 +1,11 @@ +--- old.eventEmitterPatternWithRecordOfFunction.symbols ++++ new.eventEmitterPatternWithRecordOfFunction.symbols +@@= skipped -20, +20 lines =@@ + type EventMap = Record; + >EventMap : Symbol(EventMap, Decl(eventEmitterPatternWithRecordOfFunction.ts, 4, 64)) + >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + interface B extends A { + >B : Symbol(B, Decl(eventEmitterPatternWithRecordOfFunction.ts, 6, 41)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/evolvingArrayTypeInAssert.js.diff b/testdata/baselines/reference/submodule/compiler/evolvingArrayTypeInAssert.js.diff new file mode 100644 index 0000000000..f40b4542ab --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/evolvingArrayTypeInAssert.js.diff @@ -0,0 +1,11 @@ +--- old.evolvingArrayTypeInAssert.js ++++ new.evolvingArrayTypeInAssert.js +@@= skipped -16, +16 lines =@@ + exports.unsafeCast = unsafeCast; + function unsafeCast(_value) { } + function yadda() { +- var out = []; ++ let out = []; + out.push(100); + unsafeCast(out); + return out; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.errors.txt.diff new file mode 100644 index 0000000000..cd32081c45 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.errors.txt.diff @@ -0,0 +1,19 @@ +--- old.exactOptionalPropertyTypesIdentical.errors.txt ++++ new.exactOptionalPropertyTypesIdentical.errors.txt +@@= skipped -0, +0 lines =@@ +-exactOptionalPropertyTypesIdentical.ts(2,12): error TS2322: Type '() => T extends { a?: string; } ? 0 : 1' is not assignable to type '() => T extends { a?: string | undefined; } ? 0 : 1'. +- Type 'T extends { a?: string; } ? 0 : 1' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +- Type '0 | 1' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +- Type '0' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +- +- +-==== exactOptionalPropertyTypesIdentical.ts (1 errors) ==== +- export let a: () => T extends {a?: string} ? 0 : 1 = null!; +- export let b: () => T extends {a?: string | undefined} ? 0 : 1 = a; +- ~ +-!!! error TS2322: Type '() => T extends { a?: string; } ? 0 : 1' is not assignable to type '() => T extends { a?: string | undefined; } ? 0 : 1'. +-!!! error TS2322: Type 'T extends { a?: string; } ? 0 : 1' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +-!!! error TS2322: Type '0 | 1' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +-!!! error TS2322: Type '0' is not assignable to type 'T extends { a?: string | undefined; } ? 0 : 1'. +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.js b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.js new file mode 100644 index 0000000000..e3153ce591 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.js @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/exactOptionalPropertyTypesIdentical.ts] //// + +//// [exactOptionalPropertyTypesIdentical.ts] +export let a: () => T extends {a?: string} ? 0 : 1 = null!; +export let b: () => T extends {a?: string | undefined} ? 0 : 1 = a; + + +//// [exactOptionalPropertyTypesIdentical.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = exports.a = void 0; +exports.a = null; +exports.b = exports.a; diff --git a/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.symbols b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.symbols new file mode 100644 index 0000000000..e7bbad2470 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.symbols @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/exactOptionalPropertyTypesIdentical.ts] //// + +=== exactOptionalPropertyTypesIdentical.ts === +export let a: () => T extends {a?: string} ? 0 : 1 = null!; +>a : Symbol(a, Decl(exactOptionalPropertyTypesIdentical.ts, 0, 10)) +>T : Symbol(T, Decl(exactOptionalPropertyTypesIdentical.ts, 0, 15)) +>T : Symbol(T, Decl(exactOptionalPropertyTypesIdentical.ts, 0, 15)) +>a : Symbol(a, Decl(exactOptionalPropertyTypesIdentical.ts, 0, 34)) + +export let b: () => T extends {a?: string | undefined} ? 0 : 1 = a; +>b : Symbol(b, Decl(exactOptionalPropertyTypesIdentical.ts, 1, 10)) +>T : Symbol(T, Decl(exactOptionalPropertyTypesIdentical.ts, 1, 15)) +>T : Symbol(T, Decl(exactOptionalPropertyTypesIdentical.ts, 1, 15)) +>a : Symbol(a, Decl(exactOptionalPropertyTypesIdentical.ts, 1, 34)) +>a : Symbol(a, Decl(exactOptionalPropertyTypesIdentical.ts, 0, 10)) + diff --git a/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.types b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.types new file mode 100644 index 0000000000..045155e68d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exactOptionalPropertyTypesIdentical.types @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/exactOptionalPropertyTypesIdentical.ts] //// + +=== exactOptionalPropertyTypesIdentical.ts === +export let a: () => T extends {a?: string} ? 0 : 1 = null!; +>a : () => T extends { a?: string; } ? 0 : 1 +>a : string | undefined +>null! : never + +export let b: () => T extends {a?: string | undefined} ? 0 : 1 = a; +>b : () => T extends { a?: string | undefined; } ? 0 : 1 +>a : string | undefined +>a : () => T extends { a?: string; } ? 0 : 1 + diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckIntersectionWithIndexSignature.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckIntersectionWithIndexSignature.js.diff index 5156612962..b917fed920 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckIntersectionWithIndexSignature.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckIntersectionWithIndexSignature.js.diff @@ -6,5 +6,12 @@ //// [excessPropertyCheckIntersectionWithIndexSignature.js] -"use strict"; // Repro from #51875 - let x; - x = { y: { a: 0 } }; // Error \ No newline at end of file +-var x; ++let x; + x = { y: { a: 0 } }; // Error + x = { y: { a: 0, b: 0 } }; + x = { y: { a: 0, b: 0, c: 0 } }; // Error +-var yy = { ++const yy = { + foo: { a: '', b: '' }, + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithEmptyObject.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithEmptyObject.js.diff new file mode 100644 index 0000000000..df4e08bed8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithEmptyObject.js.diff @@ -0,0 +1,11 @@ +--- old.excessPropertyCheckWithEmptyObject.js ++++ new.excessPropertyCheckWithEmptyObject.js +@@= skipped -21, +21 lines =@@ + // Excess property error expected here + Object.defineProperty(window, "prop", { value: "v1.0.0", readonly: false }); + // Excess property error expected here +-var a = { y: 10 }; ++let a = { y: 10 }; + // Excess property error expected here +-var x = { y: "hello" }; ++let x = { y: "hello" }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.errors.txt.diff new file mode 100644 index 0000000000..e2d63be7e8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.errors.txt.diff @@ -0,0 +1,31 @@ +--- old.excessPropertyCheckWithMultipleDiscriminants.errors.txt ++++ new.excessPropertyCheckWithMultipleDiscriminants.errors.txt +@@= skipped -2, +2 lines =@@ + excessPropertyCheckWithMultipleDiscriminants.ts(50,5): error TS2353: Object literal may only specify known properties, and 'p4' does not exist in type '{ p1: "left"; p2: true; p3: number; } | { p1: "left"; p2: boolean; }'. + excessPropertyCheckWithMultipleDiscriminants.ts(57,5): error TS2353: Object literal may only specify known properties, and 'p3' does not exist in type '{ p1: "right"; p2: false; p4: string; }'. + excessPropertyCheckWithMultipleDiscriminants.ts(83,5): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'Common | (Common & A)'. +-excessPropertyCheckWithMultipleDiscriminants.ts(93,5): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'Common | A'. +-excessPropertyCheckWithMultipleDiscriminants.ts(131,5): error TS2353: Object literal may only specify known properties, and 'autoIncrement' does not exist in type 'StringAttribute | OneToOneAttribute'. ++excessPropertyCheckWithMultipleDiscriminants.ts(93,5): error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'A | Common'. ++excessPropertyCheckWithMultipleDiscriminants.ts(131,5): error TS2353: Object literal may only specify known properties, and 'autoIncrement' does not exist in type 'OneToOneAttribute | StringAttribute'. + excessPropertyCheckWithMultipleDiscriminants.ts(137,5): error TS2353: Object literal may only specify known properties, and 'autoIncrement' does not exist in type 'StringAttribute'. + + +@@= skipped -110, +110 lines =@@ + a: 1, + b: 1 // excess property + ~ +-!!! error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'Common | A'. ++!!! error TS2353: Object literal may only specify known properties, and 'b' does not exist in type 'A | Common'. + } + + // Repro from https://github.com/microsoft/TypeScript/pull/51884#issuecomment-1472736068 +@@= skipped -40, +40 lines =@@ + type: 'string', + autoIncrement: true, + ~~~~~~~~~~~~~ +-!!! error TS2353: Object literal may only specify known properties, and 'autoIncrement' does not exist in type 'StringAttribute | OneToOneAttribute'. ++!!! error TS2353: Object literal may only specify known properties, and 'autoIncrement' does not exist in type 'OneToOneAttribute | StringAttribute'. + required: true, + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff index 9f32319ccc..0aa44b5b47 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithMultipleDiscriminants.js.diff @@ -6,5 +6,62 @@ "use strict"; -// Repro from #32657 Object.defineProperty(exports, "__esModule", { value: true }); - const foo = { - type: "number", \ No newline at end of file +-var foo = { ++const foo = { + type: "number", + value: 10, + multipleOf: 5, // excess property + format: "what?" + }; + // This has excess error because variant three is the only applicable case. +-var a = { ++const a = { + p1: 'left', + p2: false, + p3: 42, + p4: "hello" + }; + // This has excess error because variant two is not applicable. +-var b = { ++const b = { + p1: 'left', + p2: true, + p3: 42, + p4: "hello" + }; + // This has excess error because variant two is the only applicable case +-var c = { ++const c = { + p1: 'right', + p2: false, + p3: 42, + p4: "hello" + }; + // Should reject { b } because reduced to Common | (Common & A) +-var c1 = { ++const c1 = { + type: "A", + n: 1, + a: 1, + b: 1 // excess property + }; + // Should still reject { b } because reduced to Common | A, even though these are now disjoint +-var c2 = { ++const c2 = { + type: "A", + n: 1, + a: 1, + b: 1 // excess property + }; + // both should error due to excess properties +-var attributes = { ++const attributes = { + type: 'string', + autoIncrement: true, + required: true, + }; +-var attributes2 = { ++const attributes2 = { + type: 'string', + autoIncrement: true, + required: true, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.js.diff new file mode 100644 index 0000000000..833c129663 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.js.diff @@ -0,0 +1,11 @@ +--- old.excessPropertyCheckWithNestedArrayIntersection.js ++++ new.excessPropertyCheckWithNestedArrayIntersection.js +@@= skipped -25, +25 lines =@@ + + + //// [excessPropertyCheckWithNestedArrayIntersection.js] +-var repro = { ++const repro = { + dataType: { + fields: [{ + key: 'bla', // should be OK: Not excess \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.symbols.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.symbols.diff new file mode 100644 index 0000000000..292b9e202f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithNestedArrayIntersection.symbols.diff @@ -0,0 +1,20 @@ +--- old.excessPropertyCheckWithNestedArrayIntersection.symbols ++++ new.excessPropertyCheckWithNestedArrayIntersection.symbols +@@= skipped -5, +5 lines =@@ + + fields: Array<{ + >fields : Symbol(ValueOnlyFields.fields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 0, 27)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + value: number | null; + >value : Symbol(value, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 1, 19)) +@@= skipped -12, +12 lines =@@ + + fields: Array<{ + >fields : Symbol(ValueAndKeyFields.fields, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 5, 29)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + key: string | null; + >key : Symbol(key, Decl(excessPropertyCheckWithNestedArrayIntersection.ts, 6, 19)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithUnions.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithUnions.js.diff index 05b1283df7..59036c3cce 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithUnions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckWithUnions.js.diff @@ -7,4 +7,78 @@ -"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { \ No newline at end of file + for (var s, i = 1, n = arguments.length; i < n; i++) { +@@= skipped -12, +11 lines =@@ + }; + return __assign.apply(this, arguments); + }; +-var wrong = { tag: "T", a1: "extra" }; ++let wrong = { tag: "T", a1: "extra" }; + wrong = { tag: "A", d20: 12 }; + wrong = { tag: "D" }; +-var amb; ++let amb; + // no error for ambiguous tag, even when it could satisfy both constituents at once + amb = { tag: "A", x: "hi" }; + amb = { tag: "A", y: 12 }; +@@= skipped -14, +14 lines =@@ + // assignability errors still work + amb = { tag: "A" }; + amb = { tag: "A", z: true }; +-var over; ++let over; + // these two are still errors despite their doubled up discriminants + over = { a: 1, b: 1, first: "ok", second: "error" }; + over = { a: 1, b: 1, first: "ok", third: "error" }; +-var t2 = __assign({}, t1); ++let t2 = __assign({}, t1); + t0 = t2; +-var abab = { ++const abab = { + kind: "A", + n: { + a: "a", + b: "b", // excess -- kind: "A" + } + }; +-var abac = { ++const abac = { + kind: "A", + n: { + a: "a", + c: "c", // ok -- kind: "A", an: { a: string } | { c: string } + } + }; +-var obj = { ++const obj = { + tag: 'button', + type: 'submit', + // should have error here + href: 'foo', + }; + ; +-var dataSpecification = { ++const dataSpecification = { + foo: "asdfsadffsd" + }; + // Repro from #34611 +-var obj1 = { a: 'abc' }; // Error +-var obj2 = { a: 5, c: 'abc' }; // Error ++const obj1 = { a: 'abc' }; // Error ++const obj2 = { a: 5, c: 'abc' }; // Error + function F1(_arg) { } + F1({ + props: { +- prop1: prop1, +- prop2: prop2, ++ prop1, ++ prop2, + }, + }); + function F2(_props) { } + F2({ +- prop1: prop1, +- prop2: prop2, ++ prop1, ++ prop2, + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyCheckingIntersectionWithConditional.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckingIntersectionWithConditional.js.diff new file mode 100644 index 0000000000..b7aec45b0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyCheckingIntersectionWithConditional.js.diff @@ -0,0 +1,10 @@ +--- old.excessPropertyCheckingIntersectionWithConditional.js ++++ new.excessPropertyCheckingIntersectionWithConditional.js +@@= skipped -6, +6 lines =@@ + } + + //// [excessPropertyCheckingIntersectionWithConditional.js] +-var createDefaultExample = function (x) { ++const createDefaultExample = (x) => { + return { a: 1, x: x }; // okay in TS 4.7.4, error in TS 4.8.2 + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff index f87d79cdcf..b6ad1f40fd 100644 --- a/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyChecksWithNestedIntersections.js.diff @@ -7,4 +7,26 @@ -// https://github.com/Microsoft/TypeScript/issues/13813 Object.defineProperty(exports, "__esModule", { value: true }); exports.myInstance = exports.photo = exports.obj = void 0; - let a = { a: { x: 'hello' } }; // ok \ No newline at end of file +-var a = { a: { x: 'hello' } }; // ok +-var b = { a: { x: 2 } }; // error - types of property x are incompatible +-var c = { a: { x: 'hello', y: 2 } }; // error - y does not exist in type A +-var d = { a: { x: 'hello' }, c: 5 }; // ok +-var e = { a: { x: 2 }, c: 5 }; // error - types of property x are incompatible +-var f = { a: { x: 'hello', y: 2 }, c: 5 }; // error - y does not exist in type A ++let a = { a: { x: 'hello' } }; // ok ++let b = { a: { x: 2 } }; // error - types of property x are incompatible ++let c = { a: { x: 'hello', y: 2 } }; // error - y does not exist in type A ++let d = { a: { x: 'hello' }, c: 5 }; // ok ++let e = { a: { x: 2 }, c: 5 }; // error - types of property x are incompatible ++let f = { a: { x: 'hello', y: 2 }, c: 5 }; // error - y does not exist in type A + exports.photo = { + id: 1, + url: '', +@@= skipped -23, +22 lines =@@ + xyz: 2 // This should also be an error + } + }; +-var test; ++let test; + test = { foo: true, bar: true, boo: true }; + test = { foo: true, bar: { foo: true, bar: true, boo: true } }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessPropertyErrorForFunctionTypes.js.diff b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorForFunctionTypes.js.diff new file mode 100644 index 0000000000..3d93269015 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/excessPropertyErrorForFunctionTypes.js.diff @@ -0,0 +1,8 @@ +--- old.excessPropertyErrorForFunctionTypes.js ++++ new.excessPropertyErrorForFunctionTypes.js +@@= skipped -6, +6 lines =@@ + let doesntWork: DoesntWork = { a: 1, c: 2, d: 3 } + + //// [excessPropertyErrorForFunctionTypes.js] +-var doesntWork = { a: 1, c: 2, d: 3 }; ++let doesntWork = { a: 1, c: 2, d: 3 }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessiveStackDepthFlatArray.js.diff b/testdata/baselines/reference/submodule/compiler/excessiveStackDepthFlatArray.js.diff index 0fd96a87b2..54f26d014b 100644 --- a/testdata/baselines/reference/submodule/compiler/excessiveStackDepthFlatArray.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessiveStackDepthFlatArray.js.diff @@ -1,13 +1,30 @@ --- old.excessiveStackDepthFlatArray.js +++ new.excessiveStackDepthFlatArray.js -@@= skipped -47, +47 lines =@@ +@@= skipped -42, +42 lines =@@ + + + //// [index.js] +-var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { +- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { +- if (ar || !(i in from)) { +- if (!ar) ar = Array.prototype.slice.call(from, 0, i); +- ar[i] = from[i]; +- } +- } +- return to.concat(ar || Array.prototype.slice.call(from)); +-}; + configureStore({ +- middleware: __spreadArray([], defaultMiddleware, true), // Should not error ++ middleware: [...defaultMiddleware], // Should not error }); - const Component = () => { - const categories = ['Fruit', 'Vegetables']; +-var Component = function () { +- var categories = ['Fruit', 'Vegetables']; - return (React.createElement("ul", null, - React.createElement("li", null, "All"), -- categories.map((category) => (React.createElement("li", { key: category }, category) // Error about 'key' only -- )))); +- categories.map(function (category) { return (React.createElement("li", { key: category }, category) // Error about 'key' only +- ); }))); ++const Component = () => { ++ const categories = ['Fruit', 'Vegetables']; + return (React.createElement("ul", null, React.createElement("li", null, "All"), categories.map((category) => (React.createElement("li", { key: category }, category) // Error about 'key' only + )))); }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/excessivelyLargeTupleSpread.js.diff b/testdata/baselines/reference/submodule/compiler/excessivelyLargeTupleSpread.js.diff index 92979b3175..d65b215c96 100644 --- a/testdata/baselines/reference/submodule/compiler/excessivelyLargeTupleSpread.js.diff +++ b/testdata/baselines/reference/submodule/compiler/excessivelyLargeTupleSpread.js.diff @@ -5,6 +5,42 @@ //// [excessivelyLargeTupleSpread.js] -// #41771 - const a0 = [0]; - const a1 = [...a0, ...a0]; - const a2 = [...a1, ...a1]; \ No newline at end of file +-var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { +- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { +- if (ar || !(i in from)) { +- if (!ar) ar = Array.prototype.slice.call(from, 0, i); +- ar[i] = from[i]; +- } +- } +- return to.concat(ar || Array.prototype.slice.call(from)); +-}; +-var a0 = [0]; +-var a1 = __spreadArray(__spreadArray([], a0, true), a0, true); +-var a2 = __spreadArray(__spreadArray([], a1, true), a1, true); +-var a3 = __spreadArray(__spreadArray([], a2, true), a2, true); +-var a4 = __spreadArray(__spreadArray([], a3, true), a3, true); +-var a5 = __spreadArray(__spreadArray([], a4, true), a4, true); +-var a6 = __spreadArray(__spreadArray([], a5, true), a5, true); +-var a7 = __spreadArray(__spreadArray([], a6, true), a6, true); +-var a8 = __spreadArray(__spreadArray([], a7, true), a7, true); +-var a9 = __spreadArray(__spreadArray([], a8, true), a8, true); +-var a10 = __spreadArray(__spreadArray([], a9, true), a9, true); +-var a11 = __spreadArray(__spreadArray([], a10, true), a10, true); +-var a12 = __spreadArray(__spreadArray([], a11, true), a11, true); +-var a13 = __spreadArray(__spreadArray([], a12, true), a12, true); +-var a14 = __spreadArray(__spreadArray([], a13, true), a13, true); // 2^14 > 10,000 ++const a0 = [0]; ++const a1 = [...a0, ...a0]; ++const a2 = [...a1, ...a1]; ++const a3 = [...a2, ...a2]; ++const a4 = [...a3, ...a3]; ++const a5 = [...a4, ...a4]; ++const a6 = [...a5, ...a5]; ++const a7 = [...a6, ...a6]; ++const a8 = [...a7, ...a7]; ++const a9 = [...a8, ...a8]; ++const a10 = [...a9, ...a9]; ++const a11 = [...a10, ...a10]; ++const a12 = [...a11, ...a11]; ++const a13 = [...a12, ...a12]; ++const a14 = [...a13, ...a13]; // 2^14 > 10,000 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchCheckCircularity.js.diff b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchCheckCircularity.js.diff index 993390a5ce..c79a67ed9d 100644 --- a/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchCheckCircularity.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchCheckCircularity.js.diff @@ -7,5 +7,20 @@ -"use strict"; -// Repro from #47539 function f() { - let foo = "aaa"; - while (true) { \ No newline at end of file +- var foo = "aaa"; ++ let foo = "aaa"; + while (true) { + switch (foo) { + case "aaa": +@@= skipped -17, +15 lines =@@ + } + } + function functionC() { +- var unionVal = "A"; ++ let unionVal = "A"; + while (true) { +- var key = void 0; ++ let key; + switch (unionVal) { + case "A": { + key = "AA"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchImplicitReturn.js.diff b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchImplicitReturn.js.diff new file mode 100644 index 0000000000..669ee48621 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchImplicitReturn.js.diff @@ -0,0 +1,11 @@ +--- old.exhaustiveSwitchImplicitReturn.js ++++ new.exhaustiveSwitchImplicitReturn.js +@@= skipped -68, +68 lines =@@ + case "a": + return 1; + } +- var unusedVariable; ++ let unusedVariable; + } + function foo3(bar) { + switch (bar) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchWithWideningLiteralTypes.js.diff b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchWithWideningLiteralTypes.js.diff index ba21c22624..baf68632a2 100644 --- a/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchWithWideningLiteralTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exhaustiveSwitchWithWideningLiteralTypes.js.diff @@ -1,19 +1,27 @@ --- old.exhaustiveSwitchWithWideningLiteralTypes.js +++ new.exhaustiveSwitchWithWideningLiteralTypes.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + //// [exhaustiveSwitchWithWideningLiteralTypes.js] // Repro from #12529 - class A { -- constructor() { +-var A = /** @class */ (function () { +- function A() { - this.kind = "A"; // (property) A.kind: "A" - } -+ kind = "A"; // (property) A.kind: "A" - } - class B { -- constructor() { +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.kind = "B"; // (property) B.kind: "B" - } +- return B; +-}()); ++class A { ++ kind = "A"; // (property) A.kind: "A" ++} ++class B { + kind = "B"; // (property) B.kind: "B" - } ++} function f(value) { - switch (value.kind) { \ No newline at end of file + switch (value.kind) { + case "A": return 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff index fa0b90a7ec..eb8a41d24e 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.js.diff @@ -11,8 +11,27 @@ +// https://github.com/microsoft/TypeScript/issues/56538 function X() { } if (Math.random()) { - const X = {}; -@@= skipped -23, +23 lines =@@ +- var X_1 = {}; +- X_1.test = 1; ++ const X = {}; ++ X.test = 1; + } + function Y() { } + Y.test = "foo"; +-var aliasTopY = Y; ++const aliasTopY = Y; + if (Math.random()) { +- var Y_1 = function Y() { }; +- Y_1.test = 42; +- var topYcheck = aliasTopY; +- var blockYcheck = Y_1; ++ const Y = function Y() { }; ++ Y.test = 42; ++ const topYcheck = aliasTopY; ++ const blockYcheck = Y; + } + + //// [expandoFunctionBlockShadowing.d.ts] export declare function X(): void; export declare function Y(): void; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.symbols.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.symbols.diff index 646b025b6f..7dc85d3071 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionBlockShadowing.symbols.diff @@ -1,6 +1,15 @@ --- old.expandoFunctionBlockShadowing.symbols +++ new.expandoFunctionBlockShadowing.symbols -@@= skipped -21, +21 lines =@@ +@@= skipped -7, +7 lines =@@ + + if (Math.random()) { + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const X: { test?: any } = {}; +@@= skipped -14, +14 lines =@@ } export function Y() {} @@ -19,4 +28,9 @@ +>Y : Symbol(Y, Decl(expandoFunctionBlockShadowing.ts, 6, 1)) if (Math.random()) { - >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) \ No newline at end of file + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const Y = function Y() {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.js.diff new file mode 100644 index 0000000000..b2ce98bed7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.js.diff @@ -0,0 +1,11 @@ +--- old.expandoFunctionContextualTypes.js ++++ new.expandoFunctionContextualTypes.js +@@= skipped -17, +17 lines =@@ + + + //// [expandoFunctionContextualTypes.js] +-var MyComponent = function () { return null; }; ++const MyComponent = () => null; + MyComponent.defaultProps = { + color: "red" + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.types.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.types.diff index 3951b0b2fa..028161bb69 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypes.types.diff @@ -1,6 +1,15 @@ --- old.expandoFunctionContextualTypes.types +++ new.expandoFunctionContextualTypes.types -@@= skipped -13, +13 lines =@@ +@@= skipped -2, +2 lines =@@ + === expandoFunctionContextualTypes.ts === + interface MyComponentProps { + color: "red" | "blue" +->color : "red" | "blue" ++>color : "blue" | "red" + } + + interface StatelessComponent

{ +@@= skipped -11, +11 lines =@@ const MyComponent: StatelessComponent = () => null as any; >MyComponent : StatelessComponent diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJSDocInTs.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJSDocInTs.js.diff new file mode 100644 index 0000000000..4107a41671 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesJSDocInTs.js.diff @@ -0,0 +1,8 @@ +--- old.expandoFunctionContextualTypesJSDocInTs.js ++++ new.expandoFunctionContextualTypesJSDocInTs.js +@@= skipped -14, +14 lines =@@ + function Foo() { } + // This comment should have no effect; this is a TS file. + /** @type {never} */ +-Foo.bar = function () { }; ++Foo.bar = () => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesNoValue.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesNoValue.js.diff index 4720f816ff..dd7bbc54d0 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesNoValue.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionContextualTypesNoValue.js.diff @@ -7,4 +7,5 @@ -var blah_1 = require("blah"); +const blah_1 = require("blah"); function Foo() { } - blah_1.default.bar = () => { }; \ No newline at end of file +-blah_1.default.bar = function () { }; ++blah_1.default.bar = () => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff index 91ce438ddd..638de336f1 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionExpressionsWithDynamicNames.js.diff @@ -7,7 +7,14 @@ -// https://github.com/microsoft/TypeScript/issues/54809 Object.defineProperty(exports, "__esModule", { value: true }); exports.expr2 = exports.expr = void 0; +-var s = "X"; +-var expr = function () { }; +// https://github.com/microsoft/TypeScript/issues/54809 - const s = "X"; - const expr = () => { }; - exports.expr = expr; \ No newline at end of file ++const s = "X"; ++const expr = () => { }; + exports.expr = expr; + exports.expr[s] = 0; +-var expr2 = function () { }; ++const expr2 = function () { }; + exports.expr2 = expr2; + exports.expr2[s] = 0; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigments.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigments.js.diff index 458d8901f4..ee5751b5c8 100644 --- a/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigments.js.diff @@ -1,6 +1,35 @@ --- old.expandoFunctionNestedAssigments.js +++ new.expandoFunctionNestedAssigments.js -@@= skipped -96, +96 lines =@@ +@@= skipped -55, +55 lines =@@ + //// [expandoFunctionNestedAssigments.js] + function Foo() { + } +-var d = (Foo.inVariableInit = 1); +-function bar(p) { +- if (p === void 0) { p = (Foo.inNestedFunction = 1); } ++let d = (Foo.inVariableInit = 1); ++function bar(p = (Foo.inNestedFunction = 1)) { + } + (Foo.bla = { foo: 1 }).foo = (Foo.baz = 1) + (Foo.bar = 0); + if (Foo.fromIf = 1) { +@@= skipped -26, +25 lines =@@ + Foo.fromForBodyNested = 1; + } + } +-for (var _i = 0, _a = (Foo.forOf = []); _i < _a.length; _i++) { +- var f = _a[_i]; ++for (let f of (Foo.forOf = [])) { + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } + } +-for (var f in (Foo.forIn = [])) { ++for (let f in (Foo.forIn = [])) { + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; +@@= skipped -17, +16 lines =@@ //// [expandoFunctionNestedAssigments.d.ts] declare function Foo(): void; @@ -21,9 +50,9 @@ - var fromDoCondition: number; - var forInit: number; - var forCond: number; -- var forIncr: number; - var fromForBody: number; - var fromForBodyNested: number; +- var forIncr: number; - var forOf: any[]; - var fromForOfBody: number; - var fromForOfBodyNested: number; diff --git a/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigmentsDeclared.js.diff b/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigmentsDeclared.js.diff new file mode 100644 index 0000000000..827283c726 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expandoFunctionNestedAssigmentsDeclared.js.diff @@ -0,0 +1,19 @@ +--- old.expandoFunctionNestedAssigmentsDeclared.js ++++ new.expandoFunctionNestedAssigmentsDeclared.js +@@= skipped -97, +97 lines =@@ + Foo.fromForBodyNested = 1; + } + } +-for (var _i = 0, _a = (Foo.forOf = []); _i < _a.length; _i++) { +- var f = _a[_i]; ++for (let f of (Foo.forOf = [])) { + Foo.fromForOfBody = 1; + { + Foo.fromForOfBodyNested = 1; + } + } +-for (var f in (Foo.forIn = [])) { ++for (let f in (Foo.forIn = [])) { + Foo.fromForInBody = 1; + { + Foo.fromForInBodyNested = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/experimentalDecoratorMetadataUnresolvedTypeObjectInEmit.js.diff b/testdata/baselines/reference/submodule/compiler/experimentalDecoratorMetadataUnresolvedTypeObjectInEmit.js.diff index 131d8587e6..e96f02854d 100644 --- a/testdata/baselines/reference/submodule/compiler/experimentalDecoratorMetadataUnresolvedTypeObjectInEmit.js.diff +++ b/testdata/baselines/reference/submodule/compiler/experimentalDecoratorMetadataUnresolvedTypeObjectInEmit.js.diff @@ -16,11 +16,11 @@ -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; --let Foo = (() => { -- var _a, _b, _c, _d; -- class Foo { -- f(user) { } +-var Foo = /** @class */ (function () { +- function Foo() { - } +- Foo.prototype.f = function (user) { }; +- var _a, _b, _c, _d; - __decorate([ - __param(0, decorate), - __metadata("design:type", Function), @@ -28,7 +28,7 @@ - __metadata("design:returntype", void 0) - ], Foo.prototype, "f", null); - return Foo; --})(); +-}()); +class Foo { + f(user) { } +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/explicitAnyAfterSpreadNoImplicitAnyError.js.diff b/testdata/baselines/reference/submodule/compiler/explicitAnyAfterSpreadNoImplicitAnyError.js.diff new file mode 100644 index 0000000000..6c7224fed4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/explicitAnyAfterSpreadNoImplicitAnyError.js.diff @@ -0,0 +1,8 @@ +--- old.explicitAnyAfterSpreadNoImplicitAnyError.js ++++ new.explicitAnyAfterSpreadNoImplicitAnyError.js +@@= skipped -17, +17 lines =@@ + return __assign.apply(this, arguments); + }; + (__assign({ a: [] }, null)); +-var x; ++let x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.errors.txt b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.errors.txt index a34f14a8f7..efa398fe4e 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.errors.txt @@ -11,7 +11,7 @@ exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. ==== exportAlreadySeen.ts (10 errors) ==== - module M { + namespace M { export export var x = 1; ~~~~~~ !!! error TS1030: 'export' modifier already seen. @@ -19,7 +19,7 @@ exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. ~~~~~~ !!! error TS1030: 'export' modifier already seen. - export export module N { + export export namespace N { ~~~~~~ !!! error TS1030: 'export' modifier already seen. export export class C { } @@ -31,7 +31,7 @@ exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. } } - declare module A { + declare namespace A { export export var x; ~~~~~~ !!! error TS1030: 'export' modifier already seen. @@ -39,7 +39,7 @@ exportAlreadySeen.ts(17,16): error TS1030: 'export' modifier already seen. ~~~~~~ !!! error TS1030: 'export' modifier already seen. - export export module N { + export export namespace N { ~~~~~~ !!! error TS1030: 'export' modifier already seen. export export class C { } diff --git a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js index 05a4216d9a..a92b338d85 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js +++ b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js @@ -1,21 +1,21 @@ //// [tests/cases/compiler/exportAlreadySeen.ts] //// //// [exportAlreadySeen.ts] -module M { +namespace M { export export var x = 1; export export function f() { } - export export module N { + export export namespace N { export export class C { } export export interface I { } } } -declare module A { +declare namespace A { export export var x; export export function f() - export export module N { + export export namespace N { export export class C { } export export interface I { } } diff --git a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js.diff b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js.diff new file mode 100644 index 0000000000..ed1f27270d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.js.diff @@ -0,0 +1,19 @@ +--- old.exportAlreadySeen.js ++++ new.exportAlreadySeen.js +@@= skipped -26, +26 lines =@@ + M.x = 1; + function f() { } + M.f = f; +- var N; ++ let N; + (function (N) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + N.C = C; + })(N = M.N || (M.N = {})); + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.symbols b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.symbols index ec48133ec0..966939fa0d 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportAlreadySeen.ts] //// === exportAlreadySeen.ts === -module M { +namespace M { >M : Symbol(M, Decl(exportAlreadySeen.ts, 0, 0)) export export var x = 1; @@ -10,18 +10,18 @@ module M { export export function f() { } >f : Symbol(f, Decl(exportAlreadySeen.ts, 1, 28)) - export export module N { + export export namespace N { >N : Symbol(N, Decl(exportAlreadySeen.ts, 2, 34)) export export class C { } ->C : Symbol(C, Decl(exportAlreadySeen.ts, 4, 28)) +>C : Symbol(C, Decl(exportAlreadySeen.ts, 4, 31)) export export interface I { } >I : Symbol(I, Decl(exportAlreadySeen.ts, 5, 33)) } } -declare module A { +declare namespace A { >A : Symbol(A, Decl(exportAlreadySeen.ts, 8, 1)) export export var x; @@ -30,11 +30,11 @@ declare module A { export export function f() >f : Symbol(f, Decl(exportAlreadySeen.ts, 11, 24)) - export export module N { + export export namespace N { >N : Symbol(N, Decl(exportAlreadySeen.ts, 12, 30)) export export class C { } ->C : Symbol(C, Decl(exportAlreadySeen.ts, 14, 28)) +>C : Symbol(C, Decl(exportAlreadySeen.ts, 14, 31)) export export interface I { } >I : Symbol(I, Decl(exportAlreadySeen.ts, 15, 33)) diff --git a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.types b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.types index c52d2ac140..4b4cf31e94 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.types +++ b/testdata/baselines/reference/submodule/compiler/exportAlreadySeen.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportAlreadySeen.ts] //// === exportAlreadySeen.ts === -module M { +namespace M { >M : typeof M export export var x = 1; @@ -11,7 +11,7 @@ module M { export export function f() { } >f : () => void - export export module N { + export export namespace N { >N : typeof N export export class C { } @@ -21,7 +21,7 @@ module M { } } -declare module A { +declare namespace A { >A : typeof A export export var x; @@ -30,7 +30,7 @@ declare module A { export export function f() >f : () => any - export export module N { + export export namespace N { >N : typeof N export export class C { } diff --git a/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.js.diff b/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.js.diff index 4ab85963d1..a1ce014c5d 100644 --- a/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.js.diff @@ -1,8 +1,10 @@ --- old.exportArrayBindingPattern.js +++ new.exportArrayBindingPattern.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.b = exports.a = void 0; // issue: https://github.com/Microsoft/TypeScript/issues/10778 - const [a, , b] = [1, 2, 3]; +-var _a = [1, 2, 3], a = _a[0], b = _a[2]; -exports.a = a; --exports.b = b; \ No newline at end of file +-exports.b = b; ++const [a, , b] = [1, 2, 3]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.types.diff b/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.types.diff new file mode 100644 index 0000000000..fdfe1cfa4c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportArrayBindingPattern.types.diff @@ -0,0 +1,10 @@ +--- old.exportArrayBindingPattern.types ++++ new.exportArrayBindingPattern.types +@@= skipped -3, +3 lines =@@ + // issue: https://github.com/Microsoft/TypeScript/issues/10778 + const [a, , b] = [1, 2, 3]; + >a : number +-> : undefined + >b : number + >[1, 2, 3] : [number, number, number] + >1 : 1 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js index 77794e4039..12c07709f9 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js +++ b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js @@ -4,7 +4,7 @@ class Foo { x: Foo.Bar; } -module Foo { +namespace Foo { export interface Bar { } } diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js.diff b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js.diff index beedbe07ed..3b27e5cc49 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.js.diff @@ -1,10 +1,17 @@ --- old.exportAssignClassAndModule.js +++ new.exportAssignClassAndModule.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + //// [exportAssignClassAndModule_0.js] "use strict"; - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { + x; - } ++} module.exports = Foo; - //// [exportAssignClassAndModule_1.js] \ No newline at end of file + //// [exportAssignClassAndModule_1.js] + "use strict"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.symbols b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.symbols index 38aeebc126..f7a34a1fe0 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.symbols @@ -8,7 +8,7 @@ import Foo = require('./exportAssignClassAndModule_0'); var z: Foo.Bar; >z : Symbol(z, Decl(exportAssignClassAndModule_1.ts, 3, 3)) >Foo : Symbol(Foo, Decl(exportAssignClassAndModule_1.ts, 0, 0)) ->Bar : Symbol(Foo.Bar, Decl(exportAssignClassAndModule_0.ts, 3, 12)) +>Bar : Symbol(Foo.Bar, Decl(exportAssignClassAndModule_0.ts, 3, 15)) var zz: Foo; >zz : Symbol(zz, Decl(exportAssignClassAndModule_1.ts, 4, 3)) @@ -26,13 +26,13 @@ class Foo { x: Foo.Bar; >x : Symbol(Foo.x, Decl(exportAssignClassAndModule_0.ts, 0, 11)) >Foo : Symbol(Foo, Decl(exportAssignClassAndModule_0.ts, 0, 0), Decl(exportAssignClassAndModule_0.ts, 2, 1)) ->Bar : Symbol(Foo.Bar, Decl(exportAssignClassAndModule_0.ts, 3, 12)) +>Bar : Symbol(Foo.Bar, Decl(exportAssignClassAndModule_0.ts, 3, 15)) } -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(exportAssignClassAndModule_0.ts, 0, 0), Decl(exportAssignClassAndModule_0.ts, 2, 1)) export interface Bar { ->Bar : Symbol(Bar, Decl(exportAssignClassAndModule_0.ts, 3, 12)) +>Bar : Symbol(Bar, Decl(exportAssignClassAndModule_0.ts, 3, 15)) } } export = Foo; diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types index 31e78d8159..2b64bf2d7f 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types +++ b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types @@ -25,7 +25,7 @@ class Foo { >x : import("exportAssignClassAndModule_0").Bar >Foo : any } -module Foo { +namespace Foo { export interface Bar { } } diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types.diff b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types.diff index 03c176fc70..789aadd725 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types.diff +++ b/testdata/baselines/reference/submodule/compiler/exportAssignClassAndModule.types.diff @@ -8,4 +8,4 @@ +>x : import("exportAssignClassAndModule_0").Bar >Foo : any } - module Foo { \ No newline at end of file + namespace Foo { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.js b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.js index 782be1785a..50b1dff946 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.js +++ b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportAssignValueAndType.ts] //// //// [exportAssignValueAndType.ts] -declare module http { +declare namespace http { export interface Server { openPort: number; } } diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols index c3e9056c4e..640bf81552 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/exportAssignValueAndType.ts] //// === exportAssignValueAndType.ts === -declare module http { +declare namespace http { >http : Symbol(http, Decl(exportAssignValueAndType.ts, 0, 0)) export interface Server { openPort: number; } ->Server : Symbol(Server, Decl(exportAssignValueAndType.ts, 0, 21)) +>Server : Symbol(Server, Decl(exportAssignValueAndType.ts, 0, 24)) >openPort : Symbol(Server.openPort, Decl(exportAssignValueAndType.ts, 1, 26)) } @@ -14,7 +14,7 @@ interface server { (): http.Server; >http : Symbol(http, Decl(exportAssignValueAndType.ts, 0, 0)) ->Server : Symbol(http.Server, Decl(exportAssignValueAndType.ts, 0, 21)) +>Server : Symbol(http.Server, Decl(exportAssignValueAndType.ts, 0, 24)) startTime: Date; >startTime : Symbol(server.startTime, Decl(exportAssignValueAndType.ts, 5, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols.diff new file mode 100644 index 0000000000..0c057944e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.symbols.diff @@ -0,0 +1,20 @@ +--- old.exportAssignValueAndType.symbols ++++ new.exportAssignValueAndType.symbols +@@= skipped -17, +17 lines =@@ + + startTime: Date; + >startTime : Symbol(server.startTime, Decl(exportAssignValueAndType.ts, 5, 20)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } + + var x = 5; +@@= skipped -8, +8 lines =@@ + + var server = new Date(); + >server : Symbol(server, Decl(exportAssignValueAndType.ts, 2, 1), Decl(exportAssignValueAndType.ts, 10, 3)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + export = server; + >server : Symbol(server, Decl(exportAssignValueAndType.ts, 2, 1), Decl(exportAssignValueAndType.ts, 10, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.types b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.types index ac549e7187..de4c1d9ae2 100644 --- a/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.types +++ b/testdata/baselines/reference/submodule/compiler/exportAssignValueAndType.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportAssignValueAndType.ts] //// === exportAssignValueAndType.ts === -declare module http { +declare namespace http { export interface Server { openPort: number; } >openPort : number } diff --git a/testdata/baselines/reference/submodule/compiler/exportAssignmentWithExports.js.diff b/testdata/baselines/reference/submodule/compiler/exportAssignmentWithExports.js.diff new file mode 100644 index 0000000000..b65a80a4b3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportAssignmentWithExports.js.diff @@ -0,0 +1,21 @@ +--- old.exportAssignmentWithExports.js ++++ new.exportAssignmentWithExports.js +@@= skipped -7, +7 lines =@@ + //// [exportAssignmentWithExports.js] + "use strict"; + exports.C = void 0; +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); ++class C { ++} ++class D { ++} + module.exports = D; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportClassExtendingIntersection.js.diff b/testdata/baselines/reference/submodule/compiler/exportClassExtendingIntersection.js.diff index 3ae7308b38..1cc444edda 100644 --- a/testdata/baselines/reference/submodule/compiler/exportClassExtendingIntersection.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportClassExtendingIntersection.js.diff @@ -1,38 +1,95 @@ --- old.exportClassExtendingIntersection.js +++ new.exportClassExtendingIntersection.js -@@= skipped -39, +39 lines =@@ +@@= skipped -38, +38 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MyBaseClass = void 0; - class MyBaseClass { +-var MyBaseClass = /** @class */ (function () { +- function MyBaseClass(value) { +- } +- return MyBaseClass; +-}()); ++class MyBaseClass { + baseProperty; - constructor(value) { } - } ++ constructor(value) { } ++} exports.MyBaseClass = MyBaseClass; -@@= skipped -9, +10 lines =@@ + //// [MixinClass.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); exports.MyMixin = MyMixin; function MyMixin(base) { - return class extends base { +- return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return class_1; +- }(base)); ++ return class extends base { + mixinProperty; - }; ++ }; } //// [FinalClass.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.MyExtendedClass = void 0; -var BaseClass_1 = require("./BaseClass"); -var MixinClass_1 = require("./MixinClass"); +-var MyExtendedClass = /** @class */ (function (_super) { +- __extends(MyExtendedClass, _super); +- function MyExtendedClass() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyExtendedClass; +-}((0, MixinClass_1.MyMixin)(BaseClass_1.MyBaseClass))); +const BaseClass_1 = require("./BaseClass"); +const MixinClass_1 = require("./MixinClass"); - class MyExtendedClass extends (0, MixinClass_1.MyMixin)(BaseClass_1.MyBaseClass) { ++class MyExtendedClass extends (0, MixinClass_1.MyMixin)(BaseClass_1.MyBaseClass) { + extendedClassProperty; - } ++} exports.MyExtendedClass = MyExtendedClass; //// [Main.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var FinalClass_1 = require("./FinalClass"); -var MixinClass_1 = require("./MixinClass"); +-var myExtendedClass = new FinalClass_1.MyExtendedClass('string'); +-var AnotherMixedClass = (0, MixinClass_1.MyMixin)(FinalClass_1.MyExtendedClass); +const FinalClass_1 = require("./FinalClass"); +const MixinClass_1 = require("./MixinClass"); - const myExtendedClass = new FinalClass_1.MyExtendedClass('string'); - const AnotherMixedClass = (0, MixinClass_1.MyMixin)(FinalClass_1.MyExtendedClass); ++const myExtendedClass = new FinalClass_1.MyExtendedClass('string'); ++const AnotherMixedClass = (0, MixinClass_1.MyMixin)(FinalClass_1.MyExtendedClass); + + + //// [BaseClass.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.errors.txt b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.errors.txt index 5c998d1c9e..e1c8e98fa4 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.errors.txt @@ -7,11 +7,11 @@ exportDeclarationInInternalModule.ts(13,19): error TS1141: String literal expect class Aaa extends Bbb { } - module Aaa { + namespace Aaa { export class SomeType { } } - module Bbb { + namespace Bbb { export class SomeType { } export * from Aaa; // this line causes the nullref diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js index e1a75d1f0e..a7139d983e 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js @@ -6,11 +6,11 @@ class Bbb { class Aaa extends Bbb { } -module Aaa { +namespace Aaa { export class SomeType { } } -module Bbb { +namespace Bbb { export class SomeType { } export * from Aaa; // this line causes the nullref diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js.diff b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js.diff index 599316d939..1b43f1d860 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.js.diff @@ -1,8 +1,58 @@ --- old.exportDeclarationInInternalModule.js +++ new.exportDeclarationInInternalModule.js -@@= skipped -32, +32 lines =@@ - class SomeType { - } +@@= skipped -19, +19 lines =@@ + + + //// [exportDeclarationInInternalModule.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Bbb = /** @class */ (function () { +- function Bbb() { +- } +- return Bbb; +-}()); +-var Aaa = /** @class */ (function (_super) { +- __extends(Aaa, _super); +- function Aaa() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Aaa; +-}(Bbb)); ++class Bbb { ++} ++class Aaa extends Bbb { ++} + (function (Aaa) { +- var SomeType = /** @class */ (function () { +- function SomeType() { +- } +- return SomeType; +- }()); ++ class SomeType { ++ } + Aaa.SomeType = SomeType; + })(Aaa || (Aaa = {})); + (function (Bbb) { +- var SomeType = /** @class */ (function () { +- function SomeType() { +- } +- return SomeType; +- }()); ++ class SomeType { ++ } Bbb.SomeType = SomeType; + export * from Aaa; // this line causes the nullref })(Bbb || (Bbb = {})); diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.symbols b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.symbols index 67dc98d1c9..2e214b9f6c 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.symbols @@ -9,18 +9,18 @@ class Aaa extends Bbb { } >Aaa : Symbol(Aaa, Decl(exportDeclarationInInternalModule.ts, 1, 1), Decl(exportDeclarationInInternalModule.ts, 3, 25)) >Bbb : Symbol(Bbb, Decl(exportDeclarationInInternalModule.ts, 0, 0), Decl(exportDeclarationInInternalModule.ts, 7, 1)) -module Aaa { +namespace Aaa { >Aaa : Symbol(Aaa, Decl(exportDeclarationInInternalModule.ts, 1, 1), Decl(exportDeclarationInInternalModule.ts, 3, 25)) export class SomeType { } ->SomeType : Symbol(SomeType, Decl(exportDeclarationInInternalModule.ts, 5, 12)) +>SomeType : Symbol(SomeType, Decl(exportDeclarationInInternalModule.ts, 5, 15)) } -module Bbb { +namespace Bbb { >Bbb : Symbol(Bbb, Decl(exportDeclarationInInternalModule.ts, 0, 0), Decl(exportDeclarationInInternalModule.ts, 7, 1)) export class SomeType { } ->SomeType : Symbol(SomeType, Decl(exportDeclarationInInternalModule.ts, 9, 12)) +>SomeType : Symbol(SomeType, Decl(exportDeclarationInInternalModule.ts, 9, 15)) export * from Aaa; // this line causes the nullref } @@ -28,5 +28,5 @@ module Bbb { var a: Bbb.SomeType; >a : Symbol(a, Decl(exportDeclarationInInternalModule.ts, 15, 3)) >Bbb : Symbol(Bbb, Decl(exportDeclarationInInternalModule.ts, 0, 0), Decl(exportDeclarationInInternalModule.ts, 7, 1)) ->SomeType : Symbol(Bbb.SomeType, Decl(exportDeclarationInInternalModule.ts, 9, 12)) +>SomeType : Symbol(Bbb.SomeType, Decl(exportDeclarationInInternalModule.ts, 9, 15)) diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.types b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.types index 875e859085..1b4fb7a7ea 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.types +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationInInternalModule.types @@ -9,14 +9,14 @@ class Aaa extends Bbb { } >Aaa : Aaa >Bbb : Bbb -module Aaa { +namespace Aaa { >Aaa : typeof Aaa export class SomeType { } >SomeType : SomeType } -module Bbb { +namespace Bbb { >Bbb : typeof Bbb export class SomeType { } diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.js.diff b/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.js.diff new file mode 100644 index 0000000000..9575ac25f3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.js.diff @@ -0,0 +1,8 @@ +--- old.exportDeclarationsInAmbientNamespaces.js ++++ new.exportDeclarationsInAmbientNamespaces.js +@@= skipped -10, +10 lines =@@ + + + //// [exportDeclarationsInAmbientNamespaces.js] +-Q.try(function () { }); ++Q.try(() => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.symbols.diff new file mode 100644 index 0000000000..9d054b1fc7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDeclarationsInAmbientNamespaces.symbols.diff @@ -0,0 +1,11 @@ +--- old.exportDeclarationsInAmbientNamespaces.symbols ++++ new.exportDeclarationsInAmbientNamespaces.symbols +@@= skipped -6, +6 lines =@@ + function _try(method: Function, ...args: any[]): any; + >_try : Symbol(_try, Decl(exportDeclarationsInAmbientNamespaces.ts, 0, 21)) + >method : Symbol(method, Decl(exportDeclarationsInAmbientNamespaces.ts, 1, 18)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >args : Symbol(args, Decl(exportDeclarationsInAmbientNamespaces.ts, 1, 35)) + + export { _try as try }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultAbstractClass.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultAbstractClass.js.diff index b297e0f6f6..d240134caf 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultAbstractClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultAbstractClass.js.diff @@ -1,19 +1,71 @@ --- old.exportDefaultAbstractClass.js +++ new.exportDefaultAbstractClass.js -@@= skipped -15, +15 lines =@@ +@@= skipped -13, +13 lines =@@ + + //// [a.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + a; - } ++} exports.default = A; - class B extends A { -@@= skipped -8, +9 lines =@@ +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class B extends A { ++} + new B().a.toExponential(); //// [b.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var a_1 = require("./a"); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(a_1.default)); +const a_1 = require("./a"); - class C extends a_1.default { - } ++class C extends a_1.default { ++} new C().a.toExponential(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultClassAndValue.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultClassAndValue.js.diff new file mode 100644 index 0000000000..ffcdbfbb9b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultClassAndValue.js.diff @@ -0,0 +1,17 @@ +--- old.exportDefaultClassAndValue.js ++++ new.exportDefaultClassAndValue.js +@@= skipped -8, +8 lines =@@ + //// [exportDefaultClassAndValue.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var foo = 1; ++const foo = 1; + exports.default = foo; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.default = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultClassInNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultClassInNamespace.js.diff index d19bd1bec2..56fce75156 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultClassInNamespace.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultClassInNamespace.js.diff @@ -4,15 +4,23 @@ //// [exportDefaultClassInNamespace.js] var ns_class; (function (ns_class) { -- class default_1 { -+ class { - } +- var default_1 = /** @class */ (function () { +- function default_1() { +- } +- return default_1; +- }()); - ns_class.default_1 = default_1; ++ class { ++ } })(ns_class || (ns_class = {})); var ns_abstract_class; (function (ns_abstract_class) { -- class default_2 { -+ class { - } +- var default_2 = /** @class */ (function () { +- function default_2() { +- } +- return default_2; +- }()); - ns_abstract_class.default_2 = default_2; ++ class { ++ } })(ns_abstract_class || (ns_abstract_class = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.js b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.js index c2066884ba..ef1f3c8b7e 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.js +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts] //// //// [exportDefaultForNonInstantiatedModule.ts] -module m { +namespace m { export interface foo { } } diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.symbols b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.symbols index 685b49c562..00ce9fe8f5 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts] //// === exportDefaultForNonInstantiatedModule.ts === -module m { +namespace m { >m : Symbol(m, Decl(exportDefaultForNonInstantiatedModule.ts, 0, 0)) export interface foo { ->foo : Symbol(foo, Decl(exportDefaultForNonInstantiatedModule.ts, 0, 10)) +>foo : Symbol(foo, Decl(exportDefaultForNonInstantiatedModule.ts, 0, 13)) } } // Should not be emitted diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.types b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.types index 2a6a3c12b9..85e8b9f7a6 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.types +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultForNonInstantiatedModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportDefaultForNonInstantiatedModule.ts] //// === exportDefaultForNonInstantiatedModule.ts === -module m { +namespace m { export interface foo { } } diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultFunctionInNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultFunctionInNamespace.js.diff index 67251ef572..e5c84d4391 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultFunctionInNamespace.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultFunctionInNamespace.js.diff @@ -12,6 +12,33 @@ - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +-}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } -}; var ns_function; (function (ns_function) { @@ -22,7 +49,9 @@ var ns_async_function; (function (ns_async_function) { - default function () { -- return __awaiter(this, void 0, void 0, function* () { }); +- return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { +- return [2 /*return*/]; +- }); }); - } - ns_async_function.default_2 = default_2; + async function () { } diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultInterfaceClassAndValue.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultInterfaceClassAndValue.js.diff new file mode 100644 index 0000000000..3dfc37ceca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultInterfaceClassAndValue.js.diff @@ -0,0 +1,17 @@ +--- old.exportDefaultInterfaceClassAndValue.js ++++ new.exportDefaultInterfaceClassAndValue.js +@@= skipped -9, +9 lines =@@ + //// [exportDefaultInterfaceClassAndValue.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var foo = 1; ++const foo = 1; + exports.default = foo; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.default = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultParenthesize.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultParenthesize.js.diff new file mode 100644 index 0000000000..8ff800fffd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultParenthesize.js.diff @@ -0,0 +1,68 @@ +--- old.exportDefaultParenthesize.js ++++ new.exportDefaultParenthesize.js +@@= skipped -36, +36 lines =@@ + + + //// [commalist.js] +-var _a; +-export default (_a = {}, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a['foo' + ''] = 42, +- _a); ++export default { ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++ ['foo' + '']: 42, ++}; + //// [comma.js] +-var _a; +-export default (_a = {}, +- _a['foo'] = 42, +- _a); ++export default { ++ ['foo']: 42 ++}; + //// [functionexpression.js] +-export default (function () { return 42; }); ++export default () => 42; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff index 94bf307b34..c47559b93f 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff @@ -1,19 +1,37 @@ --- old.exportDefaultProperty.js +++ new.exportDefaultProperty.js -@@= skipped -60, +60 lines =@@ +@@= skipped -43, +43 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + var A; + (function (A) { +- var B = /** @class */ (function () { +- function B(b) { +- } +- return B; +- }()); ++ class B { ++ constructor(b) { } ++ } + A.B = B; + (function (B) { + B.b = 0; +@@= skipped -19, +17 lines =@@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /// -var foobar_1 = require("foobar"); -var X = foobar_1.default.X; -var foobarx_1 = require("foobarx"); +-var x = X; +-var x2 = foobarx_1.default; +-var a_1 = require("./a"); +-var b = new a_1.default(a_1.default.b); +-var b_1 = require("./b"); +const foobar_1 = require("foobar"); +const foobarx_1 = require("foobarx"); - const x = X; - const x2 = foobarx_1.default; --var a_1 = require("./a"); ++const x = X; ++const x2 = foobarx_1.default; +const a_1 = require("./a"); - const b = new a_1.default(a_1.default.b); --var b_1 = require("./b"); ++const b = new a_1.default(a_1.default.b); +const b_1 = require("./b"); b_1.default + 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty2.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty2.js.diff index 5fa7c36278..d9be98bdbf 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty2.js.diff @@ -1,15 +1,22 @@ --- old.exportDefaultProperty2.js +++ new.exportDefaultProperty2.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + //// [a.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + static B; - } ++} exports.default = C.B; //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var a_1 = require("./a"); +-var x = { c: a_1.default }; +const a_1 = require("./a"); - const x = { c: a_1.default }; \ No newline at end of file ++const x = { c: a_1.default }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultQualifiedNameNoError.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultQualifiedNameNoError.js.diff index f804de7c97..74d8fb8eab 100644 --- a/testdata/baselines/reference/submodule/compiler/exportDefaultQualifiedNameNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultQualifiedNameNoError.js.diff @@ -4,12 +4,12 @@ //// [code.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); --let C = (() => { -- class C { +-var C = /** @class */ (function () { +- function C() { - } - C.x = 0; - return C; --})(); +-}()); +class C { + static x = 0; +} diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultTypeAndClass.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultTypeAndClass.js.diff new file mode 100644 index 0000000000..2a92bd9ae6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultTypeAndClass.js.diff @@ -0,0 +1,14 @@ +--- old.exportDefaultTypeAndClass.js ++++ new.exportDefaultTypeAndClass.js +@@= skipped -8, +8 lines =@@ + //// [exportDefaultTypeAndClass.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.default = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultTypeClassAndValue.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultTypeClassAndValue.js.diff new file mode 100644 index 0000000000..92cf2a530e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportDefaultTypeClassAndValue.js.diff @@ -0,0 +1,17 @@ +--- old.exportDefaultTypeClassAndValue.js ++++ new.exportDefaultTypeClassAndValue.js +@@= skipped -10, +10 lines =@@ + //// [exportDefaultTypeClassAndValue.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var foo = 1; ++const foo = 1; + exports.default = foo; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.default = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=commonjs,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=commonjs,target=es5).js.diff index 7cd9ae9902..94c42b85a4 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=commonjs,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=commonjs,target=es5).js.diff @@ -6,5 +6,5 @@ "use strict"; -var _a; Object.defineProperty(exports, "__esModule", { value: true }); --_a = []; +-exports._b = _a = []; +[] = []; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=es2015,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=es2015,target=es5).js.diff new file mode 100644 index 0000000000..7b5fce3922 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=es2015,target=es5).js.diff @@ -0,0 +1,9 @@ +--- old.exportEmptyArrayBindingPattern(module=es2015,target=es5).js ++++ new.exportEmptyArrayBindingPattern(module=es2015,target=es5).js +@@= skipped -3, +3 lines =@@ + export const [] = []; + + //// [exportEmptyArrayBindingPattern.js] +-var _a; +-export var _b = _a = []; ++export const [] = []; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=esnext,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=esnext,target=es5).js.diff new file mode 100644 index 0000000000..3d38555a8f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyArrayBindingPattern(module=esnext,target=es5).js.diff @@ -0,0 +1,9 @@ +--- old.exportEmptyArrayBindingPattern(module=esnext,target=es5).js ++++ new.exportEmptyArrayBindingPattern(module=esnext,target=es5).js +@@= skipped -3, +3 lines =@@ + export const [] = []; + + //// [exportEmptyArrayBindingPattern.js] +-var _a; +-export var _b = _a = []; ++export const [] = []; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=commonjs,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=commonjs,target=es5).js.diff index c2493909c9..daca748a76 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=commonjs,target=es5).js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=commonjs,target=es5).js.diff @@ -6,5 +6,5 @@ "use strict"; -var _a; Object.defineProperty(exports, "__esModule", { value: true }); --_a = {}; +-exports._b = _a = {}; +({} = {}); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=es2015,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=es2015,target=es5).js.diff new file mode 100644 index 0000000000..b96d248765 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=es2015,target=es5).js.diff @@ -0,0 +1,9 @@ +--- old.exportEmptyObjectBindingPattern(module=es2015,target=es5).js ++++ new.exportEmptyObjectBindingPattern(module=es2015,target=es5).js +@@= skipped -3, +3 lines =@@ + export const {} = {}; + + //// [exportEmptyObjectBindingPattern.js] +-var _a; +-export var _b = _a = {}; ++export const {} = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=esnext,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=esnext,target=es5).js.diff new file mode 100644 index 0000000000..2d2de9ee0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEmptyObjectBindingPattern(module=esnext,target=es5).js.diff @@ -0,0 +1,9 @@ +--- old.exportEmptyObjectBindingPattern(module=esnext,target=es5).js ++++ new.exportEmptyObjectBindingPattern(module=esnext,target=es5).js +@@= skipped -3, +3 lines =@@ + export const {} = {}; + + //// [exportEmptyObjectBindingPattern.js] +-var _a; +-export var _b = _a = {}; ++export const {} = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.errors.txt b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.errors.txt index df228c745a..f255aaa458 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.errors.txt @@ -9,7 +9,7 @@ exportEqualMemberMissing_1.ts(3,23): error TS2339: Property 'static' does not ex !!! error TS2339: Property 'static' does not exist on type '{ (): connectExport; foo: Date; }'. ==== exportEqualMemberMissing_0.ts (0 errors) ==== - module server { + namespace server { export interface connectModule { (res, req, next): void; } diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.js b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.js index 090c4837d1..d79134ae96 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.js +++ b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportEqualMemberMissing.ts] //// //// [exportEqualMemberMissing_0.ts] -module server { +namespace server { export interface connectModule { (res, req, next): void; } diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols index 372c8d8b00..8bdc11e7c2 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols @@ -12,11 +12,11 @@ connect().use(connect.static('foo')); // Error 1 The property 'static' does not >connect : Symbol(connect, Decl(exportEqualMemberMissing_1.ts, 0, 0)) === exportEqualMemberMissing_0.ts === -module server { +namespace server { >server : Symbol(server, Decl(exportEqualMemberMissing_0.ts, 0, 0), Decl(exportEqualMemberMissing_0.ts, 8, 3)) export interface connectModule { ->connectModule : Symbol(connectModule, Decl(exportEqualMemberMissing_0.ts, 0, 15)) +>connectModule : Symbol(connectModule, Decl(exportEqualMemberMissing_0.ts, 0, 18)) (res, req, next): void; >res : Symbol(res, Decl(exportEqualMemberMissing_0.ts, 2, 9)) @@ -29,7 +29,7 @@ module server { use: (mod: connectModule) => connectExport; >use : Symbol(connectExport.use, Decl(exportEqualMemberMissing_0.ts, 4, 36)) >mod : Symbol(mod, Decl(exportEqualMemberMissing_0.ts, 5, 14)) ->connectModule : Symbol(connectModule, Decl(exportEqualMemberMissing_0.ts, 0, 15)) +>connectModule : Symbol(connectModule, Decl(exportEqualMemberMissing_0.ts, 0, 18)) >connectExport : Symbol(connectExport, Decl(exportEqualMemberMissing_0.ts, 3, 5)) } } diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols.diff new file mode 100644 index 0000000000..087fd0edfd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.symbols.diff @@ -0,0 +1,11 @@ +--- old.exportEqualMemberMissing.symbols ++++ new.exportEqualMemberMissing.symbols +@@= skipped -41, +41 lines =@@ + + foo: Date; + >foo : Symbol(foo, Decl(exportEqualMemberMissing_0.ts, 9, 29)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + }; + export = server; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.types b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.types index e2510046f3..62d88d28eb 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.types +++ b/testdata/baselines/reference/submodule/compiler/exportEqualMemberMissing.types @@ -18,7 +18,7 @@ connect().use(connect.static('foo')); // Error 1 The property 'static' does not >'foo' : "foo" === exportEqualMemberMissing_0.ts === -module server { +namespace server { export interface connectModule { (res, req, next): void; >res : any diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsCommonJs.js.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsCommonJs.js.diff new file mode 100644 index 0000000000..1a1b490f26 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportEqualsCommonJs.js.diff @@ -0,0 +1,9 @@ +--- old.exportEqualsCommonJs.js ++++ new.exportEqualsCommonJs.js +@@= skipped -4, +4 lines =@@ + + //// [exportEqualsCommonJs.js] + "use strict"; +-var _a; +-module.exports = (_a = {}, _a["hi"] = "there", _a); ++module.exports = { ["hi"]: "there" }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff deleted file mode 100644 index 3c2bc80adf..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.errors.txt.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- old.exportEqualsDefaultProperty.errors.txt -+++ new.exportEqualsDefaultProperty.errors.txt -@@= skipped -0, +0 lines =@@ -- -+imp.ts(2,5): error TS2339: Property 'toExponential' does not exist on type '{ greeting: string; default: number; }'. -+ -+ -+==== exp.ts (0 errors) ==== -+ var x = { -+ "greeting": "hello, world", -+ "default": 42 -+ }; -+ -+ export = x -+ -+==== imp.ts (1 errors) ==== -+ import foo from "./exp"; -+ foo.toExponential(2); -+ ~~~~~~~~~~~~~ -+!!! error TS2339: Property 'toExponential' does not exist on type '{ greeting: string; default: number; }'. -+ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff deleted file mode 100644 index 35de9ce474..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.symbols.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- old.exportEqualsDefaultProperty.symbols -+++ new.exportEqualsDefaultProperty.symbols -@@= skipped -19, +19 lines =@@ - >foo : Symbol(foo, Decl(imp.ts, 0, 6)) - - foo.toExponential(2); -->foo.toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) - >foo : Symbol(foo, Decl(imp.ts, 0, 6)) -->toExponential : Symbol(Number.toExponential, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff deleted file mode 100644 index 6b7846da27..0000000000 --- a/testdata/baselines/reference/submodule/compiler/exportEqualsDefaultProperty.types.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.exportEqualsDefaultProperty.types -+++ new.exportEqualsDefaultProperty.types -@@= skipped -19, +19 lines =@@ - - === imp.ts === - import foo from "./exp"; -->foo : number -+>foo : { greeting: string; default: number; } - - foo.toExponential(2); -->foo.toExponential(2) : string -->foo.toExponential : (fractionDigits?: number) => string -->foo : number -->toExponential : (fractionDigits?: number) => string -+>foo.toExponential(2) : any -+>foo.toExponential : any -+>foo : { greeting: string; default: number; } -+>toExponential : any - >2 : 2 diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsProperty.js.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsProperty.js.diff index 8e802fff75..534c5ac6d0 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualsProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportEqualsProperty.js.diff @@ -1,18 +1,36 @@ --- old.exportEqualsProperty.js +++ new.exportEqualsProperty.js -@@= skipped -57, +57 lines =@@ +@@= skipped -41, +41 lines =@@ + "use strict"; + var A; + (function (A) { +- var B = /** @class */ (function () { +- function B(b) { +- } +- return B; +- }()); ++ class B { ++ constructor(b) { } ++ } + A.B = B; + (function (B) { + B.b = 0; +@@= skipped -18, +16 lines =@@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /// -var foobar_1 = require("foobar"); -var X2 = require("foobarx"); +-var x = foobar_1.X; +-var x2 = X2; +-var B = require("./a"); +-var b = new B(B.b); +-var fooLength = require("./b"); +const foobar_1 = require("foobar"); +const X2 = require("foobarx"); - const x = foobar_1.X; - const x2 = X2; --var B = require("./a"); ++const x = foobar_1.X; ++const x2 = X2; +const B = require("./a"); - const b = new B(B.b); --var fooLength = require("./b"); ++const b = new B(B.b); +const fooLength = require("./b"); fooLength + 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportEqualsProperty2.js.diff b/testdata/baselines/reference/submodule/compiler/exportEqualsProperty2.js.diff index 8c18c82539..959601fbbc 100644 --- a/testdata/baselines/reference/submodule/compiler/exportEqualsProperty2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportEqualsProperty2.js.diff @@ -1,15 +1,22 @@ --- old.exportEqualsProperty2.js +++ new.exportEqualsProperty2.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [a.js] "use strict"; - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + static B; - } ++} module.exports = C.B; //// [b.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var B = require("./a"); +-var x = { c: B }; +const B = require("./a"); - const x = { c: B }; \ No newline at end of file ++const x = { c: B }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js index 85435354fb..7d155092c9 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js +++ b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/exportImportAndClodule.ts] //// //// [exportImportAndClodule.ts] -module K { +namespace K { export class L { constructor(public name: string) { } } - export module L { + export namespace L { export var y = 12; export interface Point { x: number; @@ -13,7 +13,7 @@ module K { } } } -module M { +namespace M { export import D = K.L; } var o: { name: string }; diff --git a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js.diff b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js.diff index 7e1ebb6309..279ad63d72 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.js.diff @@ -1,10 +1,19 @@ --- old.exportImportAndClodule.js +++ new.exportImportAndClodule.js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + //// [exportImportAndClodule.js] var K; (function (K) { - class L { +- var L = /** @class */ (function () { +- function L(name) { ++ class L { + name; - constructor(name) { ++ constructor(name) { this.name = name; - } \ No newline at end of file + } +- return L; +- }()); ++ } + K.L = L; + (function (L) { + L.y = 12; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.symbols b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.symbols index bed3887191..6c5fa004ac 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.symbols @@ -1,17 +1,17 @@ //// [tests/cases/compiler/exportImportAndClodule.ts] //// === exportImportAndClodule.ts === -module K { +namespace K { >K : Symbol(K, Decl(exportImportAndClodule.ts, 0, 0)) export class L { ->L : Symbol(L, Decl(exportImportAndClodule.ts, 0, 10), Decl(exportImportAndClodule.ts, 3, 5)) +>L : Symbol(L, Decl(exportImportAndClodule.ts, 0, 13), Decl(exportImportAndClodule.ts, 3, 5)) constructor(public name: string) { } >name : Symbol(L.name, Decl(exportImportAndClodule.ts, 2, 20)) } - export module L { ->L : Symbol(L, Decl(exportImportAndClodule.ts, 0, 10), Decl(exportImportAndClodule.ts, 3, 5)) + export namespace L { +>L : Symbol(L, Decl(exportImportAndClodule.ts, 0, 13), Decl(exportImportAndClodule.ts, 3, 5)) export var y = 12; >y : Symbol(y, Decl(exportImportAndClodule.ts, 5, 18)) @@ -27,13 +27,13 @@ module K { } } } -module M { +namespace M { >M : Symbol(M, Decl(exportImportAndClodule.ts, 11, 1)) export import D = K.L; ->D : Symbol(D, Decl(exportImportAndClodule.ts, 12, 10)) +>D : Symbol(D, Decl(exportImportAndClodule.ts, 12, 13)) >K : Symbol(K, Decl(exportImportAndClodule.ts, 0, 0)) ->L : Symbol(D, Decl(exportImportAndClodule.ts, 0, 10), Decl(exportImportAndClodule.ts, 3, 5)) +>L : Symbol(D, Decl(exportImportAndClodule.ts, 0, 13), Decl(exportImportAndClodule.ts, 3, 5)) } var o: { name: string }; >o : Symbol(o, Decl(exportImportAndClodule.ts, 15, 3), Decl(exportImportAndClodule.ts, 16, 3)) @@ -41,9 +41,9 @@ var o: { name: string }; var o = new M.D('Hello'); >o : Symbol(o, Decl(exportImportAndClodule.ts, 15, 3), Decl(exportImportAndClodule.ts, 16, 3)) ->M.D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 10)) +>M.D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 13)) >M : Symbol(M, Decl(exportImportAndClodule.ts, 11, 1)) ->D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 10)) +>D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 13)) var p: { x: number; y: number; } >p : Symbol(p, Decl(exportImportAndClodule.ts, 17, 3), Decl(exportImportAndClodule.ts, 18, 3)) @@ -53,6 +53,6 @@ var p: { x: number; y: number; } var p: M.D.Point; >p : Symbol(p, Decl(exportImportAndClodule.ts, 17, 3), Decl(exportImportAndClodule.ts, 18, 3)) >M : Symbol(M, Decl(exportImportAndClodule.ts, 11, 1)) ->D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 10)) +>D : Symbol(M.D, Decl(exportImportAndClodule.ts, 12, 13)) >Point : Symbol(K.L.Point, Decl(exportImportAndClodule.ts, 5, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.types b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.types index 20532de00c..a404985761 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.types +++ b/testdata/baselines/reference/submodule/compiler/exportImportAndClodule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportImportAndClodule.ts] //// === exportImportAndClodule.ts === -module K { +namespace K { >K : typeof K export class L { @@ -10,7 +10,7 @@ module K { constructor(public name: string) { } >name : string } - export module L { + export namespace L { >L : typeof L export var y = 12; @@ -26,7 +26,7 @@ module K { } } } -module M { +namespace M { >M : typeof M export import D = K.L; diff --git a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.js b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.js index 6345268328..35e4b375d0 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.js +++ b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/exportImportNonInstantiatedModule.ts] //// //// [exportImportNonInstantiatedModule.ts] -module A { +namespace A { export interface I { x: number } } -module B { +namespace B { export import A1 = A } diff --git a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.symbols b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.symbols index fca478a551..a250c5e74b 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.symbols @@ -1,19 +1,19 @@ //// [tests/cases/compiler/exportImportNonInstantiatedModule.ts] //// === exportImportNonInstantiatedModule.ts === -module A { +namespace A { >A : Symbol(A, Decl(exportImportNonInstantiatedModule.ts, 0, 0)) export interface I { x: number } ->I : Symbol(I, Decl(exportImportNonInstantiatedModule.ts, 0, 10)) +>I : Symbol(I, Decl(exportImportNonInstantiatedModule.ts, 0, 13)) >x : Symbol(I.x, Decl(exportImportNonInstantiatedModule.ts, 1, 24)) } -module B { +namespace B { >B : Symbol(B, Decl(exportImportNonInstantiatedModule.ts, 2, 1)) export import A1 = A ->A1 : Symbol(A1, Decl(exportImportNonInstantiatedModule.ts, 4, 10)) +>A1 : Symbol(A1, Decl(exportImportNonInstantiatedModule.ts, 4, 13)) >A : Symbol(A1, Decl(exportImportNonInstantiatedModule.ts, 0, 0)) } @@ -21,7 +21,7 @@ module B { var x: B.A1.I = { x: 1 }; >x : Symbol(x, Decl(exportImportNonInstantiatedModule.ts, 9, 3)) >B : Symbol(B, Decl(exportImportNonInstantiatedModule.ts, 2, 1)) ->A1 : Symbol(B.A1, Decl(exportImportNonInstantiatedModule.ts, 4, 10)) ->I : Symbol(A.I, Decl(exportImportNonInstantiatedModule.ts, 0, 10)) +>A1 : Symbol(B.A1, Decl(exportImportNonInstantiatedModule.ts, 4, 13)) +>I : Symbol(A.I, Decl(exportImportNonInstantiatedModule.ts, 0, 13)) >x : Symbol(x, Decl(exportImportNonInstantiatedModule.ts, 9, 17)) diff --git a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.types b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.types index 7ffdcc89bc..0541a340b4 100644 --- a/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.types +++ b/testdata/baselines/reference/submodule/compiler/exportImportNonInstantiatedModule.types @@ -1,12 +1,12 @@ //// [tests/cases/compiler/exportImportNonInstantiatedModule.ts] //// === exportImportNonInstantiatedModule.ts === -module A { +namespace A { export interface I { x: number } >x : number } -module B { +namespace B { >B : typeof B export import A1 = A diff --git a/testdata/baselines/reference/submodule/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.js.diff b/testdata/baselines/reference/submodule/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.js.diff new file mode 100644 index 0000000000..922c153a45 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportInterfaceClassAndValueWithDuplicatesInImportList.js.diff @@ -0,0 +1,17 @@ +--- old.exportInterfaceClassAndValueWithDuplicatesInImportList.js ++++ new.exportInterfaceClassAndValueWithDuplicatesInImportList.js +@@= skipped -11, +11 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Foo = exports.foo = void 0; +-var foo = 1; ++const foo = 1; + exports.foo = foo; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.Foo = Foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=es2015,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=es2015,target=es5).js.diff new file mode 100644 index 0000000000..f887214f18 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=es2015,target=es5).js.diff @@ -0,0 +1,8 @@ +--- old.exportObjectRest(module=es2015,target=es5).js ++++ new.exportObjectRest(module=es2015,target=es5).js +@@= skipped -4, +4 lines =@@ + + //// [exportObjectRest.js] + var _a; +-export var x = (_a = { x: 'x', y: 'y' }, _a).x, rest = __rest(_a, ["x"]); ++export const { x } = (_a = { x: 'x', y: 'y' }, _a), rest = __rest(_a, ["x"]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=esnext,target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=esnext,target=es5).js.diff new file mode 100644 index 0000000000..92fc522845 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportObjectRest(module=esnext,target=es5).js.diff @@ -0,0 +1,8 @@ +--- old.exportObjectRest(module=esnext,target=es5).js ++++ new.exportObjectRest(module=esnext,target=es5).js +@@= skipped -4, +4 lines =@@ + + //// [exportObjectRest.js] + var _a; +-export var x = (_a = { x: 'x', y: 'y' }, _a).x, rest = __rest(_a, ["x"]); ++export const { x } = (_a = { x: 'x', y: 'y' }, _a), rest = __rest(_a, ["x"]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportPrivateType.js b/testdata/baselines/reference/submodule/compiler/exportPrivateType.js index 42b1400197..53c7de7515 100644 --- a/testdata/baselines/reference/submodule/compiler/exportPrivateType.js +++ b/testdata/baselines/reference/submodule/compiler/exportPrivateType.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportPrivateType.ts] //// //// [exportPrivateType.ts] -module foo { +namespace foo { class C1 { x: string; y: C1; diff --git a/testdata/baselines/reference/submodule/compiler/exportPrivateType.js.diff b/testdata/baselines/reference/submodule/compiler/exportPrivateType.js.diff index 610eb8a589..a29f11f599 100644 --- a/testdata/baselines/reference/submodule/compiler/exportPrivateType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportPrivateType.js.diff @@ -1,11 +1,26 @@ --- old.exportPrivateType.js +++ new.exportPrivateType.js -@@= skipped -35, +35 lines =@@ +@@= skipped -34, +34 lines =@@ + //// [exportPrivateType.js] var foo; (function (foo) { - class C1 { +- var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +- }()); +- var C2 = /** @class */ (function () { +- function C2() { +- } +- C2.prototype.test = function () { return true; }; +- return C2; +- }()); ++ class C1 { + x; + y; - } - class C2 { - test() { return true; } \ No newline at end of file ++ } ++ class C2 { ++ test() { return true; } ++ } + })(foo || (foo = {})); + var y = foo.g; // Exported variable 'y' has or is using private type 'foo.C2'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportPrivateType.symbols b/testdata/baselines/reference/submodule/compiler/exportPrivateType.symbols index f0ac5faaca..c4e4abf122 100644 --- a/testdata/baselines/reference/submodule/compiler/exportPrivateType.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportPrivateType.symbols @@ -1,18 +1,18 @@ //// [tests/cases/compiler/exportPrivateType.ts] //// === exportPrivateType.ts === -module foo { +namespace foo { >foo : Symbol(foo, Decl(exportPrivateType.ts, 0, 0)) class C1 { ->C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 12)) +>C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 15)) x: string; >x : Symbol(C1.x, Decl(exportPrivateType.ts, 1, 14)) y: C1; >y : Symbol(C1.y, Decl(exportPrivateType.ts, 2, 18)) ->C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 12)) +>C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 15)) } class C2 { @@ -48,7 +48,7 @@ module foo { // None of the types are exported, so per section 10.3, should all be errors export var e: C1; >e : Symbol(e, Decl(exportPrivateType.ts, 21, 14)) ->C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 12)) +>C1 : Symbol(C1, Decl(exportPrivateType.ts, 0, 15)) export var f: I1; >f : Symbol(f, Decl(exportPrivateType.ts, 22, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/exportPrivateType.types b/testdata/baselines/reference/submodule/compiler/exportPrivateType.types index 07bc5d39c9..4a546b2f46 100644 --- a/testdata/baselines/reference/submodule/compiler/exportPrivateType.types +++ b/testdata/baselines/reference/submodule/compiler/exportPrivateType.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportPrivateType.ts] //// === exportPrivateType.ts === -module foo { +namespace foo { >foo : typeof foo class C1 { diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.js index c944a3c07c..0647cbc006 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.js @@ -2,7 +2,7 @@ //// [exportSpecifierAndExportedMemberDeclaration.ts] declare module "m2" { - export module X { + export namespace X { interface I { } } function Y(); diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.symbols index 4ba169df7b..ddd08bf3e7 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.symbols @@ -4,11 +4,11 @@ declare module "m2" { >"m2" : Symbol("m2", Decl(exportSpecifierAndExportedMemberDeclaration.ts, 0, 0), Decl(exportSpecifierAndExportedMemberDeclaration.ts, 7, 1)) - export module X { + export namespace X { >X : Symbol(X, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 0, 21), Decl(exportSpecifierAndExportedMemberDeclaration.ts, 5, 12)) interface I { } ->I : Symbol(I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 21)) +>I : Symbol(I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 24)) } function Y(); >Y : Symbol(Y, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 3, 5)) @@ -20,7 +20,7 @@ declare module "m2" { function Z(): X.I; >Z : Symbol(Z, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 5, 22)) >X : Symbol(X, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 0, 21), Decl(exportSpecifierAndExportedMemberDeclaration.ts, 5, 12)) ->I : Symbol(X.I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 21)) +>I : Symbol(X.I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 24)) } declare module "m2" { @@ -29,5 +29,5 @@ declare module "m2" { function Z2(): X.I; >Z2 : Symbol(Z2, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 9, 21)) >X : Symbol(X, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 0, 21), Decl(exportSpecifierAndExportedMemberDeclaration.ts, 5, 12)) ->I : Symbol(X.I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 21)) +>I : Symbol(X.I, Decl(exportSpecifierAndExportedMemberDeclaration.ts, 1, 24)) } diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.types index e22537318e..11b2414db0 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndExportedMemberDeclaration.types @@ -4,7 +4,7 @@ declare module "m2" { >"m2" : typeof import("m2") - export module X { + export namespace X { interface I { } } function Y(); diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.errors.txt index 7c8cdd2db9..cdc6852aad 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.errors.txt @@ -3,7 +3,7 @@ exportSpecifierAndLocalMemberDeclaration.ts(11,20): error TS2503: Cannot find na ==== exportSpecifierAndLocalMemberDeclaration.ts (1 errors) ==== declare module "m2" { - module X { + namespace X { interface I { } } function Y(); diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.js index 8350f6d82f..71a14cd5ec 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.js @@ -2,7 +2,7 @@ //// [exportSpecifierAndLocalMemberDeclaration.ts] declare module "m2" { - module X { + namespace X { interface I { } } function Y(); diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.symbols index 4fe3d8d4ac..24333ceb80 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.symbols @@ -4,11 +4,11 @@ declare module "m2" { >"m2" : Symbol("m2", Decl(exportSpecifierAndLocalMemberDeclaration.ts, 0, 0), Decl(exportSpecifierAndLocalMemberDeclaration.ts, 7, 1)) - module X { + namespace X { >X : Symbol(X, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 0, 21)) interface I { } ->I : Symbol(I, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 1, 14)) +>I : Symbol(I, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 1, 17)) } function Y(); >Y : Symbol(Y, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 3, 5)) @@ -20,7 +20,7 @@ declare module "m2" { function Z(): X.I; >Z : Symbol(Z, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 5, 22)) >X : Symbol(X, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 0, 21)) ->I : Symbol(X.I, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 1, 14)) +>I : Symbol(X.I, Decl(exportSpecifierAndLocalMemberDeclaration.ts, 1, 17)) } declare module "m2" { diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.types index f6efc26329..167a9331c6 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierAndLocalMemberDeclaration.types @@ -4,7 +4,7 @@ declare module "m2" { >"m2" : typeof import("m2") - module X { + namespace X { interface I { } } function Y(); diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.errors.txt b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.errors.txt index d243086c75..e9341b6172 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.errors.txt @@ -2,7 +2,7 @@ exportSpecifierReferencingOuterDeclaration1.ts(3,14): error TS2661: Cannot expor ==== exportSpecifierReferencingOuterDeclaration1.ts (1 errors) ==== - declare module X { export interface bar { } } + declare namespace X { export interface bar { } } declare module "m" { export { X }; ~ diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.js index 9783b37586..6743dac936 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts] //// //// [exportSpecifierReferencingOuterDeclaration1.ts] -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } declare module "m" { export { X }; export function foo(): X.bar; diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.symbols index c0bf5723fc..52fdb1301b 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.symbols @@ -1,12 +1,12 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts] //// === exportSpecifierReferencingOuterDeclaration1.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 18)) +>bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 21)) declare module "m" { ->"m" : Symbol("m", Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 45)) +>"m" : Symbol("m", Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 48)) export { X }; >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 2, 12)) @@ -14,5 +14,5 @@ declare module "m" { export function foo(): X.bar; >foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 2, 17)) >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 0)) ->bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 18)) +>bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration1.ts, 0, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.types index 71a9d75c75..4429281b2d 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration1.ts] //// === exportSpecifierReferencingOuterDeclaration1.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } declare module "m" { >"m" : typeof import("m") diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.errors.txt b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.errors.txt index 3838a6a4dc..7f8702c07a 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.errors.txt @@ -2,7 +2,7 @@ exportSpecifierReferencingOuterDeclaration2_B.ts(1,10): error TS2661: Cannot exp ==== exportSpecifierReferencingOuterDeclaration2_A.ts (0 errors) ==== - declare module X { export interface bar { } } + declare namespace X { export interface bar { } } ==== exportSpecifierReferencingOuterDeclaration2_B.ts (1 errors) ==== export { X }; diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.js index bdb0e9e04b..9974c0efbe 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2.ts] //// //// [exportSpecifierReferencingOuterDeclaration2_A.ts] -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } //// [exportSpecifierReferencingOuterDeclaration2_B.ts] export { X }; diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.symbols index 1814d0ae6d..f22ac0f52e 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.symbols @@ -1,9 +1,9 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration2.ts] //// === exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 18)) +>bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 21)) === exportSpecifierReferencingOuterDeclaration2_B.ts === export { X }; @@ -12,5 +12,5 @@ export { X }; export declare function foo(): X.bar; >foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 13)) >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 0)) ->bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 18)) +>bar : Symbol(X.bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.types index cb43f7bf8b..11971d67ab 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration2.types @@ -2,7 +2,7 @@ === exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } === exportSpecifierReferencingOuterDeclaration2_B.ts === export { X }; diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.errors.txt b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.errors.txt index deefe8cb76..3869bb4224 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.errors.txt @@ -2,9 +2,9 @@ exportSpecifierReferencingOuterDeclaration3.ts(6,30): error TS2694: Namespace 'X ==== exportSpecifierReferencingOuterDeclaration3.ts (1 errors) ==== - declare module X { export interface bar { } } + declare namespace X { export interface bar { } } declare module "m" { - module X { export interface foo { } } + namespace X { export interface foo { } } export { X }; export function foo(): X.foo; export function bar(): X.bar; // error diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.js index 6023e68be2..a26ef12191 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.js @@ -1,9 +1,9 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts] //// //// [exportSpecifierReferencingOuterDeclaration3.ts] -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } declare module "m" { - module X { export interface foo { } } + namespace X { export interface foo { } } export { X }; export function foo(): X.foo; export function bar(): X.bar; // error diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.symbols index cf7a506348..9c77141c07 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.symbols @@ -1,16 +1,16 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts] //// === exportSpecifierReferencingOuterDeclaration3.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 0, 18)) +>bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 0, 21)) declare module "m" { ->"m" : Symbol("m", Decl(exportSpecifierReferencingOuterDeclaration3.ts, 0, 45)) +>"m" : Symbol("m", Decl(exportSpecifierReferencingOuterDeclaration3.ts, 0, 48)) - module X { export interface foo { } } + namespace X { export interface foo { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 1, 20)) ->foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 2, 14)) +>foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 2, 17)) export { X }; >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 3, 12)) @@ -18,7 +18,7 @@ declare module "m" { export function foo(): X.foo; >foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 3, 17)) >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 1, 20)) ->foo : Symbol(X.foo, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 2, 14)) +>foo : Symbol(X.foo, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 2, 17)) export function bar(): X.bar; // error >bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration3.ts, 4, 33)) diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.types index 8752635b4d..0b297b5f33 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration3.types @@ -1,11 +1,11 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration3.ts] //// === exportSpecifierReferencingOuterDeclaration3.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } declare module "m" { >"m" : typeof import("m") - module X { export interface foo { } } + namespace X { export interface foo { } } export { X }; >X : any diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.errors.txt b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.errors.txt index 15a7fa2ae9..40916ef340 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.errors.txt @@ -2,10 +2,10 @@ exportSpecifierReferencingOuterDeclaration2_B.ts(4,34): error TS2694: Namespace ==== exportSpecifierReferencingOuterDeclaration2_A.ts (0 errors) ==== - declare module X { export interface bar { } } + declare namespace X { export interface bar { } } ==== exportSpecifierReferencingOuterDeclaration2_B.ts (1 errors) ==== - declare module X { export interface foo { } } + declare namespace X { export interface foo { } } export { X }; export declare function foo(): X.foo; export declare function bar(): X.bar; // error diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.js b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.js index 740bb41be7..80e9c2e6cb 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.js +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.js @@ -1,10 +1,10 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration4.ts] //// //// [exportSpecifierReferencingOuterDeclaration2_A.ts] -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } //// [exportSpecifierReferencingOuterDeclaration2_B.ts] -declare module X { export interface foo { } } +declare namespace X { export interface foo { } } export { X }; export declare function foo(): X.foo; export declare function bar(): X.bar; // error diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.symbols b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.symbols index 89e4cd61f4..e0be671a2d 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.symbols +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/exportSpecifierReferencingOuterDeclaration4.ts] //// === exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 0)) ->bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 18)) +>bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_A.ts, 0, 21)) === exportSpecifierReferencingOuterDeclaration2_B.ts === -declare module X { export interface foo { } } +declare namespace X { export interface foo { } } >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 0)) ->foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 18)) +>foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 21)) export { X }; >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 1, 8)) @@ -16,7 +16,7 @@ export { X }; export declare function foo(): X.foo; >foo : Symbol(foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 1, 13)) >X : Symbol(X, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 0)) ->foo : Symbol(X.foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 18)) +>foo : Symbol(X.foo, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 0, 21)) export declare function bar(): X.bar; // error >bar : Symbol(bar, Decl(exportSpecifierReferencingOuterDeclaration2_B.ts, 2, 37)) diff --git a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.types b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.types index 88ea4c89cb..20786f276b 100644 --- a/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.types +++ b/testdata/baselines/reference/submodule/compiler/exportSpecifierReferencingOuterDeclaration4.types @@ -2,10 +2,10 @@ === exportSpecifierReferencingOuterDeclaration2_A.ts === -declare module X { export interface bar { } } +declare namespace X { export interface bar { } } === exportSpecifierReferencingOuterDeclaration2_B.ts === -declare module X { export interface foo { } } +declare namespace X { export interface foo { } } export { X }; >X : any diff --git a/testdata/baselines/reference/submodule/compiler/exportStarFromEmptyModule.js.diff b/testdata/baselines/reference/submodule/compiler/exportStarFromEmptyModule.js.diff index 7c33e43513..a057e50f47 100644 --- a/testdata/baselines/reference/submodule/compiler/exportStarFromEmptyModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportStarFromEmptyModule.js.diff @@ -1,19 +1,32 @@ --- old.exportStarFromEmptyModule.js +++ new.exportStarFromEmptyModule.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.A = void 0; - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + static r; - } ++} exports.A = A; //// [exportStarFromEmptyModule_module2.js] -@@= skipped -25, +26 lines =@@ + // empty +@@= skipped -28, +26 lines =@@ + exports.A = void 0; __exportStar(require("./exportStarFromEmptyModule_module2"), exports); __exportStar(require("./exportStarFromEmptyModule_module1"), exports); - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + static q; - } ++} exports.A = A; //// [exportStarFromEmptyModule_module4.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/exportStarNotElided.js.diff b/testdata/baselines/reference/submodule/compiler/exportStarNotElided.js.diff index 713223991b..f7893c825f 100644 --- a/testdata/baselines/reference/submodule/compiler/exportStarNotElided.js.diff +++ b/testdata/baselines/reference/submodule/compiler/exportStarNotElided.js.diff @@ -1,6 +1,15 @@ --- old.exportStarNotElided.js +++ new.exportStarNotElided.js -@@= skipped -44, +44 lines =@@ +@@= skipped -16, +16 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.register = register; +-var r = []; ++const r = []; + function register(data) { + r.push(data); + } +@@= skipped -28, +28 lines =@@ //// [data1.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/testdata/baselines/reference/submodule/compiler/exportToString.js.diff b/testdata/baselines/reference/submodule/compiler/exportToString.js.diff new file mode 100644 index 0000000000..1083e4f81a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportToString.js.diff @@ -0,0 +1,9 @@ +--- old.exportToString.js ++++ new.exportToString.js +@@= skipped -8, +8 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.toString = void 0; +-var toString = 0; ++const toString = 0; + exports.toString = toString; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/exportVisibility.js.diff b/testdata/baselines/reference/submodule/compiler/exportVisibility.js.diff new file mode 100644 index 0000000000..1674709bf1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/exportVisibility.js.diff @@ -0,0 +1,16 @@ +--- old.exportVisibility.js ++++ new.exportVisibility.js +@@= skipped -15, +15 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.foo = exports.Foo = void 0; + exports.test = test; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + exports.Foo = Foo; + exports.foo = new Foo(); + function test(foo) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.js.diff b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.js.diff new file mode 100644 index 0000000000..82144a6764 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.js.diff @@ -0,0 +1,59 @@ +--- old.expressionTypeNodeShouldError.js ++++ new.expressionTypeNodeShouldError.js +@@= skipped -47, +47 lines =@@ + + + //// [string.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { +- var x; ++class C { ++ foo() { ++ const x; + typeof (this.foo); +- }; +- return C; +-}()); +-var nodes = document.getElementsByTagName("li"); ++ } ++} ++const nodes = document.getElementsByTagName("li"); + typeof (nodes.item(0)); + //// [number.js] +-var C2 = /** @class */ (function () { +- function C2() { +- } +- C2.prototype.foo = function () { +- var x; ++class C2 { ++ foo() { ++ const x; + typeof (this.foo); +- }; +- return C2; +-}()); +-var nodes2 = document.getElementsByTagName("li"); ++ } ++} ++const nodes2 = document.getElementsByTagName("li"); + typeof (nodes.item(0)); + //// [boolean.js] +-var C3 = /** @class */ (function () { +- function C3() { +- } +- C3.prototype.foo = function () { +- var x; ++class C3 { ++ foo() { ++ const x; + typeof (this.foo); +- }; +- return C3; +-}()); +-var nodes3 = document.getElementsByTagName("li"); ++ } ++} ++const nodes3 = document.getElementsByTagName("li"); + typeof (nodes.item(0)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.symbols.diff b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.symbols.diff new file mode 100644 index 0000000000..861988c786 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.symbols.diff @@ -0,0 +1,11 @@ +--- old.expressionTypeNodeShouldError.symbols ++++ new.expressionTypeNodeShouldError.symbols +@@= skipped -6, +6 lines =@@ + + === string.ts === + interface String { +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 2 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(string.ts, 0, 0)) + + typeof(x: T): T; + >typeof : Symbol(String.typeof, Decl(string.ts, 0, 18)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.types.diff b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.types.diff new file mode 100644 index 0000000000..ba6afd27cc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/expressionTypeNodeShouldError.types.diff @@ -0,0 +1,56 @@ +--- old.expressionTypeNodeShouldError.types ++++ new.expressionTypeNodeShouldError.types +@@= skipped -21, +21 lines =@@ + + const x: "".typeof(this.foo); + >x : "" +->typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(this.foo) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(this.foo) : () => void + >this.foo : () => void + >this : this +@@= skipped -18, +18 lines =@@ + + type ItemType = "".typeof(nodes.item(0)); + >ItemType : "" +->typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(nodes.item(0)) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(nodes.item(0)) : HTMLLIElement + >nodes.item(0) : HTMLLIElement + >nodes.item : (index: number) => HTMLLIElement +@@= skipped -23, +23 lines =@@ + + const x: 3.141592.typeof(this.foo); + >x : 3.141592 +->typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(this.foo) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(this.foo) : () => void + >this.foo : () => void + >this : this +@@= skipped -18, +18 lines =@@ + + type ItemType2 = 4..typeof(nodes.item(0)); + >ItemType2 : 4 +->typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(nodes.item(0)) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(nodes.item(0)) : HTMLLIElement + >nodes.item(0) : HTMLLIElement + >nodes.item : (index: number) => HTMLLIElement +@@= skipped -24, +24 lines =@@ + const x: false.typeof(this.foo); + >x : false + >false : false +->typeof(this.foo) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(this.foo) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(this.foo) : () => void + >this.foo : () => void + >this : this +@@= skipped -19, +19 lines =@@ + type ItemType3 = true.typeof(nodes.item(0)); + >ItemType3 : true + >true : true +->typeof(nodes.item(0)) : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof(nodes.item(0)) : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >(nodes.item(0)) : HTMLLIElement + >nodes.item(0) : HTMLLIElement + >nodes.item : (index: number) => HTMLLIElement \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.js.diff b/testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.js.diff index 269ca2f526..fc4c23d132 100644 --- a/testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expressionWithJSDocTypeArguments.js.diff @@ -7,21 +7,25 @@ -"use strict"; // Repro from #51802 function foo(x) { return x; } - class Bar { +-var Bar = /** @class */ (function () { +- function Bar(x) { ++class Bar { + x; - constructor(x) { ++ constructor(x) { this.x = x; } - } +- return Bar; +-}()); ++} // Errors expected on all of the following --const WhatFoo = foo; --const HuhFoo = foo; --const NopeFoo = foo; --const ComeOnFoo = foo; --const WhatBar = Bar; --const HuhBar = Bar; --const NopeBar = Bar; --const ComeOnBar = Bar; +-var WhatFoo = foo; +-var HuhFoo = foo; +-var NopeFoo = foo; +-var ComeOnFoo = foo; +-var WhatBar = Bar; +-var HuhBar = Bar; +-var NopeBar = Bar; +-var ComeOnBar = Bar; +const WhatFoo = foo; +const HuhFoo = foo; +const NopeFoo = foo; diff --git a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.js.diff b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.js.diff index 2367d8dab0..14f8a041c6 100644 --- a/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/expressionsForbiddenInParameterInitializers.js.diff @@ -12,14 +12,78 @@ - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +-}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } -}; Object.defineProperty(exports, "__esModule", { value: true }); exports.foo = foo; exports.foo2 = foo2; -function foo(_a) { -- return __awaiter(this, arguments, void 0, function* ({ foo = yield Promise.resolve().then(function () { return require("./bar"); }) }) { +- return __awaiter(this, arguments, void 0, function (_b) { +- var _c, foo, _d; +- return __generator(this, function (_e) { +- switch (_e.label) { +- case 0: +- _c = _b.foo; +- if (!(_c === void 0)) return [3 /*break*/, 2]; +- return [4 /*yield*/, Promise.resolve().then(function () { return require("./bar"); })]; +- case 1: +- _d = _e.sent(); +- return [3 /*break*/, 3]; +- case 2: +- _d = _c; +- _e.label = 3; +- case 3: +- foo = _d; +- return [2 /*return*/]; +- } +- }); - }); +async function foo({ foo = await Promise.resolve().then(() => require("./bar")) }) { } - function* foo2({ foo = yield "a" }) { +-function foo2(_a) { +- var _b, foo, _c; +- return __generator(this, function (_d) { +- switch (_d.label) { +- case 0: +- _b = _a.foo; +- if (!(_b === void 0)) return [3 /*break*/, 2]; +- return [4 /*yield*/, "a"]; +- case 1: +- _c = _d.sent(); +- return [3 /*break*/, 3]; +- case 2: +- _c = _b; +- _d.label = 3; +- case 3: +- foo = _c; +- return [2 /*return*/]; +- } +- }); ++function* foo2({ foo = yield "a" }) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass1.js b/testdata/baselines/reference/submodule/compiler/extBaseClass1.js index 39f221a415..097aecd921 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass1.js +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/extBaseClass1.ts] //// //// [extBaseClass1.ts] -module M { +namespace M { export class B { public x=10; } @@ -10,12 +10,12 @@ module M { } } -module M { +namespace M { export class C2 extends B { } } -module N { +namespace N { export class C3 extends M.B { } } diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass1.js.diff b/testdata/baselines/reference/submodule/compiler/extBaseClass1.js.diff index 58736232a0..fe137b0f97 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass1.js.diff @@ -1,22 +1,69 @@ --- old.extBaseClass1.js +++ new.extBaseClass1.js -@@= skipped -24, +24 lines =@@ +@@= skipped -21, +21 lines =@@ + + + //// [extBaseClass1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var M; (function (M) { - class B { -- constructor() { +- var B = /** @class */ (function () { +- function B() { - this.x = 10; - } +- return B; +- }()); ++ class B { + x = 10; - } ++ } M.B = B; - class C extends B { -@@= skipped -10, +8 lines =@@ +- var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +- }(B)); ++ class C extends B { ++ } M.C = C; })(M || (M = {})); (function (M) { -- class C2 extends M.B { +- var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C2; +- }(M.B)); + class C2 extends B { - } ++ } M.C2 = C2; - })(M || (M = {})); \ No newline at end of file + })(M || (M = {})); + var N; + (function (N) { +- var C3 = /** @class */ (function (_super) { +- __extends(C3, _super); +- function C3() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C3; +- }(M.B)); ++ class C3 extends M.B { ++ } + N.C3 = C3; + })(N || (N = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass1.symbols b/testdata/baselines/reference/submodule/compiler/extBaseClass1.symbols index b71ccce603..3c1b6102c9 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass1.symbols +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/extBaseClass1.ts] //// === extBaseClass1.ts === -module M { +namespace M { >M : Symbol(M, Decl(extBaseClass1.ts, 0, 0), Decl(extBaseClass1.ts, 7, 1)) export class B { ->B : Symbol(B, Decl(extBaseClass1.ts, 0, 10)) +>B : Symbol(B, Decl(extBaseClass1.ts, 0, 13)) public x=10; >x : Symbol(B.x, Decl(extBaseClass1.ts, 1, 20)) @@ -13,27 +13,27 @@ module M { export class C extends B { >C : Symbol(C, Decl(extBaseClass1.ts, 3, 5)) ->B : Symbol(B, Decl(extBaseClass1.ts, 0, 10)) +>B : Symbol(B, Decl(extBaseClass1.ts, 0, 13)) } } -module M { +namespace M { >M : Symbol(M, Decl(extBaseClass1.ts, 0, 0), Decl(extBaseClass1.ts, 7, 1)) export class C2 extends B { ->C2 : Symbol(C2, Decl(extBaseClass1.ts, 9, 10)) ->B : Symbol(B, Decl(extBaseClass1.ts, 0, 10)) +>C2 : Symbol(C2, Decl(extBaseClass1.ts, 9, 13)) +>B : Symbol(B, Decl(extBaseClass1.ts, 0, 13)) } } -module N { +namespace N { >N : Symbol(N, Decl(extBaseClass1.ts, 12, 1)) export class C3 extends M.B { ->C3 : Symbol(C3, Decl(extBaseClass1.ts, 14, 10)) ->M.B : Symbol(M.B, Decl(extBaseClass1.ts, 0, 10)) +>C3 : Symbol(C3, Decl(extBaseClass1.ts, 14, 13)) +>M.B : Symbol(M.B, Decl(extBaseClass1.ts, 0, 13)) >M : Symbol(M, Decl(extBaseClass1.ts, 0, 0), Decl(extBaseClass1.ts, 7, 1)) ->B : Symbol(M.B, Decl(extBaseClass1.ts, 0, 10)) +>B : Symbol(M.B, Decl(extBaseClass1.ts, 0, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass1.types b/testdata/baselines/reference/submodule/compiler/extBaseClass1.types index 94f7ada451..c038442764 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass1.types +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/extBaseClass1.ts] //// === extBaseClass1.ts === -module M { +namespace M { >M : typeof M export class B { @@ -18,7 +18,7 @@ module M { } } -module M { +namespace M { >M : typeof M export class C2 extends B { @@ -27,7 +27,7 @@ module M { } } -module N { +namespace N { >N : typeof N export class C3 extends M.B { diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass2.errors.txt b/testdata/baselines/reference/submodule/compiler/extBaseClass2.errors.txt index 041ec32141..fa73e0d352 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass2.errors.txt @@ -3,14 +3,14 @@ extBaseClass2.ts(7,29): error TS2304: Cannot find name 'B'. ==== extBaseClass2.ts (2 errors) ==== - module N { + namespace N { export class C4 extends M.B { ~ !!! error TS2339: Property 'B' does not exist on type 'typeof M'. } } - module M { + namespace M { export class C5 extends B { ~ !!! error TS2304: Cannot find name 'B'. diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass2.js b/testdata/baselines/reference/submodule/compiler/extBaseClass2.js index 452c6c2dca..27875251f2 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass2.js +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass2.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/extBaseClass2.ts] //// //// [extBaseClass2.ts] -module N { +namespace N { export class C4 extends M.B { } } -module M { +namespace M { export class C5 extends B { } } diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass2.js.diff b/testdata/baselines/reference/submodule/compiler/extBaseClass2.js.diff new file mode 100644 index 0000000000..3c9560d8f3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass2.js.diff @@ -0,0 +1,47 @@ +--- old.extBaseClass2.js ++++ new.extBaseClass2.js +@@= skipped -12, +12 lines =@@ + + + //// [extBaseClass2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var N; + (function (N) { +- var C4 = /** @class */ (function (_super) { +- __extends(C4, _super); +- function C4() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C4; +- }(M.B)); ++ class C4 extends M.B { ++ } + N.C4 = C4; + })(N || (N = {})); + var M; + (function (M) { +- var C5 = /** @class */ (function (_super) { +- __extends(C5, _super); +- function C5() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C5; +- }(B)); ++ class C5 extends B { ++ } + M.C5 = C5; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass2.symbols b/testdata/baselines/reference/submodule/compiler/extBaseClass2.symbols index 4fbda93261..c12692ba2c 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass2.symbols +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass2.symbols @@ -1,20 +1,20 @@ //// [tests/cases/compiler/extBaseClass2.ts] //// === extBaseClass2.ts === -module N { +namespace N { >N : Symbol(N, Decl(extBaseClass2.ts, 0, 0)) export class C4 extends M.B { ->C4 : Symbol(C4, Decl(extBaseClass2.ts, 0, 10)) +>C4 : Symbol(C4, Decl(extBaseClass2.ts, 0, 13)) >M : Symbol(M, Decl(extBaseClass2.ts, 3, 1)) } } -module M { +namespace M { >M : Symbol(M, Decl(extBaseClass2.ts, 3, 1)) export class C5 extends B { ->C5 : Symbol(C5, Decl(extBaseClass2.ts, 5, 10)) +>C5 : Symbol(C5, Decl(extBaseClass2.ts, 5, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/extBaseClass2.types b/testdata/baselines/reference/submodule/compiler/extBaseClass2.types index 4b60d6136d..5ac454498a 100644 --- a/testdata/baselines/reference/submodule/compiler/extBaseClass2.types +++ b/testdata/baselines/reference/submodule/compiler/extBaseClass2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/extBaseClass2.ts] //// === extBaseClass2.ts === -module N { +namespace N { >N : typeof N export class C4 extends M.B { @@ -12,7 +12,7 @@ module N { } } -module M { +namespace M { >M : typeof M export class C5 extends B { diff --git a/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType.js.diff b/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType.js.diff index 727d0136ee..3ec02d2e68 100644 --- a/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType.js.diff @@ -1,10 +1,45 @@ --- old.extendAndImplementTheSameBaseType.js +++ new.extendAndImplementTheSameBaseType.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + d.foo; //// [extendAndImplementTheSameBaseType.js] - class C { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function () { }; +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- D.prototype.baz = function () { }; +- return D; +-}(C)); ++class C { + foo; - bar() { } - } - class D extends C { \ No newline at end of file ++ bar() { } ++} ++class D extends C { ++ baz() { } ++} + var c; + var d = new D(); + d.bar(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType2.js.diff b/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType2.js.diff index 21a9efaaec..b0353c9cfc 100644 --- a/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendAndImplementTheSameBaseType2.js.diff @@ -1,10 +1,47 @@ --- old.extendAndImplementTheSameBaseType2.js +++ new.extendAndImplementTheSameBaseType2.js -@@= skipped -19, +19 lines =@@ +@@= skipped -18, +18 lines =@@ + var r4: number = d.bar(); //// [extendAndImplementTheSameBaseType2.js] - class C { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar = function () { ++class C { + foo; - bar() { ++ bar() { return null; - } \ No newline at end of file +- }; +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- D.prototype.baz = function () { }; +- return D; +-}(C)); ++} ++class D extends C { ++ baz() { } ++} + var d = new D(); + var r = d.foo; + var r2 = d.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendArray.errors.txt b/testdata/baselines/reference/submodule/compiler/extendArray.errors.txt index a989fcae00..b27c9c3e09 100644 --- a/testdata/baselines/reference/submodule/compiler/extendArray.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/extendArray.errors.txt @@ -7,7 +7,7 @@ extendArray.ts(7,32): error TS2552: Cannot find name '_element'. Did you mean 'E a.forEach(function (v,i,a) {}); - declare module _Core { + declare namespace _Core { interface Array { collect(fn:(e:_element) => _element[]) : any[]; ~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/extendArray.js b/testdata/baselines/reference/submodule/compiler/extendArray.js index d81963367a..07176dcbf6 100644 --- a/testdata/baselines/reference/submodule/compiler/extendArray.js +++ b/testdata/baselines/reference/submodule/compiler/extendArray.js @@ -5,7 +5,7 @@ var a = [1,2]; a.forEach(function (v,i,a) {}); -declare module _Core { +declare namespace _Core { interface Array { collect(fn:(e:_element) => _element[]) : any[]; } diff --git a/testdata/baselines/reference/submodule/compiler/extendArray.symbols b/testdata/baselines/reference/submodule/compiler/extendArray.symbols index eb0f05b921..d55807cbd6 100644 --- a/testdata/baselines/reference/submodule/compiler/extendArray.symbols +++ b/testdata/baselines/reference/submodule/compiler/extendArray.symbols @@ -13,11 +13,11 @@ a.forEach(function (v,i,a) {}); >a : Symbol(a, Decl(extendArray.ts, 1, 24)) -declare module _Core { +declare namespace _Core { >_Core : Symbol(_Core, Decl(extendArray.ts, 1, 31)) interface Array { ->Array : Symbol(Array, Decl(extendArray.ts, 4, 22)) +>Array : Symbol(Array, Decl(extendArray.ts, 4, 25)) collect(fn:(e:_element) => _element[]) : any[]; >collect : Symbol(Array.collect, Decl(extendArray.ts, 5, 19)) diff --git a/testdata/baselines/reference/submodule/compiler/extendArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendArray.symbols.diff new file mode 100644 index 0000000000..6d3d5d1a5a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendArray.symbols.diff @@ -0,0 +1,11 @@ +--- old.extendArray.symbols ++++ new.extendArray.symbols +@@= skipped -30, +30 lines =@@ + + var arr = (Array).prototype; + >arr : Symbol(arr, Decl(extendArray.ts, 11, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + arr.collect = function (fn) { + >arr : Symbol(arr, Decl(extendArray.ts, 11, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendArray.types b/testdata/baselines/reference/submodule/compiler/extendArray.types index a37ad0e766..802226f9af 100644 --- a/testdata/baselines/reference/submodule/compiler/extendArray.types +++ b/testdata/baselines/reference/submodule/compiler/extendArray.types @@ -18,7 +18,7 @@ a.forEach(function (v,i,a) {}); >a : number[] -declare module _Core { +declare namespace _Core { interface Array { collect(fn:(e:_element) => _element[]) : any[]; >collect : (fn: (e: _element) => _element[]) => any[] diff --git a/testdata/baselines/reference/submodule/compiler/extendBaseClassBeforeItsDeclared.js.diff b/testdata/baselines/reference/submodule/compiler/extendBaseClassBeforeItsDeclared.js.diff index e96422730d..4e4d43e091 100644 --- a/testdata/baselines/reference/submodule/compiler/extendBaseClassBeforeItsDeclared.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendBaseClassBeforeItsDeclared.js.diff @@ -1,10 +1,40 @@ --- old.extendBaseClassBeforeItsDeclared.js +++ new.extendBaseClassBeforeItsDeclared.js -@@= skipped -8, +8 lines =@@ - class derived extends base { - } - class base { +@@= skipped -5, +5 lines =@@ + class base { constructor (public n: number) { } } + + //// [extendBaseClassBeforeItsDeclared.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var derived = /** @class */ (function (_super) { +- __extends(derived, _super); +- function derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return derived; +-}(base)); +-var base = /** @class */ (function () { +- function base(n) { ++class derived extends base { ++} ++class base { + n; - constructor(n) { ++ constructor(n) { this.n = n; - } \ No newline at end of file + } +- return base; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendConstructSignatureInInterface.js.diff b/testdata/baselines/reference/submodule/compiler/extendConstructSignatureInInterface.js.diff new file mode 100644 index 0000000000..9923a9aebc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendConstructSignatureInInterface.js.diff @@ -0,0 +1,32 @@ +--- old.extendConstructSignatureInInterface.js ++++ new.extendConstructSignatureInInterface.js +@@= skipped -12, +12 lines =@@ + + + //// [extendConstructSignatureInInterface.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var CStatic; +-var E = /** @class */ (function (_super) { +- __extends(E, _super); +- function E() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return E; +-}(CStatic)); ++class E extends CStatic { ++} + var e = new E(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendFromAny.js.diff b/testdata/baselines/reference/submodule/compiler/extendFromAny.js.diff index 7668d6323a..dbc3bed1cb 100644 --- a/testdata/baselines/reference/submodule/compiler/extendFromAny.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendFromAny.js.diff @@ -4,20 +4,37 @@ //// [extendFromAny.js] --let C = (() => { -- class C extends Base { -- constructor() { -- super(...arguments); -- this.known = 1; -- } +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.known = 1; +- return _this; - } - C.sknown = 2; - return C; --})(); +-}(Base)); +-var c = new C(); +class C extends Base { + known = 1; + static sknown = 2; +} - let c = new C(); ++let c = new C(); c.known.length; // error, 'known' has no 'length' property - C.sknown.length; // error, 'sknown' has no 'length' property \ No newline at end of file + C.sknown.length; // error, 'sknown' has no 'length' property + c.unknown.length; // ok, unknown: any \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendGenericArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendGenericArray.symbols.diff new file mode 100644 index 0000000000..1065737902 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendGenericArray.symbols.diff @@ -0,0 +1,18 @@ +--- old.extendGenericArray.symbols ++++ new.extendGenericArray.symbols +@@= skipped -1, +1 lines =@@ + + === extendGenericArray.ts === + interface Array { +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(extendGenericArray.ts, 0, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray.ts, 0, 0)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray.ts, 0, 16)) + + foo(): T; + >foo : Symbol(Array.foo, Decl(extendGenericArray.ts, 0, 20)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(extendGenericArray.ts, 0, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray.ts, 0, 16)) + } + + var arr: string[] = []; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendGenericArray2.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendGenericArray2.symbols.diff new file mode 100644 index 0000000000..dc90843f14 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendGenericArray2.symbols.diff @@ -0,0 +1,16 @@ +--- old.extendGenericArray2.symbols ++++ new.extendGenericArray2.symbols +@@= skipped -10, +10 lines =@@ + } + + interface Array extends IFoo { } +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(extendGenericArray2.ts, 4, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray2.ts, 2, 1)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray2.ts, 4, 16)) + >IFoo : Symbol(IFoo, Decl(extendGenericArray2.ts, 0, 0)) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(extendGenericArray2.ts, 4, 16)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(extendGenericArray2.ts, 4, 16)) + + var arr: string[] = []; + >arr : Symbol(arr, Decl(extendGenericArray2.ts, 6, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendGlobalThis.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.errors.txt.diff new file mode 100644 index 0000000000..2689d6d346 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.errors.txt.diff @@ -0,0 +1,24 @@ +--- old.extendGlobalThis.errors.txt ++++ new.extendGlobalThis.errors.txt +@@= skipped -0, +0 lines =@@ +-index.ts(1,8): error TS2882: Cannot find module or type declarations for side-effect import of './extention'. +- +- +-==== extension.d.ts (0 errors) ==== +- declare global { +- namespace globalThis { +- var test: string; +- } +- } +- +- export {} +- +-==== index.ts (1 errors) ==== +- import "./extention"; +- ~~~~~~~~~~~~~ +-!!! error TS2882: Cannot find module or type declarations for side-effect import of './extention'. +- +- globalThis.tests = "a-b"; +- console.log(globalThis.test.split("-")); +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendGlobalThis.symbols.diff b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.symbols.diff new file mode 100644 index 0000000000..c5c8aa31d2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.symbols.diff @@ -0,0 +1,13 @@ +--- old.extendGlobalThis.symbols ++++ new.extendGlobalThis.symbols +@@= skipped -23, +23 lines =@@ + >console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) + >console : Symbol(console, Decl(lib.dom.d.ts, --, --)) + >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +->globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>globalThis.test.split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) + >globalThis.test : Symbol(test, Decl(extension.d.ts, 2, 11)) + >globalThis : Symbol(globalThis, Decl(extension.d.ts, 0, 16)) + >test : Symbol(test, Decl(extension.d.ts, 2, 11)) +->split : Symbol(String.split, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>split : Symbol(String.split, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/extendGlobalThis.types.diff b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.types.diff new file mode 100644 index 0000000000..4bf3f70127 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendGlobalThis.types.diff @@ -0,0 +1,14 @@ +--- old.extendGlobalThis.types ++++ new.extendGlobalThis.types +@@= skipped -29, +29 lines =@@ + >console : Console + >log : (...data: any[]) => void + >globalThis.test.split("-") : string[] +->globalThis.test.split : { (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } ++>globalThis.test.split : (separator: string | RegExp, limit?: number) => string[] + >globalThis.test : string + >globalThis : typeof globalThis + >test : string +->split : { (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; } ++>split : (separator: string | RegExp, limit?: number) => string[] + >"-" : "-" diff --git a/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol1.js.diff b/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol1.js.diff new file mode 100644 index 0000000000..52e885c94e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol1.js.diff @@ -0,0 +1,40 @@ +--- old.extendNonClassSymbol1.js ++++ new.extendNonClassSymbol1.js +@@= skipped -5, +5 lines =@@ + class C extends x { } // error, could not find symbol xs + + //// [extendNonClassSymbol1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); ++class A { ++ foo() { } ++} + var x = A; +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(x)); // error, could not find symbol xs ++class C extends x { ++} // error, could not find symbol xs \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol2.js.diff b/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol2.js.diff new file mode 100644 index 0000000000..d47f59cebb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendNonClassSymbol2.js.diff @@ -0,0 +1,34 @@ +--- old.extendNonClassSymbol2.js ++++ new.extendNonClassSymbol2.js +@@= skipped -7, +7 lines =@@ + class C extends Foo {} // error, could not find symbol Foo + + //// [extendNonClassSymbol2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + function Foo() { + this.x = 1; + } + var x = new Foo(); // legal, considered a constructor function +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(Foo)); // error, could not find symbol Foo ++class C extends Foo { ++} // error, could not find symbol Foo \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendPrivateConstructorClass.js.diff b/testdata/baselines/reference/submodule/compiler/extendPrivateConstructorClass.js.diff new file mode 100644 index 0000000000..b2907d05b8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendPrivateConstructorClass.js.diff @@ -0,0 +1,30 @@ +--- old.extendPrivateConstructorClass.js ++++ new.extendPrivateConstructorClass.js +@@= skipped -11, +11 lines =@@ + + + //// [extendPrivateConstructorClass.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(abc.XYZ)); ++class C extends abc.XYZ { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendingClassFromAliasAndUsageInIndexer.js.diff b/testdata/baselines/reference/submodule/compiler/extendingClassFromAliasAndUsageInIndexer.js.diff index a59c81ff2f..400cdb1837 100644 --- a/testdata/baselines/reference/submodule/compiler/extendingClassFromAliasAndUsageInIndexer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendingClassFromAliasAndUsageInIndexer.js.diff @@ -1,29 +1,79 @@ --- old.extendingClassFromAliasAndUsageInIndexer.js +++ new.extendingClassFromAliasAndUsageInIndexer.js -@@= skipped -36, +36 lines =@@ +@@= skipped -35, +35 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Model = void 0; - class Model { +-var Model = /** @class */ (function () { +- function Model() { +- } +- return Model; +-}()); ++class Model { + someData; - } ++} exports.Model = Model; //// [extendingClassFromAliasAndUsageInIndexer_moduleA.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; -@@= skipped -14, +15 lines =@@ + //// [extendingClassFromAliasAndUsageInIndexer_moduleB.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.VisualizationModel = void 0; -var Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); +-var VisualizationModel = /** @class */ (function (_super) { +- __extends(VisualizationModel, _super); +- function VisualizationModel() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return VisualizationModel; +-}(Backbone.Model)); +const Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone"); - class VisualizationModel extends Backbone.Model { - } ++class VisualizationModel extends Backbone.Model { ++} exports.VisualizationModel = VisualizationModel; //// [extendingClassFromAliasAndUsageInIndexer_main.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen.js.diff b/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen.js.diff new file mode 100644 index 0000000000..ab7b4bcb85 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen.js.diff @@ -0,0 +1,39 @@ +--- old.extendsClauseAlreadySeen.js ++++ new.extendsClauseAlreadySeen.js +@@= skipped -8, +8 lines =@@ + } + + //// [extendsClauseAlreadySeen.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- D.prototype.baz = function () { }; +- return D; +-}(C)); ++class C { ++} ++class D extends C extends C { ++ baz() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen2.js.diff b/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen2.js.diff new file mode 100644 index 0000000000..0d3d2a2c38 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendsClauseAlreadySeen2.js.diff @@ -0,0 +1,39 @@ +--- old.extendsClauseAlreadySeen2.js ++++ new.extendsClauseAlreadySeen2.js +@@= skipped -8, +8 lines =@@ + } + + //// [extendsClauseAlreadySeen2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- D.prototype.baz = function () { }; +- return D; +-}(C)); ++class C { ++} ++class D extends C extends C { ++ baz() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendsJavaScript.js.diff b/testdata/baselines/reference/submodule/compiler/extendsJavaScript.js.diff new file mode 100644 index 0000000000..8f41f31bfa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/extendsJavaScript.js.diff @@ -0,0 +1,13 @@ +--- old.extendsJavaScript.js ++++ new.extendsJavaScript.js +@@= skipped -12, +12 lines =@@ + /** + * @extends {SomeBase} + */ +-var MyClass = /** @class */ (function () { +- function MyClass() { +- } +- return MyClass; +-}()); ++class MyClass { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extendsUntypedModule.js.diff b/testdata/baselines/reference/submodule/compiler/extendsUntypedModule.js.diff index d056bffce9..0eb86c075c 100644 --- a/testdata/baselines/reference/submodule/compiler/extendsUntypedModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/extendsUntypedModule.js.diff @@ -1,11 +1,35 @@ --- old.extendsUntypedModule.js +++ new.extendsUntypedModule.js -@@= skipped -15, +15 lines =@@ +@@= skipped -13, +13 lines =@@ + + //// [a.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.A = void 0; -var foo_1 = require("foo"); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A; +-}(foo_1.default)); +const foo_1 = require("foo"); - class A extends foo_1.default { - } ++class A extends foo_1.default { ++} exports.A = A; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/extension.errors.txt b/testdata/baselines/reference/submodule/compiler/extension.errors.txt index 9b1d5d7f59..bb8a3221dd 100644 --- a/testdata/baselines/reference/submodule/compiler/extension.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/extension.errors.txt @@ -15,7 +15,7 @@ extension.ts(22,3): error TS2339: Property 'pe' does not exist on type 'C'. y; } - declare module M { + declare namespace M { export class C { ~ !!! error TS2300: Duplicate identifier 'C'. @@ -23,7 +23,7 @@ extension.ts(22,3): error TS2339: Property 'pe' does not exist on type 'C'. } } - declare module M { + declare namespace M { export extension class C { ~~~~~~ !!! error TS1128: Declaration or statement expected. diff --git a/testdata/baselines/reference/submodule/compiler/extension.js b/testdata/baselines/reference/submodule/compiler/extension.js index 0ab6c8d160..e4c7881afc 100644 --- a/testdata/baselines/reference/submodule/compiler/extension.js +++ b/testdata/baselines/reference/submodule/compiler/extension.js @@ -9,13 +9,13 @@ interface I { y; } -declare module M { +declare namespace M { export class C { public p:number; } } -declare module M { +declare namespace M { export extension class C { public pe:string; } diff --git a/testdata/baselines/reference/submodule/compiler/extension.symbols b/testdata/baselines/reference/submodule/compiler/extension.symbols index 56ea60ee49..7a565d5e6b 100644 --- a/testdata/baselines/reference/submodule/compiler/extension.symbols +++ b/testdata/baselines/reference/submodule/compiler/extension.symbols @@ -15,18 +15,18 @@ interface I { >y : Symbol(I.y, Decl(extension.ts, 4, 13)) } -declare module M { +declare namespace M { >M : Symbol(M, Decl(extension.ts, 6, 1), Decl(extension.ts, 12, 1)) export class C { ->C : Symbol(C, Decl(extension.ts, 8, 18)) +>C : Symbol(C, Decl(extension.ts, 8, 21)) public p:number; >p : Symbol(C.p, Decl(extension.ts, 9, 20)) } } -declare module M { +declare namespace M { >M : Symbol(M, Decl(extension.ts, 6, 1), Decl(extension.ts, 12, 1)) export extension class C { @@ -39,9 +39,9 @@ declare module M { var c=new M.C(); >c : Symbol(c, Decl(extension.ts, 20, 3)) ->M.C : Symbol(M.C, Decl(extension.ts, 8, 18)) +>M.C : Symbol(M.C, Decl(extension.ts, 8, 21)) >M : Symbol(M, Decl(extension.ts, 6, 1), Decl(extension.ts, 12, 1)) ->C : Symbol(M.C, Decl(extension.ts, 8, 18)) +>C : Symbol(M.C, Decl(extension.ts, 8, 21)) c.pe; >c : Symbol(c, Decl(extension.ts, 20, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/extension.types b/testdata/baselines/reference/submodule/compiler/extension.types index 6c858ae2c7..b5d1424de0 100644 --- a/testdata/baselines/reference/submodule/compiler/extension.types +++ b/testdata/baselines/reference/submodule/compiler/extension.types @@ -11,7 +11,7 @@ interface I { >y : any } -declare module M { +declare namespace M { >M : typeof M export class C { @@ -22,7 +22,7 @@ declare module M { } } -declare module M { +declare namespace M { >M : typeof M export extension class C { diff --git a/testdata/baselines/reference/submodule/compiler/externModule.js.diff b/testdata/baselines/reference/submodule/compiler/externModule.js.diff new file mode 100644 index 0000000000..aad019b3e5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/externModule.js.diff @@ -0,0 +1,17 @@ +--- old.externModule.js ++++ new.externModule.js +@@= skipped -44, +44 lines =@@ + declare; + module; + { +- var XDate = /** @class */ (function () { +- function XDate() { +- } +- return XDate; +- }()); +- export { XDate }; ++ export class XDate { ++ } + } + var d = new XDate(); + d.getDay(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/externModuleClobber.js b/testdata/baselines/reference/submodule/compiler/externModuleClobber.js index cfde9f462b..4b470f430e 100644 --- a/testdata/baselines/reference/submodule/compiler/externModuleClobber.js +++ b/testdata/baselines/reference/submodule/compiler/externModuleClobber.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/externModuleClobber.ts] //// //// [externModuleClobber.ts] -declare module EM { +declare namespace EM { export class Position { } export class EC { diff --git a/testdata/baselines/reference/submodule/compiler/externModuleClobber.symbols b/testdata/baselines/reference/submodule/compiler/externModuleClobber.symbols index 8d166a0104..b373edac17 100644 --- a/testdata/baselines/reference/submodule/compiler/externModuleClobber.symbols +++ b/testdata/baselines/reference/submodule/compiler/externModuleClobber.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/externModuleClobber.ts] //// === externModuleClobber.ts === -declare module EM { +declare namespace EM { >EM : Symbol(EM, Decl(externModuleClobber.ts, 0, 0)) export class Position { } ->Position : Symbol(Position, Decl(externModuleClobber.ts, 0, 19)) +>Position : Symbol(Position, Decl(externModuleClobber.ts, 0, 22)) export class EC { >EC : Symbol(EC, Decl(externModuleClobber.ts, 1, 26)) @@ -13,14 +13,14 @@ declare module EM { public getPosition() : EM.Position; >getPosition : Symbol(EC.getPosition, Decl(externModuleClobber.ts, 3, 18)) >EM : Symbol(EM, Decl(externModuleClobber.ts, 0, 0)) ->Position : Symbol(Position, Decl(externModuleClobber.ts, 0, 19)) +>Position : Symbol(Position, Decl(externModuleClobber.ts, 0, 22)) } } var x:EM.Position; >x : Symbol(x, Decl(externModuleClobber.ts, 8, 3)) >EM : Symbol(EM, Decl(externModuleClobber.ts, 0, 0)) ->Position : Symbol(EM.Position, Decl(externModuleClobber.ts, 0, 19)) +>Position : Symbol(EM.Position, Decl(externModuleClobber.ts, 0, 22)) var ec:EM.EC = new EM.EC(); >ec : Symbol(ec, Decl(externModuleClobber.ts, 9, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/externModuleClobber.types b/testdata/baselines/reference/submodule/compiler/externModuleClobber.types index cd83b8c544..a19e7a2bd3 100644 --- a/testdata/baselines/reference/submodule/compiler/externModuleClobber.types +++ b/testdata/baselines/reference/submodule/compiler/externModuleClobber.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/externModuleClobber.ts] //// === externModuleClobber.ts === -declare module EM { +declare namespace EM { >EM : typeof EM export class Position { } diff --git a/testdata/baselines/reference/submodule/compiler/externSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/externSyntax.errors.txt index 561dcf62ec..77f2412e92 100644 --- a/testdata/baselines/reference/submodule/compiler/externSyntax.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/externSyntax.errors.txt @@ -3,7 +3,7 @@ externSyntax.ts(8,20): error TS1183: An implementation cannot be declared in amb ==== externSyntax.ts (1 errors) ==== declare var v; - declare module M { + declare namespace M { export class D { public p; } diff --git a/testdata/baselines/reference/submodule/compiler/externSyntax.js b/testdata/baselines/reference/submodule/compiler/externSyntax.js index 55221e687c..e35cb9574e 100644 --- a/testdata/baselines/reference/submodule/compiler/externSyntax.js +++ b/testdata/baselines/reference/submodule/compiler/externSyntax.js @@ -2,7 +2,7 @@ //// [externSyntax.ts] declare var v; -declare module M { +declare namespace M { export class D { public p; } diff --git a/testdata/baselines/reference/submodule/compiler/externSyntax.symbols b/testdata/baselines/reference/submodule/compiler/externSyntax.symbols index 051390ae80..2419c3ecfe 100644 --- a/testdata/baselines/reference/submodule/compiler/externSyntax.symbols +++ b/testdata/baselines/reference/submodule/compiler/externSyntax.symbols @@ -4,11 +4,11 @@ declare var v; >v : Symbol(v, Decl(externSyntax.ts, 0, 11)) -declare module M { +declare namespace M { >M : Symbol(M, Decl(externSyntax.ts, 0, 14)) export class D { ->D : Symbol(D, Decl(externSyntax.ts, 1, 18)) +>D : Symbol(D, Decl(externSyntax.ts, 1, 21)) public p; >p : Symbol(D.p, Decl(externSyntax.ts, 2, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/externSyntax.types b/testdata/baselines/reference/submodule/compiler/externSyntax.types index da45f899cd..3eb59a8620 100644 --- a/testdata/baselines/reference/submodule/compiler/externSyntax.types +++ b/testdata/baselines/reference/submodule/compiler/externSyntax.types @@ -4,7 +4,7 @@ declare var v; >v : any -declare module M { +declare namespace M { >M : typeof M export class D { diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleExportingGenericClass.js.diff b/testdata/baselines/reference/submodule/compiler/externalModuleExportingGenericClass.js.diff index 33c84a2710..f9f2c92f98 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleExportingGenericClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/externalModuleExportingGenericClass.js.diff @@ -1,11 +1,17 @@ --- old.externalModuleExportingGenericClass.js +++ new.externalModuleExportingGenericClass.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [externalModuleExportingGenericClass_file0.js] "use strict"; - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + foo; - } ++} module.exports = C; //// [externalModuleExportingGenericClass_file1.js] "use strict"; diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleImmutableBindings.js.diff b/testdata/baselines/reference/submodule/compiler/externalModuleImmutableBindings.js.diff index e2cc255977..c630e05e71 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleImmutableBindings.js.diff +++ b/testdata/baselines/reference/submodule/compiler/externalModuleImmutableBindings.js.diff @@ -8,4 +8,47 @@ +const stuff = require("./f1"); var n = 'baz'; stuff.x = 0; - stuff['x'] = 1; \ No newline at end of file + stuff['x'] = 1; +@@= skipped -19, +19 lines =@@ + (stuff['blah'])++; + (stuff[n])++; + for (stuff.x in []) { } +-for (var _i = 0, _a = []; _i < _a.length; _i++) { +- stuff.x = _a[_i]; +-} ++for (stuff.x of []) { } + for (stuff['x'] in []) { } +-for (var _b = 0, _c = []; _b < _c.length; _b++) { +- stuff['x'] = _c[_b]; +-} ++for (stuff['x'] of []) { } + for (stuff.blah in []) { } +-for (var _d = 0, _e = []; _d < _e.length; _d++) { +- stuff.blah = _e[_d]; +-} ++for (stuff.blah of []) { } + for (stuff[n] in []) { } +-for (var _f = 0, _g = []; _f < _g.length; _f++) { +- stuff[n] = _g[_f]; +-} ++for (stuff[n] of []) { } + for ((stuff.x) in []) { } +-for (var _h = 0, _j = []; _h < _j.length; _h++) { +- (stuff.x) = _j[_h]; +-} ++for ((stuff.x) of []) { } + for ((stuff['x']) in []) { } +-for (var _k = 0, _l = []; _k < _l.length; _k++) { +- (stuff['x']) = _l[_k]; +-} ++for ((stuff['x']) of []) { } + for ((stuff.blah) in []) { } +-for (var _m = 0, _o = []; _m < _o.length; _m++) { +- (stuff.blah) = _o[_m]; +-} ++for ((stuff.blah) of []) { } + for ((stuff[n]) in []) { } +-for (var _p = 0, _q = []; _p < _q.length; _p++) { +- (stuff[n]) = _q[_p]; +-} ++for ((stuff[n]) of []) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleQualification.js.diff b/testdata/baselines/reference/submodule/compiler/externalModuleQualification.js.diff index b070e19d13..fdb7a1cdc5 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleQualification.js.diff +++ b/testdata/baselines/reference/submodule/compiler/externalModuleQualification.js.diff @@ -1,10 +1,27 @@ --- old.externalModuleQualification.js +++ new.externalModuleQualification.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.DiffEditor = exports.ID = void 0; exports.ID = "test"; - class DiffEditor { +-var DiffEditor = /** @class */ (function () { +- function DiffEditor(id) { +- if (id === void 0) { id = exports.ID; } ++class DiffEditor { + previousDiffAction; - constructor(id = exports.ID) { ++ constructor(id = exports.ID) { } - } \ No newline at end of file +- return DiffEditor; +-}()); ++} + exports.DiffEditor = DiffEditor; +-var NavigateAction = /** @class */ (function () { +- function NavigateAction() { ++class NavigateAction { ++ f(editor) { + } +- NavigateAction.prototype.f = function (editor) { +- }; +- return NavigateAction; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.js b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.js index 4ac2014bce..15b70f965d 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.js +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/externalModuleResolution.ts] //// //// [foo.d.ts] -declare module M1 { +declare namespace M1 { export var X:number; } export = M1 //// [foo.ts] -module M2 { +namespace M2 { export var Y = 1; } export = M2 diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.symbols b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.symbols index 893211af18..2764503254 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.symbols +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.symbols @@ -10,7 +10,7 @@ x.Y // .ts should be picked >Y : Symbol(x.Y, Decl(foo.ts, 1, 14)) === foo.ts === -module M2 { +namespace M2 { >M2 : Symbol(M2, Decl(foo.ts, 0, 0)) export var Y = 1; diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.types b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.types index 603a59abf0..ec96a758e1 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution.types +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution.types @@ -10,7 +10,7 @@ x.Y // .ts should be picked >Y : number === foo.ts === -module M2 { +namespace M2 { >M2 : typeof M2 export var Y = 1; diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.js b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.js index 7dfd23ce51..ed4fea1e7b 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.js +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/externalModuleResolution2.ts] //// //// [foo.ts] -module M2 { +namespace M2 { export var X = 1; } export = M2 //// [foo.d.ts] -declare module M1 { +declare namespace M1 { export var Y:number; } export = M1 diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.symbols b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.symbols index 35a938ec36..d9e7275482 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.symbols +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.symbols @@ -10,7 +10,7 @@ x.X // .ts should be picked >X : Symbol(x.X, Decl(foo.ts, 1, 14)) === foo.ts === -module M2 { +namespace M2 { >M2 : Symbol(M2, Decl(foo.ts, 0, 0)) export var X = 1; diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.types b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.types index d770f2697b..b05420c14c 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.types +++ b/testdata/baselines/reference/submodule/compiler/externalModuleResolution2.types @@ -10,7 +10,7 @@ x.X // .ts should be picked >X : number === foo.ts === -module M2 { +namespace M2 { >M2 : typeof M2 export var X = 1; diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.js b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.js index 47b09ef9ac..f6a475ce69 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.js +++ b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.js @@ -2,7 +2,7 @@ //// [externalModuleWithoutCompilerFlag1.ts] // Not on line 0 because we want to verify the error is placed in the appropriate location. - export module M { + export namespace M { } //// [externalModuleWithoutCompilerFlag1.js] diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.symbols b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.symbols index 4e2d79f4fa..7e17dc5da1 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.symbols +++ b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.symbols @@ -2,6 +2,6 @@ === externalModuleWithoutCompilerFlag1.ts === // Not on line 0 because we want to verify the error is placed in the appropriate location. - export module M { + export namespace M { >M : Symbol(M, Decl(externalModuleWithoutCompilerFlag1.ts, 0, 0)) } diff --git a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.types b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.types index c6d1da659e..fccd8e7faf 100644 --- a/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.types +++ b/testdata/baselines/reference/submodule/compiler/externalModuleWithoutCompilerFlag1.types @@ -3,5 +3,5 @@ === externalModuleWithoutCompilerFlag1.ts === // Not on line 0 because we want to verify the error is placed in the appropriate location. - export module M { + export namespace M { } diff --git a/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.js.diff b/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.js.diff new file mode 100644 index 0000000000..38390a36a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fallbackToBindingPatternForTypeInference.js.diff @@ -0,0 +1,31 @@ +--- old.fallbackToBindingPatternForTypeInference.js ++++ new.fallbackToBindingPatternForTypeInference.js +@@= skipped -9, +9 lines =@@ + + + //// [fallbackToBindingPatternForTypeInference.js] +-trans(function (_a) { +- var a = _a.a; +- return a; +-}); +-trans(function (_a) { +- var b = _a[0], c = _a[1]; +- return 'foo'; +-}); +-trans(function (_a) { +- var _b = _a.d, e = _b[0], f = _b[1]; +- return 'foo'; +-}); +-trans(function (_a) { +- var g = _a[0].g, h = _a[1].h; +- return 'foo'; +-}); +-trans(function (_a) { +- var a = _a.a, _b = _a.b, b = _b === void 0 ? 10 : _b; +- return a; +-}); ++trans(({ a }) => a); ++trans(([b, c]) => 'foo'); ++trans(({ d: [e, f] }) => 'foo'); ++trans(([{ g }, { h }]) => 'foo'); ++trans(({ a, b = 10 }) => a); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js index 56a6bd4457..ef0b6e4e03 100644 --- a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js +++ b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/fatArrowSelf.ts] //// //// [fatArrowSelf.ts] -module Events { +namespace Events { export interface ListenerCallback { (value:any):void; } @@ -11,7 +11,7 @@ module Events { } } -module Consumer { +namespace Consumer { class EventEmitterConsummer { constructor (private emitter: Events.EventEmitter) { } diff --git a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js.diff b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js.diff index f25d6019ef..cc3c7426f2 100644 --- a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js.diff +++ b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.js.diff @@ -1,10 +1,45 @@ --- old.fatArrowSelf.js +++ new.fatArrowSelf.js -@@= skipped -37, +37 lines =@@ +@@= skipped -28, +28 lines =@@ + //// [fatArrowSelf.js] + var Events; + (function (Events) { +- var EventEmitter = /** @class */ (function () { +- function EventEmitter() { ++ class EventEmitter { ++ addListener(type, listener) { + } +- EventEmitter.prototype.addListener = function (type, listener) { +- }; +- return EventEmitter; +- }()); ++ } + Events.EventEmitter = EventEmitter; + })(Events || (Events = {})); var Consumer; (function (Consumer) { - class EventEmitterConsummer { +- var EventEmitterConsummer = /** @class */ (function () { +- function EventEmitterConsummer(emitter) { ++ class EventEmitterConsummer { + emitter; - constructor(emitter) { ++ constructor(emitter) { this.emitter = emitter; - } \ No newline at end of file + } +- EventEmitterConsummer.prototype.register = function () { +- var _this = this; +- this.emitter.addListener('change', function (e) { +- _this.changed(); ++ register() { ++ this.emitter.addListener('change', (e) => { ++ this.changed(); + }); +- }; +- EventEmitterConsummer.prototype.changed = function () { +- }; +- return EventEmitterConsummer; +- }()); ++ } ++ changed() { ++ } ++ } + })(Consumer || (Consumer = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.symbols b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.symbols index 663c5148c6..7e864288d4 100644 --- a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.symbols +++ b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/fatArrowSelf.ts] //// === fatArrowSelf.ts === -module Events { +namespace Events { >Events : Symbol(Events, Decl(fatArrowSelf.ts, 0, 0)) export interface ListenerCallback { ->ListenerCallback : Symbol(ListenerCallback, Decl(fatArrowSelf.ts, 0, 15)) +>ListenerCallback : Symbol(ListenerCallback, Decl(fatArrowSelf.ts, 0, 18)) (value:any):void; >value : Symbol(value, Decl(fatArrowSelf.ts, 2, 9)) @@ -17,16 +17,16 @@ module Events { >addListener : Symbol(EventEmitter.addListener, Decl(fatArrowSelf.ts, 4, 31)) >type : Symbol(type, Decl(fatArrowSelf.ts, 5, 28)) >listener : Symbol(listener, Decl(fatArrowSelf.ts, 5, 40)) ->ListenerCallback : Symbol(ListenerCallback, Decl(fatArrowSelf.ts, 0, 15)) +>ListenerCallback : Symbol(ListenerCallback, Decl(fatArrowSelf.ts, 0, 18)) } } } -module Consumer { +namespace Consumer { >Consumer : Symbol(Consumer, Decl(fatArrowSelf.ts, 8, 1)) class EventEmitterConsummer { ->EventEmitterConsummer : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 17)) +>EventEmitterConsummer : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 20)) constructor (private emitter: Events.EventEmitter) { } >emitter : Symbol(EventEmitterConsummer.emitter, Decl(fatArrowSelf.ts, 12, 21)) @@ -39,14 +39,14 @@ module Consumer { this.emitter.addListener('change', (e) => { >this.emitter.addListener : Symbol(Events.EventEmitter.addListener, Decl(fatArrowSelf.ts, 4, 31)) >this.emitter : Symbol(EventEmitterConsummer.emitter, Decl(fatArrowSelf.ts, 12, 21)) ->this : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 17)) +>this : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 20)) >emitter : Symbol(EventEmitterConsummer.emitter, Decl(fatArrowSelf.ts, 12, 21)) >addListener : Symbol(Events.EventEmitter.addListener, Decl(fatArrowSelf.ts, 4, 31)) >e : Symbol(e, Decl(fatArrowSelf.ts, 15, 48)) this.changed(); >this.changed : Symbol(EventEmitterConsummer.changed, Decl(fatArrowSelf.ts, 18, 9)) ->this : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 17)) +>this : Symbol(EventEmitterConsummer, Decl(fatArrowSelf.ts, 10, 20)) >changed : Symbol(EventEmitterConsummer.changed, Decl(fatArrowSelf.ts, 18, 9)) }); diff --git a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.types b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.types index bb78e5f67d..b3e12dc7f3 100644 --- a/testdata/baselines/reference/submodule/compiler/fatArrowSelf.types +++ b/testdata/baselines/reference/submodule/compiler/fatArrowSelf.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/fatArrowSelf.ts] //// === fatArrowSelf.ts === -module Events { +namespace Events { >Events : typeof Events export interface ListenerCallback { @@ -19,7 +19,7 @@ module Events { } } -module Consumer { +namespace Consumer { >Consumer : typeof Consumer class EventEmitterConsummer { diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctions.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctions.js.diff new file mode 100644 index 0000000000..a94409e7c2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctions.js.diff @@ -0,0 +1,51 @@ +--- old.fatarrowfunctions.js ++++ new.fatarrowfunctions.js +@@= skipped -49, +49 lines =@@ + function foo(x) { + return x(); + } +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function () { return 0; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function (x, y, z) { return x + y + z; }); +-foo(function () { return 0; }); +-foo((function (x) { return x; })); +-foo(function (x) { return x * x; }); +-var y = function (x) { return x * x; }; +-var z = function (x) { return x * x; }; +-var w = function () { return 3; }; ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo(() => { return 0; }); ++foo((x, y, z) => x + y + z); ++foo((x, y, z) => x + y + z); ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo((x, y, z) => { return x + y + z; }); ++foo(() => { return 0; }); ++foo(((x) => x)); ++foo(x => x * x); ++var y = x => x * x; ++var z = (x) => x * x; ++var w = () => 3; + function ternaryTest(isWhile) { + var f = isWhile ? function (n) { return n > 0; } : function (n) { return n === 0; }; + } + var messenger = { + message: "Hello World", + start: function () { +- var _this = this; +- setTimeout(function () { _this.message.toString(); }, 3000); ++ setTimeout(() => { this.message.toString(); }, 3000); + } + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsErrors.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsErrors.js.diff index fe743429e8..c8c9a84c68 100644 --- a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsErrors.js.diff @@ -1,11 +1,41 @@ --- old.fatarrowfunctionsErrors.js +++ new.fatarrowfunctionsErrors.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + var x4= (...a: any[]) { }; //// [fatarrowfunctionsErrors.js] - foo((...Far) => { return 0; }); +-foo(function () { +- var Far = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- Far[_i] = arguments[_i]; +- } +- return 0; +-}); -foo((1), { return: 0 }); +-foo(function (x) { return x; }); +-foo(function (x) { +- if (x === void 0) { x = 0; } +- return x; +-}); ++foo((...Far) => { return 0; }); +foo((1), { return: 0, }); - foo((x) => { return x; }); - foo((x = 0) => { return x; }); - var y = x, number; \ No newline at end of file ++foo((x) => { return x; }); ++foo((x = 0) => { return x; }); + var y = x, number; + x * x; +-false ? (function () { return null; }) : null; ++false ? (() => null) : null; + // missing fatarrow +-var x1 = function () { }; +-var x2 = function (a) { }; +-var x3 = function (a) { }; +-var x4 = function () { +- var a = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- a[_i] = arguments[_i]; +- } +-}; ++var x1 = () => { }; ++var x2 = (a) => { }; ++var x3 = (a) => { }; ++var x4 = (...a) => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsInFunctionParameterDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsInFunctionParameterDefaults.js.diff new file mode 100644 index 0000000000..01a7bf87e3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsInFunctionParameterDefaults.js.diff @@ -0,0 +1,14 @@ +--- old.fatarrowfunctionsInFunctionParameterDefaults.js ++++ new.fatarrowfunctionsInFunctionParameterDefaults.js +@@= skipped -11, +11 lines =@@ + + + //// [fatarrowfunctionsInFunctionParameterDefaults.js] +-function fn(x, y) { +- var _this = this; +- if (x === void 0) { x = function () { return _this; }; } +- if (y === void 0) { y = x(); } ++function fn(x = () => this, y = x()) { + // should be 4 + return y; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.js.diff new file mode 100644 index 0000000000..6879aba653 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.js.diff @@ -0,0 +1,330 @@ +--- old.fatarrowfunctionsOptionalArgs.js ++++ new.fatarrowfunctionsOptionalArgs.js +@@= skipped -135, +135 lines =@@ + //// [fatarrowfunctionsOptionalArgs.js] + // valid + // no params +-(function () { return 1; }); +-// one param, no type +-(function (arg) { return 2; }); +-// one param, no type +-(function (arg) { return 2; }); ++() => 1; ++// one param, no type ++(arg) => 2; ++// one param, no type ++arg => 2; + // one param, no type with default value +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 3; +-}); ++(arg = 1) => 3; + // one param, no type, optional +-(function (arg) { return 4; }); ++(arg) => 4; + // typed param +-(function (arg) { return 5; }); ++(arg) => 5; + // typed param with default value +-(function (arg) { +- if (arg === void 0) { arg = 0; } +- return 6; +-}); ++(arg = 0) => 6; + // optional param +-(function (arg) { return 7; }); ++(arg) => 7; + // var arg param +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 8; +-}); ++(...arg) => 8; + // multiple arguments +-(function (arg1, arg2) { return 12; }); +-(function (arg1, arg2) { +- if (arg1 === void 0) { arg1 = 1; } +- if (arg2 === void 0) { arg2 = 3; } +- return 13; +-}); +-(function (arg1, arg2) { return 14; }); +-(function (arg1, arg2) { return 15; }); +-(function (arg1, arg2) { +- if (arg1 === void 0) { arg1 = 0; } +- if (arg2 === void 0) { arg2 = 1; } +- return 16; +-}); +-(function (arg1, arg2) { return 17; }); +-(function (arg1) { +- var arg2 = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arg2[_i - 1] = arguments[_i]; +- } +- return 18; +-}); +-(function (arg1, arg2) { return 19; }); ++(arg1, arg2) => 12; ++(arg1 = 1, arg2 = 3) => 13; ++(arg1, arg2) => 14; ++(arg1, arg2) => 15; ++(arg1 = 0, arg2 = 1) => 16; ++(arg1, arg2) => 17; ++(arg1, ...arg2) => 18; ++(arg1, arg2) => 19; + // in paren +-(function () { return 21; }); +-(function (arg) { return 22; }); +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 23; +-}); +-(function (arg) { return 24; }); +-(function (arg) { return 25; }); +-(function (arg) { +- if (arg === void 0) { arg = 0; } +- return 26; +-}); +-(function (arg) { return 27; }); +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 28; +-}); ++(() => 21); ++((arg) => 22); ++((arg = 1) => 23); ++((arg) => 24); ++((arg) => 25); ++((arg = 0) => 26); ++((arg) => 27); ++((...arg) => 28); + // in multiple paren +-((((function (arg) { return 32; })))); ++(((((arg) => { return 32; })))); + // in ternary exression +-false ? function () { return 41; } : null; +-false ? function (arg) { return 42; } : null; +-false ? function (arg) { +- if (arg === void 0) { arg = 1; } +- return 43; +-} : null; +-false ? function (arg) { return 44; } : null; +-false ? function (arg) { return 45; } : null; +-false ? function (arg) { return 46; } : null; +-false ? function (arg) { +- if (arg === void 0) { arg = 0; } +- return 47; +-} : null; +-false ? function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 48; +-} : null; ++false ? () => 41 : null; ++false ? (arg) => 42 : null; ++false ? (arg = 1) => 43 : null; ++false ? (arg) => 44 : null; ++false ? (arg) => 45 : null; ++false ? (arg) => 46 : null; ++false ? (arg = 0) => 47 : null; ++false ? (...arg) => 48 : null; + // in ternary exression within paren +-false ? (function () { return 51; }) : null; +-false ? (function (arg) { return 52; }) : null; +-false ? (function (arg) { +- if (arg === void 0) { arg = 1; } +- return 53; +-}) : null; +-false ? (function (arg) { return 54; }) : null; +-false ? (function (arg) { return 55; }) : null; +-false ? (function (arg) { return 56; }) : null; +-false ? (function (arg) { +- if (arg === void 0) { arg = 0; } +- return 57; +-}) : null; +-false ? (function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 58; +-}) : null; ++false ? (() => 51) : null; ++false ? ((arg) => 52) : null; ++false ? ((arg = 1) => 53) : null; ++false ? ((arg) => 54) : null; ++false ? ((arg) => 55) : null; ++false ? ((arg) => 56) : null; ++false ? ((arg = 0) => 57) : null; ++false ? ((...arg) => 58) : null; + // ternary exression's else clause +-false ? null : function () { return 61; }; +-false ? null : function (arg) { return 62; }; +-false ? null : function (arg) { +- if (arg === void 0) { arg = 1; } +- return 63; +-}; +-false ? null : function (arg) { return 64; }; +-false ? null : function (arg) { return 65; }; +-false ? null : function (arg) { return 66; }; +-false ? null : function (arg) { +- if (arg === void 0) { arg = 0; } +- return 67; +-}; +-false ? null : function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 68; +-}; ++false ? null : () => 61; ++false ? null : (arg) => 62; ++false ? null : (arg = 1) => 63; ++false ? null : (arg) => 64; ++false ? null : (arg) => 65; ++false ? null : (arg) => 66; ++false ? null : (arg = 0) => 67; ++false ? null : (...arg) => 68; + // nested ternary expressions +-(function (a) { return a; }) ? function (b) { return b; } : function (c) { return c; }; ++((a) => { return a; }) ? (b) => { return b; } : (c) => { return c; }; + //multiple levels +-(function (a) { return a; }); +-(function (b) { return function (c) { return 81; }; }); +-(function (c) { return function (d) { return 82; }; }); ++(a) => { return a; }; ++(b) => (c) => 81; ++(c) => (d) => 82; + // In Expressions +-(function (arg) { return 90; }) instanceof Function; +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 91; +-}) instanceof Function; +-(function (arg) { return 92; }) instanceof Function; +-(function (arg) { return 93; }) instanceof Function; +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 94; +-}) instanceof Function; +-(function (arg) { return 95; }) instanceof Function; +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 96; +-}) instanceof Function; +-'' + (function (arg) { return 100; }); +-(function (arg) { return 0; }) + '' + (function (arg) { return 101; }); +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 0; +-}) + '' + (function (arg) { +- if (arg === void 0) { arg = 2; } +- return 102; +-}); +-(function (arg) { return 0; }) + '' + (function (arg) { return 103; }); +-(function (arg) { return 0; }) + '' + (function (arg) { return 104; }); +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 0; +-}) + '' + (function (arg) { +- if (arg === void 0) { arg = 2; } +- return 105; +-}); +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 0; +-}) + '' + (function (arg) { +- if (arg === void 0) { arg = 2; } +- return 106; +-}); +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 0; +-}) + '' + (function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 107; +-}); +-(function (arg1, arg2) { return 0; }) + '' + (function (arg1, arg2) { return 108; }); +-(function (arg1) { +- var arg2 = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arg2[_i - 1] = arguments[_i]; +- } +- return 0; +-}) + '' + (function (arg1) { +- var arg2 = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- arg2[_i - 1] = arguments[_i]; +- } +- return 108; +-}); ++((arg) => 90) instanceof Function; ++((arg = 1) => 91) instanceof Function; ++((arg) => 92) instanceof Function; ++((arg) => 93) instanceof Function; ++((arg = 1) => 94) instanceof Function; ++((arg) => 95) instanceof Function; ++((...arg) => 96) instanceof Function; ++'' + ((arg) => 100); ++((arg) => 0) + '' + ((arg) => 101); ++((arg = 1) => 0) + '' + ((arg = 2) => 102); ++((arg) => 0) + '' + ((arg) => 103); ++((arg) => 0) + '' + ((arg) => 104); ++((arg = 1) => 0) + '' + ((arg = 2) => 105); ++((arg = 1) => 0) + '' + ((arg = 2) => 106); ++((...arg) => 0) + '' + ((...arg) => 107); ++((arg1, arg2) => 0) + '' + ((arg1, arg2) => 108); ++((arg1, ...arg2) => 0) + '' + ((arg1, ...arg2) => 108); + // Function Parameters +-function foo() { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +-} +-foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { ++function foo(...arg) { } ++foo((a) => 110, ((a) => 111), (a) => { + return 112; +-}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +- if (a === void 0) { a = 0; } +- return 116; +-}, function (a) { +- if (a === void 0) { a = 0; } +- return 117; +-}, function (a) { +- if (a === void 0) { a = 0; } +- return 118; +-}, function () { +- var a = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- a[_i] = arguments[_i]; +- } +- return 119; +-}, function (a, b) { +- if (b === void 0) { b = 0; } +- var c = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- c[_i - 2] = arguments[_i]; +- } +- return 120; +-}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); ++}, (a) => 113, (a, b) => 114, (a) => 115, (a = 0) => 116, (a = 0) => 117, (a = 0) => 118, (...a) => 119, (a, b = 0, ...c) => 120, (a) => (b) => (c) => 121, false ? (a) => 0 : (b) => 122); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.symbols.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.symbols.diff new file mode 100644 index 0000000000..c9a8b34468 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgs.symbols.diff @@ -0,0 +1,41 @@ +--- old.fatarrowfunctionsOptionalArgs.symbols ++++ new.fatarrowfunctionsOptionalArgs.symbols +@@= skipped -189, +189 lines =@@ + // In Expressions + ((arg) => 90) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 91, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((arg = 1) => 91) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 92, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((arg? ) => 92) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 93, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((arg: number) => 93) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 94, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((arg: number = 1) => 94) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 95, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((arg?: number) => 95) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 96, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + ((...arg: number[]) => 96) instanceof Function; + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 97, 2)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + '' + ((arg) => 100); + >arg : Symbol(arg, Decl(fatarrowfunctionsOptionalArgs.ts, 99, 7)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors1.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors1.js.diff new file mode 100644 index 0000000000..a8e9e3184b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors1.js.diff @@ -0,0 +1,38 @@ +--- old.fatarrowfunctionsOptionalArgsErrors1.js ++++ new.fatarrowfunctionsOptionalArgsErrors1.js +@@= skipped -9, +9 lines =@@ + (arg1 = 1, arg2) => 1; + + //// [fatarrowfunctionsOptionalArgsErrors1.js] +-(function (arg1, arg2) { return 101; }); +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 102; +-}); +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 103; +-}); +-(function () { +- var arg = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- arg[_i] = arguments[_i]; +- } +- return 104; +-}); ++(arg1, arg2) => 101; ++(...arg) => 102; ++(...arg) => 103; ++(...arg = []) => 104; + // Uninitialized parameter makes the initialized one required +-(function (arg1, arg2) { +- if (arg1 === void 0) { arg1 = 1; } +- return 1; +-}); ++(arg1 = 1, arg2) => 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors3.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors3.js.diff new file mode 100644 index 0000000000..511951b551 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors3.js.diff @@ -0,0 +1,14 @@ +--- old.fatarrowfunctionsOptionalArgsErrors3.js ++++ new.fatarrowfunctionsOptionalArgsErrors3.js +@@= skipped -4, +4 lines =@@ + + + //// [fatarrowfunctionsOptionalArgsErrors3.js] +-(function () { +- var = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- [_i] = arguments[_i]; +- } +- return 105; +-}); ++(...) => 105; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors4.js.diff b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors4.js.diff new file mode 100644 index 0000000000..6570cdd454 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fatarrowfunctionsOptionalArgsErrors4.js.diff @@ -0,0 +1,56 @@ +--- old.fatarrowfunctionsOptionalArgsErrors4.js ++++ new.fatarrowfunctionsOptionalArgsErrors4.js +@@= skipped -24, +24 lines =@@ + ); + + //// [fatarrowfunctionsOptionalArgsErrors4.js] +-false ? function (arg) { +- if (arg === void 0) { arg = 0; } +- return 47; +-} : null; +-false ? (function (arg) { +- if (arg === void 0) { arg = 0; } +- return 57; +-}) : null; +-false ? null : function (arg) { +- if (arg === void 0) { arg = 0; } +- return 67; +-}; +-(function (arg) { +- if (arg === void 0) { arg = 1; } +- return 0; +-}) + '' + (function (arg) { +- if (arg === void 0) { arg = 2; } +- return 106; +-}); +-foo(function (a) { return 110; }, (function (a) { return 111; }), function (a) { ++false ? (arg = 0) => 47 : null; ++false ? ((arg = 0) => 57) : null; ++false ? null : (arg = 0) => 67; ++((arg = 1) => 0) + '' + ((arg = 2) => 106); ++foo((a) => 110, ((a) => 111), (a) => { + return 112; +-}, function (a) { return 113; }, function (a, b) { return 114; }, function (a) { return 115; }, function (a) { +- if (a === void 0) { a = 0; } +- return 116; +-}, function (a) { +- if (a === void 0) { a = 0; } +- return 117; +-}, function (a) { +- if (a === void 0) { a = 0; } +- return 118; +-}, function () { +- var a = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- a[_i] = arguments[_i]; +- } +- return 119; +-}, function (a, b) { +- if (b === void 0) { b = 0; } +- var c = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- c[_i - 2] = arguments[_i]; +- } +- return 120; +-}, function (a) { return function (b) { return function (c) { return 121; }; }; }, false ? function (a) { return 0; } : function (b) { return 122; }); ++}, (a) => 113, (a, b) => 114, (a) => 115, (a = 0) => 116, (a = 0) => 117, (a = 0) => 118, (...a) => 119, (a, b = 0, ...c) => 120, (a) => (b) => (c) => 121, false ? (a) => 0 : (b) => 122); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fillInMissingTypeArgsOnConstructCalls.js.diff b/testdata/baselines/reference/submodule/compiler/fillInMissingTypeArgsOnConstructCalls.js.diff index 7bdca63aff..de82a1e7fc 100644 --- a/testdata/baselines/reference/submodule/compiler/fillInMissingTypeArgsOnConstructCalls.js.diff +++ b/testdata/baselines/reference/submodule/compiler/fillInMissingTypeArgsOnConstructCalls.js.diff @@ -1,9 +1,15 @@ --- old.fillInMissingTypeArgsOnConstructCalls.js +++ new.fillInMissingTypeArgsOnConstructCalls.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [fillInMissingTypeArgsOnConstructCalls.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + list; - } ++} var a = new A(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols.diff b/testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols.diff new file mode 100644 index 0000000000..89d15faadd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/findLast(target=esnext).symbols.diff @@ -0,0 +1,20 @@ +--- old.findLast(target=esnext).symbols ++++ new.findLast(target=esnext).symbols +@@= skipped -23, +23 lines =@@ + + new Uint8Array().findLast((item) => item === 0); + >new Uint8Array().findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) +->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more) ++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) + >findLast : Symbol(Uint8Array.findLast, Decl(lib.es2023.array.d.ts, --, --), Decl(lib.es2023.array.d.ts, --, --)) + >item : Symbol(item, Decl(findLast.ts, 3, 27)) + >item : Symbol(item, Decl(findLast.ts, 3, 27)) +@@= skipped -93, +93 lines =@@ + + new Uint8Array().findLastIndex((item) => item === 0); + >new Uint8Array().findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) +->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more) ++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) + >findLastIndex : Symbol(Uint8Array.findLastIndex, Decl(lib.es2023.array.d.ts, --, --)) + >item : Symbol(item, Decl(findLast.ts, 17, 32)) + >item : Symbol(item, Decl(findLast.ts, 17, 32)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.js.diff b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.js.diff index 7263dbe607..748efb9145 100644 --- a/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.js.diff +++ b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.js.diff @@ -5,6 +5,11 @@ //// [firstMatchRegExpMatchArray.js] -"use strict"; - const match = ''.match(/ /); +-var match = ''.match(/ /); ++const match = ''.match(/ /); if (match !== null) { - const foo = match[0]; \ No newline at end of file +- var foo = match[0]; +- var bar = match[1]; ++ const foo = match[0]; ++ const bar = match[1]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.symbols.diff new file mode 100644 index 0000000000..d632a393fe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.symbols.diff @@ -0,0 +1,13 @@ +--- old.firstMatchRegExpMatchArray.symbols ++++ new.firstMatchRegExpMatchArray.symbols +@@= skipped -2, +2 lines =@@ + === firstMatchRegExpMatchArray.ts === + const match = ''.match(/ /) + >match : Symbol(match, Decl(firstMatchRegExpMatchArray.ts, 0, 5)) +->''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) ++>match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) + + if (match !== null) { + >match : Symbol(match, Decl(firstMatchRegExpMatchArray.ts, 0, 5)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.types.diff b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.types.diff new file mode 100644 index 0000000000..bdeb0ab9d1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/firstMatchRegExpMatchArray.types.diff @@ -0,0 +1,14 @@ +--- old.firstMatchRegExpMatchArray.types ++++ new.firstMatchRegExpMatchArray.types +@@= skipped -3, +3 lines =@@ + const match = ''.match(/ /) + >match : RegExpMatchArray | null + >''.match(/ /) : RegExpMatchArray | null +->''.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>''.match : (regexp: string | RegExp) => RegExpMatchArray | null + >'' : "" +->match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } ++>match : (regexp: string | RegExp) => RegExpMatchArray | null + >/ / : RegExp + + if (match !== null) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly1.js.diff b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly1.js.diff new file mode 100644 index 0000000000..d281327d81 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly1.js.diff @@ -0,0 +1,10 @@ +--- old.fixingTypeParametersRepeatedly1.js ++++ new.fixingTypeParametersRepeatedly1.js +@@= skipped -9, +9 lines =@@ + g("", x => null, x => x.toLowerCase()); + + //// [fixingTypeParametersRepeatedly1.js] +-f("", function (x) { return null; }, function (x) { return x.toLowerCase(); }); +-g("", function (x) { return null; }, function (x) { return x.toLowerCase(); }); ++f("", x => null, x => x.toLowerCase()); ++g("", x => null, x => x.toLowerCase()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly2.js.diff b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly2.js.diff new file mode 100644 index 0000000000..78951ce81c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly2.js.diff @@ -0,0 +1,10 @@ +--- old.fixingTypeParametersRepeatedly2.js ++++ new.fixingTypeParametersRepeatedly2.js +@@= skipped -20, +20 lines =@@ + + //// [fixingTypeParametersRepeatedly2.js] + var derived; +-var result = foo(derived, function (d) { return d.toBase(); }); +-var result = bar(derived, function (d) { return d.toBase(); }); ++var result = foo(derived, d => d.toBase()); ++var result = bar(derived, d => d.toBase()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly3.js.diff b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly3.js.diff new file mode 100644 index 0000000000..419815bfa8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/fixingTypeParametersRepeatedly3.js.diff @@ -0,0 +1,10 @@ +--- old.fixingTypeParametersRepeatedly3.js ++++ new.fixingTypeParametersRepeatedly3.js +@@= skipped -20, +20 lines =@@ + + //// [fixingTypeParametersRepeatedly3.js] + var derived; +-var result = foo(derived, function (d) { return d.toBase(); }); +-var result2 = bar(derived, function (d) { return d.toBase(); }); ++var result = foo(derived, d => d.toBase()); ++var result2 = bar(derived, d => d.toBase()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/flatArrayNoExcessiveStackDepth.types.diff b/testdata/baselines/reference/submodule/compiler/flatArrayNoExcessiveStackDepth.types.diff new file mode 100644 index 0000000000..d528a7db53 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/flatArrayNoExcessiveStackDepth.types.diff @@ -0,0 +1,30 @@ +--- old.flatArrayNoExcessiveStackDepth.types ++++ new.flatArrayNoExcessiveStackDepth.types +@@= skipped -27, +27 lines =@@ + + if (typeof value !== "string") { + >typeof value !== "string" : boolean +->typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >value : unknown + >"string" : "string" + +@@= skipped -10, +10 lines =@@ + >"No" : "No" + } + const match = value.match(/anything/) || []; +->match : [] | RegExpMatchArray ++>match : RegExpMatchArray | [] + >value.match(/anything/) || [] : RegExpMatchArray | [] + >value.match(/anything/) : RegExpMatchArray | null + >value.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } +@@= skipped -10, +10 lines =@@ + >[] : [] + + const [, extracted] = match; +-> : undefined + >extracted : string +->match : [] | RegExpMatchArray ++>match : RegExpMatchArray | [] + + }; diff --git a/testdata/baselines/reference/submodule/compiler/flowControlTypeGuardThenSwitch.js.diff b/testdata/baselines/reference/submodule/compiler/flowControlTypeGuardThenSwitch.js.diff new file mode 100644 index 0000000000..ba60ec6257 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/flowControlTypeGuardThenSwitch.js.diff @@ -0,0 +1,20 @@ +--- old.flowControlTypeGuardThenSwitch.js ++++ new.flowControlTypeGuardThenSwitch.js +@@= skipped -46, +46 lines =@@ + function isBoth(x) { + return true; + } +-var foo = undefined; ++let foo = undefined; + if (isBoth(foo)) { + switch (foo.kind) { + case Kind.A: +- var myA = foo; // Should not be an error ++ const myA = foo; // Should not be an error + break; + case Kind.B: +- var myB = foo; ++ const myB = foo; + break; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/flowInFinally1.js.diff b/testdata/baselines/reference/submodule/compiler/flowInFinally1.js.diff new file mode 100644 index 0000000000..2150e5c144 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/flowInFinally1.js.diff @@ -0,0 +1,21 @@ +--- old.flowInFinally1.js ++++ new.flowInFinally1.js +@@= skipped -16, +16 lines =@@ + } + + //// [flowInFinally1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.method = function () { }; +- return A; +-}()); +-var a = null; ++class A { ++ constructor() { } ++ method() { } ++} ++let a = null; + try { + a = new A(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forAwaitForUnion.types.diff b/testdata/baselines/reference/submodule/compiler/forAwaitForUnion.types.diff index 4e80a00f7c..2955f6246a 100644 --- a/testdata/baselines/reference/submodule/compiler/forAwaitForUnion.types.diff +++ b/testdata/baselines/reference/submodule/compiler/forAwaitForUnion.types.diff @@ -5,7 +5,13 @@ === forAwaitForUnion.ts === async function f(source: Iterable | AsyncIterable) { ->f : (source: Iterable | AsyncIterable) => Promise +->source : Iterable | AsyncIterable +>f : (source: AsyncIterable | Iterable) => Promise - >source : AsyncIterable | Iterable ++>source : AsyncIterable | Iterable - for await (const x of source) { \ No newline at end of file + for await (const x of source) { + >x : Awaited +->source : Iterable | AsyncIterable ++>source : AsyncIterable | Iterable + } + } diff --git a/testdata/baselines/reference/submodule/compiler/forInModule.js b/testdata/baselines/reference/submodule/compiler/forInModule.js index 897dedf336..de658b57e6 100644 --- a/testdata/baselines/reference/submodule/compiler/forInModule.js +++ b/testdata/baselines/reference/submodule/compiler/forInModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/forInModule.ts] //// //// [forInModule.ts] -module Foo { +namespace Foo { for (var i = 0; i < 1; i++) { i+i; } diff --git a/testdata/baselines/reference/submodule/compiler/forInModule.symbols b/testdata/baselines/reference/submodule/compiler/forInModule.symbols index 13a9f2e989..c881802d4e 100644 --- a/testdata/baselines/reference/submodule/compiler/forInModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/forInModule.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/forInModule.ts] //// === forInModule.ts === -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(forInModule.ts, 0, 0)) for (var i = 0; i < 1; i++) { diff --git a/testdata/baselines/reference/submodule/compiler/forInModule.types b/testdata/baselines/reference/submodule/compiler/forInModule.types index 203ea8a993..6f54b9d673 100644 --- a/testdata/baselines/reference/submodule/compiler/forInModule.types +++ b/testdata/baselines/reference/submodule/compiler/forInModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/forInModule.ts] //// === forInModule.ts === -module Foo { +namespace Foo { >Foo : typeof Foo for (var i = 0; i < 1; i++) { diff --git a/testdata/baselines/reference/submodule/compiler/forInStrictNullChecksNoError.js.diff b/testdata/baselines/reference/submodule/compiler/forInStrictNullChecksNoError.js.diff new file mode 100644 index 0000000000..476a7bfe2e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/forInStrictNullChecksNoError.js.diff @@ -0,0 +1,11 @@ +--- old.forInStrictNullChecksNoError.js ++++ new.forInStrictNullChecksNoError.js +@@= skipped -9, +9 lines =@@ + + //// [forInStrictNullChecksNoError.js] + function f(x) { +- for (var key in x) { // 1 ++ for (const key in x) { // 1 + console.log(x[key]); // 2 + } + x["no"]; // should still error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forLoopEndingMultilineComments.js.diff b/testdata/baselines/reference/submodule/compiler/forLoopEndingMultilineComments.js.diff new file mode 100644 index 0000000000..98bb0ad5db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/forLoopEndingMultilineComments.js.diff @@ -0,0 +1,12 @@ +--- old.forLoopEndingMultilineComments.js ++++ new.forLoopEndingMultilineComments.js +@@= skipped -26, +26 lines =@@ + function consoleTestResultHandler(testResult) { + // needed to get colors to show up when passing through Grunt + void a; +- for (var _i = 0, a_1 = a; _i < a_1.length; _i++) { +- var q = a_1[_i]; ++ for (const q of a) { + void a; + /* eslint-disable no-console */ + if (a) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forLoopWithDestructuringDoesNotElideFollowingStatement.js.diff b/testdata/baselines/reference/submodule/compiler/forLoopWithDestructuringDoesNotElideFollowingStatement.js.diff new file mode 100644 index 0000000000..6f6d15575e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/forLoopWithDestructuringDoesNotElideFollowingStatement.js.diff @@ -0,0 +1,15 @@ +--- old.forLoopWithDestructuringDoesNotElideFollowingStatement.js ++++ new.forLoopWithDestructuringDoesNotElideFollowingStatement.js +@@= skipped -16, +16 lines =@@ + } + return t; + }; +-var array = [{ a: 0, b: 1 }]; +-for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { +- var _a = array_1[_i]; +- var a = _a.a, rest = __rest(_a, ["a"]); ++let array = [{ a: 0, b: 1 }]; ++for (let _a of array) { ++ let { a } = _a, rest = __rest(_a, ["a"]); + void a; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forOfStringConstituents.js.diff b/testdata/baselines/reference/submodule/compiler/forOfStringConstituents.js.diff new file mode 100644 index 0000000000..6709266433 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/forOfStringConstituents.js.diff @@ -0,0 +1,11 @@ +--- old.forOfStringConstituents.js ++++ new.forOfStringConstituents.js +@@= skipped -10, +10 lines =@@ + for (y of x.y); + + //// [forOfStringConstituents.js] +-for (var _i = 0, _a = x.y; _i < _a.length; _i++) { +- y = _a[_i]; ++for (y of x.y) + ; +-} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forOfTransformsExpression.js.diff b/testdata/baselines/reference/submodule/compiler/forOfTransformsExpression.js.diff new file mode 100644 index 0000000000..34e1d4c13c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/forOfTransformsExpression.js.diff @@ -0,0 +1,12 @@ +--- old.forOfTransformsExpression.js ++++ new.forOfTransformsExpression.js +@@= skipped -8, +8 lines =@@ + + //// [forOfTransformsExpression.js] + // https://github.com/Microsoft/TypeScript/issues/11024 +-var items = [{ name: "A" }, { name: "C" }, { name: "B" }]; +-for (var _i = 0, _a = items.sort(function (a, b) { return a.name.localeCompare(b.name); }); _i < _a.length; _i++) { +- var item = _a[_i]; ++let items = [{ name: "A" }, { name: "C" }, { name: "B" }]; ++for (var item of items.sort((a, b) => a.name.localeCompare(b.name))) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forwardRefInClassProperties.js.diff b/testdata/baselines/reference/submodule/compiler/forwardRefInClassProperties.js.diff index 512ed20ca3..23c4c0ed3f 100644 --- a/testdata/baselines/reference/submodule/compiler/forwardRefInClassProperties.js.diff +++ b/testdata/baselines/reference/submodule/compiler/forwardRefInClassProperties.js.diff @@ -4,16 +4,10 @@ //// [forwardRefInClassProperties.js] --let Test = (() => { -- class Test { -- constructor() { -- this._b = this._a; // undefined, no error/warning -- this._a = 3; -- } -- method() { -- let a = b; // Property 'b' is used before its initialization. -- let b = 3; -- } +-var Test = /** @class */ (function () { +- function Test() { +- this._b = this._a; // undefined, no error/warning +- this._a = 3; +class Test { + _b = this._a; // undefined, no error/warning + _a = 3; @@ -23,8 +17,12 @@ + let a = b; // Property 'b' is used before its initialization. + let b = 3; } +- Test.prototype.method = function () { +- var a = b; // Property 'b' is used before its initialization. +- var b = 3; +- }; - Test._B = Test._A; // undefined, no error/warning - Test._A = 3; - return Test; --})(); +-}()); +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=false).js.diff b/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=false).js.diff index e8ff4b3490..38c190bdcc 100644 --- a/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=false).js.diff +++ b/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=false).js.diff @@ -1,16 +1,27 @@ --- old.forwardRefInTypeDeclaration(strict=false).js +++ new.forwardRefInTypeDeclaration(strict=false).js -@@= skipped -34, +34 lines =@@ - const s3 = "x"; - const s4 = "x"; - const s5 = "x"; --let Cls2 = (() => { -- class Cls2 { +@@= skipped -29, +29 lines =@@ + + + //// [forwardRefInTypeDeclaration.js] +-var s1 = "x"; +-var s2 = "x"; +-var s3 = "x"; +-var s4 = "x"; +-var s5 = "x"; +-var Cls2 = /** @class */ (function () { +- function Cls2() { - } - Cls2.b = "b"; - return Cls2; --})(); +-}()); +-var obj2 = { d: 'd' }; ++const s1 = "x"; ++const s2 = "x"; ++const s3 = "x"; ++const s4 = "x"; ++const s5 = "x"; +class Cls2 { + static b = "b"; +} - const obj2 = { d: 'd' }; \ No newline at end of file ++const obj2 = { d: 'd' }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=true).js.diff b/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=true).js.diff index 76eeeaccd4..a511695491 100644 --- a/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=true).js.diff +++ b/testdata/baselines/reference/submodule/compiler/forwardRefInTypeDeclaration(strict=true).js.diff @@ -5,18 +5,24 @@ //// [forwardRefInTypeDeclaration.js] -"use strict"; - const s1 = "x"; - const s2 = "x"; - const s3 = "x"; - const s4 = "x"; - const s5 = "x"; --let Cls2 = (() => { -- class Cls2 { +-var s1 = "x"; +-var s2 = "x"; +-var s3 = "x"; +-var s4 = "x"; +-var s5 = "x"; +-var Cls2 = /** @class */ (function () { +- function Cls2() { - } - Cls2.b = "b"; - return Cls2; --})(); +-}()); +-var obj2 = { d: 'd' }; ++const s1 = "x"; ++const s2 = "x"; ++const s3 = "x"; ++const s4 = "x"; ++const s5 = "x"; +class Cls2 { + static b = "b"; +} - const obj2 = { d: 'd' }; \ No newline at end of file ++const obj2 = { d: 'd' }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/freshLiteralInference.js.diff b/testdata/baselines/reference/submodule/compiler/freshLiteralInference.js.diff new file mode 100644 index 0000000000..a72550fb4d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/freshLiteralInference.js.diff @@ -0,0 +1,18 @@ +--- old.freshLiteralInference.js ++++ new.freshLiteralInference.js +@@= skipped -17, +17 lines =@@ + + + //// [freshLiteralInference.js] +-var value = f1("1"); // regular "1" +-var x1 = value; // regular "1" +-var obj2 = f2({ value: "1" }); // { value: regular "1" } +-var x2 = obj2.value; // regular "1" +-var obj3 = f3({ value: "1" }); // before: { value: fresh "1" } +-var x3 = obj3.value; // before: string, after: "1" ++const value = f1("1"); // regular "1" ++let x1 = value; // regular "1" ++const obj2 = f2({ value: "1" }); // { value: regular "1" } ++let x2 = obj2.value; // regular "1" ++const obj3 = f3({ value: "1" }); // before: { value: fresh "1" } ++let x3 = obj3.value; // before: string, after: "1" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/freshLiteralTypesInIntersections.js.diff b/testdata/baselines/reference/submodule/compiler/freshLiteralTypesInIntersections.js.diff index 1a4ac6adf4..9e1cd72c3e 100644 --- a/testdata/baselines/reference/submodule/compiler/freshLiteralTypesInIntersections.js.diff +++ b/testdata/baselines/reference/submodule/compiler/freshLiteralTypesInIntersections.js.diff @@ -6,5 +6,6 @@ //// [freshLiteralTypesInIntersections.js] -"use strict"; -// Repro from #19657 - const q = func("x", ["x"]); +-var q = func("x", ["x"]); ++const q = func("x", ["x"]); q("x"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/funClodule.errors.txt b/testdata/baselines/reference/submodule/compiler/funClodule.errors.txt index 7bdb4d0311..c2bdb9ac4f 100644 --- a/testdata/baselines/reference/submodule/compiler/funClodule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/funClodule.errors.txt @@ -4,14 +4,14 @@ funClodule.ts(19,7): error TS2813: Class declaration cannot implement overload l ==== funClodule.ts (2 errors) ==== declare function foo(); - declare module foo { + declare namespace foo { export function x(): any; } declare class foo { } // Should error declare class foo2 { } - declare module foo2 { + declare namespace foo2 { export function x(): any; } declare function foo2(); // Should error @@ -21,7 +21,7 @@ funClodule.ts(19,7): error TS2813: Class declaration cannot implement overload l ~~~~ !!! error TS2814: Function with bodies can only merge with classes that are ambient. !!! related TS6506 funClodule.ts:19:7: Consider adding a 'declare' modifier to this class. - module foo3 { + namespace foo3 { export function x(): any { } } class foo3 { } // Should error diff --git a/testdata/baselines/reference/submodule/compiler/funClodule.js b/testdata/baselines/reference/submodule/compiler/funClodule.js index 62b945a962..e73f5ac324 100644 --- a/testdata/baselines/reference/submodule/compiler/funClodule.js +++ b/testdata/baselines/reference/submodule/compiler/funClodule.js @@ -2,21 +2,21 @@ //// [funClodule.ts] declare function foo(); -declare module foo { +declare namespace foo { export function x(): any; } declare class foo { } // Should error declare class foo2 { } -declare module foo2 { +declare namespace foo2 { export function x(): any; } declare function foo2(); // Should error function foo3() { } -module foo3 { +namespace foo3 { export function x(): any { } } class foo3 { } // Should error diff --git a/testdata/baselines/reference/submodule/compiler/funClodule.js.diff b/testdata/baselines/reference/submodule/compiler/funClodule.js.diff new file mode 100644 index 0000000000..48555cda77 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/funClodule.js.diff @@ -0,0 +1,13 @@ +--- old.funClodule.js ++++ new.funClodule.js +@@= skipped -26, +26 lines =@@ + function x() { } + foo3.x = x; + })(foo3 || (foo3 = {})); +-var foo3 = /** @class */ (function () { +- function foo3() { +- } +- return foo3; +-}()); // Should error ++class foo3 { ++} // Should error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/funClodule.symbols b/testdata/baselines/reference/submodule/compiler/funClodule.symbols index 3d5b751ec1..0009f3005d 100644 --- a/testdata/baselines/reference/submodule/compiler/funClodule.symbols +++ b/testdata/baselines/reference/submodule/compiler/funClodule.symbols @@ -4,11 +4,11 @@ declare function foo(); >foo : Symbol(foo, Decl(funClodule.ts, 0, 0), Decl(funClodule.ts, 0, 23), Decl(funClodule.ts, 3, 1)) -declare module foo { +declare namespace foo { >foo : Symbol(foo, Decl(funClodule.ts, 0, 0), Decl(funClodule.ts, 0, 23), Decl(funClodule.ts, 3, 1)) export function x(): any; ->x : Symbol(x, Decl(funClodule.ts, 1, 20)) +>x : Symbol(x, Decl(funClodule.ts, 1, 23)) } declare class foo { } // Should error >foo : Symbol(foo, Decl(funClodule.ts, 0, 0), Decl(funClodule.ts, 0, 23), Decl(funClodule.ts, 3, 1)) @@ -17,11 +17,11 @@ declare class foo { } // Should error declare class foo2 { } >foo2 : Symbol(foo2, Decl(funClodule.ts, 10, 1), Decl(funClodule.ts, 4, 21), Decl(funClodule.ts, 7, 22)) -declare module foo2 { +declare namespace foo2 { >foo2 : Symbol(foo2, Decl(funClodule.ts, 10, 1), Decl(funClodule.ts, 4, 21), Decl(funClodule.ts, 7, 22)) export function x(): any; ->x : Symbol(x, Decl(funClodule.ts, 8, 21)) +>x : Symbol(x, Decl(funClodule.ts, 8, 24)) } declare function foo2(); // Should error >foo2 : Symbol(foo2, Decl(funClodule.ts, 10, 1), Decl(funClodule.ts, 4, 21), Decl(funClodule.ts, 7, 22)) @@ -30,11 +30,11 @@ declare function foo2(); // Should error function foo3() { } >foo3 : Symbol(foo3, Decl(funClodule.ts, 11, 24), Decl(funClodule.ts, 14, 19), Decl(funClodule.ts, 17, 1)) -module foo3 { +namespace foo3 { >foo3 : Symbol(foo3, Decl(funClodule.ts, 11, 24), Decl(funClodule.ts, 14, 19), Decl(funClodule.ts, 17, 1)) export function x(): any { } ->x : Symbol(x, Decl(funClodule.ts, 15, 13)) +>x : Symbol(x, Decl(funClodule.ts, 15, 16)) } class foo3 { } // Should error >foo3 : Symbol(foo3, Decl(funClodule.ts, 11, 24), Decl(funClodule.ts, 14, 19), Decl(funClodule.ts, 17, 1)) diff --git a/testdata/baselines/reference/submodule/compiler/funClodule.types b/testdata/baselines/reference/submodule/compiler/funClodule.types index ec8730f4da..1a32eda822 100644 --- a/testdata/baselines/reference/submodule/compiler/funClodule.types +++ b/testdata/baselines/reference/submodule/compiler/funClodule.types @@ -4,7 +4,7 @@ declare function foo(); >foo : typeof foo -declare module foo { +declare namespace foo { >foo : typeof foo export function x(): any; @@ -17,7 +17,7 @@ declare class foo { } // Should error declare class foo2 { } >foo2 : foo2 -declare module foo2 { +declare namespace foo2 { >foo2 : typeof foo2 export function x(): any; @@ -30,7 +30,7 @@ declare function foo2(); // Should error function foo3() { } >foo3 : typeof foo3 -module foo3 { +namespace foo3 { >foo3 : typeof foo3 export function x(): any { } diff --git a/testdata/baselines/reference/submodule/compiler/funcdecl.js b/testdata/baselines/reference/submodule/compiler/funcdecl.js index fb5e6fbf1e..a1948fd39b 100644 --- a/testdata/baselines/reference/submodule/compiler/funcdecl.js +++ b/testdata/baselines/reference/submodule/compiler/funcdecl.js @@ -51,7 +51,7 @@ var withOverloadSignature = overload1; function f(n: () => void) { } -module m2 { +namespace m2 { export function foo(n: () => void ) { } diff --git a/testdata/baselines/reference/submodule/compiler/funcdecl.js.diff b/testdata/baselines/reference/submodule/compiler/funcdecl.js.diff new file mode 100644 index 0000000000..be5f6ee6b5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/funcdecl.js.diff @@ -0,0 +1,39 @@ +--- old.funcdecl.js ++++ new.funcdecl.js +@@= skipped -95, +95 lines =@@ + function withOptionalParams(a) { + } + var withOptionalParamsVar = withOptionalParams; +-function withInitializedParams(a, b0, b, c) { +- if (b === void 0) { b = 30; } +- if (c === void 0) { c = "string value"; } ++function withInitializedParams(a, b0, b = 30, c = "string value") { + } + var withInitializedParamsVar = withInitializedParams; +-function withOptionalInitializedParams(a, c) { +- if (c === void 0) { c = "hello string"; } ++function withOptionalInitializedParams(a, c = "hello string") { + } + var withOptionalInitializedParamsVar = withOptionalInitializedParams; +-function withRestParams(a) { +- var myRestParameter = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- myRestParameter[_i - 1] = arguments[_i]; +- } ++function withRestParams(a, ...myRestParameter) { + return myRestParameter; + } + var withRestParamsVar = withRestParams; +@@= skipped -28, +21 lines =@@ + } + m2.foo = foo; + })(m2 || (m2 = {})); +-m2.foo(function () { ++m2.foo(() => { + var b = 30; + return b; + }); +-var f2 = function () { ++var f2 = () => { + return "string"; + }; diff --git a/testdata/baselines/reference/submodule/compiler/funcdecl.symbols b/testdata/baselines/reference/submodule/compiler/funcdecl.symbols index bc9b7afec3..fa48d4be7d 100644 --- a/testdata/baselines/reference/submodule/compiler/funcdecl.symbols +++ b/testdata/baselines/reference/submodule/compiler/funcdecl.symbols @@ -114,20 +114,20 @@ function f(n: () => void) { } >f : Symbol(f, Decl(funcdecl.ts, 46, 38)) >n : Symbol(n, Decl(funcdecl.ts, 48, 11)) -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(funcdecl.ts, 48, 29)) export function foo(n: () => void ) { ->foo : Symbol(foo, Decl(funcdecl.ts, 50, 11)) +>foo : Symbol(foo, Decl(funcdecl.ts, 50, 14)) >n : Symbol(n, Decl(funcdecl.ts, 51, 24)) } } m2.foo(() => { ->m2.foo : Symbol(m2.foo, Decl(funcdecl.ts, 50, 11)) +>m2.foo : Symbol(m2.foo, Decl(funcdecl.ts, 50, 14)) >m2 : Symbol(m2, Decl(funcdecl.ts, 48, 29)) ->foo : Symbol(m2.foo, Decl(funcdecl.ts, 50, 11)) +>foo : Symbol(m2.foo, Decl(funcdecl.ts, 50, 14)) var b = 30; >b : Symbol(b, Decl(funcdecl.ts, 58, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/funcdecl.types b/testdata/baselines/reference/submodule/compiler/funcdecl.types index b4f78fe855..cc0029bd5f 100644 --- a/testdata/baselines/reference/submodule/compiler/funcdecl.types +++ b/testdata/baselines/reference/submodule/compiler/funcdecl.types @@ -121,7 +121,7 @@ function f(n: () => void) { } >f : (n: () => void) => void >n : () => void -module m2 { +namespace m2 { >m2 : typeof m2 export function foo(n: () => void ) { diff --git a/testdata/baselines/reference/submodule/compiler/functionAndPropertyNameConflict.js.diff b/testdata/baselines/reference/submodule/compiler/functionAndPropertyNameConflict.js.diff new file mode 100644 index 0000000000..fc4e5ea39f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionAndPropertyNameConflict.js.diff @@ -0,0 +1,24 @@ +--- old.functionAndPropertyNameConflict.js ++++ new.functionAndPropertyNameConflict.js +@@= skipped -8, +8 lines =@@ + } + + //// [functionAndPropertyNameConflict.js] +-var C65 = /** @class */ (function () { +- function C65() { ++class C65 { ++ aaaaa() { } ++ get aaaaa() { ++ return 1; + } +- C65.prototype.aaaaa = function () { }; +- Object.defineProperty(C65.prototype, "aaaaa", { +- get: function () { +- return 1; +- }, +- enumerable: false, +- configurable: true +- }); +- return C65; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionArgShadowing.js.diff b/testdata/baselines/reference/submodule/compiler/functionArgShadowing.js.diff index f4991e5f84..5f53c31a68 100644 --- a/testdata/baselines/reference/submodule/compiler/functionArgShadowing.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionArgShadowing.js.diff @@ -1,10 +1,40 @@ --- old.functionArgShadowing.js +++ new.functionArgShadowing.js -@@= skipped -27, +27 lines =@@ +@@= skipped -16, +16 lines =@@ + } + + //// [functionArgShadowing.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); ++class A { ++ foo() { } ++} ++class B { ++ bar() { } ++} + function foo(x) { + var x = new B(); x.bar(); // the property bar does not exist on a value of type A } - class C { +-var C = /** @class */ (function () { +- function C(p) { ++class C { + p; - constructor(p) { ++ constructor(p) { this.p = p; - var p; \ No newline at end of file + var p; + var n = p; + } +- return C; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=false).js.diff b/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=false).js.diff new file mode 100644 index 0000000000..86d004d1e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=false).js.diff @@ -0,0 +1,8 @@ +--- old.functionAssignabilityWithArrayLike01(strict=false).js ++++ new.functionAssignabilityWithArrayLike01(strict=false).js +@@= skipped -5, +5 lines =@@ + + //// [functionAssignabilityWithArrayLike01.js] + function func() { } +-var array = func; ++const array = func; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=true).js.diff b/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=true).js.diff index 54d593f8ce..893773fc73 100644 --- a/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=true).js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionAssignabilityWithArrayLike01(strict=true).js.diff @@ -6,4 +6,5 @@ //// [functionAssignabilityWithArrayLike01.js] -"use strict"; function func() { } - const array = func; \ No newline at end of file +-var array = func; ++const array = func; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/functionAssignment.js.diff new file mode 100644 index 0000000000..16f490bb01 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionAssignment.js.diff @@ -0,0 +1,16 @@ +--- old.functionAssignment.js ++++ new.functionAssignment.js +@@= skipped -47, +47 lines =@@ + var x = barbaz.get(function () { }); + }); + function f2(n) { } +-f2(function () { ++f2(() => { + var n = ''; + n = 4; + }); + function f3(a) { } + f3({ a: 0, b: 0 }); + function callb(a) { } +-callb(function (a) { a.length; }); ++callb((a) => { a.length; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionAssignment.symbols.diff b/testdata/baselines/reference/submodule/compiler/functionAssignment.symbols.diff new file mode 100644 index 0000000000..7746be1784 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionAssignment.symbols.diff @@ -0,0 +1,20 @@ +--- old.functionAssignment.symbols ++++ new.functionAssignment.symbols +@@= skipped -3, +3 lines =@@ + function f(n: Function) { } + >f : Symbol(f, Decl(functionAssignment.ts, 0, 0)) + >n : Symbol(n, Decl(functionAssignment.ts, 0, 11)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + f(function () { }); + >f : Symbol(f, Decl(functionAssignment.ts, 0, 0)) +@@= skipped -20, +20 lines =@@ + get(callback: Function): number; + >get : Symbol(baz.get, Decl(functionAssignment.ts, 7, 15)) + >callback : Symbol(callback, Decl(functionAssignment.ts, 8, 8)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + var barbaz: baz; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall10.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall10.js.diff new file mode 100644 index 0000000000..c3e70643c4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall10.js.diff @@ -0,0 +1,16 @@ +--- old.functionCall10.js ++++ new.functionCall10.js +@@= skipped -8, +8 lines =@@ + + + //// [functionCall10.js] +-function foo() { +- var a = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- a[_i] = arguments[_i]; +- } +-} ++function foo(...a) { } + ; + foo(0, 1); + foo('foo'); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall13.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall13.js.diff new file mode 100644 index 0000000000..d18c67fe3c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall13.js.diff @@ -0,0 +1,16 @@ +--- old.functionCall13.js ++++ new.functionCall13.js +@@= skipped -9, +9 lines =@@ + + + //// [functionCall13.js] +-function foo(a) { +- var b = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- b[_i - 1] = arguments[_i]; +- } +-} ++function foo(a, ...b) { } + foo('foo', 1); + foo('foo'); + foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall14.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall14.js.diff new file mode 100644 index 0000000000..48610b1c94 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall14.js.diff @@ -0,0 +1,16 @@ +--- old.functionCall14.js ++++ new.functionCall14.js +@@= skipped -9, +9 lines =@@ + + + //// [functionCall14.js] +-function foo(a) { +- var b = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- b[_i - 1] = arguments[_i]; +- } +-} ++function foo(a, ...b) { } + foo('foo', 1); + foo('foo'); + foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall15.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall15.js.diff new file mode 100644 index 0000000000..dc3f1d999e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall15.js.diff @@ -0,0 +1,13 @@ +--- old.functionCall15.js ++++ new.functionCall15.js +@@= skipped -3, +3 lines =@@ + function foo(a?:string, b?:number, ...b:number[]){} + + //// [functionCall15.js] +-function foo(a, b) { +- var b = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- b[_i - 2] = arguments[_i]; +- } +-} ++function foo(a, b, ...b) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall16.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall16.js.diff new file mode 100644 index 0000000000..f3e66dee18 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall16.js.diff @@ -0,0 +1,16 @@ +--- old.functionCall16.js ++++ new.functionCall16.js +@@= skipped -10, +10 lines =@@ + + + //// [functionCall16.js] +-function foo(a, b) { +- var c = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- c[_i - 2] = arguments[_i]; +- } +-} ++function foo(a, b, ...c) { } + foo('foo', 1); + foo('foo'); + foo('foo', 'bar'); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall17.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall17.js.diff new file mode 100644 index 0000000000..86aeb321ee --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionCall17.js.diff @@ -0,0 +1,16 @@ +--- old.functionCall17.js ++++ new.functionCall17.js +@@= skipped -10, +10 lines =@@ + + + //// [functionCall17.js] +-function foo(a, b, c) { +- var d = []; +- for (var _i = 3; _i < arguments.length; _i++) { +- d[_i - 3] = arguments[_i]; +- } +-} ++function foo(a, b, c, ...d) { } + foo('foo', 1); + foo('foo'); + foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall5.js b/testdata/baselines/reference/submodule/compiler/functionCall5.js index 95ec44d187..8686ca5b22 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall5.js +++ b/testdata/baselines/reference/submodule/compiler/functionCall5.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionCall5.ts] //// //// [functionCall5.ts] -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} function foo():m1.c1{return new m1.c1();}; var x = foo(); diff --git a/testdata/baselines/reference/submodule/compiler/functionCall5.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall5.js.diff index 3d399b9eec..75e6f9e6ca 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall5.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionCall5.js.diff @@ -1,10 +1,17 @@ --- old.functionCall5.js +++ new.functionCall5.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + //// [functionCall5.js] var m1; (function (m1) { - class c1 { +- var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +- }()); ++ class c1 { + a; - } ++ } m1.c1 = c1; - })(m1 || (m1 = {})); \ No newline at end of file + })(m1 || (m1 = {})); + function foo() { return new m1.c1(); } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall5.symbols b/testdata/baselines/reference/submodule/compiler/functionCall5.symbols index 1f461ce409..8280e4b173 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall5.symbols +++ b/testdata/baselines/reference/submodule/compiler/functionCall5.symbols @@ -1,20 +1,20 @@ //// [tests/cases/compiler/functionCall5.ts] //// === functionCall5.ts === -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} >m1 : Symbol(m1, Decl(functionCall5.ts, 0, 0)) ->c1 : Symbol(c1, Decl(functionCall5.ts, 0, 11)) ->a : Symbol(c1.a, Decl(functionCall5.ts, 0, 29)) +>c1 : Symbol(c1, Decl(functionCall5.ts, 0, 14)) +>a : Symbol(c1.a, Decl(functionCall5.ts, 0, 32)) function foo():m1.c1{return new m1.c1();}; ->foo : Symbol(foo, Decl(functionCall5.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall5.ts, 0, 45)) >m1 : Symbol(m1, Decl(functionCall5.ts, 0, 0)) ->c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 11)) ->m1.c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 11)) +>c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 14)) +>m1.c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 14)) >m1 : Symbol(m1, Decl(functionCall5.ts, 0, 0)) ->c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 11)) +>c1 : Symbol(m1.c1, Decl(functionCall5.ts, 0, 14)) var x = foo(); >x : Symbol(x, Decl(functionCall5.ts, 2, 3)) ->foo : Symbol(foo, Decl(functionCall5.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall5.ts, 0, 45)) diff --git a/testdata/baselines/reference/submodule/compiler/functionCall5.types b/testdata/baselines/reference/submodule/compiler/functionCall5.types index 0db71b93e0..a99870f330 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall5.types +++ b/testdata/baselines/reference/submodule/compiler/functionCall5.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionCall5.ts] //// === functionCall5.ts === -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} >m1 : typeof m1 >c1 : c1 >a : any diff --git a/testdata/baselines/reference/submodule/compiler/functionCall7.errors.txt b/testdata/baselines/reference/submodule/compiler/functionCall7.errors.txt index b1bfd014fd..2d0742857a 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall7.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/functionCall7.errors.txt @@ -4,7 +4,7 @@ functionCall7.ts(7,1): error TS2554: Expected 1 arguments, but got 0. ==== functionCall7.ts (3 errors) ==== - module m1 { export class c1 { public a; }} + namespace m1 { export class c1 { public a; }} function foo(a:m1.c1){ a.a = 1; }; var myC = new m1.c1(); foo(myC); diff --git a/testdata/baselines/reference/submodule/compiler/functionCall7.js b/testdata/baselines/reference/submodule/compiler/functionCall7.js index 6068b13625..8a4f617b71 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall7.js +++ b/testdata/baselines/reference/submodule/compiler/functionCall7.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionCall7.ts] //// //// [functionCall7.ts] -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} function foo(a:m1.c1){ a.a = 1; }; var myC = new m1.c1(); foo(myC); diff --git a/testdata/baselines/reference/submodule/compiler/functionCall7.js.diff b/testdata/baselines/reference/submodule/compiler/functionCall7.js.diff index 0a2d359937..af40e57716 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall7.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionCall7.js.diff @@ -1,10 +1,17 @@ --- old.functionCall7.js +++ new.functionCall7.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [functionCall7.js] var m1; (function (m1) { - class c1 { +- var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +- }()); ++ class c1 { + a; - } ++ } m1.c1 = c1; - })(m1 || (m1 = {})); \ No newline at end of file + })(m1 || (m1 = {})); + function foo(a) { a.a = 1; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionCall7.symbols b/testdata/baselines/reference/submodule/compiler/functionCall7.symbols index 8531084b8e..1c2e37beb3 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall7.symbols +++ b/testdata/baselines/reference/submodule/compiler/functionCall7.symbols @@ -1,38 +1,38 @@ //// [tests/cases/compiler/functionCall7.ts] //// === functionCall7.ts === -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} >m1 : Symbol(m1, Decl(functionCall7.ts, 0, 0)) ->c1 : Symbol(c1, Decl(functionCall7.ts, 0, 11)) ->a : Symbol(c1.a, Decl(functionCall7.ts, 0, 29)) +>c1 : Symbol(c1, Decl(functionCall7.ts, 0, 14)) +>a : Symbol(c1.a, Decl(functionCall7.ts, 0, 32)) function foo(a:m1.c1){ a.a = 1; }; ->foo : Symbol(foo, Decl(functionCall7.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall7.ts, 0, 45)) >a : Symbol(a, Decl(functionCall7.ts, 1, 13)) >m1 : Symbol(m1, Decl(functionCall7.ts, 0, 0)) ->c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 11)) ->a.a : Symbol(m1.c1.a, Decl(functionCall7.ts, 0, 29)) +>c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 14)) +>a.a : Symbol(m1.c1.a, Decl(functionCall7.ts, 0, 32)) >a : Symbol(a, Decl(functionCall7.ts, 1, 13)) ->a : Symbol(m1.c1.a, Decl(functionCall7.ts, 0, 29)) +>a : Symbol(m1.c1.a, Decl(functionCall7.ts, 0, 32)) var myC = new m1.c1(); >myC : Symbol(myC, Decl(functionCall7.ts, 2, 3)) ->m1.c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 11)) +>m1.c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 14)) >m1 : Symbol(m1, Decl(functionCall7.ts, 0, 0)) ->c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 11)) +>c1 : Symbol(m1.c1, Decl(functionCall7.ts, 0, 14)) foo(myC); ->foo : Symbol(foo, Decl(functionCall7.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall7.ts, 0, 45)) >myC : Symbol(myC, Decl(functionCall7.ts, 2, 3)) foo(myC, myC); ->foo : Symbol(foo, Decl(functionCall7.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall7.ts, 0, 45)) >myC : Symbol(myC, Decl(functionCall7.ts, 2, 3)) >myC : Symbol(myC, Decl(functionCall7.ts, 2, 3)) foo(4); ->foo : Symbol(foo, Decl(functionCall7.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall7.ts, 0, 45)) foo(); ->foo : Symbol(foo, Decl(functionCall7.ts, 0, 42)) +>foo : Symbol(foo, Decl(functionCall7.ts, 0, 45)) diff --git a/testdata/baselines/reference/submodule/compiler/functionCall7.types b/testdata/baselines/reference/submodule/compiler/functionCall7.types index 7d724c15ec..bc7fd7f066 100644 --- a/testdata/baselines/reference/submodule/compiler/functionCall7.types +++ b/testdata/baselines/reference/submodule/compiler/functionCall7.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionCall7.ts] //// === functionCall7.ts === -module m1 { export class c1 { public a; }} +namespace m1 { export class c1 { public a; }} >m1 : typeof m1 >c1 : c1 >a : any diff --git a/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.js.diff b/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.js.diff new file mode 100644 index 0000000000..d1caa97a67 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.js.diff @@ -0,0 +1,19 @@ +--- old.functionExpressionAndLambdaMatchesFunction.js ++++ new.functionExpressionAndLambdaMatchesFunction.js +@@= skipped -11, +11 lines =@@ + + + //// [functionExpressionAndLambdaMatchesFunction.js] +-var CDoc = /** @class */ (function () { +- function CDoc() { ++class CDoc { ++ constructor() { + function doSomething(a) { + } +- doSomething(function () { return undefined; }); ++ doSomething(() => undefined); + doSomething(function () { }); + } +- return CDoc; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.symbols.diff b/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.symbols.diff new file mode 100644 index 0000000000..20ec1ac551 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionExpressionAndLambdaMatchesFunction.symbols.diff @@ -0,0 +1,11 @@ +--- old.functionExpressionAndLambdaMatchesFunction.symbols ++++ new.functionExpressionAndLambdaMatchesFunction.symbols +@@= skipped -7, +7 lines =@@ + function doSomething(a: Function) { + >doSomething : Symbol(doSomething, Decl(functionExpressionAndLambdaMatchesFunction.ts, 1, 23)) + >a : Symbol(a, Decl(functionExpressionAndLambdaMatchesFunction.ts, 2, 29)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + doSomething(() => undefined); + >doSomething : Symbol(doSomething, Decl(functionExpressionAndLambdaMatchesFunction.ts, 1, 23)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionExpressionInWithBlock.js.diff b/testdata/baselines/reference/submodule/compiler/functionExpressionInWithBlock.js.diff new file mode 100644 index 0000000000..8248074f76 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionExpressionInWithBlock.js.diff @@ -0,0 +1,12 @@ +--- old.functionExpressionInWithBlock.js ++++ new.functionExpressionInWithBlock.js +@@= skipped -12, +12 lines =@@ + function x() { + with ({}) { + function f() { +- var _this = this; +- (function () { return _this; }); ++ () => this; + } + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionLikeInParameterInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/functionLikeInParameterInitializer.js.diff index 077530f91b..eba99d77ae 100644 --- a/testdata/baselines/reference/submodule/compiler/functionLikeInParameterInitializer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionLikeInParameterInitializer.js.diff @@ -1,13 +1,46 @@ --- old.functionLikeInParameterInitializer.js +++ new.functionLikeInParameterInitializer.js -@@= skipped -41, +41 lines =@@ - } +@@= skipped -28, +28 lines =@@ + exports.baz2 = baz2; + exports.baz3 = baz3; // error - function baz3(func = class { -- constructor() { -- this.x = foo; -- } +-function bar(func) { +- if (func === void 0) { func = function () { return foo; }; } +- var foo = "in"; +-} +-// error +-function baz1(func) { +- if (func === void 0) { func = { f: function () { return foo; } }; } +- var foo = "in"; +-} +-// error +-function baz2(func) { +- if (func === void 0) { func = function () { return foo; }; } +- var foo = "in"; +-} +-// error +-function baz3(func) { +- if (func === void 0) { func = /** @class */ (function () { +- function class_1() { +- this.x = foo; +- } +- return class_1; +- }()); } +- var foo = "in"; ++function bar(func = () => foo) { ++ let foo = "in"; ++} ++// error ++function baz1(func = { f() { return foo; } }) { ++ let foo = "in"; ++} ++// error ++function baz2(func = function () { return foo; }) { ++ let foo = "in"; ++} ++// error ++function baz3(func = class { + x = foo; - }) { - let foo = "in"; ++}) { ++ let foo = "in"; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.js b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.js index fe7587d0a1..991c37ef6b 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.js +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.js @@ -5,12 +5,12 @@ function foo(title: string) { var x = 10; } -module foo.Bar { +namespace foo.Bar { export function f() { } } -module foo.Baz { +namespace foo.Baz { export function g() { Bar.f(); } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols index 7df77b96f6..071a7a8c2a 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.symbols @@ -9,25 +9,25 @@ function foo(title: string) { >x : Symbol(x, Decl(functionMergedWithModule.ts, 1, 7)) } -module foo.Bar { +namespace foo.Bar { >foo : Symbol(foo, Decl(functionMergedWithModule.ts, 0, 0), Decl(functionMergedWithModule.ts, 2, 1), Decl(functionMergedWithModule.ts, 7, 1)) ->Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 11)) +>Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 14)) export function f() { ->f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 16)) +>f : Symbol(f, Decl(functionMergedWithModule.ts, 4, 19)) } } -module foo.Baz { +namespace foo.Baz { >foo : Symbol(foo, Decl(functionMergedWithModule.ts, 0, 0), Decl(functionMergedWithModule.ts, 2, 1), Decl(functionMergedWithModule.ts, 7, 1)) ->Baz : Symbol(Baz, Decl(functionMergedWithModule.ts, 9, 11)) +>Baz : Symbol(Baz, Decl(functionMergedWithModule.ts, 9, 14)) export function g() { ->g : Symbol(g, Decl(functionMergedWithModule.ts, 9, 16)) +>g : Symbol(g, Decl(functionMergedWithModule.ts, 9, 19)) Bar.f(); ->Bar.f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 16)) ->Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 11)) ->f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 16)) +>Bar.f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 19)) +>Bar : Symbol(Bar, Decl(functionMergedWithModule.ts, 4, 14)) +>f : Symbol(Bar.f, Decl(functionMergedWithModule.ts, 4, 19)) } } diff --git a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types index 76f03599da..806be90fe0 100644 --- a/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types +++ b/testdata/baselines/reference/submodule/compiler/functionMergedWithModule.types @@ -10,7 +10,7 @@ function foo(title: string) { >10 : 10 } -module foo.Bar { +namespace foo.Bar { >foo : typeof foo >Bar : typeof Bar @@ -19,7 +19,7 @@ module foo.Bar { } } -module foo.Baz { +namespace foo.Baz { >foo : typeof foo >Baz : typeof Baz diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloadAmbiguity1.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloadAmbiguity1.js.diff new file mode 100644 index 0000000000..944715628e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloadAmbiguity1.js.diff @@ -0,0 +1,11 @@ +--- old.functionOverloadAmbiguity1.js ++++ new.functionOverloadAmbiguity1.js +@@= skipped -13, +13 lines =@@ + + //// [functionOverloadAmbiguity1.js] + function callb(a) { } +-callb(function (a) { a.length; }); // error, chose first overload ++callb((a) => { a.length; }); // error, chose first overload + function callb2(a) { } +-callb2(function (a) { a.length; }); // ok, chose first overload ++callb2((a) => { a.length; }); // ok, chose first overload \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads43.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads43.js.diff new file mode 100644 index 0000000000..9876974c8d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads43.js.diff @@ -0,0 +1,12 @@ +--- old.functionOverloads43.js ++++ new.functionOverloads43.js +@@= skipped -14, +14 lines =@@ + var y = foo([{a: 100}]); + + //// [functionOverloads43.js] +-function foo(_a) { +- var x = _a[0]; ++function foo([x]) { + if (x) { + return x.a; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads44.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads44.js.diff new file mode 100644 index 0000000000..3cf886abc4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads44.js.diff @@ -0,0 +1,17 @@ +--- old.functionOverloads44.js ++++ new.functionOverloads44.js +@@= skipped -24, +24 lines =@@ + var y2 = foo2([{a: 100}]); + + //// [functionOverloads44.js] +-function foo1(_a) { +- var x = _a[0]; ++function foo1([x]) { + return undefined; + } +-function foo2(_a) { +- var x = _a[0]; ++function foo2([x]) { + return undefined; + } + var x1 = foo1([{ a: "str" }]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads44.types.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads44.types.diff index 4c1eae5d38..87b4554a34 100644 --- a/testdata/baselines/reference/submodule/compiler/functionOverloads44.types.diff +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads44.types.diff @@ -17,4 +17,15 @@ +>x : { a: string | number; } >a : string | number - return undefined; \ No newline at end of file + return undefined; +@@= skipped -27, +27 lines =@@ + >100 : 100 + + var x2 = foo2([{a: "str"}]); +->x2 : Dog | Cat +->foo2([{a: "str"}]) : Dog | Cat ++>x2 : Cat | Dog ++>foo2([{a: "str"}]) : Cat | Dog + >foo2 : { (bar: { a: number; }[]): Cat; (bar: { a: string; }[]): Cat | Dog; } + >[{a: "str"}] : { a: string; }[] + >{a: "str"} : { a: string; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads45.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads45.js.diff new file mode 100644 index 0000000000..32199333a8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads45.js.diff @@ -0,0 +1,17 @@ +--- old.functionOverloads45.js ++++ new.functionOverloads45.js +@@= skipped -24, +24 lines =@@ + var y2 = foo2([{a: 100}]); + + //// [functionOverloads45.js] +-function foo1(_a) { +- var x = _a[0]; ++function foo1([x]) { + return undefined; + } +-function foo2(_a) { +- var x = _a[0]; ++function foo2([x]) { + return undefined; + } + var x1 = foo1([{ a: "str" }]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads5.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads5.js.diff new file mode 100644 index 0000000000..a3938959fa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads5.js.diff @@ -0,0 +1,15 @@ +--- old.functionOverloads5.js ++++ new.functionOverloads5.js +@@= skipped -7, +7 lines =@@ + + + //// [functionOverloads5.js] +-var baz = /** @class */ (function () { +- function baz() { +- } +- baz.prototype.foo = function (bar) { }; +- return baz; +-}()); ++class baz { ++ foo(bar) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads6.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads6.js.diff new file mode 100644 index 0000000000..ed3d430a0c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads6.js.diff @@ -0,0 +1,15 @@ +--- old.functionOverloads6.js ++++ new.functionOverloads6.js +@@= skipped -8, +8 lines =@@ + + + //// [functionOverloads6.js] +-var foo = /** @class */ (function () { +- function foo() { +- } +- foo.fnOverload = function (foo) { }; +- return foo; +-}()); ++class foo { ++ static fnOverload(foo) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloads7.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloads7.js.diff new file mode 100644 index 0000000000..284556ebb4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloads7.js.diff @@ -0,0 +1,21 @@ +--- old.functionOverloads7.js ++++ new.functionOverloads7.js +@@= skipped -12, +12 lines =@@ + + + //// [functionOverloads7.js] +-var foo = /** @class */ (function () { +- function foo() { +- } +- foo.prototype.bar = function (foo) { return "foo"; }; +- foo.prototype.n = function () { ++class foo { ++ bar(foo) { return "foo"; } ++ n() { + var foo = this.bar(); + foo = this.bar("test"); +- }; +- return foo; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloadsOnGenericArity2.symbols.diff b/testdata/baselines/reference/submodule/compiler/functionOverloadsOnGenericArity2.symbols.diff new file mode 100644 index 0000000000..ef97209d32 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloadsOnGenericArity2.symbols.diff @@ -0,0 +1,9 @@ +--- old.functionOverloadsOnGenericArity2.symbols ++++ new.functionOverloadsOnGenericArity2.symbols +@@= skipped -17, +17 lines =@@ + >U : Symbol(U, Decl(functionOverloadsOnGenericArity2.ts, 3, 9)) + >T : Symbol(T, Decl(functionOverloadsOnGenericArity2.ts, 3, 11)) + >p : Symbol(p, Decl(functionOverloadsOnGenericArity2.ts, 3, 15)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloadsOutOfOrder.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloadsOutOfOrder.js.diff new file mode 100644 index 0000000000..29bd53252f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionOverloadsOutOfOrder.js.diff @@ -0,0 +1,32 @@ +--- old.functionOverloadsOutOfOrder.js ++++ new.functionOverloadsOutOfOrder.js +@@= skipped -17, +17 lines =@@ + } + + //// [functionOverloadsOutOfOrder.js] +-var d = /** @class */ (function () { +- function d() { +- } +- d.prototype.foo = function (ns) { +- return ns.toString(); +- }; +- return d; +-}()); +-var e = /** @class */ (function () { +- function e() { +- } +- e.prototype.foo = function (ns) { +- return ns.toString(); +- }; +- return e; +-}()); ++class d { ++ foo(ns) { ++ return ns.toString(); ++ } ++} ++class e { ++ foo(ns) { ++ return ns.toString(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionOverloadsRecursiveGenericReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/functionOverloadsRecursiveGenericReturnType.js.diff index 29fd0c4e1b..bd8ae046f7 100644 --- a/testdata/baselines/reference/submodule/compiler/functionOverloadsRecursiveGenericReturnType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionOverloadsRecursiveGenericReturnType.js.diff @@ -1,13 +1,30 @@ --- old.functionOverloadsRecursiveGenericReturnType.js +++ new.functionOverloadsRecursiveGenericReturnType.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [functionOverloadsRecursiveGenericReturnType.js] - class B { +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-function Choice() { +- var v_args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- v_args[_i] = arguments[_i]; +- } ++class B { + id; - } - class A { ++} ++class A { + GetEnumerator; - } - function Choice(...v_args) { - return new A(); \ No newline at end of file ++} ++function Choice(...v_args) { + return new A(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionParameterArityMismatch.js.diff b/testdata/baselines/reference/submodule/compiler/functionParameterArityMismatch.js.diff new file mode 100644 index 0000000000..e64199c76a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionParameterArityMismatch.js.diff @@ -0,0 +1,24 @@ +--- old.functionParameterArityMismatch.js ++++ new.functionParameterArityMismatch.js +@@= skipped -18, +18 lines =@@ + + + //// [functionParameterArityMismatch.js] +-var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { +- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { +- if (ar || !(i in from)) { +- if (!ar) ar = Array.prototype.slice.call(from, 0, i); +- ar[i] = from[i]; +- } +- } +- return to.concat(ar || Array.prototype.slice.call(from)); +-}; + f1(); + f1(1, 2); + f1(1, 2, 3, 4); +@@= skipped -16, +7 lines =@@ + f2(1, 2, 3); + f2(1, 2, 3, 4, 5); + f2(1, 2, 3, 4, 5, 6, 7); +-f2.apply(void 0, __spreadArray([1, 2, 3, 4, 5], [6, 7], false)); ++f2(1, 2, 3, 4, 5, ...[6, 7]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs.js.diff b/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs.js.diff index 0f191798b5..5a77ec0d46 100644 --- a/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs.js.diff @@ -1,13 +1,50 @@ --- old.functionSubtypingOfVarArgs.js +++ new.functionSubtypingOfVarArgs.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [functionSubtypingOfVarArgs.js] - class EventBase { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var EventBase = /** @class */ (function () { +- function EventBase() { - this._listeners = []; - } +- EventBase.prototype.add = function (listener) { ++class EventBase { + _listeners = []; - add(listener) { ++ add(listener) { this._listeners.push(listener); - } \ No newline at end of file +- }; +- return EventBase; +-}()); +-var StringEvent = /** @class */ (function (_super) { +- __extends(StringEvent, _super); +- function StringEvent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- StringEvent.prototype.add = function (listener) { +- _super.prototype.add.call(this, listener); +- }; +- return StringEvent; +-}(EventBase)); ++ } ++} ++class StringEvent extends EventBase { ++ add(listener) { ++ super.add(listener); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs2.js.diff b/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs2.js.diff index a65bccd207..7a312bec1c 100644 --- a/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionSubtypingOfVarArgs2.js.diff @@ -1,13 +1,50 @@ --- old.functionSubtypingOfVarArgs2.js +++ new.functionSubtypingOfVarArgs2.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [functionSubtypingOfVarArgs2.js] - class EventBase { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var EventBase = /** @class */ (function () { +- function EventBase() { - this._listeners = []; - } +- EventBase.prototype.add = function (listener) { ++class EventBase { + _listeners = []; - add(listener) { ++ add(listener) { this._listeners.push(listener); - } \ No newline at end of file +- }; +- return EventBase; +-}()); +-var StringEvent = /** @class */ (function (_super) { +- __extends(StringEvent, _super); +- function StringEvent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- StringEvent.prototype.add = function (listener) { +- _super.prototype.add.call(this, listener); +- }; +- return StringEvent; +-}(EventBase)); ++ } ++} ++class StringEvent extends EventBase { ++ add(listener) { ++ super.add(listener); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionType.symbols.diff b/testdata/baselines/reference/submodule/compiler/functionType.symbols.diff new file mode 100644 index 0000000000..5b87098959 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionType.symbols.diff @@ -0,0 +1,10 @@ +--- old.functionType.symbols ++++ new.functionType.symbols +@@= skipped -9, +9 lines =@@ + >apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --)) + + (new Function("return 5"))(); +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + diff --git a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.js b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.js index a380d6753f..ae70cd117d 100644 --- a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.js +++ b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionTypeArgumentArrayAssignment.ts] //// //// [functionTypeArgumentArrayAssignment.ts] -module test { +namespace test { interface Array { foo: T; length: number; diff --git a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.symbols b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.symbols index 34e94f36f4..235cb0bed7 100644 --- a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.symbols +++ b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/functionTypeArgumentArrayAssignment.ts] //// === functionTypeArgumentArrayAssignment.ts === -module test { +namespace test { >test : Symbol(test, Decl(functionTypeArgumentArrayAssignment.ts, 0, 0)) interface Array { ->Array : Symbol(Array, Decl(functionTypeArgumentArrayAssignment.ts, 0, 13)) +>Array : Symbol(Array, Decl(functionTypeArgumentArrayAssignment.ts, 0, 16)) >T : Symbol(T, Decl(functionTypeArgumentArrayAssignment.ts, 1, 20)) foo: T; diff --git a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.types b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.types index 7f65372814..e106510cfb 100644 --- a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.types +++ b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentArrayAssignment.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/functionTypeArgumentArrayAssignment.ts] //// === functionTypeArgumentArrayAssignment.ts === -module test { +namespace test { >test : typeof test interface Array { diff --git a/testdata/baselines/reference/submodule/compiler/functionTypeArgumentAssignmentCompat.js.diff b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentAssignmentCompat.js.diff new file mode 100644 index 0000000000..e92188c54b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionTypeArgumentAssignmentCompat.js.diff @@ -0,0 +1,11 @@ +--- old.functionTypeArgumentAssignmentCompat.js ++++ new.functionTypeArgumentAssignmentCompat.js +@@= skipped -16, +16 lines =@@ + + //// [functionTypeArgumentAssignmentCompat.js] + var f; +-var g = function () { return []; }; ++var g = () => []; + f = g; + var s = f("str").toUpperCase(); + console.log(s); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithAnyReturnTypeAndNoReturnExpression.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithAnyReturnTypeAndNoReturnExpression.js.diff new file mode 100644 index 0000000000..f5b4b90514 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithAnyReturnTypeAndNoReturnExpression.js.diff @@ -0,0 +1,10 @@ +--- old.functionWithAnyReturnTypeAndNoReturnExpression.js ++++ new.functionWithAnyReturnTypeAndNoReturnExpression.js +@@= skipped -8, +8 lines =@@ + //// [functionWithAnyReturnTypeAndNoReturnExpression.js] + // All should be allowed + function f() { } +-var f2 = function () { }; +-var f3 = function () { }; ++var f2 = () => { }; ++var f3 = () => { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements1.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements1.js.diff new file mode 100644 index 0000000000..3a49a35fff --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements1.js.diff @@ -0,0 +1,10 @@ +--- old.functionWithDefaultParameterWithNoStatements1.js ++++ new.functionWithDefaultParameterWithNoStatements1.js +@@= skipped -3, +3 lines =@@ + function foo(x = 0) { } + + //// [functionWithDefaultParameterWithNoStatements1.js] +-function foo(x) { +- if (x === void 0) { x = 0; } +-} ++function foo(x = 0) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements10.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements10.js.diff new file mode 100644 index 0000000000..b3b91a7c4c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements10.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements10.js ++++ new.functionWithDefaultParameterWithNoStatements10.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements10.js] +-function foo(a) { +- if (a === void 0) { a = [0]; } +-} +-function bar(a) { +- if (a === void 0) { a = [0]; } ++function foo(a = [0]) { } ++function bar(a = [0]) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements11.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements11.js.diff new file mode 100644 index 0000000000..823c9960bd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements11.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements11.js ++++ new.functionWithDefaultParameterWithNoStatements11.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements11.js] + var v; +-function foo(a) { +- if (a === void 0) { a = v[0]; } +-} +-function bar(a) { +- if (a === void 0) { a = v[0]; } ++function foo(a = v[0]) { } ++function bar(a = v[0]) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements12.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements12.js.diff new file mode 100644 index 0000000000..44d34efe68 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements12.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements12.js ++++ new.functionWithDefaultParameterWithNoStatements12.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements12.js] + var v; +-function foo(a) { +- if (a === void 0) { a = (v); } +-} +-function bar(a) { +- if (a === void 0) { a = (v); } ++function foo(a = (v)) { } ++function bar(a = (v)) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements13.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements13.js.diff new file mode 100644 index 0000000000..a56ebcd877 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements13.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements13.js ++++ new.functionWithDefaultParameterWithNoStatements13.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements13.js] + var v; +-function foo(a) { +- if (a === void 0) { a = [1 + 1]; } +-} +-function bar(a) { +- if (a === void 0) { a = [1 + 1]; } ++function foo(a = [1 + 1]) { } ++function bar(a = [1 + 1]) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements14.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements14.js.diff new file mode 100644 index 0000000000..019f4b4a26 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements14.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements14.js ++++ new.functionWithDefaultParameterWithNoStatements14.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements14.js] + var v; +-function foo(a) { +- if (a === void 0) { a = v[1 + 1]; } +-} +-function bar(a) { +- if (a === void 0) { a = v[1 + 1]; } ++function foo(a = v[1 + 1]) { } ++function bar(a = v[1 + 1]) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements15.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements15.js.diff new file mode 100644 index 0000000000..28fd2d6284 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements15.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements15.js ++++ new.functionWithDefaultParameterWithNoStatements15.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements15.js] + var v; +-function foo(a) { +- if (a === void 0) { a = (1 + 1); } +-} +-function bar(a) { +- if (a === void 0) { a = (1 + 1); } ++function foo(a = (1 + 1)) { } ++function bar(a = (1 + 1)) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements16.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements16.js.diff new file mode 100644 index 0000000000..0a79f83ab3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements16.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements16.js ++++ new.functionWithDefaultParameterWithNoStatements16.js +@@= skipped -9, +9 lines =@@ + + //// [functionWithDefaultParameterWithNoStatements16.js] + var v; +-function foo(a) { +- if (a === void 0) { a = bar(); } +-} +-function bar(a) { +- if (a === void 0) { a = foo(); } ++function foo(a = bar()) { } ++function bar(a = foo()) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements2.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements2.js.diff new file mode 100644 index 0000000000..7ce282a14d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements2.js.diff @@ -0,0 +1,10 @@ +--- old.functionWithDefaultParameterWithNoStatements2.js ++++ new.functionWithDefaultParameterWithNoStatements2.js +@@= skipped -4, +4 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements2.js] +-function foo(x) { +- if (x === void 0) { x = 0; } ++function foo(x = 0) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements3.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements3.js.diff new file mode 100644 index 0000000000..42f2f0f57b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements3.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements3.js ++++ new.functionWithDefaultParameterWithNoStatements3.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements3.js] +-function foo(a) { +- if (a === void 0) { a = ""; } +-} +-function bar(a) { +- if (a === void 0) { a = ""; } ++function foo(a = "") { } ++function bar(a = "") { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements4.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements4.js.diff new file mode 100644 index 0000000000..5022cdff4c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements4.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements4.js ++++ new.functionWithDefaultParameterWithNoStatements4.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements4.js] +-function foo(a) { +- if (a === void 0) { a = ""; } +-} +-function bar(a) { +- if (a === void 0) { a = ""; } ++function foo(a = ``) { } ++function bar(a = ``) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements5.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements5.js.diff new file mode 100644 index 0000000000..8078a38064 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements5.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements5.js ++++ new.functionWithDefaultParameterWithNoStatements5.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements5.js] +-function foo(a) { +- if (a === void 0) { a = 0; } +-} +-function bar(a) { +- if (a === void 0) { a = 0; } ++function foo(a = 0) { } ++function bar(a = 0) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements6.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements6.js.diff new file mode 100644 index 0000000000..538e20aa37 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements6.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements6.js ++++ new.functionWithDefaultParameterWithNoStatements6.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements6.js] +-function foo(a) { +- if (a === void 0) { a = true; } +-} +-function bar(a) { +- if (a === void 0) { a = true; } ++function foo(a = true) { } ++function bar(a = true) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements7.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements7.js.diff new file mode 100644 index 0000000000..658df30a02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements7.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements7.js ++++ new.functionWithDefaultParameterWithNoStatements7.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements7.js] +-function foo(a) { +- if (a === void 0) { a = false; } +-} +-function bar(a) { +- if (a === void 0) { a = false; } ++function foo(a = false) { } ++function bar(a = false) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements8.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements8.js.diff new file mode 100644 index 0000000000..6e259d26ce --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements8.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements8.js ++++ new.functionWithDefaultParameterWithNoStatements8.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements8.js] +-function foo(a) { +- if (a === void 0) { a = undefined; } +-} +-function bar(a) { +- if (a === void 0) { a = undefined; } ++function foo(a = undefined) { } ++function bar(a = undefined) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements9.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements9.js.diff new file mode 100644 index 0000000000..f6ca6a9c7b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithDefaultParameterWithNoStatements9.js.diff @@ -0,0 +1,14 @@ +--- old.functionWithDefaultParameterWithNoStatements9.js ++++ new.functionWithDefaultParameterWithNoStatements9.js +@@= skipped -6, +6 lines =@@ + } + + //// [functionWithDefaultParameterWithNoStatements9.js] +-function foo(a) { +- if (a === void 0) { a = console.log; } +-} +-function bar(a) { +- if (a === void 0) { a = console.log; } ++function foo(a = console.log) { } ++function bar(a = console.log) { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType1.types.diff b/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType1.types.diff new file mode 100644 index 0000000000..e841f2d322 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType1.types.diff @@ -0,0 +1,11 @@ +--- old.functionWithNoBestCommonType1.types ++++ new.functionWithNoBestCommonType1.types +@@= skipped -1, +1 lines =@@ + + === functionWithNoBestCommonType1.ts === + function foo() { +->foo : () => true | void ++>foo : () => void | true + + return true; + >true : true \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType2.types.diff b/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType2.types.diff new file mode 100644 index 0000000000..8632bc1d5a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionWithNoBestCommonType2.types.diff @@ -0,0 +1,13 @@ +--- old.functionWithNoBestCommonType2.types ++++ new.functionWithNoBestCommonType2.types +@@= skipped -1, +1 lines =@@ + + === functionWithNoBestCommonType2.ts === + var v = function () { +->v : () => true | void +->function () { return true; return bar();} : () => true | void ++>v : () => void | true ++>function () { return true; return bar();} : () => void | true + + return true; + >true : true \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionWithSameNameAsField.js.diff b/testdata/baselines/reference/submodule/compiler/functionWithSameNameAsField.js.diff index 4ca88776a6..ca01e78092 100644 --- a/testdata/baselines/reference/submodule/compiler/functionWithSameNameAsField.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionWithSameNameAsField.js.diff @@ -1,10 +1,20 @@ --- old.functionWithSameNameAsField.js +++ new.functionWithSameNameAsField.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + //// [functionWithSameNameAsField.js] - class TestProgressBar { +-var TestProgressBar = /** @class */ (function () { +- function TestProgressBar() { +- } +- TestProgressBar.prototype.total = function (total) { ++class TestProgressBar { + total; - total(total) { ++ total(total) { this.total = total; - return this; \ No newline at end of file + return this; +- }; +- return TestProgressBar; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionsInClassExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/functionsInClassExpressions.js.diff index 24b344deb4..1ce987002b 100644 --- a/testdata/baselines/reference/submodule/compiler/functionsInClassExpressions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/functionsInClassExpressions.js.diff @@ -1,18 +1,26 @@ --- old.functionsInClassExpressions.js +++ new.functionsInClassExpressions.js -@@= skipped -14, +14 lines =@@ +@@= skipped -12, +12 lines =@@ + } + //// [functionsInClassExpressions.js] - let Foo = class { - constructor() { +-var Foo = /** @class */ (function () { +- function class_1() { +- var _this = this; - this.bar = 0; -- this.inc = () => { -- this.bar++; +- this.inc = function () { +- _this.bar++; - }; ++let Foo = class { ++ constructor() { this.bar++; } +- class_1.prototype.m = function () { return this.bar; }; +- return class_1; +-}()); + bar = 0; + inc = () => { + this.bar++; + }; - m() { return this.bar; } - }; \ No newline at end of file ++ m() { return this.bar; } ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionsMissingReturnStatementsAndExpressions.js.diff b/testdata/baselines/reference/submodule/compiler/functionsMissingReturnStatementsAndExpressions.js.diff new file mode 100644 index 0000000000..1afd22bdc5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionsMissingReturnStatementsAndExpressions.js.diff @@ -0,0 +1,93 @@ +--- old.functionsMissingReturnStatementsAndExpressions.js ++++ new.functionsMissingReturnStatementsAndExpressions.js +@@= skipped -243, +243 lines =@@ + function f23() { + // Error; because `undefined | number` becomes `number` without strictNullChecks. + } +-var f30 = function () { ++const f30 = () => { + // Ok, contextual type for implicit return is `undefined` + }; +-var f31 = function () { ++const f31 = () => { + // Ok, contextual type for expression-less return is `undefined` + return; + }; +-var f32 = function () { ++const f32 = () => { + // Error, contextual type for implicit return isn't just `undefined` + }; +-var f33 = function () { ++const f33 = () => { + // Error, contextual type for expression-less return isn't just `undefined` + return; + }; +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "m1", { +- get: function () { +- // Errors; get accessors must return a value. +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "m2", { +- get: function () { +- // Permissible; returns undefined. +- return; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "m3", { +- get: function () { +- return "Okay, because this is a return expression."; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "m4", { +- get: function () { +- // Fine since this consists of a single throw statement. +- throw null; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "m5", { +- get: function () { +- // Not fine, since we can *only* consist of a single throw statement +- // if no return statements are present but we are a get accessor. +- throw null; +- throw undefined. +- ; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ get m1() { ++ // Errors; get accessors must return a value. ++ } ++ get m2() { ++ // Permissible; returns undefined. ++ return; ++ } ++ get m3() { ++ return "Okay, because this is a return expression."; ++ } ++ get m4() { ++ // Fine since this consists of a single throw statement. ++ throw null; ++ } ++ get m5() { ++ // Not fine, since we can *only* consist of a single throw statement ++ // if no return statements are present but we are a get accessor. ++ throw null; ++ throw undefined. ++ ; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols.diff b/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols.diff new file mode 100644 index 0000000000..1c3f16c453 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols.diff @@ -0,0 +1,56 @@ +--- old.functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols ++++ new.functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=false).symbols +@@= skipped -5, +5 lines =@@ + + if (Math.random() < 0.5) return true; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is always assignable to unknown. +@@= skipped -14, +14 lines =@@ + + if (Math.random() < 0.5) return true; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is always assignable to unknown. +@@= skipped -23, +23 lines =@@ + + if (Math.random() < 0.5) return {}; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to object when strictNullChecks is off. +@@= skipped -12, +12 lines =@@ + + if (Math.random() < 0.5) return { "foo": true }; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + >"foo" : Symbol("foo", Decl(functionsWithImplicitReturnTypeAssignableToUndefined.ts, 28, 37)) + +@@= skipped -13, +13 lines =@@ + + if (Math.random() < 0.5) return null; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to null when strictNullChecks is off. +@@= skipped -11, +11 lines =@@ + + if (Math.random() < 0.5) return "foo"; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to null when strictNullChecks is off. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols.diff b/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols.diff new file mode 100644 index 0000000000..204e753fe4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols.diff @@ -0,0 +1,56 @@ +--- old.functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols ++++ new.functionsWithImplicitReturnTypeAssignableToUndefined(strictnullchecks=true).symbols +@@= skipped -5, +5 lines =@@ + + if (Math.random() < 0.5) return true; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is always assignable to unknown. +@@= skipped -14, +14 lines =@@ + + if (Math.random() < 0.5) return true; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is always assignable to unknown. +@@= skipped -23, +23 lines =@@ + + if (Math.random() < 0.5) return {}; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to object when strictNullChecks is off. +@@= skipped -12, +12 lines =@@ + + if (Math.random() < 0.5) return { "foo": true }; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + >"foo" : Symbol("foo", Decl(functionsWithImplicitReturnTypeAssignableToUndefined.ts, 28, 37)) + +@@= skipped -13, +13 lines =@@ + + if (Math.random() < 0.5) return null; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to null when strictNullChecks is off. +@@= skipped -11, +11 lines =@@ + + if (Math.random() < 0.5) return "foo"; + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + // Implicit return, but undefined is assignable to null when strictNullChecks is off. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.js b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.js index 317683f190..0d2790be87 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.js @@ -5,7 +5,7 @@ interface A { // interface before module declaration (): B.C; // uses defined below class in module } declare function B(): B.C; // function merged with module -declare module B { +declare namespace B { export class C { // class defined in module } } diff --git a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.symbols index 052c470d78..c6a753442e 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.symbols @@ -6,22 +6,22 @@ interface A { // interface before module declaration (): B.C; // uses defined below class in module >B : Symbol(B, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 2, 1), Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 3, 26)) ->C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 18)) +>C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 21)) } declare function B(): B.C; // function merged with module >B : Symbol(B, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 2, 1), Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 3, 26)) >B : Symbol(B, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 2, 1), Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 3, 26)) ->C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 18)) +>C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 21)) -declare module B { +declare namespace B { >B : Symbol(B, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 2, 1), Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 3, 26)) export class C { // class defined in module ->C : Symbol(C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 18)) +>C : Symbol(C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 21)) } } new B.C(); ->B.C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 18)) +>B.C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 21)) >B : Symbol(B, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 2, 1), Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 3, 26)) ->C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 18)) +>C : Symbol(B.C, Decl(funduleExportedClassIsUsedBeforeDeclaration.ts, 4, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.types b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.types index 398f7adeb8..28843b773c 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/funduleExportedClassIsUsedBeforeDeclaration.types @@ -9,7 +9,7 @@ declare function B(): B.C; // function merged with module >B : typeof B >B : any -declare module B { +declare namespace B { >B : typeof B export class C { // class defined in module diff --git a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.js b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.js index e0ee7dd20a..fba189c67e 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.js +++ b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.js @@ -4,7 +4,7 @@ function fn() { return fn.n; } -module fn { +namespace fn { export var n = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.symbols b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.symbols index 72c56ba3f6..4658c8a195 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.symbols +++ b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.symbols @@ -9,7 +9,7 @@ function fn() { >fn : Symbol(fn, Decl(funduleOfFunctionWithoutReturnTypeAnnotation.ts, 0, 0), Decl(funduleOfFunctionWithoutReturnTypeAnnotation.ts, 2, 1)) >n : Symbol(fn.n, Decl(funduleOfFunctionWithoutReturnTypeAnnotation.ts, 4, 14)) } -module fn { +namespace fn { >fn : Symbol(fn, Decl(funduleOfFunctionWithoutReturnTypeAnnotation.ts, 0, 0), Decl(funduleOfFunctionWithoutReturnTypeAnnotation.ts, 2, 1)) export var n = 1; diff --git a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.types b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.types index c6a0d16a0a..e2fc0a017e 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.types +++ b/testdata/baselines/reference/submodule/compiler/funduleOfFunctionWithoutReturnTypeAnnotation.types @@ -9,7 +9,7 @@ function fn() { >fn : typeof fn >n : number } -module fn { +namespace fn { >fn : typeof fn export var n = 1; diff --git a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.errors.txt b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.errors.txt index f4c5c1be2c..7d957d34e5 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.errors.txt @@ -1,12 +1,12 @@ -funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +funduleSplitAcrossFiles_module.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== funduleSplitAcrossFiles_function.ts (0 errors) ==== function D() { } ==== funduleSplitAcrossFiles_module.ts (1 errors) ==== - module D { - ~ + namespace D { + ~ !!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var y = "hi"; } diff --git a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.js b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.js index bb59338a63..2b13b93880 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.js +++ b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.js @@ -4,7 +4,7 @@ function D() { } //// [funduleSplitAcrossFiles_module.ts] -module D { +namespace D { export var y = "hi"; } D.y; diff --git a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.symbols b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.symbols index 12c9100a76..1e7c475b89 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.symbols +++ b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.symbols @@ -5,7 +5,7 @@ function D() { } >D : Symbol(D, Decl(funduleSplitAcrossFiles_function.ts, 0, 0), Decl(funduleSplitAcrossFiles_module.ts, 0, 0)) === funduleSplitAcrossFiles_module.ts === -module D { +namespace D { >D : Symbol(D, Decl(funduleSplitAcrossFiles_function.ts, 0, 0), Decl(funduleSplitAcrossFiles_module.ts, 0, 0)) export var y = "hi"; diff --git a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.types b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.types index 25fa9f422b..714fddba4e 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.types +++ b/testdata/baselines/reference/submodule/compiler/funduleSplitAcrossFiles.types @@ -5,7 +5,7 @@ function D() { } >D : typeof D === funduleSplitAcrossFiles_module.ts === -module D { +namespace D { >D : typeof D export var y = "hi"; diff --git a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.js b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.js index ef06bdbc78..6b48ea1e67 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.js +++ b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.js @@ -2,7 +2,7 @@ //// [funduleUsedAcrossFileBoundary_file1.ts] declare function Q(value: T): string; -declare module Q { +declare namespace Q { interface Promise { foo: string; } diff --git a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.symbols b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.symbols index e20abc363f..f700c7e9f0 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.symbols +++ b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.symbols @@ -7,11 +7,11 @@ declare function Q(value: T): string; >value : Symbol(value, Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 22)) >T : Symbol(T, Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 19)) -declare module Q { +declare namespace Q { >Q : Symbol(Q, Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 0), Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 40)) interface Promise { ->Promise : Symbol(Promise, Decl(funduleUsedAcrossFileBoundary_file1.ts, 1, 18)) +>Promise : Symbol(Promise, Decl(funduleUsedAcrossFileBoundary_file1.ts, 1, 21)) >T : Symbol(T, Decl(funduleUsedAcrossFileBoundary_file1.ts, 2, 22)) foo: string; @@ -28,7 +28,7 @@ function promiseWithCancellation(promise: Q.Promise) { >T : Symbol(T, Decl(funduleUsedAcrossFileBoundary_file2.ts, 0, 33)) >promise : Symbol(promise, Decl(funduleUsedAcrossFileBoundary_file2.ts, 0, 36)) >Q : Symbol(Q, Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 0), Decl(funduleUsedAcrossFileBoundary_file1.ts, 0, 40)) ->Promise : Symbol(Q.Promise, Decl(funduleUsedAcrossFileBoundary_file1.ts, 1, 18)) +>Promise : Symbol(Q.Promise, Decl(funduleUsedAcrossFileBoundary_file1.ts, 1, 21)) >T : Symbol(T, Decl(funduleUsedAcrossFileBoundary_file2.ts, 0, 33)) var deferred = Q.defer(); // used to be an error diff --git a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.types b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.types index 18d60cc551..f35e5d3bf1 100644 --- a/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.types +++ b/testdata/baselines/reference/submodule/compiler/funduleUsedAcrossFileBoundary.types @@ -5,7 +5,7 @@ declare function Q(value: T): string; >Q : typeof Q >value : T -declare module Q { +declare namespace Q { >Q : typeof Q interface Promise { diff --git a/testdata/baselines/reference/submodule/compiler/fuzzy.errors.txt b/testdata/baselines/reference/submodule/compiler/fuzzy.errors.txt index 36e42284cd..d080afbb46 100644 --- a/testdata/baselines/reference/submodule/compiler/fuzzy.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/fuzzy.errors.txt @@ -7,7 +7,7 @@ fuzzy.ts(25,20): error TS2352: Conversion of type '{ oneI: this; }' to type 'R' ==== fuzzy.ts (3 errors) ==== - module M { + namespace M { export interface I { works:()=>R; alsoWorks:()=>R; diff --git a/testdata/baselines/reference/submodule/compiler/fuzzy.js b/testdata/baselines/reference/submodule/compiler/fuzzy.js index 8c452a5579..180ce335b5 100644 --- a/testdata/baselines/reference/submodule/compiler/fuzzy.js +++ b/testdata/baselines/reference/submodule/compiler/fuzzy.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/fuzzy.ts] //// //// [fuzzy.ts] -module M { +namespace M { export interface I { works:()=>R; alsoWorks:()=>R; diff --git a/testdata/baselines/reference/submodule/compiler/fuzzy.js.diff b/testdata/baselines/reference/submodule/compiler/fuzzy.js.diff index fb2dc48915..e97aed6418 100644 --- a/testdata/baselines/reference/submodule/compiler/fuzzy.js.diff +++ b/testdata/baselines/reference/submodule/compiler/fuzzy.js.diff @@ -1,10 +1,33 @@ --- old.fuzzy.js +++ new.fuzzy.js -@@= skipped -35, +35 lines =@@ +@@= skipped -34, +34 lines =@@ + //// [fuzzy.js] var M; (function (M) { - class C { +- var C = /** @class */ (function () { +- function C(x) { ++ class C { + x; - constructor(x) { ++ constructor(x) { this.x = x; - } \ No newline at end of file + } +- C.prototype.works = function () { ++ works() { + return ({ anything: 1 }); +- }; +- C.prototype.doesntWork = function () { ++ } ++ doesntWork() { + return { anything: 1, oneI: this }; +- }; +- C.prototype.worksToo = function () { ++ } ++ worksToo() { + return ({ oneI: this }); +- }; +- return C; +- }()); ++ } ++ } + M.C = C; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/fuzzy.symbols b/testdata/baselines/reference/submodule/compiler/fuzzy.symbols index 70700fb660..a1e10c7396 100644 --- a/testdata/baselines/reference/submodule/compiler/fuzzy.symbols +++ b/testdata/baselines/reference/submodule/compiler/fuzzy.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/fuzzy.ts] //// === fuzzy.ts === -module M { +namespace M { >M : Symbol(M, Decl(fuzzy.ts, 0, 0)) export interface I { ->I : Symbol(I, Decl(fuzzy.ts, 0, 10)) +>I : Symbol(I, Decl(fuzzy.ts, 0, 13)) works:()=>R; >works : Symbol(I.works, Decl(fuzzy.ts, 1, 24)) @@ -28,12 +28,12 @@ module M { oneI:I; >oneI : Symbol(R.oneI, Decl(fuzzy.ts, 8, 24)) ->I : Symbol(I, Decl(fuzzy.ts, 0, 10)) +>I : Symbol(I, Decl(fuzzy.ts, 0, 13)) } export class C implements I { >C : Symbol(C, Decl(fuzzy.ts, 10, 5)) ->I : Symbol(I, Decl(fuzzy.ts, 0, 10)) +>I : Symbol(I, Decl(fuzzy.ts, 0, 13)) constructor(public x:number) { >x : Symbol(C.x, Decl(fuzzy.ts, 13, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/fuzzy.types b/testdata/baselines/reference/submodule/compiler/fuzzy.types index 361f241943..eb58838d24 100644 --- a/testdata/baselines/reference/submodule/compiler/fuzzy.types +++ b/testdata/baselines/reference/submodule/compiler/fuzzy.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/fuzzy.ts] //// === fuzzy.ts === -module M { +namespace M { >M : typeof M export interface I { diff --git a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js index 61459b8c13..b670cf5846 100644 --- a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js +++ b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js @@ -6,7 +6,7 @@ class C { type: T; } -module M { +namespace M { export function f(x: typeof C) { return new x(); } diff --git a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js.diff b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js.diff index 13a003ed26..fe4a8713c2 100644 --- a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js.diff +++ b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.js.diff @@ -1,10 +1,19 @@ --- old.generativeRecursionWithTypeOf.js +++ new.generativeRecursionWithTypeOf.js -@@= skipped -14, +14 lines =@@ +@@= skipped -12, +12 lines =@@ + } + //// [generativeRecursionWithTypeOf.js] - class C { - static foo(x) { } +-var C = /** @class */ (function () { +- function C() { +- } +- C.foo = function (x) { }; +- return C; +-}()); ++class C { ++ static foo(x) { } + type; - } ++} var M; - (function (M) { \ No newline at end of file + (function (M) { + function f(x) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.symbols b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.symbols index 6525f8185a..9e7d134246 100644 --- a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.symbols +++ b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.symbols @@ -14,11 +14,11 @@ class C { >T : Symbol(T, Decl(generativeRecursionWithTypeOf.ts, 0, 8)) } -module M { +namespace M { >M : Symbol(M, Decl(generativeRecursionWithTypeOf.ts, 3, 1)) export function f(x: typeof C) { ->f : Symbol(f, Decl(generativeRecursionWithTypeOf.ts, 5, 10)) +>f : Symbol(f, Decl(generativeRecursionWithTypeOf.ts, 5, 13)) >x : Symbol(x, Decl(generativeRecursionWithTypeOf.ts, 6, 22)) >C : Symbol(C, Decl(generativeRecursionWithTypeOf.ts, 0, 0)) diff --git a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.types b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.types index 5253a9dd8a..188923e8f0 100644 --- a/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.types +++ b/testdata/baselines/reference/submodule/compiler/generativeRecursionWithTypeOf.types @@ -12,7 +12,7 @@ class C { >type : T } -module M { +namespace M { >M : typeof M export function f(x: typeof C) { diff --git a/testdata/baselines/reference/submodule/compiler/generatorTransformFinalLabel.js.diff b/testdata/baselines/reference/submodule/compiler/generatorTransformFinalLabel.js.diff index 738795692e..288db306b8 100644 --- a/testdata/baselines/reference/submodule/compiler/generatorTransformFinalLabel.js.diff +++ b/testdata/baselines/reference/submodule/compiler/generatorTransformFinalLabel.js.diff @@ -5,13 +5,19 @@ //// [generatorTransformFinalLabel.js] -function test(skip) { -- return __awaiter(this, void 0, void 0, function* () { -- if (!skip) { -- yield 1; -- } -- else { -- throw Error('test'); -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!!skip) return [3 /*break*/, 2]; +- return [4 /*yield*/, 1]; +- case 1: +- _a.sent(); +- return [3 /*break*/, 3]; +- case 2: throw Error('test'); +- case 3: return [2 /*return*/]; +- } +- }); - }); +async function test(skip) { + if (!skip) { diff --git a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.errors.txt b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.errors.txt index ea5c26f44a..13e9261574 100644 --- a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.errors.txt @@ -4,7 +4,7 @@ genericArgumentCallSigAssignmentCompat.ts(16,31): error TS2345: Argument of type ==== genericArgumentCallSigAssignmentCompat.ts (1 errors) ==== - module Underscore { + namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.js b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.js index 56bd39756d..d15140fd18 100644 --- a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.js +++ b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts] //// //// [genericArgumentCallSigAssignmentCompat.ts] -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.symbols b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.symbols index 0fe839767b..668b094ff9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts] //// === genericArgumentCallSigAssignmentCompat.ts === -module Underscore { +namespace Underscore { >Underscore : Symbol(Underscore, Decl(genericArgumentCallSigAssignmentCompat.ts, 0, 0)) export interface Iterator { ->Iterator : Symbol(Iterator, Decl(genericArgumentCallSigAssignmentCompat.ts, 0, 19)) +>Iterator : Symbol(Iterator, Decl(genericArgumentCallSigAssignmentCompat.ts, 0, 22)) >T : Symbol(T, Decl(genericArgumentCallSigAssignmentCompat.ts, 1, 30)) >U : Symbol(U, Decl(genericArgumentCallSigAssignmentCompat.ts, 1, 32)) @@ -26,7 +26,7 @@ module Underscore { >list : Symbol(list, Decl(genericArgumentCallSigAssignmentCompat.ts, 6, 15)) >T : Symbol(T, Decl(genericArgumentCallSigAssignmentCompat.ts, 6, 12)) >iterator : Symbol(iterator, Decl(genericArgumentCallSigAssignmentCompat.ts, 6, 25)) ->Iterator : Symbol(Iterator, Decl(genericArgumentCallSigAssignmentCompat.ts, 0, 19)) +>Iterator : Symbol(Iterator, Decl(genericArgumentCallSigAssignmentCompat.ts, 0, 22)) >T : Symbol(T, Decl(genericArgumentCallSigAssignmentCompat.ts, 6, 12)) >context : Symbol(context, Decl(genericArgumentCallSigAssignmentCompat.ts, 6, 58)) diff --git a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.types b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.types index 5f56da4851..a2b86c6dd0 100644 --- a/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.types +++ b/testdata/baselines/reference/submodule/compiler/genericArgumentCallSigAssignmentCompat.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericArgumentCallSigAssignmentCompat.ts] //// === genericArgumentCallSigAssignmentCompat.ts === -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; >value : T diff --git a/testdata/baselines/reference/submodule/compiler/genericArray1.js.diff b/testdata/baselines/reference/submodule/compiler/genericArray1.js.diff new file mode 100644 index 0000000000..2cd150080e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericArray1.js.diff @@ -0,0 +1,11 @@ +--- old.genericArray1.js ++++ new.genericArray1.js +@@= skipped -27, +27 lines =@@ + length: number; + } + */ +-var lengths = ["a", "b", "c"].map(function (x) { return x.length; }); ++var lengths = ["a", "b", "c"].map(x => x.length); + + + //// [genericArray1.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericArrayAssignmentCompatErrors.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericArrayAssignmentCompatErrors.symbols.diff new file mode 100644 index 0000000000..bc97a13bbc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericArrayAssignmentCompatErrors.symbols.diff @@ -0,0 +1,29 @@ +--- old.genericArrayAssignmentCompatErrors.symbols ++++ new.genericArrayAssignmentCompatErrors.symbols +@@= skipped -2, +2 lines =@@ + === genericArrayAssignmentCompatErrors.ts === + var myCars=new Array(); + >myCars : Symbol(myCars, Decl(genericArrayAssignmentCompatErrors.ts, 0, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars2 = new []; + >myCars2 : Symbol(myCars2, Decl(genericArrayAssignmentCompatErrors.ts, 1, 3)) + + var myCars3 = new Array({}); + >myCars3 : Symbol(myCars3, Decl(genericArrayAssignmentCompatErrors.ts, 2, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars4: Array; // error + >myCars4 : Symbol(myCars4, Decl(genericArrayAssignmentCompatErrors.ts, 3, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var myCars5: Array[]; + >myCars5 : Symbol(myCars5, Decl(genericArrayAssignmentCompatErrors.ts, 4, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + myCars = myCars2; + >myCars : Symbol(myCars, Decl(genericArrayAssignmentCompatErrors.ts, 0, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.errors.txt.diff new file mode 100644 index 0000000000..750bdec847 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.genericArrayExtenstions.errors.txt ++++ new.genericArrayExtenstions.errors.txt +@@= skipped -0, +0 lines =@@ + genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. +- Type 'ObservableArray' is missing the following properties from type 'T[]': length, pop, push, join, and 24 more. ++ Type 'ObservableArray' is missing the following properties from type 'T[]': length, pop, push, join, and 15 more. + + + ==== genericArrayExtenstions.ts (1 errors) ==== + export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray + ~~~~~~~~~~~~~~~ + !!! error TS2420: Class 'ObservableArray' incorrectly implements interface 'T[]'. +-!!! error TS2420: Type 'ObservableArray' is missing the following properties from type 'T[]': length, pop, push, join, and 24 more. ++!!! error TS2420: Type 'ObservableArray' is missing the following properties from type 'T[]': length, pop, push, join, and 15 more. + concat(...items: U[]): T[]; + concat(...items: T[]): T[]; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.symbols.diff new file mode 100644 index 0000000000..2bf2511a59 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericArrayExtenstions.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericArrayExtenstions.symbols ++++ new.genericArrayExtenstions.symbols +@@= skipped -3, +3 lines =@@ + export declare class ObservableArray implements Array { // MS.Entertainment.ObservableArray + >ObservableArray : Symbol(ObservableArray, Decl(genericArrayExtenstions.ts, 0, 0)) + >T : Symbol(T, Decl(genericArrayExtenstions.ts, 0, 37)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(genericArrayExtenstions.ts, 0, 37)) + + concat(...items: U[]): T[]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericArrayWithoutTypeAnnotation.js.diff b/testdata/baselines/reference/submodule/compiler/genericArrayWithoutTypeAnnotation.js.diff new file mode 100644 index 0000000000..054ab5e3c0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericArrayWithoutTypeAnnotation.js.diff @@ -0,0 +1,16 @@ +--- old.genericArrayWithoutTypeAnnotation.js ++++ new.genericArrayWithoutTypeAnnotation.js +@@= skipped -9, +9 lines =@@ + + + //// [genericArrayWithoutTypeAnnotation.js] +-var Bar = /** @class */ (function () { +- function Bar() { ++class Bar { ++ getBar(foo) { + } +- Bar.prototype.getBar = function (foo) { +- }; +- return Bar; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericAssignmentCompatWithInterfaces1.js.diff b/testdata/baselines/reference/submodule/compiler/genericAssignmentCompatWithInterfaces1.js.diff new file mode 100644 index 0000000000..2a618a71d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericAssignmentCompatWithInterfaces1.js.diff @@ -0,0 +1,18 @@ +--- old.genericAssignmentCompatWithInterfaces1.js ++++ new.genericAssignmentCompatWithInterfaces1.js +@@= skipped -21, +21 lines =@@ + + + //// [genericAssignmentCompatWithInterfaces1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.compareTo = function (other) { return 1; }; +- return A; +-}()); ++class A { ++ compareTo(other) { return 1; } ++} + var z = { x: new A() }; + var a1 = { x: new A() }; + var a2 = function () { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty.js.diff b/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty.js.diff index 629184eaa4..c8321af2f9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty.js.diff @@ -1,11 +1,45 @@ --- old.genericBaseClassLiteralProperty.js +++ new.genericBaseClassLiteralProperty.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + } //// [genericBaseClassLiteralProperty.js] - class BaseClass { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var BaseClass = /** @class */ (function () { +- function BaseClass() { +- } +- return BaseClass; +-}()); +-var SubClass = /** @class */ (function (_super) { +- __extends(SubClass, _super); +- function SubClass() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- SubClass.prototype.Error = function () { ++class BaseClass { + _getValue1; + _getValue2; - } - class SubClass extends BaseClass { - Error() { \ No newline at end of file ++} ++class SubClass extends BaseClass { ++ Error() { + var x = this._getValue1(); + var y = this._getValue2(); +- }; +- return SubClass; +-}(BaseClass)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty2.js.diff b/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty2.js.diff index d25e49f121..41889e557c 100644 --- a/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericBaseClassLiteralProperty2.js.diff @@ -1,10 +1,52 @@ --- old.genericBaseClassLiteralProperty2.js +++ new.genericBaseClassLiteralProperty2.js -@@= skipped -20, +20 lines =@@ - class CollectionItem2 { - } - class BaseCollection2 { +@@= skipped -17, +17 lines =@@ + + + //// [genericBaseClassLiteralProperty2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var CollectionItem2 = /** @class */ (function () { +- function CollectionItem2() { +- } +- return CollectionItem2; +-}()); +-var BaseCollection2 = /** @class */ (function () { +- function BaseCollection2() { ++class CollectionItem2 { ++} ++class BaseCollection2 { + _itemsByKey; - constructor() { ++ constructor() { this._itemsByKey = {}; - } \ No newline at end of file + } +- return BaseCollection2; +-}()); +-var DataView2 = /** @class */ (function (_super) { +- __extends(DataView2, _super); +- function DataView2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- DataView2.prototype.fillItems = function (item) { ++} ++class DataView2 extends BaseCollection2 { ++ fillItems(item) { + this._itemsByKey['dummy'] = item; +- }; +- return DataView2; +-}(BaseCollection2)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols.diff new file mode 100644 index 0000000000..516ad0d7f4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols ++++ new.genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.symbols +@@= skipped -115, +115 lines =@@ + >implement : Symbol(implement, Decl(genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.ts, 30, 13)) + >T : Symbol(T, Decl(genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.ts, 30, 26)) + >I : Symbol(I, Decl(genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.ts, 30, 35)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >X : Symbol(X, Decl(genericCallInferenceUsingThisTypeNoInvalidCacheReuseAfterMappedTypeApplication1.ts, 30, 64)) + + x: (...i: I) => X, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCallWithFixedArguments.js.diff b/testdata/baselines/reference/submodule/compiler/genericCallWithFixedArguments.js.diff new file mode 100644 index 0000000000..40b816e036 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCallWithFixedArguments.js.diff @@ -0,0 +1,26 @@ +--- old.genericCallWithFixedArguments.js ++++ new.genericCallWithFixedArguments.js +@@= skipped -9, +9 lines =@@ + + + //// [genericCallWithFixedArguments.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); ++class A { ++ foo() { } ++} ++class B { ++ bar() { } ++} + function g(x) { } + g(7); // the parameter list is fixed, so this should not error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.js.diff b/testdata/baselines/reference/submodule/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.js.diff index fce0cfae13..cad463d514 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericCallWithinOwnBodyCastTypeParameterIdentity.js.diff @@ -5,6 +5,35 @@ //// [genericCallWithinOwnBodyCastTypeParameterIdentity.js] -"use strict"; - const toThenable = (fn) => (input) => { - const result = fn(input); - return { \ No newline at end of file +-var toThenable = function (fn) { +- return function (input) { +- var result = fn(input); +- return { +- then: function (onFulfilled) { +- return toThenable(onFulfilled)(result); +- } +- }; ++const toThenable = (fn) => (input) => { ++ const result = fn(input); ++ return { ++ then(onFulfilled) { ++ return toThenable(onFulfilled)(result); ++ } + }; + }; +-var toThenableInferred = function (fn) { +- return function (input) { +- var result = fn(input); +- return { +- then: function (onFulfilled) { +- return toThenableInferred(onFulfilled)(result); +- } +- }; ++const toThenableInferred = (fn) => (input) => { ++ const result = fn(input); ++ return { ++ then(onFulfilled) { ++ return toThenableInferred(onFulfilled)(result); ++ } + }; + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js index ec885a9f64..7ce0478233 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js +++ b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericCallbacksAndClassHierarchy.ts] //// //// [genericCallbacksAndClassHierarchy.ts] -module M { +namespace M { export interface I { subscribe(callback: (newValue: T) => void ): any; } diff --git a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js.diff b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js.diff index cc0c97680f..bbed45594f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.js.diff @@ -1,14 +1,71 @@ --- old.genericCallbacksAndClassHierarchy.js +++ new.genericCallbacksAndClassHierarchy.js -@@= skipped -28, +28 lines =@@ +@@= skipped -25, +25 lines =@@ + } + + //// [genericCallbacksAndClassHierarchy.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var M; (function (M) { - class C1 { +- var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +- }()); ++ class C1 { + value; - } ++ } M.C1 = C1; - class A { +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); ++ class A { + dummy; - } ++ } M.A = A; - class B extends C1 { \ No newline at end of file +- var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +- }(C1)); ++ class B extends C1 { ++ } + M.B = B; +- var D = /** @class */ (function () { +- function D() { +- } +- D.prototype._subscribe = function (viewModel) { +- var f = function (newValue) { }; ++ class D { ++ _subscribe(viewModel) { ++ var f = (newValue) => { }; + var v = viewModel.value; + // both of these should work + v.subscribe(f); +- v.subscribe(function (newValue) { }); +- }; +- return D; +- }()); ++ v.subscribe((newValue) => { }); ++ } ++ } + M.D = D; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.symbols b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.symbols index 69711de27e..047b0dc821 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericCallbacksAndClassHierarchy.ts] //// === genericCallbacksAndClassHierarchy.ts === -module M { +namespace M { >M : Symbol(M, Decl(genericCallbacksAndClassHierarchy.ts, 0, 0)) export interface I { ->I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10)) +>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 13)) >T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 1, 23)) subscribe(callback: (newValue: T) => void ): any; @@ -20,7 +20,7 @@ module M { public value: I; >value : Symbol(C1.value, Decl(genericCallbacksAndClassHierarchy.ts, 4, 24)) ->I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10)) +>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 13)) >T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 4, 20)) } export class A { @@ -55,7 +55,7 @@ module M { var v: I> = viewModel.value; >v : Symbol(v, Decl(genericCallbacksAndClassHierarchy.ts, 15, 15)) ->I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 10)) +>I : Symbol(I, Decl(genericCallbacksAndClassHierarchy.ts, 0, 13)) >A : Symbol(A, Decl(genericCallbacksAndClassHierarchy.ts, 6, 5)) >T : Symbol(T, Decl(genericCallbacksAndClassHierarchy.ts, 11, 19)) >viewModel.value : Symbol(C1.value, Decl(genericCallbacksAndClassHierarchy.ts, 4, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.types b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.types index b1f8b5e1ed..2d24195355 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.types +++ b/testdata/baselines/reference/submodule/compiler/genericCallbacksAndClassHierarchy.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericCallbacksAndClassHierarchy.ts] //// === genericCallbacksAndClassHierarchy.ts === -module M { +namespace M { >M : typeof M export interface I { diff --git a/testdata/baselines/reference/submodule/compiler/genericChainedCalls.js.diff b/testdata/baselines/reference/submodule/compiler/genericChainedCalls.js.diff new file mode 100644 index 0000000000..abb8bfb2cf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericChainedCalls.js.diff @@ -0,0 +1,18 @@ +--- old.genericChainedCalls.js ++++ new.genericChainedCalls.js +@@= skipped -16, +16 lines =@@ + + + //// [genericChainedCalls.js] +-var r1 = v1.func(function (num) { return num.toString(); }) +- .func(function (str) { return str.length; }) // error, number doesn't have a length +- .func(function (num) { return num.toString(); }); +-var s1 = v1.func(function (num) { return num.toString(); }); +-var s2 = s1.func(function (str) { return str.length; }); // should also error +-var s3 = s2.func(function (num) { return num.toString(); }); ++var r1 = v1.func(num => num.toString()) ++ .func(str => str.length) // error, number doesn't have a length ++ .func(num => num.toString()); ++var s1 = v1.func(num => num.toString()); ++var s2 = s1.func(str => str.length); // should also error ++var s3 = s2.func(num => num.toString()); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js index 316ec2ac77..33af43efe7 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js +++ b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js @@ -1,10 +1,10 @@ //// [tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts] //// //// [genericClassImplementingGenericInterfaceFromAnotherModule.ts] -module foo { +namespace foo { export interface IFoo { } } -module bar { +namespace bar { export class Foo implements foo.IFoo { } } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js.diff new file mode 100644 index 0000000000..a0281da404 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.js.diff @@ -0,0 +1,15 @@ +--- old.genericClassImplementingGenericInterfaceFromAnotherModule.js ++++ new.genericClassImplementingGenericInterfaceFromAnotherModule.js +@@= skipped -11, +11 lines =@@ + //// [genericClassImplementingGenericInterfaceFromAnotherModule.js] + var bar; + (function (bar) { +- var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +- }()); ++ class Foo { ++ } + bar.Foo = Foo; + })(bar || (bar = {})); diff --git a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.symbols b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.symbols index 948ab07d15..51221c8323 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts] //// === genericClassImplementingGenericInterfaceFromAnotherModule.ts === -module foo { +namespace foo { >foo : Symbol(foo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 0)) export interface IFoo { } ->IFoo : Symbol(IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 12)) +>IFoo : Symbol(IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 15)) >T : Symbol(T, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 1, 26)) } -module bar { +namespace bar { >bar : Symbol(bar, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 2, 1)) export class Foo implements foo.IFoo { } ->Foo : Symbol(Foo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 3, 12)) +>Foo : Symbol(Foo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 3, 15)) >T : Symbol(T, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 4, 21)) ->foo.IFoo : Symbol(foo.IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 12)) +>foo.IFoo : Symbol(foo.IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 15)) >foo : Symbol(foo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 0)) ->IFoo : Symbol(foo.IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 12)) +>IFoo : Symbol(foo.IFoo, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 0, 15)) >T : Symbol(T, Decl(genericClassImplementingGenericInterfaceFromAnotherModule.ts, 4, 21)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.types b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.types index 6adf5f61a9..00b1a46aa6 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/genericClassImplementingGenericInterfaceFromAnotherModule.ts] //// === genericClassImplementingGenericInterfaceFromAnotherModule.ts === -module foo { +namespace foo { export interface IFoo { } } -module bar { +namespace bar { >bar : typeof bar export class Foo implements foo.IFoo { } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassInheritsConstructorFromNonGenericClass.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassInheritsConstructorFromNonGenericClass.js.diff new file mode 100644 index 0000000000..cb9e355afe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericClassInheritsConstructorFromNonGenericClass.js.diff @@ -0,0 +1,47 @@ +--- old.genericClassInheritsConstructorFromNonGenericClass.js ++++ new.genericClassInheritsConstructorFromNonGenericClass.js +@@= skipped -7, +7 lines =@@ + } + + //// [genericClassInheritsConstructorFromNonGenericClass.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A; +-}(B)); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(C)); +-var C = /** @class */ (function () { +- function C(p) { +- } +- return C; +-}()); ++class A extends B { ++} ++class B extends C { ++} ++class C { ++ constructor(p) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js index 7ec3294780..4830265d5f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js @@ -36,11 +36,11 @@ interface KnockoutObservableArrayStatic { (value?: T[]): KnockoutObservableArray; } -declare module ko { +declare namespace ko { export var observableArray: KnockoutObservableArrayStatic; } -module Portal.Controls.Validators { +namespace Portal.Controls.Validators { export class Validator { private _subscription; @@ -53,7 +53,7 @@ module Portal.Controls.Validators { } } -module PortalFx.ViewModels.Controls.Validators { +namespace PortalFx.ViewModels.Controls.Validators { export class Validator extends Portal.Controls.Validators.Validator { diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js.diff index c348469440..d03f43cf24 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.js.diff @@ -1,7 +1,24 @@ --- old.genericClassPropertyInheritanceSpecialization.js +++ new.genericClassPropertyInheritanceSpecialization.js -@@= skipped -79, +79 lines =@@ +@@= skipped -77, +77 lines =@@ + + //// [genericClassPropertyInheritanceSpecialization.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var Portal; (function (Portal) { - var Controls; @@ -10,15 +27,25 @@ - var Validators; + let Validators; (function (Validators) { - class Validator { +- var Validator = /** @class */ (function () { +- function Validator(message) { +- } +- Validator.prototype.destroy = function () { }; +- Validator.prototype._validate = function (value) { return 0; }; +- return Validator; +- }()); ++ class Validator { + _subscription; + message; + validationState; + validate; - constructor(message) { } - destroy() { } - _validate(value) { return 0; } -@@= skipped -15, +19 lines =@@ ++ constructor(message) { } ++ destroy() { } ++ _validate(value) { return 0; } ++ } + Validators.Validator = Validator; + })(Validators = Controls.Validators || (Controls.Validators = {})); + })(Controls = Portal.Controls || (Portal.Controls = {})); })(Portal || (Portal = {})); var PortalFx; (function (PortalFx) { @@ -31,14 +58,28 @@ - var Validators; + let Validators; (function (Validators) { - class Validator extends Portal.Controls.Validators.Validator { - constructor(message) { -@@= skipped -17, +17 lines =@@ +- var Validator = /** @class */ (function (_super) { +- __extends(Validator, _super); +- function Validator(message) { +- return _super.call(this, message) || this; ++ class Validator extends Portal.Controls.Validators.Validator { ++ constructor(message) { ++ super(message); + } +- return Validator; +- }(Portal.Controls.Validators.Validator)); ++ } + Validators.Validator = Validator; + })(Validators = Controls.Validators || (Controls.Validators = {})); + })(Controls = ViewModels.Controls || (ViewModels.Controls = {})); })(ViewModels = PortalFx.ViewModels || (PortalFx.ViewModels = {})); })(PortalFx || (PortalFx = {})); - class ViewModel { -- constructor() { +-var ViewModel = /** @class */ (function () { +- function ViewModel() { - this.validators = ko.observableArray(); - } +- return ViewModel; +-}()); ++class ViewModel { + validators = ko.observableArray(); - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols index 4bdd8ab6c5..c9c641dc08 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.symbols @@ -138,7 +138,7 @@ interface KnockoutObservableArrayStatic { >T : Symbol(T, Decl(genericClassPropertyInheritanceSpecialization.ts, 32, 5)) } -declare module ko { +declare namespace ko { >ko : Symbol(ko, Decl(genericClassPropertyInheritanceSpecialization.ts, 33, 1)) export var observableArray: KnockoutObservableArrayStatic; @@ -146,13 +146,13 @@ declare module ko { >KnockoutObservableArrayStatic : Symbol(KnockoutObservableArrayStatic, Decl(genericClassPropertyInheritanceSpecialization.ts, 27, 1)) } -module Portal.Controls.Validators { +namespace Portal.Controls.Validators { >Portal : Symbol(Portal, Decl(genericClassPropertyInheritanceSpecialization.ts, 37, 1)) ->Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) ->Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 17)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 26)) export class Validator { ->Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 38)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 41, 27)) private _subscription; @@ -184,29 +184,29 @@ module Portal.Controls.Validators { } } -module PortalFx.ViewModels.Controls.Validators { +namespace PortalFx.ViewModels.Controls.Validators { >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ->Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) +>ViewModels : Symbol(ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 19)) +>Controls : Symbol(Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 30)) +>Validators : Symbol(Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 39)) export class Validator extends Portal.Controls.Validators.Validator { ->Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) +>Validator : Symbol(Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 51)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 54, 27)) ->Portal.Controls.Validators.Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) ->Portal.Controls.Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ->Portal.Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) +>Portal.Controls.Validators.Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 38)) +>Portal.Controls.Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 26)) +>Portal.Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 17)) >Portal : Symbol(Portal, Decl(genericClassPropertyInheritanceSpecialization.ts, 37, 1)) ->Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 14)) ->Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 23)) ->Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) +>Controls : Symbol(Portal.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 17)) +>Validators : Symbol(Portal.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 26)) +>Validator : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 38)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 54, 27)) constructor(message?: string) { >message : Symbol(message, Decl(genericClassPropertyInheritanceSpecialization.ts, 56, 20)) super(message); ->super : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 35)) +>super : Symbol(Portal.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 39, 38)) >message : Symbol(message, Decl(genericClassPropertyInheritanceSpecialization.ts, 56, 20)) } } @@ -221,10 +221,10 @@ interface Contract { >validators : Symbol(Contract.validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 28)) >KnockoutObservableArray : Symbol(KnockoutObservableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 10, 1)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) +>ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 19)) +>Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 30)) +>Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 39)) +>Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 51)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 63, 19)) } @@ -239,19 +239,19 @@ class ViewModel implements Contract { >validators : Symbol(ViewModel.validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 53)) >KnockoutObservableArray : Symbol(KnockoutObservableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 10, 1)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) +>ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 19)) +>Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 30)) +>Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 39)) +>Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 51)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) >ko.observableArray : Symbol(ko.observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) >ko : Symbol(ko, Decl(genericClassPropertyInheritanceSpecialization.ts, 33, 1)) >observableArray : Symbol(ko.observableArray, Decl(genericClassPropertyInheritanceSpecialization.ts, 36, 14)) >PortalFx : Symbol(PortalFx, Decl(genericClassPropertyInheritanceSpecialization.ts, 50, 1)) ->ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 16)) ->Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 27)) ->Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 36)) ->Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 48)) +>ViewModels : Symbol(PortalFx.ViewModels, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 19)) +>Controls : Symbol(PortalFx.ViewModels.Controls, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 30)) +>Validators : Symbol(PortalFx.ViewModels.Controls.Validators, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 39)) +>Validator : Symbol(PortalFx.ViewModels.Controls.Validators.Validator, Decl(genericClassPropertyInheritanceSpecialization.ts, 52, 51)) >TValue : Symbol(TValue, Decl(genericClassPropertyInheritanceSpecialization.ts, 69, 16)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types index 8e9a3b65b3..a88d0c23df 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassPropertyInheritanceSpecialization.types @@ -93,14 +93,14 @@ interface KnockoutObservableArrayStatic { >value : T[] } -declare module ko { +declare namespace ko { >ko : typeof ko export var observableArray: KnockoutObservableArrayStatic; >observableArray : KnockoutObservableArrayStatic } -module Portal.Controls.Validators { +namespace Portal.Controls.Validators { >Portal : typeof Portal >Controls : typeof Controls >Validators : typeof Validators @@ -133,7 +133,7 @@ module Portal.Controls.Validators { } } -module PortalFx.ViewModels.Controls.Validators { +namespace PortalFx.ViewModels.Controls.Validators { >PortalFx : typeof PortalFx >ViewModels : typeof ViewModels >Controls : typeof Controls diff --git a/testdata/baselines/reference/submodule/compiler/genericClassStaticMethod.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassStaticMethod.js.diff new file mode 100644 index 0000000000..703c97625c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericClassStaticMethod.js.diff @@ -0,0 +1,45 @@ +--- old.genericClassStaticMethod.js ++++ new.genericClassStaticMethod.js +@@= skipped -12, +12 lines =@@ + + + //// [genericClassStaticMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.getFoo = function () { +- }; +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Bar.getFoo = function () { +- }; +- return Bar; +-}(Foo)); ++class Foo { ++ static getFoo() { ++ } ++} ++class Bar extends Foo { ++ static getFoo() { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js index 608a4e08ff..97e8d147d9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js +++ b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassWithStaticFactory.ts] //// //// [genericClassWithStaticFactory.ts] -module Editor { +namespace Editor { export class List { public next: List; diff --git a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js.diff index ad11c0d8a0..55fe01c8c2 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.js.diff @@ -1,14 +1,160 @@ --- old.genericClassWithStaticFactory.js +++ new.genericClassWithStaticFactory.js -@@= skipped -146, +146 lines =@@ +@@= skipped -145, +145 lines =@@ + //// [genericClassWithStaticFactory.js] var Editor; (function (Editor) { - class List { +- var List = /** @class */ (function () { +- function List(isHead, data) { ++ class List { + isHead; + data; + next; + prev; + listFactory; - constructor(isHead, data) { ++ constructor(isHead, data) { this.isHead = isHead; - this.data = data; \ No newline at end of file + this.data = data; + this.listFactory = new ListFactory(); + } +- List.prototype.add = function (data) { ++ add(data) { + var entry = this.listFactory.MakeEntry(data); + this.prev.next = entry; + entry.next = this; + entry.prev = this.prev; + this.prev = entry; + return entry; +- }; +- List.prototype.count = function () { ++ } ++ count() { + var entry; + var i; + entry = this.next; +@@= skipped -22, +27 lines =@@ + entry = entry.next; + } + return (i); +- }; +- List.prototype.isEmpty = function () { ++ } ++ isEmpty() { + return (this.next == this); +- }; +- List.prototype.first = function () { ++ } ++ first() { + if (this.isEmpty()) { + return this.next.data; + } + else { + return null; + } +- }; +- List.prototype.pushEntry = function (entry) { ++ } ++ pushEntry(entry) { + entry.isHead = false; + entry.next = this.next; + entry.prev = this; + this.next = entry; + entry.next.prev = entry; // entry.next.prev does not show intellisense, but entry.prev.prev does +- }; +- List.prototype.push = function (data) { ++ } ++ push(data) { + var entry = this.listFactory.MakeEntry(data); + entry.data = data; + entry.isHead = false; +@@= skipped -27, +27 lines =@@ + entry.prev = this; + this.next = entry; + entry.next.prev = entry; // entry.next.prev does not show intellisense, but entry.prev.prev does +- }; +- List.prototype.popEntry = function (head) { ++ } ++ popEntry(head) { + if (this.next.isHead) { + return null; + } + else { + return this.listFactory.RemoveEntry(this.next); + } +- }; +- List.prototype.insertEntry = function (entry) { ++ } ++ insertEntry(entry) { + entry.isHead = false; + this.prev.next = entry; + entry.next = this; + entry.prev = this.prev; + this.prev = entry; + return entry; +- }; +- List.prototype.insertAfter = function (data) { ++ } ++ insertAfter(data) { + var entry = this.listFactory.MakeEntry(data); + entry.next = this.next; + entry.prev = this; + this.next = entry; + entry.next.prev = entry; // entry.next.prev does not show intellisense, but entry.prev.prev does + return entry; +- }; +- List.prototype.insertEntryBefore = function (entry) { ++ } ++ insertEntryBefore(entry) { + this.prev.next = entry; + entry.next = this; + entry.prev = this.prev; + this.prev = entry; + return entry; +- }; +- List.prototype.insertBefore = function (data) { ++ } ++ insertBefore(data) { + var entry = this.listFactory.MakeEntry(data); + return this.insertEntryBefore(entry); +- }; +- return List; +- }()); ++ } ++ } + Editor.List = List; +- var ListFactory = /** @class */ (function () { +- function ListFactory() { +- } +- ListFactory.prototype.MakeHead = function () { ++ class ListFactory { ++ MakeHead() { + var entry = new List(true, null); + entry.prev = entry; + entry.next = entry; + return entry; +- }; +- ListFactory.prototype.MakeEntry = function (data) { ++ } ++ MakeEntry(data) { + var entry = new List(false, data); + entry.prev = entry; + entry.next = entry; + return entry; +- }; +- ListFactory.prototype.RemoveEntry = function (entry) { ++ } ++ RemoveEntry(entry) { + if (entry == null) { + return null; + } +@@= skipped -67, +64 lines =@@ + entry.prev.next = entry.next; + return entry; + } +- }; +- return ListFactory; +- }()); ++ } ++ } + Editor.ListFactory = ListFactory; + })(Editor || (Editor = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.symbols b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.symbols index 266323e165..9b0f32e869 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.symbols @@ -1,21 +1,21 @@ //// [tests/cases/compiler/genericClassWithStaticFactory.ts] //// === genericClassWithStaticFactory.ts === -module Editor { +namespace Editor { >Editor : Symbol(Editor, Decl(genericClassWithStaticFactory.ts, 0, 0)) export class List { ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) public next: List; >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) public prev: List; >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) private listFactory: ListFactory; @@ -30,7 +30,7 @@ module Editor { this.listFactory = new ListFactory(); >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >ListFactory : Symbol(ListFactory, Decl(genericClassWithStaticFactory.ts, 106, 5)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) @@ -41,14 +41,14 @@ module Editor { >add : Symbol(List.add, Decl(genericClassWithStaticFactory.ts, 10, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 12, 19)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) var entry = this.listFactory.MakeEntry(data); >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15)) >this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 12, 19)) @@ -56,7 +56,7 @@ module Editor { this.prev.next = entry; >this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15)) @@ -65,19 +65,19 @@ module Editor { >entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) entry.prev = this.prev; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) this.prev = entry; >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 13, 15)) @@ -90,7 +90,7 @@ module Editor { var entry: List; >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) var i: number; @@ -99,7 +99,7 @@ module Editor { entry = this.next; >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 23, 15)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) for (i = 0; !(entry.isHead); i++) { @@ -125,9 +125,9 @@ module Editor { return (this.next == this); >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) } public first(): T { @@ -136,13 +136,13 @@ module Editor { if (this.isEmpty()) >this.isEmpty : Symbol(List.isEmpty, Decl(genericClassWithStaticFactory.ts, 32, 9)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >isEmpty : Symbol(List.isEmpty, Decl(genericClassWithStaticFactory.ts, 32, 9)) { return this.next.data; >this.next.data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >data : Symbol(List.data, Decl(genericClassWithStaticFactory.ts, 7, 43)) } @@ -154,7 +154,7 @@ module Editor { public pushEntry(entry: List): void { >pushEntry : Symbol(List.pushEntry, Decl(genericClassWithStaticFactory.ts, 46, 9)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) entry.isHead = false; @@ -167,18 +167,18 @@ module Editor { >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) entry.prev = this; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) this.next = entry; >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 48, 25)) @@ -200,7 +200,7 @@ module Editor { >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15)) >this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 56, 20)) @@ -221,18 +221,18 @@ module Editor { >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) entry.prev = this; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) this.next = entry; >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 57, 15)) @@ -248,15 +248,15 @@ module Editor { public popEntry(head: List): List { >popEntry : Symbol(List.popEntry, Decl(genericClassWithStaticFactory.ts, 64, 9)) >head : Symbol(head, Decl(genericClassWithStaticFactory.ts, 66, 24)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) if (this.next.isHead) { >this.next.isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >isHead : Symbol(List.isHead, Decl(genericClassWithStaticFactory.ts, 7, 20)) @@ -266,11 +266,11 @@ module Editor { return this.listFactory.RemoveEntry(this.next); >this.listFactory.RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9)) >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) } } @@ -278,9 +278,9 @@ module Editor { public insertEntry(entry: List): List { >insertEntry : Symbol(List.insertEntry, Decl(genericClassWithStaticFactory.ts, 73, 9)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) entry.isHead = false; @@ -291,7 +291,7 @@ module Editor { this.prev.next = entry; >this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27)) @@ -300,19 +300,19 @@ module Editor { >entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) entry.prev = this.prev; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) this.prev = entry; >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 75, 27)) @@ -324,16 +324,16 @@ module Editor { >insertAfter : Symbol(List.insertAfter, Decl(genericClassWithStaticFactory.ts, 82, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 84, 27)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) var entry: List = this.listFactory.MakeEntry(data); >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) >this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 84, 27)) @@ -343,18 +343,18 @@ module Editor { >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) entry.prev = this; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) this.next = entry; >this.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 85, 15)) @@ -373,15 +373,15 @@ module Editor { public insertEntryBefore(entry: List): List { >insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) this.prev.next = entry; >this.prev.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33)) @@ -390,19 +390,19 @@ module Editor { >entry.next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33)) >next : Symbol(List.next, Decl(genericClassWithStaticFactory.ts, 2, 26)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) entry.prev = this.prev; >entry.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) this.prev = entry; >this.prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >prev : Symbol(List.prev, Decl(genericClassWithStaticFactory.ts, 3, 29)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 93, 33)) @@ -414,21 +414,21 @@ module Editor { >insertBefore : Symbol(List.insertBefore, Decl(genericClassWithStaticFactory.ts, 100, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 102, 28)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 2, 22)) var entry = this.listFactory.MakeEntry(data); >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 103, 15)) >this.listFactory.MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >this.listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >listFactory : Symbol(List.listFactory, Decl(genericClassWithStaticFactory.ts, 4, 29)) >MakeEntry : Symbol(ListFactory.MakeEntry, Decl(genericClassWithStaticFactory.ts, 115, 9)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 102, 28)) return this.insertEntryBefore(entry); >this.insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9)) ->this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>this : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >insertEntryBefore : Symbol(List.insertEntryBefore, Decl(genericClassWithStaticFactory.ts, 91, 9)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 103, 15)) } @@ -441,14 +441,14 @@ module Editor { public MakeHead(): List { >MakeHead : Symbol(ListFactory.MakeHead, Decl(genericClassWithStaticFactory.ts, 108, 33)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24)) var entry: List = new List(true, null); >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 111, 15)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 110, 24)) entry.prev = entry; @@ -472,14 +472,14 @@ module Editor { >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 117, 28)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25)) var entry: List = new List(false, data); >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 118, 15)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 117, 25)) >data : Symbol(data, Decl(genericClassWithStaticFactory.ts, 117, 28)) @@ -503,9 +503,9 @@ module Editor { >RemoveEntry : Symbol(ListFactory.RemoveEntry, Decl(genericClassWithStaticFactory.ts, 122, 9)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27)) >entry : Symbol(entry, Decl(genericClassWithStaticFactory.ts, 124, 30)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27)) ->List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 15)) +>List : Symbol(List, Decl(genericClassWithStaticFactory.ts, 0, 18)) >T : Symbol(T, Decl(genericClassWithStaticFactory.ts, 124, 27)) if (entry == null) { diff --git a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.types b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.types index 74f9f32296..6e3090fbf7 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticFactory.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassWithStaticFactory.ts] //// === genericClassWithStaticFactory.ts === -module Editor { +namespace Editor { >Editor : typeof Editor export class List { diff --git a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticsUsingTypeArguments.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticsUsingTypeArguments.js.diff index 0a9021b60f..9552264032 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassWithStaticsUsingTypeArguments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClassWithStaticsUsingTypeArguments.js.diff @@ -4,11 +4,10 @@ //// [genericClassWithStaticsUsingTypeArguments.js] // Should be error to use 'T' in all declarations within Foo. --let Foo = (() => { -- class Foo { -- static f(xs) { -- return xs.reverse(); -- } +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.f = function (xs) { +class Foo { + static a = (n) => { }; + static b; @@ -16,12 +15,13 @@ + static d = false || ((x) => x || undefined)(null); + static e = function (x) { return null; }; + static f(xs) { -+ return xs.reverse(); - } -- Foo.a = (n) => { }; + return xs.reverse(); +- }; +- Foo.a = function (n) { }; - Foo.c = []; -- Foo.d = false || ((x) => x || undefined)(null); +- Foo.d = false || (function (x) { return x || undefined; })(null); - Foo.e = function (x) { return null; }; - return Foo; --})(); +-}()); ++ } +} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClasses0.js.diff b/testdata/baselines/reference/submodule/compiler/genericClasses0.js.diff index f13a812604..005aaf99e8 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClasses0.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClasses0.js.diff @@ -1,10 +1,16 @@ --- old.genericClasses0.js +++ new.genericClasses0.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + var y = v1.x; // should be 'string' //// [genericClasses0.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var v1; - var y = v1.x; // should be 'string' \ No newline at end of file + var y = v1.x; // should be 'string' diff --git a/testdata/baselines/reference/submodule/compiler/genericClasses1.js.diff b/testdata/baselines/reference/submodule/compiler/genericClasses1.js.diff index c4ee6eee92..36b0a09672 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClasses1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClasses1.js.diff @@ -1,10 +1,16 @@ --- old.genericClasses1.js +++ new.genericClasses1.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + var y = v1.x; // should be 'string' //// [genericClasses1.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var v1 = new C(); - var y = v1.x; // should be 'string' \ No newline at end of file + var y = v1.x; // should be 'string' diff --git a/testdata/baselines/reference/submodule/compiler/genericClasses2.js.diff b/testdata/baselines/reference/submodule/compiler/genericClasses2.js.diff index f617bb2ecf..9da4f2882e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClasses2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClasses2.js.diff @@ -1,12 +1,19 @@ --- old.genericClasses2.js +++ new.genericClasses2.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + var z = v1.z.a; // should be 'number' //// [genericClasses2.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; + y; + z; - } ++} var v1; - var y = v1.x; // should be 'string' \ No newline at end of file + var y = v1.x; // should be 'string' + var w = v1.y.a; // should be 'string' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClasses3.js.diff b/testdata/baselines/reference/submodule/compiler/genericClasses3.js.diff index 80d11f4508..7ac69878ce 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClasses3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClasses3.js.diff @@ -1,14 +1,43 @@ --- old.genericClasses3.js +++ new.genericClasses3.js -@@= skipped -20, +20 lines =@@ +@@= skipped -19, +19 lines =@@ + //// [genericClasses3.js] - class B { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(B)); ++class B { + a; + b; - } - class C extends B { ++} ++class C extends B { + x; - } ++} var v2; - var y = v2.x; // should be 'string' \ No newline at end of file + var y = v2.x; // should be 'string' + var u = v2.a; // should be 'string' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClasses4.js.diff b/testdata/baselines/reference/submodule/compiler/genericClasses4.js.diff index 0c80e3a412..4b658ca3ba 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClasses4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericClasses4.js.diff @@ -1,11 +1,34 @@ --- old.genericClasses4.js +++ new.genericClasses4.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + //// [genericClasses4.js] // once caused stack overflow - class Vec2_T { +-var Vec2_T = /** @class */ (function () { +- function Vec2_T(x, y) { ++class Vec2_T { + x; + y; - constructor(x, y) { ++ constructor(x, y) { this.x = x; - this.y = y; \ No newline at end of file + this.y = y; + } +- Vec2_T.prototype.fmap = function (f) { ++ fmap(f) { + var x = f(this.x); + var y = f(this.y); + var retval = new Vec2_T(x, y); + return retval; +- }; +- Vec2_T.prototype.apply = function (f) { ++ } ++ apply(f) { + var x = f.x(this.x); + var y = f.y(this.y); + var retval = new Vec2_T(x, y); + return retval; +- }; +- return Vec2_T; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js index cf0e61f55d..b953ee6fce 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js +++ b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassesInModule.ts] //// //// [genericClassesInModule.ts] -module Foo { +namespace Foo { export class B{ } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js.diff b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js.diff new file mode 100644 index 0000000000..c2ce3462ad --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.js.diff @@ -0,0 +1,24 @@ +--- old.genericClassesInModule.js ++++ new.genericClassesInModule.js +@@= skipped -12, +12 lines =@@ + //// [genericClassesInModule.js] + var Foo; + (function (Foo) { +- var B = /** @class */ (function () { +- function B() { +- } +- return B; +- }()); ++ class B { ++ } + Foo.B = B; +- var A = /** @class */ (function () { +- function A() { +- } +- return A; +- }()); ++ class A { ++ } + Foo.A = A; + })(Foo || (Foo = {})); + var a = new Foo.B(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.symbols b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.symbols index ed93146703..652dcb7ba1 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericClassesInModule.ts] //// === genericClassesInModule.ts === -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(genericClassesInModule.ts, 0, 0)) export class B{ } ->B : Symbol(B, Decl(genericClassesInModule.ts, 0, 12)) +>B : Symbol(B, Decl(genericClassesInModule.ts, 0, 15)) >T : Symbol(T, Decl(genericClassesInModule.ts, 2, 19)) export class A { } @@ -14,9 +14,9 @@ module Foo { var a = new Foo.B(); >a : Symbol(a, Decl(genericClassesInModule.ts, 7, 3)) ->Foo.B : Symbol(Foo.B, Decl(genericClassesInModule.ts, 0, 12)) +>Foo.B : Symbol(Foo.B, Decl(genericClassesInModule.ts, 0, 15)) >Foo : Symbol(Foo, Decl(genericClassesInModule.ts, 0, 0)) ->B : Symbol(Foo.B, Decl(genericClassesInModule.ts, 0, 12)) +>B : Symbol(Foo.B, Decl(genericClassesInModule.ts, 0, 15)) >Foo : Symbol(Foo, Decl(genericClassesInModule.ts, 0, 0)) >A : Symbol(Foo.A, Decl(genericClassesInModule.ts, 2, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.types b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.types index 98dfc6611d..6e94b20f1c 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesInModule.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassesInModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassesInModule.ts] //// === genericClassesInModule.ts === -module Foo { +namespace Foo { >Foo : typeof Foo export class B{ } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.errors.txt index 4e51674e9c..587de8daea 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.errors.txt @@ -7,7 +7,7 @@ genericClassesRedeclaration.ts(68,11): error TS2300: Duplicate identifier 'Ident ==== genericClassesRedeclaration.ts (6 errors) ==== - declare module TypeScript { + declare namespace TypeScript { interface IIndexable { [s: string]: T; ~~~~~~~~~~~~~~~ @@ -52,7 +52,7 @@ genericClassesRedeclaration.ts(68,11): error TS2300: Duplicate identifier 'Ident } } - declare module TypeScript { + declare namespace TypeScript { interface IIndexable { [s: string]: T; ~~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.js b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.js index 5ac720b706..3363ce635b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassesRedeclaration.ts] //// //// [genericClassesRedeclaration.ts] -declare module TypeScript { +declare namespace TypeScript { interface IIndexable { [s: string]: T; } @@ -40,7 +40,7 @@ declare module TypeScript { } } -declare module TypeScript { +declare namespace TypeScript { interface IIndexable { [s: string]: T; } diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.symbols b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.symbols index 1681eca383..35802c86b0 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericClassesRedeclaration.ts] //// === genericClassesRedeclaration.ts === -declare module TypeScript { +declare namespace TypeScript { >TypeScript : Symbol(TypeScript, Decl(genericClassesRedeclaration.ts, 0, 0), Decl(genericClassesRedeclaration.ts, 37, 1)) interface IIndexable { ->IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 27), Decl(genericClassesRedeclaration.ts, 39, 27)) +>IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 30), Decl(genericClassesRedeclaration.ts, 39, 30)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 1, 25), Decl(genericClassesRedeclaration.ts, 40, 25)) [s: string]: T; @@ -15,7 +15,7 @@ declare module TypeScript { function createIntrinsicsObject(): IIndexable; >createIntrinsicsObject : Symbol(createIntrinsicsObject, Decl(genericClassesRedeclaration.ts, 3, 5), Decl(genericClassesRedeclaration.ts, 42, 5)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 4, 36)) ->IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 27), Decl(genericClassesRedeclaration.ts, 39, 27)) +>IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 30), Decl(genericClassesRedeclaration.ts, 39, 30)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 4, 36)) interface IHashTable { @@ -192,11 +192,11 @@ declare module TypeScript { } } -declare module TypeScript { +declare namespace TypeScript { >TypeScript : Symbol(TypeScript, Decl(genericClassesRedeclaration.ts, 0, 0), Decl(genericClassesRedeclaration.ts, 37, 1)) interface IIndexable { ->IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 27), Decl(genericClassesRedeclaration.ts, 39, 27)) +>IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 30), Decl(genericClassesRedeclaration.ts, 39, 30)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 1, 25), Decl(genericClassesRedeclaration.ts, 40, 25)) [s: string]: T; @@ -206,7 +206,7 @@ declare module TypeScript { function createIntrinsicsObject(): IIndexable; >createIntrinsicsObject : Symbol(createIntrinsicsObject, Decl(genericClassesRedeclaration.ts, 3, 5), Decl(genericClassesRedeclaration.ts, 42, 5)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 43, 36)) ->IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 27), Decl(genericClassesRedeclaration.ts, 39, 27)) +>IIndexable : Symbol(IIndexable, Decl(genericClassesRedeclaration.ts, 0, 30), Decl(genericClassesRedeclaration.ts, 39, 30)) >T : Symbol(T, Decl(genericClassesRedeclaration.ts, 43, 36)) interface IHashTable { diff --git a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.types b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.types index a2ee0056df..a1883a6d90 100644 --- a/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/genericClassesRedeclaration.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericClassesRedeclaration.ts] //// === genericClassesRedeclaration.ts === -declare module TypeScript { +declare namespace TypeScript { >TypeScript : typeof TypeScript interface IIndexable { @@ -160,7 +160,7 @@ declare module TypeScript { } } -declare module TypeScript { +declare namespace TypeScript { >TypeScript : typeof TypeScript interface IIndexable { diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js index 38c7566c41..195ba608e6 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/genericCloduleInModule.ts] //// //// [genericCloduleInModule.ts] -module A { +namespace A { export class B { foo() { } static bar() { } } - export module B { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js.diff b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js.diff new file mode 100644 index 0000000000..2912bb6fc5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.js.diff @@ -0,0 +1,20 @@ +--- old.genericCloduleInModule.js ++++ new.genericCloduleInModule.js +@@= skipped -16, +16 lines =@@ + //// [genericCloduleInModule.js] + var A; + (function (A) { +- var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.foo = function () { }; +- B.bar = function () { }; +- return B; +- }()); ++ class B { ++ foo() { } ++ static bar() { } ++ } + A.B = B; + (function (B) { + B.x = 1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.symbols b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.symbols index eb9aa1bcfe..b64253d271 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericCloduleInModule.ts] //// === genericCloduleInModule.ts === -module A { +namespace A { >A : Symbol(A, Decl(genericCloduleInModule.ts, 0, 0)) export class B { ->B : Symbol(B, Decl(genericCloduleInModule.ts, 0, 10), Decl(genericCloduleInModule.ts, 4, 5)) +>B : Symbol(B, Decl(genericCloduleInModule.ts, 0, 13), Decl(genericCloduleInModule.ts, 4, 5)) >T : Symbol(T, Decl(genericCloduleInModule.ts, 1, 19)) foo() { } @@ -14,8 +14,8 @@ module A { static bar() { } >bar : Symbol(B.bar, Decl(genericCloduleInModule.ts, 2, 17)) } - export module B { ->B : Symbol(B, Decl(genericCloduleInModule.ts, 0, 10), Decl(genericCloduleInModule.ts, 4, 5)) + export namespace B { +>B : Symbol(B, Decl(genericCloduleInModule.ts, 0, 13), Decl(genericCloduleInModule.ts, 4, 5)) export var x = 1; >x : Symbol(x, Decl(genericCloduleInModule.ts, 6, 18)) @@ -25,7 +25,7 @@ module A { var b: A.B; >b : Symbol(b, Decl(genericCloduleInModule.ts, 10, 3)) >A : Symbol(A, Decl(genericCloduleInModule.ts, 0, 0)) ->B : Symbol(A.B, Decl(genericCloduleInModule.ts, 0, 10), Decl(genericCloduleInModule.ts, 4, 5)) +>B : Symbol(A.B, Decl(genericCloduleInModule.ts, 0, 13), Decl(genericCloduleInModule.ts, 4, 5)) b.foo(); >b.foo : Symbol(A.B.foo, Decl(genericCloduleInModule.ts, 1, 23)) diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.types b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.types index 35c2c578af..e973ae3adf 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.types +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericCloduleInModule.ts] //// === genericCloduleInModule.ts === -module A { +namespace A { >A : typeof A export class B { @@ -13,7 +13,7 @@ module A { static bar() { } >bar : () => void } - export module B { + export namespace B { >B : typeof B export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.errors.txt index 193c59fc01..a522143ac7 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.errors.txt @@ -2,15 +2,15 @@ genericCloduleInModule2.ts(14,8): error TS2314: Generic type 'B' requires 1 t ==== genericCloduleInModule2.ts (1 errors) ==== - module A { + namespace A { export class B { foo() { } static bar() { } } } - module A { - export module B { + namespace A { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js index 6f89f3b8bc..d3f1b3bfb4 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/genericCloduleInModule2.ts] //// //// [genericCloduleInModule2.ts] -module A { +namespace A { export class B { foo() { } static bar() { } } } -module A { - export module B { +namespace A { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js.diff b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js.diff new file mode 100644 index 0000000000..b63d4f8f07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.js.diff @@ -0,0 +1,25 @@ +--- old.genericCloduleInModule2.js ++++ new.genericCloduleInModule2.js +@@= skipped -19, +19 lines =@@ + //// [genericCloduleInModule2.js] + var A; + (function (A) { +- var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.foo = function () { }; +- B.bar = function () { }; +- return B; +- }()); ++ class B { ++ foo() { } ++ static bar() { } ++ } + A.B = B; + })(A || (A = {})); + (function (A) { +- var B; ++ let B; + (function (B) { + B.x = 1; + })(B = A.B || (A.B = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.symbols b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.symbols index c45d4fdc91..194bc0e257 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericCloduleInModule2.ts] //// === genericCloduleInModule2.ts === -module A { +namespace A { >A : Symbol(A, Decl(genericCloduleInModule2.ts, 0, 0), Decl(genericCloduleInModule2.ts, 5, 1)) export class B { ->B : Symbol(B, Decl(genericCloduleInModule2.ts, 0, 10), Decl(genericCloduleInModule2.ts, 7, 10)) +>B : Symbol(B, Decl(genericCloduleInModule2.ts, 0, 13), Decl(genericCloduleInModule2.ts, 7, 13)) >T : Symbol(T, Decl(genericCloduleInModule2.ts, 1, 19)) foo() { } @@ -16,11 +16,11 @@ module A { } } -module A { +namespace A { >A : Symbol(A, Decl(genericCloduleInModule2.ts, 0, 0), Decl(genericCloduleInModule2.ts, 5, 1)) - export module B { ->B : Symbol(B, Decl(genericCloduleInModule2.ts, 0, 10), Decl(genericCloduleInModule2.ts, 7, 10)) + export namespace B { +>B : Symbol(B, Decl(genericCloduleInModule2.ts, 0, 13), Decl(genericCloduleInModule2.ts, 7, 13)) export var x = 1; >x : Symbol(x, Decl(genericCloduleInModule2.ts, 9, 18)) @@ -30,7 +30,7 @@ module A { var b: A.B; >b : Symbol(b, Decl(genericCloduleInModule2.ts, 13, 3)) >A : Symbol(A, Decl(genericCloduleInModule2.ts, 0, 0), Decl(genericCloduleInModule2.ts, 5, 1)) ->B : Symbol(A.B, Decl(genericCloduleInModule2.ts, 0, 10), Decl(genericCloduleInModule2.ts, 7, 10)) +>B : Symbol(A.B, Decl(genericCloduleInModule2.ts, 0, 13), Decl(genericCloduleInModule2.ts, 7, 13)) b.foo(); >b : Symbol(b, Decl(genericCloduleInModule2.ts, 13, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.types b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.types index 2b75d7bb3a..32d8bb3c49 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.types +++ b/testdata/baselines/reference/submodule/compiler/genericCloduleInModule2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericCloduleInModule2.ts] //// === genericCloduleInModule2.ts === -module A { +namespace A { >A : typeof A export class B { @@ -15,10 +15,10 @@ module A { } } -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes.js.diff b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes.js.diff index 0967b854fe..97eba7f7b2 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes.js.diff @@ -1,11 +1,25 @@ --- old.genericCloneReturnTypes.js +++ new.genericCloneReturnTypes.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + b = b3; //// [genericCloneReturnTypes.js] - class Bar { +-var Bar = /** @class */ (function () { +- function Bar(x) { ++class Bar { + size; + t; - constructor(x) { ++ constructor(x) { this.size = x; - } \ No newline at end of file + } +- Bar.prototype.clone = function () { ++ clone() { + return new Bar(this.size); +- }; +- return Bar; +-}()); ++ } ++} + var b; + var b2 = b.clone(); + var b3; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.js.diff b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.js.diff index d7976a4dd4..f20612df69 100644 --- a/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.js.diff @@ -1,11 +1,26 @@ --- old.genericCloneReturnTypes2.js +++ new.genericCloneReturnTypes2.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + var d: MyList = a.clone(); // error //// [genericCloneReturnTypes2.js] - class MyList { +-var MyList = /** @class */ (function () { +- function MyList(n) { ++class MyList { + size; + data; - constructor(n) { ++ constructor(n) { this.size = n; - this.data = new Array(this.size); \ No newline at end of file + this.data = new Array(this.size); + } +- MyList.prototype.clone = function () { ++ clone() { + return new MyList(this.size); +- }; +- return MyList; +-}()); ++ } ++} + var a; + var b = a.clone(); // ok + var c = a.clone(); // bug was there was an error on this line \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.symbols.diff new file mode 100644 index 0000000000..09bb540c28 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCloneReturnTypes2.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericCloneReturnTypes2.symbols ++++ new.genericCloneReturnTypes2.symbols +@@= skipped -24, +24 lines =@@ + >this.data : Symbol(MyList.data, Decl(genericCloneReturnTypes2.ts, 1, 24)) + >this : Symbol(MyList, Decl(genericCloneReturnTypes2.ts, 0, 0)) + >data : Symbol(MyList.data, Decl(genericCloneReturnTypes2.ts, 1, 24)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(genericCloneReturnTypes2.ts, 0, 13)) + >this.size : Symbol(MyList.size, Decl(genericCloneReturnTypes2.ts, 0, 17)) + >this : Symbol(MyList, Decl(genericCloneReturnTypes2.ts, 0, 0)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCombinators2.js.diff b/testdata/baselines/reference/submodule/compiler/genericCombinators2.js.diff new file mode 100644 index 0000000000..d9ba1ff5c5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCombinators2.js.diff @@ -0,0 +1,11 @@ +--- old.genericCombinators2.js ++++ new.genericCombinators2.js +@@= skipped -20, +20 lines =@@ + //// [genericCombinators2.js] + var _; + var c2; +-var rf1 = function (x, y) { return x.toFixed(); }; +-var r5a = _.map(c2, function (x, y) { return x.toFixed(); }); ++var rf1 = (x, y) => { return x.toFixed(); }; ++var r5a = _.map(c2, (x, y) => { return x.toFixed(); }); + var r5b = _.map(c2, rf1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericCombinators2.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericCombinators2.symbols.diff new file mode 100644 index 0000000000..8d2b9b5046 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericCombinators2.symbols.diff @@ -0,0 +1,19 @@ +--- old.genericCombinators2.symbols ++++ new.genericCombinators2.symbols +@@= skipped -82, +82 lines =@@ + >_.map : Symbol(Combinators.map, Decl(genericCombinators2.ts, 6, 23), Decl(genericCombinators2.ts, 7, 81)) + >_ : Symbol(_, Decl(genericCombinators2.ts, 11, 3)) + >map : Symbol(Combinators.map, Decl(genericCombinators2.ts, 6, 23), Decl(genericCombinators2.ts, 7, 81)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >c2 : Symbol(c2, Decl(genericCombinators2.ts, 12, 3)) + >x : Symbol(x, Decl(genericCombinators2.ts, 14, 43)) + >y : Symbol(y, Decl(genericCombinators2.ts, 14, 45)) +@@= skipped -13, +13 lines =@@ + >_.map : Symbol(Combinators.map, Decl(genericCombinators2.ts, 6, 23), Decl(genericCombinators2.ts, 7, 81)) + >_ : Symbol(_, Decl(genericCombinators2.ts, 11, 3)) + >map : Symbol(Combinators.map, Decl(genericCombinators2.ts, 6, 23), Decl(genericCombinators2.ts, 7, 81)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >c2 : Symbol(c2, Decl(genericCombinators2.ts, 12, 3)) + >rf1 : Symbol(rf1, Decl(genericCombinators2.ts, 13, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraint1.js.diff b/testdata/baselines/reference/submodule/compiler/genericConstraint1.js.diff new file mode 100644 index 0000000000..67651ee221 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericConstraint1.js.diff @@ -0,0 +1,20 @@ +--- old.genericConstraint1.js ++++ new.genericConstraint1.js +@@= skipped -10, +10 lines =@@ + x.bar2(2, ""); + + //// [genericConstraint1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.bar2 = function (x, y) { ++class C { ++ bar2(x, y) { + return null; +- }; +- return C; +-}()); ++ } ++} + var x = new C(); + x.bar2(2, ""); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraint2.js.diff b/testdata/baselines/reference/submodule/compiler/genericConstraint2.js.diff index 7cb9f05300..e92782c443 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraint2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraint2.js.diff @@ -1,10 +1,24 @@ --- old.genericConstraint2.js +++ new.genericConstraint2.js -@@= skipped -31, +31 lines =@@ +@@= skipped -30, +30 lines =@@ + return 1; return x.comparer(y); } - class ComparableString { +-var ComparableString = /** @class */ (function () { +- function ComparableString(currentValue) { ++class ComparableString { + currentValue; - constructor(currentValue) { ++ constructor(currentValue) { this.currentValue = currentValue; - } \ No newline at end of file + } +- ComparableString.prototype.localeCompare = function (other) { ++ localeCompare(other) { + return 0; +- }; +- return ComparableString; +-}()); ++ } ++} + var a = new ComparableString("a"); + var b = new ComparableString("b"); + var c = compare(a, b); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraint2.types.diff b/testdata/baselines/reference/submodule/compiler/genericConstraint2.types.diff new file mode 100644 index 0000000000..dce294968f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericConstraint2.types.diff @@ -0,0 +1,11 @@ +--- old.genericConstraint2.types ++++ new.genericConstraint2.types +@@= skipped -14, +14 lines =@@ + if (x == null) return y == null ? 0 : -1; + >x == null : boolean + >x : T +->y == null ? 0 : -1 : 0 | -1 ++>y == null ? 0 : -1 : -1 | 0 + >y == null : boolean + >y : T + >0 : 0 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintDeclaration.js.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintDeclaration.js.diff new file mode 100644 index 0000000000..b2252a2be4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintDeclaration.js.diff @@ -0,0 +1,18 @@ +--- old.genericConstraintDeclaration.js ++++ new.genericConstraintDeclaration.js +@@= skipped -10, +10 lines =@@ + + + //// [genericConstraintDeclaration.js] +-var List = /** @class */ (function () { +- function List() { +- } +- List.empty = function () { return null; }; +- return List; +-}()); ++class List { ++ static empty() { return null; } ++} + + + //// [genericConstraintDeclaration.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js index 4e21f2d11d..cd5c0a8276 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts] //// //// [genericConstraintOnExtendedBuiltinTypes.ts] -declare module EndGate { +declare namespace EndGate { export interface ICloneable { Clone(): any; } @@ -9,7 +9,7 @@ declare module EndGate { interface Number extends EndGate.ICloneable { } -module EndGate.Tweening { +namespace EndGate.Tweening { export class Tween{ private _from: T; @@ -20,7 +20,7 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { export class NumberTween extends Tween{ constructor(from: number) { super(from); diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js.diff index 2b4991d68a..d9120f4a40 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.js.diff @@ -1,26 +1,57 @@ --- old.genericConstraintOnExtendedBuiltinTypes.js +++ new.genericConstraintOnExtendedBuiltinTypes.js -@@= skipped -30, +30 lines =@@ +@@= skipped -28, +28 lines =@@ + } + //// [genericConstraintOnExtendedBuiltinTypes.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var EndGate; (function (EndGate) { - var Tweening; + let Tweening; (function (Tweening) { - class Tween { +- var Tween = /** @class */ (function () { +- function Tween(from) { ++ class Tween { + _from; - constructor(from) { ++ constructor(from) { this._from = from.Clone(); } -@@= skipped -11, +12 lines =@@ +- return Tween; +- }()); ++ } + Tweening.Tween = Tween; })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); (function (EndGate) { - var Tweening; + let Tweening; (function (Tweening) { -- class NumberTween extends Tweening.Tween { +- var NumberTween = /** @class */ (function (_super) { +- __extends(NumberTween, _super); +- function NumberTween(from) { +- return _super.call(this, from) || this; + class NumberTween extends Tween { - constructor(from) { - super(from); - } \ No newline at end of file ++ constructor(from) { ++ super(from); + } +- return NumberTween; +- }(Tweening.Tween)); ++ } + Tweening.NumberTween = NumberTween; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); + })(EndGate || (EndGate = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols index 60f4954750..417a82b44b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts] //// === genericConstraintOnExtendedBuiltinTypes.ts === -declare module EndGate { +declare namespace EndGate { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) export interface ICloneable { ->ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) +>ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 27)) Clone(): any; >Clone : Symbol(ICloneable.Clone, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 1, 33)) @@ -14,18 +14,18 @@ declare module EndGate { interface Number extends EndGate.ICloneable { } >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 4, 1)) ->EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) +>EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 27)) >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) ->ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) +>ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 27)) -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 18), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 18)) export class Tween{ ->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 28)) >T : Symbol(T, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 9, 23)) ->ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 24)) +>ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 27)) private _from: T; >_from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 9, 45)) @@ -38,7 +38,7 @@ module EndGate.Tweening { this._from = from.Clone(); >this._from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 9, 45)) ->this : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) +>this : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 28)) >_from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 9, 45)) >from.Clone : Symbol(ICloneable.Clone, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 1, 33)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 13, 20)) @@ -47,19 +47,19 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 17, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 18), Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 18)) export class NumberTween extends Tween{ ->NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 25)) ->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) +>NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 19, 28)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 28)) constructor(from: number) { >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) super(from); ->super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 25)) +>super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 8, 28)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes.ts, 21, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types index 65975ad36e..39981455b7 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes.ts] //// === genericConstraintOnExtendedBuiltinTypes.ts === -declare module EndGate { +declare namespace EndGate { export interface ICloneable { Clone(): any; >Clone : () => any @@ -11,7 +11,7 @@ declare module EndGate { interface Number extends EndGate.ICloneable { } >EndGate : typeof EndGate -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : typeof EndGate >Tweening : typeof Tweening @@ -38,7 +38,7 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : typeof EndGate >Tweening : typeof Tweening diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js index abd1693541..544cd3ff6b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts] //// //// [genericConstraintOnExtendedBuiltinTypes2.ts] -module EndGate { +namespace EndGate { export interface ICloneable { Clone(): any; } @@ -9,7 +9,7 @@ module EndGate { interface Number extends EndGate.ICloneable { } -module EndGate.Tweening { +namespace EndGate.Tweening { export class Tween{ private _from: T; @@ -19,7 +19,7 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { export class NumberTween extends Tween{ constructor(from: number) { super(from); diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js.diff b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js.diff index a01f10a4ce..280ee0dae3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.js.diff @@ -1,26 +1,57 @@ --- old.genericConstraintOnExtendedBuiltinTypes2.js +++ new.genericConstraintOnExtendedBuiltinTypes2.js -@@= skipped -29, +29 lines =@@ +@@= skipped -27, +27 lines =@@ + } + //// [genericConstraintOnExtendedBuiltinTypes2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); var EndGate; (function (EndGate) { - var Tweening; + let Tweening; (function (Tweening) { - class Tween { +- var Tween = /** @class */ (function () { +- function Tween(from) { ++ class Tween { + _from; - constructor(from) { ++ constructor(from) { this._from = from.Clone(); } -@@= skipped -11, +12 lines =@@ +- return Tween; +- }()); ++ } + Tweening.Tween = Tween; })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); })(EndGate || (EndGate = {})); (function (EndGate) { - var Tweening; + let Tweening; (function (Tweening) { -- class NumberTween extends Tweening.Tween { +- var NumberTween = /** @class */ (function (_super) { +- __extends(NumberTween, _super); +- function NumberTween(from) { +- return _super.call(this, from) || this; + class NumberTween extends Tween { - constructor(from) { - super(from); - } \ No newline at end of file ++ constructor(from) { ++ super(from); + } +- return NumberTween; +- }(Tweening.Tween)); ++ } + Tweening.NumberTween = NumberTween; + })(Tweening = EndGate.Tweening || (EndGate.Tweening = {})); + })(EndGate || (EndGate = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols index fb2b9c9b09..ec3340babe 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts] //// === genericConstraintOnExtendedBuiltinTypes2.ts === -module EndGate { +namespace EndGate { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) export interface ICloneable { ->ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) +>ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 19)) Clone(): any; >Clone : Symbol(ICloneable.Clone, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 1, 33)) @@ -14,18 +14,18 @@ module EndGate { interface Number extends EndGate.ICloneable { } >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) ->EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) +>EndGate.ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 19)) >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) ->ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) +>ICloneable : Symbol(EndGate.ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 19)) -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 18), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 18)) export class Tween{ ->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 28)) >T : Symbol(T, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 9, 23)) ->ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 16)) +>ICloneable : Symbol(ICloneable, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 19)) private _from: T; >_from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 9, 45)) @@ -37,7 +37,7 @@ module EndGate.Tweening { this._from = from.Clone(); >this._from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 9, 45)) ->this : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) +>this : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 28)) >_from : Symbol(Tween._from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 9, 45)) >from.Clone : Symbol(ICloneable.Clone, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 1, 33)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 12, 20)) @@ -46,20 +46,20 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : Symbol(EndGate, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 0, 0), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 6, 47), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 16, 1)) ->Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 15), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 15)) +>Tweening : Symbol(Tweening, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 18), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 18)) export class NumberTween extends Tween{ ->NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 25)) ->Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) +>NumberTween : Symbol(NumberTween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 18, 28)) +>Tween : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 28)) >Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 4, 1)) constructor(from: number) { >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) super(from); ->super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 25)) +>super : Symbol(Tween, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 8, 28)) >from : Symbol(from, Decl(genericConstraintOnExtendedBuiltinTypes2.ts, 20, 20)) } } diff --git a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types index 72d1b4f2a6..c7b2b7e43f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types +++ b/testdata/baselines/reference/submodule/compiler/genericConstraintOnExtendedBuiltinTypes2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericConstraintOnExtendedBuiltinTypes2.ts] //// === genericConstraintOnExtendedBuiltinTypes2.ts === -module EndGate { +namespace EndGate { export interface ICloneable { Clone(): any; >Clone : () => any @@ -11,7 +11,7 @@ module EndGate { interface Number extends EndGate.ICloneable { } >EndGate : typeof EndGate -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : typeof EndGate >Tweening : typeof Tweening @@ -37,7 +37,7 @@ module EndGate.Tweening { } } -module EndGate.Tweening { +namespace EndGate.Tweening { >EndGate : typeof EndGate >Tweening : typeof Tweening diff --git a/testdata/baselines/reference/submodule/compiler/genericConstructorFunction1.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericConstructorFunction1.symbols.diff new file mode 100644 index 0000000000..4bf99ad0cc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericConstructorFunction1.symbols.diff @@ -0,0 +1,20 @@ +--- old.genericConstructorFunction1.symbols ++++ new.genericConstructorFunction1.symbols +@@= skipped -11, +11 lines =@@ + >index : Symbol(index, Decl(genericConstructorFunction1.ts, 1, 15)) + >arg : Symbol(arg, Decl(genericConstructorFunction1.ts, 1, 36)) + >T : Symbol(T, Decl(genericConstructorFunction1.ts, 0, 12)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var v2 = v1['test']; + >v2 : Symbol(v2, Decl(genericConstructorFunction1.ts, 2, 7)) +@@= skipped -21, +21 lines =@@ + >T : Symbol(T, Decl(genericConstructorFunction1.ts, 8, 13)) + >arg : Symbol(arg, Decl(genericConstructorFunction1.ts, 8, 23)) + >T : Symbol(T, Decl(genericConstructorFunction1.ts, 8, 13)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + function f2(args: T) { + >f2 : Symbol(f2, Decl(genericConstructorFunction1.ts, 8, 39)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericContextualTypingSpecialization.js.diff b/testdata/baselines/reference/submodule/compiler/genericContextualTypingSpecialization.js.diff new file mode 100644 index 0000000000..be37974dcc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericContextualTypingSpecialization.js.diff @@ -0,0 +1,8 @@ +--- old.genericContextualTypingSpecialization.js ++++ new.genericContextualTypingSpecialization.js +@@= skipped -5, +5 lines =@@ + + //// [genericContextualTypingSpecialization.js] + var b; +-b.reduce(function (c, d) { return c + d; }, 0); // should not error on '+' ++b.reduce((c, d) => c + d, 0); // should not error on '+' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericDefaults.js.diff b/testdata/baselines/reference/submodule/compiler/genericDefaults.js.diff new file mode 100644 index 0000000000..c7ef23b177 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericDefaults.js.diff @@ -0,0 +1,111 @@ +--- old.genericDefaults.js ++++ new.genericDefaults.js +@@= skipped -811, +811 lines =@@ + f20(a); + f20(a, b); + f20(a, b, d); +-var i00c00 = x.a; +-var i00c01 = x.a; +-var i01c00 = x.a; +-var i01c01 = x.a; +-var i02c00 = x.a; +-var i02c01 = x.a; +-var i02c02 = x.a; +-var i02c03 = x.a; +-var i02c04 = x.a; +-var i03c00 = x.a; +-var i03c01 = x.a; +-var i03c02 = x.a; +-var i03c03 = x.a; +-var i03c04 = x.a; +-var i05c00 = x.a; +-var i05c01 = x.a; +-var i06c00 = x.a; +-var i06c01 = x.a; +-var i06c02 = x.a; +-var i07c00 = x.a; +-var i07c01 = x.b; +-var i07c02 = x.a; +-var i07c03 = x.b; +-var Base01c00 = new Base01(); +-var Base01c01 = new Base01(1); +-var Base01c02 = new Base01(); +-var Base01c03 = new Base01(1); +-var Derived01c00 = new Derived01(); +-var Derived01c01 = new Derived01(1); +-var Derived01c02 = new Derived01(); +-var Derived01c03 = new Derived01(1); +-var Derived02c00 = new Derived02(); +-var Derived02c01 = new Derived02(1); +-var Derived02c02 = new Derived02(); +-var Derived02c03 = new Derived02(1); +-var Derived03c00 = new Derived03(ab); +-var Derived03c01 = Derived03c00.a; +-var t00c00 = x.a; +-var t00c01 = x.a; +-var t01c00 = x.a; +-var t01c01 = x.a; +-var t02c00 = x.a; +-var t02c01 = x.a; +-var t02c02 = x.a; +-var t02c03 = x.a; +-var t02c04 = x.a; +-var t03c00 = x.a; +-var t03c01 = x.a; +-var t03c02 = x.a; +-var t03c03 = x.a; +-var t03c04 = x.a; ++const i00c00 = x.a; ++const i00c01 = x.a; ++const i01c00 = x.a; ++const i01c01 = x.a; ++const i02c00 = x.a; ++const i02c01 = x.a; ++const i02c02 = x.a; ++const i02c03 = x.a; ++const i02c04 = x.a; ++const i03c00 = x.a; ++const i03c01 = x.a; ++const i03c02 = x.a; ++const i03c03 = x.a; ++const i03c04 = x.a; ++const i05c00 = x.a; ++const i05c01 = x.a; ++const i06c00 = x.a; ++const i06c01 = x.a; ++const i06c02 = x.a; ++const i07c00 = x.a; ++const i07c01 = x.b; ++const i07c02 = x.a; ++const i07c03 = x.b; ++const Base01c00 = new Base01(); ++const Base01c01 = new Base01(1); ++const Base01c02 = new Base01(); ++const Base01c03 = new Base01(1); ++const Derived01c00 = new Derived01(); ++const Derived01c01 = new Derived01(1); ++const Derived01c02 = new Derived01(); ++const Derived01c03 = new Derived01(1); ++const Derived02c00 = new Derived02(); ++const Derived02c01 = new Derived02(1); ++const Derived02c02 = new Derived02(); ++const Derived02c03 = new Derived02(1); ++const Derived03c00 = new Derived03(ab); ++const Derived03c01 = Derived03c00.a; ++const t00c00 = x.a; ++const t00c01 = x.a; ++const t01c00 = x.a; ++const t01c01 = x.a; ++const t02c00 = x.a; ++const t02c01 = x.a; ++const t02c02 = x.a; ++const t02c03 = x.a; ++const t02c04 = x.a; ++const t03c00 = x.a; ++const t03c01 = x.a; ++const t03c02 = x.a; ++const t03c03 = x.a; ++const t03c04 = x.a; + + + //// [genericDefaults.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericDefaults.types.diff b/testdata/baselines/reference/submodule/compiler/genericDefaults.types.diff new file mode 100644 index 0000000000..f879c8a394 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericDefaults.types.diff @@ -0,0 +1,314 @@ +--- old.genericDefaults.types ++++ new.genericDefaults.types +@@= skipped -775, +775 lines =@@ + + // function with a type parameter with a default that refers to an earier type parameter in a union + declare function f11(a?: T, b?: U): [T, U]; +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : T + >b : U + + // inference + f11(); + >f11() : [unknown, unknown] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + + f11(a); + >f11(a) : [A, A | B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + + f11(a, a); + >f11(a, a) : [A, A] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >a : A + + f11(a, b); + >f11(a, b) : [A, B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >b : B + + f11(a, c); + >f11(a, c) : [A, C] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >c : C + + // no inference, partially supplied + f11(); + >f11() : [A, A | B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + + f11(a); + >f11(a) : [A, A | B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + + f11(a, a); + >f11(a, a) : [A, A | B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >a : A + + f11(a, b); + >f11(a, b) : [A, A | B] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >b : B + + // no inference, fully supplied + f11(); + >f11() : [A, C] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + + f11(a); + >f11(a) : [A, C] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + + f11(a, c); + >f11(a, c) : [A, C] +->f11 : (a?: T, b?: U) => [T, U] ++>f11 : (a?: T, b?: U) => [T, U] + >a : A + >c : C + +@@= skipped -461, +461 lines =@@ + + // function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union + declare function f17(a?: T, b?: U): [T, U]; +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : T + >b : U + + // inference + f17(); + >f17() : [unknown, unknown] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + + f17(a); + >f17(a) : [A, A | B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + + f17(a, a); + >f17(a, a) : [A, A] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >a : A + + f17(a, b); + >f17(a, b) : [A, B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >b : B + + f17(a, c); + >f17(a, c) : [A, C] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >c : C + + // no inference, partially supplied + f17(); + >f17() : [A, A | B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + + f17(a); + >f17(a) : [A, A | B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + + f17(a, a); + >f17(a, a) : [A, A | B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >a : A + + f17(a, b); + >f17(a, b) : [A, A | B] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >b : B + + // no inference, fully supplied + f17(); + >f17() : [A, C] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + + f17(a); + >f17(a) : [A, C] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + + f17(a, c); + >f17(a, c) : [A, C] +->f17 : (a?: T, b?: U) => [T, U] ++>f17 : (a?: T, b?: U) => [T, U] + >a : A + >c : C + + // function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union + declare function f18(a?: T, b?: U, c?: V): [T, U, V]; +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : T + >b : U + >c : V +@@= skipped -80, +80 lines =@@ + // inference + f18(); + >f18() : [unknown, unknown, unknown] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + + f18(a); + >f18(a) : [A, unknown, unknown] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + + f18(a, b); + >f18(a, b) : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + + f18(a, b, b); + >f18(a, b, b) : [A, B, B] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >b : B + + f18(a, b, c); + >f18(a, b, c) : [A, B, C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >c : C +@@= skipped -30, +30 lines =@@ + // no inference, partially supplied + f18(); + >f18() : [A, any, any] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + + f18(a); + >f18(a) : [A, any, any] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + + f18(a, b); + >f18(a, b) : [A, any, any] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + + f18(a, b, b); + >f18(a, b, b) : [A, any, any] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >b : B + + f18(a, b, c); + >f18(a, b, c) : [A, any, any] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >c : C + + f18(); + >f18() : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + + f18(a); + >f18(a) : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + + f18(a, b); + >f18(a, b) : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + + f18(a, b, b); + >f18(a, b, b) : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >b : B + + f18(a, b, c); + >f18(a, b, c) : [A, B, B | C] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >c : C +@@= skipped -59, +59 lines =@@ + // no inference, fully supplied + f18(); + >f18() : [A, B, D] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + + f18(a); + >f18(a) : [A, B, D] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + + f18(a, b); + >f18(a, b) : [A, B, D] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + + f18(a, b, d); + >f18(a, b, d) : [A, B, D] +->f18 : (a?: T, b?: U, c?: V) => [T, U, V] ++>f18 : (a?: T, b?: U, c?: V) => [T, U, V] + >a : A + >b : B + >d : D \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase.js.diff b/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase.js.diff index c5f9c209e3..9d8433662d 100644 --- a/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase.js.diff @@ -1,13 +1,42 @@ --- old.genericDerivedTypeWithSpecializedBase.js +++ new.genericDerivedTypeWithSpecializedBase.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [genericDerivedTypeWithSpecializedBase.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + x; - } - class B extends A { ++} ++class B extends A { + y; - } ++} var x; - var y; \ No newline at end of file + var y; + x = y; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase2.js.diff b/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase2.js.diff index 39ae8bc7da..59beee2e3f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericDerivedTypeWithSpecializedBase2.js.diff @@ -1,13 +1,42 @@ --- old.genericDerivedTypeWithSpecializedBase2.js +++ new.genericDerivedTypeWithSpecializedBase2.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [genericDerivedTypeWithSpecializedBase2.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + x; - } - class B extends A { ++} ++class B extends A { + y; - } ++} var x; - var y; \ No newline at end of file + var y; + x = y; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionCallSignatureReturnTypeMismatch.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionCallSignatureReturnTypeMismatch.symbols.diff new file mode 100644 index 0000000000..f3b110c702 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionCallSignatureReturnTypeMismatch.symbols.diff @@ -0,0 +1,13 @@ +--- old.genericFunctionCallSignatureReturnTypeMismatch.symbols ++++ new.genericFunctionCallSignatureReturnTypeMismatch.symbols +@@= skipped -1, +1 lines =@@ + + === genericFunctionCallSignatureReturnTypeMismatch.ts === + interface Array {} +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(genericFunctionCallSignatureReturnTypeMismatch.ts, 0, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(genericFunctionCallSignatureReturnTypeMismatch.ts, 0, 0)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(genericFunctionCallSignatureReturnTypeMismatch.ts, 0, 16)) + + var f : { (x:T): T; } + >f : Symbol(f, Decl(genericFunctionCallSignatureReturnTypeMismatch.ts, 2, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionHasFreshTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionHasFreshTypeArgs.js.diff new file mode 100644 index 0000000000..dd150a208f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionHasFreshTypeArgs.js.diff @@ -0,0 +1,8 @@ +--- old.genericFunctionHasFreshTypeArgs.js ++++ new.genericFunctionHasFreshTypeArgs.js +@@= skipped -6, +6 lines =@@ + //// [genericFunctionHasFreshTypeArgs.js] + function f(p) { } + ; +-f(function (x) { return f(function (y) { return x = y; }); }); ++f(x => f(y => x = y)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionInference2.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionInference2.js.diff index 57fccd601a..3c15a99066 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunctionInference2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionInference2.js.diff @@ -5,6 +5,24 @@ //// [genericFunctionInference2.js] -// Repro from #30685 - const myReducer1 = combineReducers({ - combined: combineReducers({ foo }), - }); \ No newline at end of file +-var myReducer1 = combineReducers({ +- combined: combineReducers({ foo: foo }), +-}); +-var myReducer2 = combineReducers({ +- combined: combineReducers({ foo: foo }), +-}); +-var enhancer4 = withH(function (props) { return ({ +- onChange: function (props) { return function (e) { }; }, +- onSubmit: function (props) { return function (e) { }; }, +-}); }); ++const myReducer1 = combineReducers({ ++ combined: combineReducers({ foo }), ++}); ++const myReducer2 = combineReducers({ ++ combined: combineReducers({ foo }), ++}); ++const enhancer4 = withH((props) => ({ ++ onChange: (props) => (e) => { }, ++ onSubmit: (props) => (e) => { }, ++})); + enhancer4.onChange(null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionSpecializations1.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionSpecializations1.symbols.diff new file mode 100644 index 0000000000..5adaa4f8af --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionSpecializations1.symbols.diff @@ -0,0 +1,10 @@ +--- old.genericFunctionSpecializations1.symbols ++++ new.genericFunctionSpecializations1.symbols +@@= skipped -19, +19 lines =@@ + function foo4(test: T) { } + >foo4 : Symbol(foo4, Decl(genericFunctionSpecializations1.ts, 1, 29), Decl(genericFunctionSpecializations1.ts, 3, 31)) + >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >test : Symbol(test, Decl(genericFunctionSpecializations1.ts, 4, 32)) + >T : Symbol(T, Decl(genericFunctionSpecializations1.ts, 4, 14)) diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionTypedArgumentsAreFixed.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionTypedArgumentsAreFixed.js.diff new file mode 100644 index 0000000000..71cc7f9be0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionTypedArgumentsAreFixed.js.diff @@ -0,0 +1,8 @@ +--- old.genericFunctionTypedArgumentsAreFixed.js ++++ new.genericFunctionTypedArgumentsAreFixed.js +@@= skipped -4, +4 lines =@@ + map((a) => a.length, [1]); + + //// [genericFunctionTypedArgumentsAreFixed.js] +-map(function (a) { return a.length; }, [1]); ++map((a) => a.length, [1]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctions2.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctions2.js.diff new file mode 100644 index 0000000000..94331bb5cd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctions2.js.diff @@ -0,0 +1,11 @@ +--- old.genericFunctions2.js ++++ new.genericFunctions2.js +@@= skipped -9, +9 lines =@@ + + //// [genericFunctions2.js] + var myItems; +-var lengths = map(myItems, function (x) { return x.length; }); ++var lengths = map(myItems, x => x.length); + + + //// [genericFunctions2.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsAndConditionalInference.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsAndConditionalInference.js.diff new file mode 100644 index 0000000000..a4793beedf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsAndConditionalInference.js.diff @@ -0,0 +1,24 @@ +--- old.genericFunctionsAndConditionalInference.js ++++ new.genericFunctionsAndConditionalInference.js +@@= skipped -43, +43 lines =@@ + function foo(obj) { + return unboxify(obj); + } +-var qq = foo({ u: { value: 10 }, v: { value: 'hello' } }); // { u: U, v: V } but should be { u: number, v: string } +-var left = {}; +-var right = {}; +-var ok = function (at) { return ({ lr: at.lr(at.str, at.num) }); }; +-var orphaned = function (at) { return at.dict(ok(at)); }; +-var leftOk = ok(left); +-var leftOrphaned = orphaned(left); +-var rightOk = ok(right); +-var rightOrphaned = orphaned(right); ++let qq = foo({ u: { value: 10 }, v: { value: 'hello' } }); // { u: U, v: V } but should be { u: number, v: string } ++const left = {}; ++const right = {}; ++const ok = (at) => ({ lr: at.lr(at.str, at.num) }); ++const orphaned = (at) => at.dict(ok(at)); ++const leftOk = ok(left); ++const leftOrphaned = orphaned(left); ++const rightOk = ok(right); ++const rightOrphaned = orphaned(right); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsNotContextSensitive.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsNotContextSensitive.js.diff index e734247968..43568a3149 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunctionsNotContextSensitive.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsNotContextSensitive.js.diff @@ -6,5 +6,7 @@ //// [genericFunctionsNotContextSensitive.js] -"use strict"; // Repro from #37110 - const f = (_) => _; - const a = f((_) => _ => ({})); // (_: K) => (_: G) => {} \ No newline at end of file +-var f = function (_) { return _; }; +-var a = f(function (_) { return function (_) { return ({}); }; }); // (_: K) => (_: G) => {} ++const f = (_) => _; ++const a = f((_) => _ => ({})); // (_: K) => (_: G) => {} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters1.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters1.symbols.diff new file mode 100644 index 0000000000..10b7bf47e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters1.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericFunctionsWithOptionalParameters1.symbols ++++ new.genericFunctionsWithOptionalParameters1.symbols +@@= skipped -8, +8 lines =@@ + >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8)) + >S : Symbol(S, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 10)) + >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 14)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 8)) + >folder : Symbol(folder, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 27)) + >s : Symbol(s, Decl(genericFunctionsWithOptionalParameters1.ts, 1, 38)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters2.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters2.symbols.diff new file mode 100644 index 0000000000..e19ecd4195 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters2.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericFunctionsWithOptionalParameters2.symbols ++++ new.genericFunctionsWithOptionalParameters2.symbols +@@= skipped -8, +8 lines =@@ + >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 8)) + >S : Symbol(S, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 10)) + >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 14)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 8)) + >folder : Symbol(folder, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 26)) + >s : Symbol(s, Decl(genericFunctionsWithOptionalParameters2.ts, 1, 37)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.js.diff new file mode 100644 index 0000000000..bdbd850c8b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.js.diff @@ -0,0 +1,26 @@ +--- old.genericFunctionsWithOptionalParameters3.js ++++ new.genericFunctionsWithOptionalParameters3.js +@@= skipped -17, +17 lines =@@ + + + //// [genericFunctionsWithOptionalParameters3.js] +-var Collection = /** @class */ (function () { +- function Collection() { +- } +- Collection.prototype.add = function (x) { }; +- return Collection; +-}()); ++class Collection { ++ add(x) { } ++} + var utils; + var c = new Collection(); +-var r3 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); +-var r4 = utils.mapReduce(c, function (x) { return 1; }, function (y) { return new Date(); }); +-var f1 = function (x) { return 1; }; +-var f2 = function (y) { return new Date(); }; ++var r3 = utils.mapReduce(c, (x) => { return 1; }, (y) => { return new Date(); }); ++var r4 = utils.mapReduce(c, (x) => { return 1; }, (y) => { return new Date(); }); ++var f1 = (x) => { return 1; }; ++var f2 = (y) => { return new Date(); }; + var r5 = utils.mapReduce(c, f1, f2); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.symbols.diff new file mode 100644 index 0000000000..7a16edd4a6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunctionsWithOptionalParameters3.symbols.diff @@ -0,0 +1,29 @@ +--- old.genericFunctionsWithOptionalParameters3.symbols ++++ new.genericFunctionsWithOptionalParameters3.symbols +@@= skipped -64, +64 lines =@@ + >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters3.ts, 8, 3)) + >x : Symbol(x, Decl(genericFunctionsWithOptionalParameters3.ts, 9, 29)) + >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 9, 50)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var r4 = utils.mapReduce(c, (x: string) => { return 1 }, (y: number) => { return new Date() }); + >r4 : Symbol(r4, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 3)) +@@= skipped -10, +10 lines =@@ + >c : Symbol(c, Decl(genericFunctionsWithOptionalParameters3.ts, 8, 3)) + >x : Symbol(x, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 29)) + >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 10, 58)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var f1 = (x: string) => { return 1 }; + >f1 : Symbol(f1, Decl(genericFunctionsWithOptionalParameters3.ts, 11, 3)) +@@= skipped -9, +9 lines =@@ + var f2 = (y: number) => { return new Date() }; + >f2 : Symbol(f2, Decl(genericFunctionsWithOptionalParameters3.ts, 12, 3)) + >y : Symbol(y, Decl(genericFunctionsWithOptionalParameters3.ts, 12, 10)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var r5 = utils.mapReduce(c, f1, f2); + >r5 : Symbol(r5, Decl(genericFunctionsWithOptionalParameters3.ts, 13, 3)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.errors.txt b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.errors.txt index 4faa622a4b..1ea5c8564b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.errors.txt @@ -2,9 +2,9 @@ genericFunduleInModule.ts(8,8): error TS2749: 'A.B' refers to a value, but is be ==== genericFunduleInModule.ts (1 errors) ==== - module A { + namespace A { export function B(x: T) { return x; } - export module B { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.js b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.js index 19a5eeb354..de0139911b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.js +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.js @@ -1,9 +1,9 @@ //// [tests/cases/compiler/genericFunduleInModule.ts] //// //// [genericFunduleInModule.ts] -module A { +namespace A { export function B(x: T) { return x; } - export module B { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.symbols b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.symbols index c48ca960f7..d0fd028d3e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.symbols @@ -1,18 +1,18 @@ //// [tests/cases/compiler/genericFunduleInModule.ts] //// === genericFunduleInModule.ts === -module A { +namespace A { >A : Symbol(A, Decl(genericFunduleInModule.ts, 0, 0)) export function B(x: T) { return x; } ->B : Symbol(B, Decl(genericFunduleInModule.ts, 0, 10), Decl(genericFunduleInModule.ts, 1, 44)) +>B : Symbol(B, Decl(genericFunduleInModule.ts, 0, 13), Decl(genericFunduleInModule.ts, 1, 44)) >T : Symbol(T, Decl(genericFunduleInModule.ts, 1, 22)) >x : Symbol(x, Decl(genericFunduleInModule.ts, 1, 25)) >T : Symbol(T, Decl(genericFunduleInModule.ts, 1, 22)) >x : Symbol(x, Decl(genericFunduleInModule.ts, 1, 25)) - export module B { ->B : Symbol(B, Decl(genericFunduleInModule.ts, 0, 10), Decl(genericFunduleInModule.ts, 1, 44)) + export namespace B { +>B : Symbol(B, Decl(genericFunduleInModule.ts, 0, 13), Decl(genericFunduleInModule.ts, 1, 44)) export var x = 1; >x : Symbol(x, Decl(genericFunduleInModule.ts, 3, 18)) @@ -25,7 +25,7 @@ var b: A.B; >B : Symbol(A.B) A.B(1); ->A.B : Symbol(A.B, Decl(genericFunduleInModule.ts, 0, 10), Decl(genericFunduleInModule.ts, 1, 44)) +>A.B : Symbol(A.B, Decl(genericFunduleInModule.ts, 0, 13), Decl(genericFunduleInModule.ts, 1, 44)) >A : Symbol(A, Decl(genericFunduleInModule.ts, 0, 0)) ->B : Symbol(A.B, Decl(genericFunduleInModule.ts, 0, 10), Decl(genericFunduleInModule.ts, 1, 44)) +>B : Symbol(A.B, Decl(genericFunduleInModule.ts, 0, 13), Decl(genericFunduleInModule.ts, 1, 44)) diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.types b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.types index 333110f90d..2079a2312b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.types +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericFunduleInModule.ts] //// === genericFunduleInModule.ts === -module A { +namespace A { >A : typeof A export function B(x: T) { return x; } @@ -9,7 +9,7 @@ module A { >x : T >x : T - export module B { + export namespace B { >B : typeof B export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.errors.txt b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.errors.txt index a980c90918..44b4fc78ce 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.errors.txt @@ -2,12 +2,12 @@ genericFunduleInModule2.ts(11,8): error TS2749: 'A.B' refers to a value, but is ==== genericFunduleInModule2.ts (1 errors) ==== - module A { + namespace A { export function B(x: T) { return x; } } - module A { - export module B { + namespace A { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js index f28f010288..913eb99593 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/genericFunduleInModule2.ts] //// //// [genericFunduleInModule2.ts] -module A { +namespace A { export function B(x: T) { return x; } } -module A { - export module B { +namespace A { + export namespace B { export var x = 1; } } diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js.diff b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js.diff new file mode 100644 index 0000000000..02f36561dc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.js.diff @@ -0,0 +1,11 @@ +--- old.genericFunduleInModule2.js ++++ new.genericFunduleInModule2.js +@@= skipped -20, +20 lines =@@ + A.B = B; + })(A || (A = {})); + (function (A) { +- var B; ++ let B; + (function (B) { + B.x = 1; + })(B = A.B || (A.B = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.symbols b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.symbols index 906279addb..506dd798f8 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/genericFunduleInModule2.ts] //// === genericFunduleInModule2.ts === -module A { +namespace A { >A : Symbol(A, Decl(genericFunduleInModule2.ts, 0, 0), Decl(genericFunduleInModule2.ts, 2, 1)) export function B(x: T) { return x; } ->B : Symbol(B, Decl(genericFunduleInModule2.ts, 0, 10), Decl(genericFunduleInModule2.ts, 4, 10)) +>B : Symbol(B, Decl(genericFunduleInModule2.ts, 0, 13), Decl(genericFunduleInModule2.ts, 4, 13)) >T : Symbol(T, Decl(genericFunduleInModule2.ts, 1, 22)) >x : Symbol(x, Decl(genericFunduleInModule2.ts, 1, 25)) >T : Symbol(T, Decl(genericFunduleInModule2.ts, 1, 22)) >x : Symbol(x, Decl(genericFunduleInModule2.ts, 1, 25)) } -module A { +namespace A { >A : Symbol(A, Decl(genericFunduleInModule2.ts, 0, 0), Decl(genericFunduleInModule2.ts, 2, 1)) - export module B { ->B : Symbol(B, Decl(genericFunduleInModule2.ts, 0, 10), Decl(genericFunduleInModule2.ts, 4, 10)) + export namespace B { +>B : Symbol(B, Decl(genericFunduleInModule2.ts, 0, 13), Decl(genericFunduleInModule2.ts, 4, 13)) export var x = 1; >x : Symbol(x, Decl(genericFunduleInModule2.ts, 6, 18)) @@ -29,7 +29,7 @@ var b: A.B; >B : Symbol(A.B) A.B(1); ->A.B : Symbol(A.B, Decl(genericFunduleInModule2.ts, 0, 10), Decl(genericFunduleInModule2.ts, 4, 10)) +>A.B : Symbol(A.B, Decl(genericFunduleInModule2.ts, 0, 13), Decl(genericFunduleInModule2.ts, 4, 13)) >A : Symbol(A, Decl(genericFunduleInModule2.ts, 0, 0), Decl(genericFunduleInModule2.ts, 2, 1)) ->B : Symbol(A.B, Decl(genericFunduleInModule2.ts, 0, 10), Decl(genericFunduleInModule2.ts, 4, 10)) +>B : Symbol(A.B, Decl(genericFunduleInModule2.ts, 0, 13), Decl(genericFunduleInModule2.ts, 4, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.types b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.types index c3b5f8b3eb..c20bee8938 100644 --- a/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.types +++ b/testdata/baselines/reference/submodule/compiler/genericFunduleInModule2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericFunduleInModule2.ts] //// === genericFunduleInModule2.ts === -module A { +namespace A { >A : typeof A export function B(x: T) { return x; } @@ -10,10 +10,10 @@ module A { >x : T } -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B export var x = 1; diff --git a/testdata/baselines/reference/submodule/compiler/genericGetter.js.diff b/testdata/baselines/reference/submodule/compiler/genericGetter.js.diff index e3068d1a32..b7db748f73 100644 --- a/testdata/baselines/reference/submodule/compiler/genericGetter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericGetter.js.diff @@ -1,10 +1,25 @@ --- old.genericGetter.js +++ new.genericGetter.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + var r: string = c.x; //// [genericGetter.js] - class C { +-var C = /** @class */ (function () { +- function C() { ++class C { + data; - get x() { - return this.data; - } \ No newline at end of file ++ get x() { ++ return this.data; + } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return this.data; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++} + var c = new C(); + var r = c.x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericGetter2.js.diff b/testdata/baselines/reference/submodule/compiler/genericGetter2.js.diff index c1c9458174..d5cb5e81fe 100644 --- a/testdata/baselines/reference/submodule/compiler/genericGetter2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericGetter2.js.diff @@ -1,10 +1,31 @@ --- old.genericGetter2.js +++ new.genericGetter2.js -@@= skipped -13, +13 lines =@@ - class A { +@@= skipped -10, +10 lines =@@ } - class C { + + //// [genericGetter2.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return this.data; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class A { ++} ++class C { + data; - get x() { - return this.data; - } \ No newline at end of file ++ get x() { ++ return this.data; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericGetter3.js.diff b/testdata/baselines/reference/submodule/compiler/genericGetter3.js.diff index 2aaafc68bb..94819226fb 100644 --- a/testdata/baselines/reference/submodule/compiler/genericGetter3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericGetter3.js.diff @@ -1,10 +1,33 @@ --- old.genericGetter3.js +++ new.genericGetter3.js -@@= skipped -16, +16 lines =@@ - class A { - } - class C { +@@= skipped -13, +13 lines =@@ + var r: string = c.x; + + //// [genericGetter3.js] +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return this.data; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class A { ++} ++class C { + data; - get x() { - return this.data; - } \ No newline at end of file ++ get x() { ++ return this.data; ++ } ++} + var c = new C(); + var r = c.x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericImplements.js.diff b/testdata/baselines/reference/submodule/compiler/genericImplements.js.diff index c83c5ef615..6d79111b7f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericImplements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericImplements.js.diff @@ -1,14 +1,59 @@ --- old.genericImplements.js +++ new.genericImplements.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + } // { f: () => T } //// [genericImplements.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-; +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-; +-// OK +-var X = /** @class */ (function () { +- function X() { +- } +- X.prototype.f = function () { return undefined; }; +- return X; +-}()); // { f: () => { b; } } +-// OK +-var Y = /** @class */ (function () { +- function Y() { +- } +- Y.prototype.f = function () { return undefined; }; +- return Y; +-}()); // { f: () => { a; } } +-// OK +-var Z = /** @class */ (function () { +- function Z() { +- } +- Z.prototype.f = function () { return undefined; }; +- return Z; +-}()); // { f: () => T } ++class A { + a; - } - ; - class B { ++} ++; ++class B { + b; - } - ; - // OK \ No newline at end of file ++} ++; ++// OK ++class X { ++ f() { return undefined; } ++} // { f: () => { b; } } ++// OK ++class Y { ++ f() { return undefined; } ++} // { f: () => { a; } } ++// OK ++class Z { ++ f() { return undefined; } ++} // { f: () => T } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.js.diff b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.js.diff new file mode 100644 index 0000000000..8c60534306 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.js.diff @@ -0,0 +1,17 @@ +--- old.genericIndexedAccessMethodIntersectionCanBeAccessed.js ++++ new.genericIndexedAccessMethodIntersectionCanBeAccessed.js +@@= skipped -25, +25 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createService = void 0; +-var createService = function (ServiceCtr) { +- Object.keys(ServiceCtr).forEach(function (key) { +- var method = (ServiceCtr)[key]; +- var __$daemonMode = method.__$daemonMode, __$action = method.__$action, id = method.id; ++const createService = (ServiceCtr) => { ++ Object.keys(ServiceCtr).forEach(key => { ++ const method = (ServiceCtr)[key]; ++ const { __$daemonMode, __$action, id } = method; + }); + }; + exports.createService = createService; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.symbols.diff new file mode 100644 index 0000000000..f86e062a14 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.symbols.diff @@ -0,0 +1,14 @@ +--- old.genericIndexedAccessMethodIntersectionCanBeAccessed.symbols ++++ new.genericIndexedAccessMethodIntersectionCanBeAccessed.symbols +@@= skipped -46, +46 lines =@@ + ) => { + Object.keys(ServiceCtr).forEach(key => { + >Object.keys(ServiceCtr).forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +->Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>Object.keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --)) + >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ++>keys : Symbol(ObjectConstructor.keys, Decl(lib.es5.d.ts, --, --)) + >ServiceCtr : Symbol(ServiceCtr, Decl(genericIndexedAccessMethodIntersectionCanBeAccessed.ts, 11, 33)) + >forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) + >key : Symbol(key, Decl(genericIndexedAccessMethodIntersectionCanBeAccessed.ts, 14, 36)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.types.diff b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.types.diff new file mode 100644 index 0000000000..634f08681a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessMethodIntersectionCanBeAccessed.types.diff @@ -0,0 +1,14 @@ +--- old.genericIndexedAccessMethodIntersectionCanBeAccessed.types ++++ new.genericIndexedAccessMethodIntersectionCanBeAccessed.types +@@= skipped -33, +33 lines =@@ + >Object.keys(ServiceCtr).forEach(key => { const method = (ServiceCtr)[key as keyof T]; const {__$daemonMode, __$action, id} = method; }) : void + >Object.keys(ServiceCtr).forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void + >Object.keys(ServiceCtr) : string[] +->Object.keys : { (o: object): string[]; (o: {}): string[]; } ++>Object.keys : (o: object) => string[] + >Object : ObjectConstructor +->keys : { (o: object): string[]; (o: {}): string[]; } ++>keys : (o: object) => string[] + >ServiceCtr : ExtendedService & Service + >forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void + >key => { const method = (ServiceCtr)[key as keyof T]; const {__$daemonMode, __$action, id} = method; } : (key: string) => void \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericIndexedAccessVarianceComparisonResultCorrect.js.diff b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessVarianceComparisonResultCorrect.js.diff index 7f4caa3c6f..8cfe1b277a 100644 --- a/testdata/baselines/reference/submodule/compiler/genericIndexedAccessVarianceComparisonResultCorrect.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericIndexedAccessVarianceComparisonResultCorrect.js.diff @@ -1,23 +1,30 @@ --- old.genericIndexedAccessVarianceComparisonResultCorrect.js +++ new.genericIndexedAccessVarianceComparisonResultCorrect.js -@@= skipped -29, +29 lines =@@ +@@= skipped -28, +28 lines =@@ + c = d; //// [genericIndexedAccessVarianceComparisonResultCorrect.js] - class A { -- constructor() { +-var A = /** @class */ (function () { +- function A() { - this.x = 'A'; - this.y = 0; - } -+ x = 'A'; -+ y = 0; - } - class B { -- constructor() { +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.x = 'B'; - this.z = true; - } +- return B; +-}()); ++class A { ++ x = 'A'; ++ y = 0; ++} ++class B { + x = 'B'; + z = true; - } ++} b = a; // should be no error c = d; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInference1.js.diff b/testdata/baselines/reference/submodule/compiler/genericInference1.js.diff new file mode 100644 index 0000000000..83bf780bf7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericInference1.js.diff @@ -0,0 +1,8 @@ +--- old.genericInference1.js ++++ new.genericInference1.js +@@= skipped -3, +3 lines =@@ + ['a', 'b', 'c'].map(x => x.length); + + //// [genericInference1.js] +-['a', 'b', 'c'].map(function (x) { return x.length; }); ++['a', 'b', 'c'].map(x => x.length); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInference2.js b/testdata/baselines/reference/submodule/compiler/genericInference2.js index 7f2b4b5cd0..382cd97bca 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInference2.js +++ b/testdata/baselines/reference/submodule/compiler/genericInference2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericInference2.ts] //// //// [genericInference2.ts] - declare module ko { + declare namespace ko { export interface Observable { (): T; (value: T): any; diff --git a/testdata/baselines/reference/submodule/compiler/genericInference2.symbols b/testdata/baselines/reference/submodule/compiler/genericInference2.symbols index 04b81f754a..cdbdc56730 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInference2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericInference2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericInference2.ts] //// === genericInference2.ts === - declare module ko { + declare namespace ko { >ko : Symbol(ko, Decl(genericInference2.ts, 0, 0)) export interface Observable { ->Observable : Symbol(Observable, Decl(genericInference2.ts, 0, 23)) +>Observable : Symbol(Observable, Decl(genericInference2.ts, 0, 26)) >T : Symbol(T, Decl(genericInference2.ts, 1, 35)) (): T; @@ -30,7 +30,7 @@ >T : Symbol(T, Decl(genericInference2.ts, 8, 34)) >value : Symbol(value, Decl(genericInference2.ts, 8, 37)) >T : Symbol(T, Decl(genericInference2.ts, 8, 34)) ->Observable : Symbol(Observable, Decl(genericInference2.ts, 0, 23)) +>Observable : Symbol(Observable, Decl(genericInference2.ts, 0, 26)) >T : Symbol(T, Decl(genericInference2.ts, 8, 34)) } var o = { diff --git a/testdata/baselines/reference/submodule/compiler/genericInference2.types b/testdata/baselines/reference/submodule/compiler/genericInference2.types index f5473b31fd..57251d43b1 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInference2.types +++ b/testdata/baselines/reference/submodule/compiler/genericInference2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericInference2.ts] //// === genericInference2.ts === - declare module ko { + declare namespace ko { >ko : typeof ko export interface Observable { diff --git a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameter.js.diff index 58907b3091..f0fe2cc5bf 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameter.js.diff @@ -6,6 +6,9 @@ //// [genericInferenceDefaultTypeParameter.js] -"use strict"; -// Repro from #50858 - f1(event => { }); - f1(event => { }); - f1(event => { }); \ No newline at end of file +-f1(function (event) { }); +-f1(function (event) { }); +-f1(function (event) { }); ++f1(event => { }); ++f1(event => { }); ++f1(event => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff index fb30d959fd..c3913dfad3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericInferenceDefaultTypeParameterJsxReact.js.diff @@ -15,4 +15,6 @@ +const react_1 = __importDefault(require("react")); function Component(props) { return react_1.default.createElement(react_1.default.Fragment, null); - } \ No newline at end of file + } +-var v1 = react_1.default.createElement(Component, { onClick: function (e) { return e.preventDefault(); } }); ++const v1 = react_1.default.createElement(Component, { onClick: e => e.preventDefault() }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInheritedDefaultConstructors.js.diff b/testdata/baselines/reference/submodule/compiler/genericInheritedDefaultConstructors.js.diff index 9ad4b447a0..0bbcb2d4fc 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInheritedDefaultConstructors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericInheritedDefaultConstructors.js.diff @@ -1,12 +1,40 @@ --- old.genericInheritedDefaultConstructors.js +++ new.genericInheritedDefaultConstructors.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [genericInheritedDefaultConstructors.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + a; - } - class B extends A { ++} ++class B extends A { + b; - } ++} var c = B; // shouldn't error here \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInstanceOf.js.diff b/testdata/baselines/reference/submodule/compiler/genericInstanceOf.js.diff index 2ab812f48a..cb5320ec8e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericInstanceOf.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericInstanceOf.js.diff @@ -1,11 +1,24 @@ --- old.genericInstanceOf.js +++ new.genericInstanceOf.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + } //// [genericInstanceOf.js] - class C { +-var C = /** @class */ (function () { +- function C(a, b) { ++class C { + a; + b; - constructor(a, b) { ++ constructor(a, b) { this.a = a; - this.b = b; \ No newline at end of file + this.b = b; + } +- C.prototype.foo = function () { ++ foo() { + if (this.a instanceof this.b) { + } +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInterfaceImplementation.js.diff b/testdata/baselines/reference/submodule/compiler/genericInterfaceImplementation.js.diff new file mode 100644 index 0000000000..dddf705e3c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericInterfaceImplementation.js.diff @@ -0,0 +1,23 @@ +--- old.genericInterfaceImplementation.js ++++ new.genericInterfaceImplementation.js +@@= skipped -18, +18 lines =@@ + + + //// [genericInterfaceImplementation.js] +-var None = /** @class */ (function () { +- function None() { +- } +- None.prototype.get = function () { ++class None { ++ get() { + throw null; +- }; +- None.prototype.flatten = function () { ++ } ++ flatten() { + return new None(); +- }; +- return None; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInterfaceTypeCall.js.diff b/testdata/baselines/reference/submodule/compiler/genericInterfaceTypeCall.js.diff new file mode 100644 index 0000000000..b1f52b9bac --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericInterfaceTypeCall.js.diff @@ -0,0 +1,10 @@ +--- old.genericInterfaceTypeCall.js ++++ new.genericInterfaceTypeCall.js +@@= skipped -18, +18 lines =@@ + //// [genericInterfaceTypeCall.js] + var foo; + var test; +-test.fail(function (arg) { return foo.reject(arg); }); +-test.fail2(function (arg) { return foo.reject(arg); }); // Error: Supplied parameters do not match any signature of call target ++test.fail(arg => foo.reject(arg)); ++test.fail2(arg => foo.reject(arg)); // Error: Supplied parameters do not match any signature of call target \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericInterfacesWithoutTypeArguments.js.diff b/testdata/baselines/reference/submodule/compiler/genericInterfacesWithoutTypeArguments.js.diff new file mode 100644 index 0000000000..aa883052e0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericInterfacesWithoutTypeArguments.js.diff @@ -0,0 +1,15 @@ +--- old.genericInterfacesWithoutTypeArguments.js ++++ new.genericInterfacesWithoutTypeArguments.js +@@= skipped -7, +7 lines =@@ + + + //// [genericInterfacesWithoutTypeArguments.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + var i; + var c; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericIsNeverEmptyObject.js.diff b/testdata/baselines/reference/submodule/compiler/genericIsNeverEmptyObject.js.diff index f4c36261ad..4fb6fa4d34 100644 --- a/testdata/baselines/reference/submodule/compiler/genericIsNeverEmptyObject.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericIsNeverEmptyObject.js.diff @@ -15,5 +15,11 @@ }; +// Repro from #29067 function test(obj) { - let { a } = obj, rest = __rest(obj, ["a"]); - return __assign(__assign({}, rest), { b: a }); \ No newline at end of file +- var a = obj.a, rest = __rest(obj, ["a"]); ++ let { a } = obj, rest = __rest(obj, ["a"]); + return __assign(__assign({}, rest), { b: a }); + } +-var o1 = { a: 'hello', x: 42 }; +-var o2 = test(o1); ++let o1 = { a: 'hello', x: 42 }; ++let o2 = test(o1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericLambaArgWithoutTypeArguments.js.diff b/testdata/baselines/reference/submodule/compiler/genericLambaArgWithoutTypeArguments.js.diff new file mode 100644 index 0000000000..31aecbc74e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericLambaArgWithoutTypeArguments.js.diff @@ -0,0 +1,8 @@ +--- old.genericLambaArgWithoutTypeArguments.js ++++ new.genericLambaArgWithoutTypeArguments.js +@@= skipped -13, +13 lines =@@ + function foo(a) { + return null; + } +-foo(function (arg) { return arg.x; }); ++foo((arg) => { return arg.x; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericMappedTypeAsClause.js.diff b/testdata/baselines/reference/submodule/compiler/genericMappedTypeAsClause.js.diff index f850b4d1de..8d8af5684e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMappedTypeAsClause.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericMappedTypeAsClause.js.diff @@ -5,6 +5,21 @@ //// [genericMappedTypeAsClause.js] -"use strict"; - const foo1 = { aFoo: 'test', bFoo: 42 }; - const foo2 = { bFoo: 'bar' }; // Error - function f1() { \ No newline at end of file +-var foo1 = { aFoo: 'test', bFoo: 42 }; +-var foo2 = { bFoo: 'bar' }; // Error ++const foo1 = { aFoo: 'test', bFoo: 42 }; ++const foo2 = { bFoo: 'bar' }; // Error + function f1() { +- var x1 = 42; // Error +- var x2 = 'test'; // Error +- var x3 = [1, 2, 3]; // Error +- var x4 = false; // Error +- var x5 = { a: 'bar', b: 42 }; // Error +- var x6 = undefined; // Error ++ const x1 = 42; // Error ++ const x2 = 'test'; // Error ++ const x3 = [1, 2, 3]; // Error ++ const x4 = false; // Error ++ const x5 = { a: 'bar', b: 42 }; // Error ++ const x6 = undefined; // Error + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.errors.txt b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.errors.txt index f8106b2154..57123560b9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.errors.txt @@ -4,7 +4,7 @@ genericMergedDeclarationUsingTypeParameter.ts(4,14): error TS2304: Cannot find n ==== genericMergedDeclarationUsingTypeParameter.ts (2 errors) ==== function foo(y: T, z: U) { return y; } - module foo { + namespace foo { export var x: T; ~ !!! error TS2304: Cannot find name 'T'. diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.js b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.js index a10afb2473..78af72d095 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.js +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.js @@ -2,7 +2,7 @@ //// [genericMergedDeclarationUsingTypeParameter.ts] function foo(y: T, z: U) { return y; } -module foo { +namespace foo { export var x: T; var y = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.symbols b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.symbols index 64b0416e38..028bb35878 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.symbols @@ -12,7 +12,7 @@ function foo(y: T, z: U) { return y; } >U : Symbol(U, Decl(genericMergedDeclarationUsingTypeParameter.ts, 0, 25)) >y : Symbol(y, Decl(genericMergedDeclarationUsingTypeParameter.ts, 0, 29)) -module foo { +namespace foo { >foo : Symbol(foo, Decl(genericMergedDeclarationUsingTypeParameter.ts, 0, 0), Decl(genericMergedDeclarationUsingTypeParameter.ts, 0, 54)) export var x: T; diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.types b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.types index 67749d8d9b..4860be0dc7 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.types +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter.types @@ -7,7 +7,7 @@ function foo(y: T, z: U) { return y; } >z : U >y : T -module foo { +namespace foo { >foo : typeof foo export var x: T; diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.errors.txt b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.errors.txt index a1bd58f15c..321d03d881 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.errors.txt @@ -4,7 +4,7 @@ genericMergedDeclarationUsingTypeParameter2.ts(4,14): error TS2304: Cannot find ==== genericMergedDeclarationUsingTypeParameter2.ts (2 errors) ==== class foo { constructor(x: T) { } } - module foo { + namespace foo { export var x: T; ~ !!! error TS2304: Cannot find name 'T'. diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js index ed61976392..ae7dc384d4 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js @@ -2,7 +2,7 @@ //// [genericMergedDeclarationUsingTypeParameter2.ts] class foo { constructor(x: T) { } } -module foo { +namespace foo { export var x: T; var y = 1; } diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js.diff b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js.diff new file mode 100644 index 0000000000..b719eae181 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.js.diff @@ -0,0 +1,17 @@ +--- old.genericMergedDeclarationUsingTypeParameter2.js ++++ new.genericMergedDeclarationUsingTypeParameter2.js +@@= skipped -8, +8 lines =@@ + + + //// [genericMergedDeclarationUsingTypeParameter2.js] +-var foo = /** @class */ (function () { +- function foo(x) { +- } +- return foo; +-}()); ++class foo { ++ constructor(x) { } ++} + (function (foo) { + var y = 1; + })(foo || (foo = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.symbols b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.symbols index 6a0ed83fb5..4780bdf50e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.symbols @@ -7,7 +7,7 @@ class foo { constructor(x: T) { } } >x : Symbol(x, Decl(genericMergedDeclarationUsingTypeParameter2.ts, 0, 27)) >T : Symbol(T, Decl(genericMergedDeclarationUsingTypeParameter2.ts, 0, 10)) -module foo { +namespace foo { >foo : Symbol(foo, Decl(genericMergedDeclarationUsingTypeParameter2.ts, 0, 0), Decl(genericMergedDeclarationUsingTypeParameter2.ts, 0, 38)) export var x: T; diff --git a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.types b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.types index 5225637b41..a03bc91807 100644 --- a/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.types +++ b/testdata/baselines/reference/submodule/compiler/genericMergedDeclarationUsingTypeParameter2.types @@ -5,7 +5,7 @@ class foo { constructor(x: T) { } } >foo : foo >x : T -module foo { +namespace foo { >foo : typeof foo export var x: T; diff --git a/testdata/baselines/reference/submodule/compiler/genericObjectCreationWithoutTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/genericObjectCreationWithoutTypeArgs.js.diff new file mode 100644 index 0000000000..7b0214f78b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericObjectCreationWithoutTypeArgs.js.diff @@ -0,0 +1,16 @@ +--- old.genericObjectCreationWithoutTypeArgs.js ++++ new.genericObjectCreationWithoutTypeArgs.js +@@= skipped -11, +11 lines =@@ + + + //// [genericObjectCreationWithoutTypeArgs.js] +-var SS = /** @class */ (function () { +- function SS() { +- } +- return SS; +-}()); ++class SS { ++} + var x1 = new SS(); // OK + var x2 = new SS; // OK + var x3 = new SS(); // OK \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericObjectLitReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/genericObjectLitReturnType.js.diff new file mode 100644 index 0000000000..44d35eae7f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericObjectLitReturnType.js.diff @@ -0,0 +1,18 @@ +--- old.genericObjectLitReturnType.js ++++ new.genericObjectLitReturnType.js +@@= skipped -13, +13 lines =@@ + + + //// [genericObjectLitReturnType.js] +-var X = /** @class */ (function () { +- function X() { +- } +- X.prototype.f = function (t) { return { a: t }; }; +- return X; +-}()); ++class X { ++ f(t) { return { a: t }; } ++} + var x; + var t1 = x.f(5); + t1.a = 5; // Should not error: t1 should have type {a: number}, instead has type {a: T} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericObjectSpreadResultInSwitch.js.diff b/testdata/baselines/reference/submodule/compiler/genericObjectSpreadResultInSwitch.js.diff new file mode 100644 index 0000000000..ba9661dde9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericObjectSpreadResultInSwitch.js.diff @@ -0,0 +1,31 @@ +--- old.genericObjectSpreadResultInSwitch.js ++++ new.genericObjectSpreadResultInSwitch.js +@@= skipped -46, +46 lines =@@ + } + return t; + }; +-var getType = function (params) { +- var ++const getType = (params) => { ++ const { + // Omit +- foo = params.foo, rest = __rest(params, ["foo"]); ++ foo } = params, rest = __rest(params, ["foo"]); + return rest; + }; + switch (params.tag) { + case 'a': { + // TS 4.2: number + // TS 4.3: string | number +- var result = getType(params).type; ++ const result = getType(params).type; + break; + } + case 'b': { + // TS 4.2: string + // TS 4.3: string | number +- var result = getType(params).type; ++ const result = getType(params).type; + break; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js index 263dba03ef..edb47718b4 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js @@ -2,9 +2,9 @@ //// [genericOfACloduleType1.ts] class G{ bar(x: T) { return x; } } -module M { +namespace M { export class C { foo() { } } - export module C { + export namespace C { export class X { } } diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js.diff b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js.diff new file mode 100644 index 0000000000..8b56637ba4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.js.diff @@ -0,0 +1,38 @@ +--- old.genericOfACloduleType1.js ++++ new.genericOfACloduleType1.js +@@= skipped -14, +14 lines =@@ + var g2 = new G() // was: error Type reference cannot refer to container 'M.C'. + + //// [genericOfACloduleType1.js] +-var G = /** @class */ (function () { +- function G() { +- } +- G.prototype.bar = function (x) { return x; }; +- return G; +-}()); ++class G { ++ bar(x) { return x; } ++} + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + M.C = C; + (function (C) { +- var X = /** @class */ (function () { +- function X() { +- } +- return X; +- }()); ++ class X { ++ } + C.X = X; + })(C = M.C || (M.C = {})); + var g1 = new G(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.symbols b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.symbols index 6008cf398c..0491363dd6 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.symbols @@ -9,25 +9,25 @@ class G{ bar(x: T) { return x; } } >T : Symbol(T, Decl(genericOfACloduleType1.ts, 0, 8)) >x : Symbol(x, Decl(genericOfACloduleType1.ts, 0, 16)) -module M { +namespace M { >M : Symbol(M, Decl(genericOfACloduleType1.ts, 0, 37)) export class C { foo() { } } ->C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 10), Decl(genericOfACloduleType1.ts, 2, 32)) +>C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 13), Decl(genericOfACloduleType1.ts, 2, 32)) >foo : Symbol(C.foo, Decl(genericOfACloduleType1.ts, 2, 20)) - export module C { ->C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 10), Decl(genericOfACloduleType1.ts, 2, 32)) + export namespace C { +>C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 13), Decl(genericOfACloduleType1.ts, 2, 32)) export class X { ->X : Symbol(X, Decl(genericOfACloduleType1.ts, 3, 21)) +>X : Symbol(X, Decl(genericOfACloduleType1.ts, 3, 24)) } } var g1 = new G(); >g1 : Symbol(g1, Decl(genericOfACloduleType1.ts, 8, 7)) >G : Symbol(G, Decl(genericOfACloduleType1.ts, 0, 0)) ->C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 10), Decl(genericOfACloduleType1.ts, 2, 32)) +>C : Symbol(C, Decl(genericOfACloduleType1.ts, 1, 13), Decl(genericOfACloduleType1.ts, 2, 32)) g1.bar(null).foo(); >g1.bar(null).foo : Symbol(C.foo, Decl(genericOfACloduleType1.ts, 2, 20)) @@ -40,5 +40,5 @@ var g2 = new G() // was: error Type reference cannot refer to container 'M. >g2 : Symbol(g2, Decl(genericOfACloduleType1.ts, 11, 3)) >G : Symbol(G, Decl(genericOfACloduleType1.ts, 0, 0)) >M : Symbol(M, Decl(genericOfACloduleType1.ts, 0, 37)) ->C : Symbol(M.C, Decl(genericOfACloduleType1.ts, 1, 10), Decl(genericOfACloduleType1.ts, 2, 32)) +>C : Symbol(M.C, Decl(genericOfACloduleType1.ts, 1, 13), Decl(genericOfACloduleType1.ts, 2, 32)) diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.types b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.types index 28932b4a5f..ff992f7c42 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.types +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType1.types @@ -7,14 +7,14 @@ class G{ bar(x: T) { return x; } } >x : T >x : T -module M { +namespace M { >M : typeof M export class C { foo() { } } >C : C >foo : () => void - export module C { + export namespace C { >C : typeof C export class X { diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js index 6baa448224..8b1eef7068 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js @@ -2,9 +2,9 @@ //// [genericOfACloduleType2.ts] class G{ bar(x: T) { return x; } } -module M { +namespace M { export class C { foo() { } } - export module C { + export namespace C { export class X { } } @@ -13,7 +13,7 @@ module M { g1.bar(null).foo(); // no error } -module N { +namespace N { var g2 = new G() } diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js.diff b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js.diff new file mode 100644 index 0000000000..36742cc728 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.js.diff @@ -0,0 +1,38 @@ +--- old.genericOfACloduleType2.js ++++ new.genericOfACloduleType2.js +@@= skipped -17, +17 lines =@@ + } + + //// [genericOfACloduleType2.js] +-var G = /** @class */ (function () { +- function G() { +- } +- G.prototype.bar = function (x) { return x; }; +- return G; +-}()); ++class G { ++ bar(x) { return x; } ++} + var M; + (function (M) { +- var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { }; +- return C; +- }()); ++ class C { ++ foo() { } ++ } + M.C = C; + (function (C) { +- var X = /** @class */ (function () { +- function X() { +- } +- return X; +- }()); ++ class X { ++ } + C.X = X; + })(C = M.C || (M.C = {})); + var g1 = new G(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.symbols b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.symbols index 9e34e5f3fb..40073df3de 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.symbols @@ -9,25 +9,25 @@ class G{ bar(x: T) { return x; } } >T : Symbol(T, Decl(genericOfACloduleType2.ts, 0, 8)) >x : Symbol(x, Decl(genericOfACloduleType2.ts, 0, 16)) -module M { +namespace M { >M : Symbol(M, Decl(genericOfACloduleType2.ts, 0, 37)) export class C { foo() { } } ->C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 10), Decl(genericOfACloduleType2.ts, 2, 32)) +>C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 13), Decl(genericOfACloduleType2.ts, 2, 32)) >foo : Symbol(C.foo, Decl(genericOfACloduleType2.ts, 2, 20)) - export module C { ->C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 10), Decl(genericOfACloduleType2.ts, 2, 32)) + export namespace C { +>C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 13), Decl(genericOfACloduleType2.ts, 2, 32)) export class X { ->X : Symbol(X, Decl(genericOfACloduleType2.ts, 3, 21)) +>X : Symbol(X, Decl(genericOfACloduleType2.ts, 3, 24)) } } var g1 = new G(); >g1 : Symbol(g1, Decl(genericOfACloduleType2.ts, 8, 7)) >G : Symbol(G, Decl(genericOfACloduleType2.ts, 0, 0)) ->C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 10), Decl(genericOfACloduleType2.ts, 2, 32)) +>C : Symbol(C, Decl(genericOfACloduleType2.ts, 1, 13), Decl(genericOfACloduleType2.ts, 2, 32)) g1.bar(null).foo(); // no error >g1.bar(null).foo : Symbol(C.foo, Decl(genericOfACloduleType2.ts, 2, 20)) @@ -37,12 +37,12 @@ module M { >foo : Symbol(C.foo, Decl(genericOfACloduleType2.ts, 2, 20)) } -module N { +namespace N { >N : Symbol(N, Decl(genericOfACloduleType2.ts, 10, 1)) var g2 = new G() >g2 : Symbol(g2, Decl(genericOfACloduleType2.ts, 13, 7)) >G : Symbol(G, Decl(genericOfACloduleType2.ts, 0, 0)) >M : Symbol(M, Decl(genericOfACloduleType2.ts, 0, 37)) ->C : Symbol(M.C, Decl(genericOfACloduleType2.ts, 1, 10), Decl(genericOfACloduleType2.ts, 2, 32)) +>C : Symbol(M.C, Decl(genericOfACloduleType2.ts, 1, 13), Decl(genericOfACloduleType2.ts, 2, 32)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.types b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.types index 4715a54bdb..0433ae08c1 100644 --- a/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.types +++ b/testdata/baselines/reference/submodule/compiler/genericOfACloduleType2.types @@ -7,14 +7,14 @@ class G{ bar(x: T) { return x; } } >x : T >x : T -module M { +namespace M { >M : typeof M export class C { foo() { } } >C : C >foo : () => void - export module C { + export namespace C { >C : typeof C export class X { @@ -37,7 +37,7 @@ module M { >foo : () => void } -module N { +namespace N { >N : typeof N var g2 = new G() diff --git a/testdata/baselines/reference/submodule/compiler/genericOverloadSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/genericOverloadSignatures.js.diff new file mode 100644 index 0000000000..92fa471386 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericOverloadSignatures.js.diff @@ -0,0 +1,14 @@ +--- old.genericOverloadSignatures.js ++++ new.genericOverloadSignatures.js +@@= skipped -33, +33 lines =@@ + + //// [genericOverloadSignatures.js] + function f(a) { } +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C2 { ++} + var b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericParameterAssignability1.js.diff b/testdata/baselines/reference/submodule/compiler/genericParameterAssignability1.js.diff new file mode 100644 index 0000000000..5b473d2c2e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericParameterAssignability1.js.diff @@ -0,0 +1,9 @@ +--- old.genericParameterAssignability1.js ++++ new.genericParameterAssignability1.js +@@= skipped -6, +6 lines =@@ + + //// [genericParameterAssignability1.js] + function f(x) { return null; } +-var r = function (x) { return x; }; ++var r = (x) => x; + r = f; // should be allowed \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty.js.diff b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty.js.diff index 1bdedd95ff..9101e016c6 100644 --- a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty.js.diff @@ -1,10 +1,19 @@ --- old.genericPrototypeProperty.js +++ new.genericPrototypeProperty.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + var r3 = r.foo(null); //// [genericPrototypeProperty.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function (x) { return null; }; +- return C; +-}()); ++class C { + x; - foo(x) { return null; } - } - var r = C.prototype; \ No newline at end of file ++ foo(x) { return null; } ++} + var r = C.prototype; + // should be any + var r2 = r.x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty2.js.diff b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty2.js.diff index a16ecdde61..dd1d51c02a 100644 --- a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty2.js.diff @@ -1,17 +1,57 @@ --- old.genericPrototypeProperty2.js +++ new.genericPrototypeProperty2.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + } //// [genericPrototypeProperty2.js] - class BaseEvent { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var BaseEvent = /** @class */ (function () { +- function BaseEvent() { +- } +- return BaseEvent; +-}()); +-var MyEvent = /** @class */ (function (_super) { +- __extends(MyEvent, _super); +- function MyEvent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyEvent; +-}(BaseEvent)); +-var BaseEventWrapper = /** @class */ (function () { +- function BaseEventWrapper() { +- } +- return BaseEventWrapper; +-}()); +-var MyEventWrapper = /** @class */ (function (_super) { +- __extends(MyEventWrapper, _super); +- function MyEventWrapper() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyEventWrapper; +-}(BaseEventWrapper)); ++class BaseEvent { + target; - } - class MyEvent extends BaseEvent { ++} ++class MyEvent extends BaseEvent { + target; - } - class BaseEventWrapper { ++} ++class BaseEventWrapper { + t; - } - class MyEventWrapper extends BaseEventWrapper { ++} ++class MyEventWrapper extends BaseEventWrapper { + t; // any satisfies constraint and passes assignability check between 'target' properties - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty3.js.diff b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty3.js.diff index 5a1c5f2da8..2560eb826f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericPrototypeProperty3.js.diff @@ -1,17 +1,57 @@ --- old.genericPrototypeProperty3.js +++ new.genericPrototypeProperty3.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + } //// [genericPrototypeProperty3.js] - class BaseEvent { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var BaseEvent = /** @class */ (function () { +- function BaseEvent() { +- } +- return BaseEvent; +-}()); +-var MyEvent = /** @class */ (function (_super) { +- __extends(MyEvent, _super); +- function MyEvent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyEvent; +-}(BaseEvent)); +-var BaseEventWrapper = /** @class */ (function () { +- function BaseEventWrapper() { +- } +- return BaseEventWrapper; +-}()); +-var MyEventWrapper = /** @class */ (function (_super) { +- __extends(MyEventWrapper, _super); +- function MyEventWrapper() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyEventWrapper; +-}(BaseEventWrapper)); ++class BaseEvent { + target; - } - class MyEvent extends BaseEvent { ++} ++class MyEvent extends BaseEvent { + target; - } - class BaseEventWrapper { ++} ++class BaseEventWrapper { + t; - } - class MyEventWrapper extends BaseEventWrapper { ++} ++class MyEventWrapper extends BaseEventWrapper { + t; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js index 47629ee04f..49aee423e3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts] //// //// [genericRecursiveImplicitConstructorErrors2.ts] -module TypeScript2 { +namespace TypeScript2 { export interface DeclKind { }; export interface PullTypesymbol { }; export interface SymbolLinkKind { }; diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js.diff b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js.diff new file mode 100644 index 0000000000..1ae96eb802 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.js.diff @@ -0,0 +1,62 @@ +--- old.genericRecursiveImplicitConstructorErrors2.js ++++ new.genericRecursiveImplicitConstructorErrors2.js +@@= skipped -28, +28 lines =@@ + + + //// [genericRecursiveImplicitConstructorErrors2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var TypeScript2; + (function (TypeScript2) { + ; + ; + ; +- var PullSymbolVisibility; ++ let PullSymbolVisibility; + (function (PullSymbolVisibility) { + PullSymbolVisibility[PullSymbolVisibility["Private"] = 0] = "Private"; + PullSymbolVisibility[PullSymbolVisibility["Public"] = 1] = "Public"; + })(PullSymbolVisibility = TypeScript2.PullSymbolVisibility || (TypeScript2.PullSymbolVisibility = {})); +- var PullSymbol = /** @class */ (function () { +- function PullSymbol(name, declKind) { ++ class PullSymbol { ++ constructor(name, declKind) { + } + // link methods +- PullSymbol.prototype.addOutgoingLink = function (linkTo, kind) { +- }; +- PullSymbol.prototype.getType = function () { ++ addOutgoingLink(linkTo, kind) { ++ } ++ getType() { + return undefined; +- }; +- return PullSymbol; +- }()); ++ } ++ } + TypeScript2.PullSymbol = PullSymbol; +- var PullTypeSymbol = /** @class */ (function (_super) { +- __extends(PullTypeSymbol, _super); +- function PullTypeSymbol() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return PullTypeSymbol; +- }(PullSymbol)); ++ class PullTypeSymbol extends PullSymbol { ++ } + TypeScript2.PullTypeSymbol = PullTypeSymbol; + })(TypeScript2 || (TypeScript2 = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.symbols b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.symbols index 7aeb5ccb44..ae47d9807e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts] //// === genericRecursiveImplicitConstructorErrors2.ts === -module TypeScript2 { +namespace TypeScript2 { >TypeScript2 : Symbol(TypeScript2, Decl(genericRecursiveImplicitConstructorErrors2.ts, 0, 0)) export interface DeclKind { }; ->DeclKind : Symbol(DeclKind, Decl(genericRecursiveImplicitConstructorErrors2.ts, 0, 20)) +>DeclKind : Symbol(DeclKind, Decl(genericRecursiveImplicitConstructorErrors2.ts, 0, 23)) export interface PullTypesymbol { }; >PullTypesymbol : Symbol(PullTypesymbol, Decl(genericRecursiveImplicitConstructorErrors2.ts, 1, 32)) @@ -29,7 +29,7 @@ module TypeScript2 { constructor (name: string, declKind: DeclKind) { >name : Symbol(name, Decl(genericRecursiveImplicitConstructorErrors2.ts, 10, 17)) >declKind : Symbol(declKind, Decl(genericRecursiveImplicitConstructorErrors2.ts, 10, 30)) ->DeclKind : Symbol(DeclKind, Decl(genericRecursiveImplicitConstructorErrors2.ts, 0, 20)) +>DeclKind : Symbol(DeclKind, Decl(genericRecursiveImplicitConstructorErrors2.ts, 0, 23)) } // link methods diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.types b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.types index 6baf43460e..92d00fcc63 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.types +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors2.ts] //// === genericRecursiveImplicitConstructorErrors2.ts === -module TypeScript2 { +namespace TypeScript2 { >TypeScript2 : typeof TypeScript2 export interface DeclKind { }; diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.errors.txt b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.errors.txt index 0a3d27451f..206d07180f 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.errors.txt @@ -8,7 +8,7 @@ genericRecursiveImplicitConstructorErrors3.ts(19,22): error TS2339: Property 'is ==== genericRecursiveImplicitConstructorErrors3.ts (7 errors) ==== - module TypeScript { + namespace TypeScript { export class MemberName { static create(arg1: any, arg2?: any, arg3?: any): MemberName { ~~~~~~~~~~ @@ -17,7 +17,7 @@ genericRecursiveImplicitConstructorErrors3.ts(19,22): error TS2339: Property 'is } } - module TypeScript { + namespace TypeScript { export class PullSymbol { public type: PullTypeSymbol = null; ~~~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js index 5733851e64..3f4b539a8b 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts] //// //// [genericRecursiveImplicitConstructorErrors3.ts] -module TypeScript { +namespace TypeScript { export class MemberName { static create(arg1: any, arg2?: any, arg3?: any): MemberName { } } } -module TypeScript { +namespace TypeScript { export class PullSymbol { public type: PullTypeSymbol = null; } diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js.diff b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js.diff index fb7d411c9f..508342caf6 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.js.diff @@ -1,30 +1,78 @@ --- old.genericRecursiveImplicitConstructorErrors3.js +++ new.genericRecursiveImplicitConstructorErrors3.js -@@= skipped -42, +42 lines =@@ +@@= skipped -32, +32 lines =@@ + + + //// [genericRecursiveImplicitConstructorErrors3.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var TypeScript; + (function (TypeScript) { +- var MemberName = /** @class */ (function () { +- function MemberName() { ++ class MemberName { ++ static create(arg1, arg2, arg3) { + } +- MemberName.create = function (arg1, arg2, arg3) { +- }; +- return MemberName; +- }()); ++ } + TypeScript.MemberName = MemberName; })(TypeScript || (TypeScript = {})); (function (TypeScript) { - class PullSymbol { -- constructor() { +- var PullSymbol = /** @class */ (function () { +- function PullSymbol() { - this.type = null; - } +- return PullSymbol; +- }()); ++ class PullSymbol { + type = null; - } ++ } TypeScript.PullSymbol = PullSymbol; - class PullTypeSymbol extends PullSymbol { -- constructor() { -- super(...arguments); -- this._elementType = null; +- var PullTypeSymbol = /** @class */ (function (_super) { +- __extends(PullTypeSymbol, _super); +- function PullTypeSymbol() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this._elementType = null; +- return _this; - } +- PullTypeSymbol.prototype.toString = function (scopeSymbol, useConstraintInName) { ++ class PullTypeSymbol extends PullSymbol { + _elementType = null; - toString(scopeSymbol, useConstraintInName) { ++ toString(scopeSymbol, useConstraintInName) { var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); return s; -@@= skipped -20, +15 lines =@@ +- }; +- PullTypeSymbol.prototype.getScopedNameEx = function (scopeSymbol, useConstraintInName, getPrettyTypeName, getTypeParamMarkerInfo) { ++ } ++ getScopedNameEx(scopeSymbol, useConstraintInName, getPrettyTypeName, getTypeParamMarkerInfo) { + if (this.isArray()) { + var elementMemberName = this._elementType ? (this._elementType.isArray() || this._elementType.isNamedTypeSymbol() ? this._elementType.getScopedNameEx(scopeSymbol, false, getPrettyTypeName, getTypeParamMarkerInfo) : this._elementType.getMemberTypeNameEx(false, scopeSymbol, getPrettyTypeName)) : 1; - return TypeScript.MemberName.create(elementMemberName, "", "[]"); + return MemberName.create(elementMemberName, "", "[]"); } - } - } \ No newline at end of file +- }; +- return PullTypeSymbol; +- }(PullSymbol)); ++ } ++ } + TypeScript.PullTypeSymbol = PullTypeSymbol; + })(TypeScript || (TypeScript = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.symbols b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.symbols index afb84b36fd..970f629523 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts] //// === genericRecursiveImplicitConstructorErrors3.ts === -module TypeScript { +namespace TypeScript { >TypeScript : Symbol(TypeScript, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 0), Decl(genericRecursiveImplicitConstructorErrors3.ts, 5, 1)) export class MemberName { ->MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 19)) +>MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 22)) >A : Symbol(A, Decl(genericRecursiveImplicitConstructorErrors3.ts, 1, 29)) >B : Symbol(B, Decl(genericRecursiveImplicitConstructorErrors3.ts, 1, 31)) >C : Symbol(C, Decl(genericRecursiveImplicitConstructorErrors3.ts, 1, 33)) @@ -18,16 +18,16 @@ module TypeScript { >arg1 : Symbol(arg1, Decl(genericRecursiveImplicitConstructorErrors3.ts, 2, 29)) >arg2 : Symbol(arg2, Decl(genericRecursiveImplicitConstructorErrors3.ts, 2, 39)) >arg3 : Symbol(arg3, Decl(genericRecursiveImplicitConstructorErrors3.ts, 2, 51)) ->MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 19)) +>MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 22)) } } } -module TypeScript { +namespace TypeScript { >TypeScript : Symbol(TypeScript, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 0), Decl(genericRecursiveImplicitConstructorErrors3.ts, 5, 1)) export class PullSymbol { ->PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 19)) +>PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 22)) >A : Symbol(A, Decl(genericRecursiveImplicitConstructorErrors3.ts, 8, 29)) >B : Symbol(B, Decl(genericRecursiveImplicitConstructorErrors3.ts, 8, 31)) >C : Symbol(C, Decl(genericRecursiveImplicitConstructorErrors3.ts, 8, 33)) @@ -41,7 +41,7 @@ module TypeScript { >A : Symbol(A, Decl(genericRecursiveImplicitConstructorErrors3.ts, 11, 33)) >B : Symbol(B, Decl(genericRecursiveImplicitConstructorErrors3.ts, 11, 35)) >C : Symbol(C, Decl(genericRecursiveImplicitConstructorErrors3.ts, 11, 37)) ->PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 19)) +>PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 22)) private _elementType: PullTypeSymbol = null; >_elementType : Symbol(PullTypeSymbol._elementType, Decl(genericRecursiveImplicitConstructorErrors3.ts, 11, 59)) @@ -53,7 +53,7 @@ module TypeScript { >B : Symbol(B, Decl(genericRecursiveImplicitConstructorErrors3.ts, 13, 26)) >C : Symbol(C, Decl(genericRecursiveImplicitConstructorErrors3.ts, 13, 28)) >scopeSymbol : Symbol(scopeSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 13, 31)) ->PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 19)) +>PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 22)) >useConstraintInName : Symbol(useConstraintInName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 13, 56)) var s = this.getScopedNameEx(scopeSymbol, useConstraintInName).toString(); @@ -73,7 +73,7 @@ module TypeScript { >B : Symbol(B, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 33)) >C : Symbol(C, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 35)) >scopeSymbol : Symbol(scopeSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 38)) ->PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 19)) +>PullSymbol : Symbol(PullSymbol, Decl(genericRecursiveImplicitConstructorErrors3.ts, 7, 22)) >useConstraintInName : Symbol(useConstraintInName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 63)) >getPrettyTypeName : Symbol(getPrettyTypeName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 94)) >getTypeParamMarkerInfo : Symbol(getTypeParamMarkerInfo, Decl(genericRecursiveImplicitConstructorErrors3.ts, 17, 123)) @@ -112,7 +112,7 @@ module TypeScript { return MemberName.create(elementMemberName, "", "[]"); >MemberName.create : Symbol(MemberName.create, Decl(genericRecursiveImplicitConstructorErrors3.ts, 1, 36)) ->MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 19)) +>MemberName : Symbol(MemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 0, 22)) >create : Symbol(MemberName.create, Decl(genericRecursiveImplicitConstructorErrors3.ts, 1, 36)) >elementMemberName : Symbol(elementMemberName, Decl(genericRecursiveImplicitConstructorErrors3.ts, 19, 19)) } diff --git a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.types b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.types index 1f426653e6..ac2b576182 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.types +++ b/testdata/baselines/reference/submodule/compiler/genericRecursiveImplicitConstructorErrors3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericRecursiveImplicitConstructorErrors3.ts] //// === genericRecursiveImplicitConstructorErrors3.ts === -module TypeScript { +namespace TypeScript { >TypeScript : typeof TypeScript export class MemberName { @@ -16,7 +16,7 @@ module TypeScript { } } -module TypeScript { +namespace TypeScript { >TypeScript : typeof TypeScript export class PullSymbol { diff --git a/testdata/baselines/reference/submodule/compiler/genericReduce.js.diff b/testdata/baselines/reference/submodule/compiler/genericReduce.js.diff new file mode 100644 index 0000000000..1692ee5a66 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericReduce.js.diff @@ -0,0 +1,20 @@ +--- old.genericReduce.js ++++ new.genericReduce.js +@@= skipped -16, +16 lines =@@ + + //// [genericReduce.js] + var a = ["An", "array", "of", "strings"]; +-var b = a.map(function (s) { return s.length; }); +-var n1 = b.reduce(function (x, y) { return x + y; }); +-var n2 = b.reduceRight(function (x, y) { return x + y; }); ++var b = a.map(s => s.length); ++var n1 = b.reduce((x, y) => x + y); ++var n2 = b.reduceRight((x, y) => x + y); + n1.x = "fail"; // should error, as 'n1' should be type 'number', not 'any'. + n1.toExponential(2); // should not error if 'n1' is correctly number. + n2.x = "fail"; // should error, as 'n2' should be type 'number', not 'any'. + n2.toExponential(2); // should not error if 'n2' is correctly number. +-var n3 = b.reduce(function (x, y) { return x + y; }, ""); // Initial value is of type string ++var n3 = b.reduce((x, y) => x + y, ""); // Initial value is of type string + n3.toExponential(2); // should error if 'n3' is correctly type 'string' + n3.charAt(0); // should not error if 'n3' is correctly type 'string' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericRestArgs.js.diff b/testdata/baselines/reference/submodule/compiler/genericRestArgs.js.diff new file mode 100644 index 0000000000..7c8f058f5c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericRestArgs.js.diff @@ -0,0 +1,17 @@ +--- old.genericRestArgs.js ++++ new.genericRestArgs.js +@@= skipped -14, +14 lines =@@ + var a2Gc = makeArrayG(1, ""); // error + + //// [genericRestArgs.js] +-function makeArrayG() { +- var items = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- items[_i] = arguments[_i]; +- } +- return items; +-} ++function makeArrayG(...items) { return items; } + var a1Ga = makeArrayG(1, ""); // no error + var a1Gb = makeArrayG(1, ""); + var a1Gc = makeArrayG(1, ""); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericRestTypes.js.diff b/testdata/baselines/reference/submodule/compiler/genericRestTypes.js.diff index 327b439fef..2864410db9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericRestTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericRestTypes.js.diff @@ -7,5 +7,32 @@ -"use strict"; -// Repro from #25793 function assignmentWithComplexRest() { - const fn1 = (x, ..._) => x; - const fn2 = fn1; \ No newline at end of file +- var fn1 = function (x) { +- var _ = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- _[_i - 1] = arguments[_i]; +- } +- return x; +- }; +- var fn2 = fn1; ++ const fn1 = (x, ..._) => x; ++ const fn2 = fn1; + } + function assignmentWithComplexRest2() { +- var fn1 = function (cb) { }; +- var fn2 = fn1; ++ const fn1 = (cb) => { }; ++ const fn2 = fn1; + } + function assignmentWithComplexRest3() { +- var fn1 = function (x) { +- var _ = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- _[_i - 1] = arguments[_i]; +- } +- return x; +- }; +- var fn2 = fn1; ++ const fn1 = (x, ..._) => x; ++ const fn2 = fn1; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters.js.diff b/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters.js.diff index bd794a3ba6..eea24c6f60 100644 --- a/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters.js.diff @@ -1,10 +1,21 @@ --- old.genericReversingTypeParameters.js +++ new.genericReversingTypeParameters.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + var r2b = i.get(1); //// [genericReversingTypeParameters.js] - class BiMap { +-var BiMap = /** @class */ (function () { +- function BiMap() { +- } +- BiMap.prototype.get = function (key) { return null; }; +- BiMap.prototype.inverse = function () { return null; }; +- return BiMap; +-}()); ++class BiMap { + inverseBiMap; - get(key) { return null; } - inverse() { return null; } - } \ No newline at end of file ++ get(key) { return null; } ++ inverse() { return null; } ++} + var b = new BiMap(); + var r1 = b.get(''); + var i = b.inverse(); // used to get the type wrong here. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters2.js.diff b/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters2.js.diff index e8c97130c8..81ec915c7e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericReversingTypeParameters2.js.diff @@ -1,10 +1,21 @@ --- old.genericReversingTypeParameters2.js +++ new.genericReversingTypeParameters2.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + var r2b = i.get(1); //// [genericReversingTypeParameters2.js] - class BiMap { +-var BiMap = /** @class */ (function () { +- function BiMap() { +- } +- BiMap.prototype.get = function (key) { return null; }; +- BiMap.prototype.inverse = function () { return null; }; +- return BiMap; +-}()); ++class BiMap { + inverseBiMap; - get(key) { return null; } - inverse() { return null; } - } \ No newline at end of file ++ get(key) { return null; } ++ inverse() { return null; } ++} + var b = new BiMap(); + var i = b.inverse(); // used to get the type wrong here. + var r2b = i.get(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericSignatureIdentity.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericSignatureIdentity.symbols.diff new file mode 100644 index 0000000000..233d9d243b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericSignatureIdentity.symbols.diff @@ -0,0 +1,11 @@ +--- old.genericSignatureIdentity.symbols ++++ new.genericSignatureIdentity.symbols +@@= skipped -10, +10 lines =@@ + + (x: T): T; + >T : Symbol(T, Decl(genericSignatureIdentity.ts, 6, 5)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >x : Symbol(x, Decl(genericSignatureIdentity.ts, 6, 21)) + >T : Symbol(T, Decl(genericSignatureIdentity.ts, 6, 5)) + >T : Symbol(T, Decl(genericSignatureIdentity.ts, 6, 5)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericSpecializations1.js.diff b/testdata/baselines/reference/submodule/compiler/genericSpecializations1.js.diff new file mode 100644 index 0000000000..2a5b0b6a30 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericSpecializations1.js.diff @@ -0,0 +1,33 @@ +--- old.genericSpecializations1.js ++++ new.genericSpecializations1.js +@@= skipped -17, +17 lines =@@ + } + + //// [genericSpecializations1.js] +-var IntFooBad = /** @class */ (function () { +- function IntFooBad() { +- } +- IntFooBad.prototype.foo = function (x) { return null; }; +- return IntFooBad; +-}()); +-var StringFoo2 = /** @class */ (function () { +- function StringFoo2() { +- } +- StringFoo2.prototype.foo = function (x) { return null; }; +- return StringFoo2; +-}()); +-var StringFoo3 = /** @class */ (function () { +- function StringFoo3() { +- } +- StringFoo3.prototype.foo = function (x) { return null; }; +- return StringFoo3; +-}()); ++class IntFooBad { ++ foo(x) { return null; } ++} ++class StringFoo2 { ++ foo(x) { return null; } ++} ++class StringFoo3 { ++ foo(x) { return null; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericSpecializations2.js.diff b/testdata/baselines/reference/submodule/compiler/genericSpecializations2.js.diff new file mode 100644 index 0000000000..9a5eb0110f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericSpecializations2.js.diff @@ -0,0 +1,45 @@ +--- old.genericSpecializations2.js ++++ new.genericSpecializations2.js +@@= skipped -21, +21 lines =@@ + + + //// [genericSpecializations2.js] +-var IFoo = /** @class */ (function () { +- function IFoo() { +- } +- IFoo.prototype.foo = function (x) { ++class IFoo { ++ foo(x) { + return null; +- }; +- return IFoo; +-}()); +-var IntFooBad = /** @class */ (function () { +- function IntFooBad() { +- } +- IntFooBad.prototype.foo = function (x) { return null; }; +- return IntFooBad; +-}()); +-var StringFoo2 = /** @class */ (function () { +- function StringFoo2() { +- } +- StringFoo2.prototype.foo = function (x) { return null; }; +- return StringFoo2; +-}()); +-var StringFoo3 = /** @class */ (function () { +- function StringFoo3() { +- } +- StringFoo3.prototype.foo = function (x) { return null; }; +- return StringFoo3; +-}()); ++ } ++} ++class IntFooBad { ++ foo(x) { return null; } ++} ++class StringFoo2 { ++ foo(x) { return null; } ++} ++class StringFoo3 { ++ foo(x) { return null; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericSpecializations3.js.diff b/testdata/baselines/reference/submodule/compiler/genericSpecializations3.js.diff new file mode 100644 index 0000000000..93876c546b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericSpecializations3.js.diff @@ -0,0 +1,49 @@ +--- old.genericSpecializations3.js ++++ new.genericSpecializations3.js +@@= skipped -39, +39 lines =@@ + //// [genericSpecializations3.js] + var iFoo; + iFoo.foo(1); +-var IntFooBad = /** @class */ (function () { +- function IntFooBad() { +- } +- IntFooBad.prototype.foo = function (x) { return null; }; +- return IntFooBad; +-}()); ++class IntFooBad { ++ foo(x) { return null; } ++} + var intFooBad; +-var IntFoo = /** @class */ (function () { +- function IntFoo() { +- } +- IntFoo.prototype.foo = function (x) { return null; }; +- return IntFoo; +-}()); ++class IntFoo { ++ foo(x) { return null; } ++} + var intFoo; +-var StringFoo2 = /** @class */ (function () { +- function StringFoo2() { +- } +- StringFoo2.prototype.foo = function (x) { return null; }; +- return StringFoo2; +-}()); ++class StringFoo2 { ++ foo(x) { return null; } ++} + var stringFoo2; + stringFoo2.foo("hm"); + intFoo = stringFoo2; // error + stringFoo2 = intFoo; // error +-var StringFoo3 = /** @class */ (function () { +- function StringFoo3() { +- } +- StringFoo3.prototype.foo = function (x) { return null; }; +- return StringFoo3; +-}()); ++class StringFoo3 { ++ foo(x) { return null; } ++} + var stringFoo3; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericStaticAnyTypeFunction.js.diff b/testdata/baselines/reference/submodule/compiler/genericStaticAnyTypeFunction.js.diff new file mode 100644 index 0000000000..c3e706319d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericStaticAnyTypeFunction.js.diff @@ -0,0 +1,25 @@ +--- old.genericStaticAnyTypeFunction.js ++++ new.genericStaticAnyTypeFunction.js +@@= skipped -20, +20 lines =@@ + + + //// [genericStaticAnyTypeFunction.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.one = function (source, value) { ++class A { ++ static one(source, value) { + return source; +- }; +- A.goo = function () { return 0; }; +- A.two = function (source) { ++ } ++ static goo() { return 0; } ++ static two(source) { + return this.one(source, 42); // should not error +- }; +- return A; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.js.diff b/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.js.diff new file mode 100644 index 0000000000..91b4d1fa4d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.js.diff @@ -0,0 +1,12 @@ +--- old.genericTemplateOverloadResolution.js ++++ new.genericTemplateOverloadResolution.js +@@= skipped -13, +13 lines =@@ + + + //// [genericTemplateOverloadResolution.js] +-var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { +- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } +- return cooked; +-}; +-expect(fooFn(__makeTemplateObject([""], [""]))); ++expect(fooFn ``); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.symbols.diff new file mode 100644 index 0000000000..7b36addf3f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTemplateOverloadResolution.symbols.diff @@ -0,0 +1,27 @@ +--- old.genericTemplateOverloadResolution.symbols ++++ new.genericTemplateOverloadResolution.symbols +@@= skipped -6, +6 lines =@@ + (strings: TemplateStringsArray): Promise<{}>; + >strings : Symbol(strings, Decl(genericTemplateOverloadResolution.ts, 1, 5)) + >TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + (strings: TemplateStringsArray): Promise; + >T : Symbol(T, Decl(genericTemplateOverloadResolution.ts, 2, 5)) + >strings : Symbol(strings, Decl(genericTemplateOverloadResolution.ts, 2, 8)) + >TemplateStringsArray : Symbol(TemplateStringsArray, Decl(lib.es5.d.ts, --, --)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(genericTemplateOverloadResolution.ts, 2, 5)) + } + +@@= skipped -17, +17 lines =@@ + declare function expect(x: Promise): void; + >expect : Symbol(expect, Decl(genericTemplateOverloadResolution.ts, 5, 28)) + >x : Symbol(x, Decl(genericTemplateOverloadResolution.ts, 7, 24)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + expect(fooFn``); + >expect : Symbol(expect, Decl(genericTemplateOverloadResolution.ts, 5, 28)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.errors.txt b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.errors.txt index 56a9dee32a..ce6e6b330e 100644 --- a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.errors.txt @@ -4,7 +4,7 @@ genericTypeArgumentInference1.ts(12,39): error TS2345: Argument of type '(val ==== genericTypeArgumentInference1.ts (1 errors) ==== - module Underscore { + namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.js b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.js index d6eb3c4bf7..1077eafbb5 100644 --- a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.js +++ b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericTypeArgumentInference1.ts] //// //// [genericTypeArgumentInference1.ts] -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; } diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.symbols b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.symbols index 4182114384..3a3b1ea7c1 100644 --- a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.symbols +++ b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/genericTypeArgumentInference1.ts] //// === genericTypeArgumentInference1.ts === -module Underscore { +namespace Underscore { >Underscore : Symbol(Underscore, Decl(genericTypeArgumentInference1.ts, 0, 0)) export interface Iterator { ->Iterator : Symbol(Iterator, Decl(genericTypeArgumentInference1.ts, 0, 19)) +>Iterator : Symbol(Iterator, Decl(genericTypeArgumentInference1.ts, 0, 22)) >T : Symbol(T, Decl(genericTypeArgumentInference1.ts, 1, 30)) >U : Symbol(U, Decl(genericTypeArgumentInference1.ts, 1, 32)) @@ -25,7 +25,7 @@ module Underscore { >list : Symbol(list, Decl(genericTypeArgumentInference1.ts, 5, 15)) >T : Symbol(T, Decl(genericTypeArgumentInference1.ts, 5, 12)) >iterator : Symbol(iterator, Decl(genericTypeArgumentInference1.ts, 5, 25)) ->Iterator : Symbol(Iterator, Decl(genericTypeArgumentInference1.ts, 0, 19)) +>Iterator : Symbol(Iterator, Decl(genericTypeArgumentInference1.ts, 0, 22)) >T : Symbol(T, Decl(genericTypeArgumentInference1.ts, 5, 12)) >context : Symbol(context, Decl(genericTypeArgumentInference1.ts, 5, 58)) >T : Symbol(T, Decl(genericTypeArgumentInference1.ts, 5, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.types b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.types index 8f3f192eb3..17b7d853f0 100644 --- a/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.types +++ b/testdata/baselines/reference/submodule/compiler/genericTypeArgumentInference1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/genericTypeArgumentInference1.ts] //// === genericTypeArgumentInference1.ts === -module Underscore { +namespace Underscore { export interface Iterator { (value: T, index: any, list: any): U; >value : T diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions1.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions1.js.diff new file mode 100644 index 0000000000..3d05c4d2d4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions1.js.diff @@ -0,0 +1,18 @@ +--- old.genericTypeAssertions1.js ++++ new.genericTypeAssertions1.js +@@= skipped -6, +6 lines =@@ + var r2: A = >>foo; // error + + //// [genericTypeAssertions1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function (x) { }; +- return A; +-}()); ++class A { ++ foo(x) { } ++} + var foo = new A(); + var r = new A(); // error + var r2 = foo; // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions2.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions2.js.diff new file mode 100644 index 0000000000..1c4851282b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions2.js.diff @@ -0,0 +1,47 @@ +--- old.genericTypeAssertions2.js ++++ new.genericTypeAssertions2.js +@@= skipped -15, +15 lines =@@ + var r5: A = >[]; // error + + //// [genericTypeAssertions2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function (x) { }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- B.prototype.bar = function () { ++class A { ++ foo(x) { } ++} ++class B extends A { ++ bar() { + return null; +- }; +- return B; +-}(A)); ++ } ++} + var foo = new A(); + var r = new B(); + var r2 = new B(); // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions3.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions3.js.diff new file mode 100644 index 0000000000..5174997945 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions3.js.diff @@ -0,0 +1,10 @@ +--- old.genericTypeAssertions3.js ++++ new.genericTypeAssertions3.js +@@= skipped -5, +5 lines =@@ + + + //// [genericTypeAssertions3.js] +-var r = (function (x) { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error +-var s = (function (x) { return null; }); // no error ++var r = ((x) => { return null; }); // bug was 'could not find dotted symbol T' on x's annotation in the type assertion instead of no error ++var s = ((x) => { return null; }); // no error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions4.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions4.js.diff new file mode 100644 index 0000000000..90689cba7d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions4.js.diff @@ -0,0 +1,55 @@ +--- old.genericTypeAssertions4.js ++++ new.genericTypeAssertions4.js +@@= skipped -27, +27 lines =@@ + } + + //// [genericTypeAssertions4.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { return ""; }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- B.prototype.bar = function () { return 1; }; +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C.prototype.baz = function () { return 1; }; +- return C; +-}(A)); ++class A { ++ foo() { return ""; } ++} ++class B extends A { ++ bar() { return 1; } ++} ++class C extends A { ++ baz() { return 1; } ++} + var a; + var b; + var c; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.js.diff new file mode 100644 index 0000000000..dfb3068411 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.js.diff @@ -0,0 +1,56 @@ +--- old.genericTypeAssertions6.js ++++ new.genericTypeAssertions6.js +@@= skipped -26, +26 lines =@@ + var c: A = >b; + + //// [genericTypeAssertions6.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A(x) { ++class A { ++ constructor(x) { + var y = x; + var z = x; + } +- A.prototype.f = function (x, y) { ++ f(x, y) { + x = y; + y = x; +- }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- B.prototype.g = function (x) { ++} ++class B extends A { ++ g(x) { + var a = x; + var b = x; + var c = new Date(); + var d = new Date(); + var e = new Date(); +- }; +- return B; +-}(A)); ++ } ++} + var b; + var c = b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.symbols.diff b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.symbols.diff new file mode 100644 index 0000000000..31ed223637 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeAssertions6.symbols.diff @@ -0,0 +1,70 @@ +--- old.genericTypeAssertions6.symbols ++++ new.genericTypeAssertions6.symbols +@@= skipped -41, +41 lines =@@ + class B extends A { + >B : Symbol(B, Decl(genericTypeAssertions6.ts, 10, 1)) + >T : Symbol(T, Decl(genericTypeAssertions6.ts, 12, 8)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >U : Symbol(U, Decl(genericTypeAssertions6.ts, 12, 23)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >A : Symbol(A, Decl(genericTypeAssertions6.ts, 0, 0)) + >T : Symbol(T, Decl(genericTypeAssertions6.ts, 12, 8)) + >U : Symbol(U, Decl(genericTypeAssertions6.ts, 12, 23)) +@@= skipped -14, +14 lines =@@ + + var a: Date = x; + >a : Symbol(a, Decl(genericTypeAssertions6.ts, 14, 11)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >x : Symbol(x, Decl(genericTypeAssertions6.ts, 13, 6)) + + var b = x; + >b : Symbol(b, Decl(genericTypeAssertions6.ts, 15, 11)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >x : Symbol(x, Decl(genericTypeAssertions6.ts, 13, 6)) + + var c = new Date(); + >c : Symbol(c, Decl(genericTypeAssertions6.ts, 16, 11)) + >T : Symbol(T, Decl(genericTypeAssertions6.ts, 12, 8)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var d = new Date(); + >d : Symbol(d, Decl(genericTypeAssertions6.ts, 17, 11)) + >U : Symbol(U, Decl(genericTypeAssertions6.ts, 12, 23)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var e = new Date(); + >e : Symbol(e, Decl(genericTypeAssertions6.ts, 18, 11)) + >T : Symbol(T, Decl(genericTypeAssertions6.ts, 12, 8)) + >U : Symbol(U, Decl(genericTypeAssertions6.ts, 12, 23)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } + } + + var b: B; + >b : Symbol(b, Decl(genericTypeAssertions6.ts, 22, 3)) + >B : Symbol(B, Decl(genericTypeAssertions6.ts, 10, 1)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var c: A = >b; + >c : Symbol(c, Decl(genericTypeAssertions6.ts, 23, 3)) + >A : Symbol(A, Decl(genericTypeAssertions6.ts, 0, 0)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >A : Symbol(A, Decl(genericTypeAssertions6.ts, 0, 0)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >b : Symbol(b, Decl(genericTypeAssertions6.ts, 22, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeConstraints.js.diff new file mode 100644 index 0000000000..b2a199bb72 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeConstraints.js.diff @@ -0,0 +1,56 @@ +--- old.genericTypeConstraints.js ++++ new.genericTypeConstraints.js +@@= skipped -15, +15 lines =@@ + } + + //// [genericTypeConstraints.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.fooMethod = function () { }; +- return Foo; +-}()); +-var FooExtended = /** @class */ (function () { +- function FooExtended() { +- } +- return FooExtended; +-}()); +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); +-var BarExtended = /** @class */ (function (_super) { +- __extends(BarExtended, _super); +- function BarExtended() { +- return _super.call(this) || this; +- } +- return BarExtended; +-}(Bar)); ++class Foo { ++ fooMethod() { } ++} ++class FooExtended { ++} ++class Bar { ++} ++class BarExtended extends Bar { ++ constructor() { ++ super(); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeParameterEquivalence2.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeParameterEquivalence2.js.diff new file mode 100644 index 0000000000..faa24b780d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeParameterEquivalence2.js.diff @@ -0,0 +1,11 @@ +--- old.genericTypeParameterEquivalence2.js ++++ new.genericTypeParameterEquivalence2.js +@@= skipped -75, +75 lines =@@ + // filter :: (a->bool) -> [a] -> [a] + function filter(f, ar) { + var ret = []; +- forEach(ar, function (el) { ++ forEach(ar, (el) => { + if (f(el)) { + ret.push(el); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeReferencesRequireTypeArgs.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeReferencesRequireTypeArgs.js.diff new file mode 100644 index 0000000000..82acb35376 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeReferencesRequireTypeArgs.js.diff @@ -0,0 +1,18 @@ +--- old.genericTypeReferencesRequireTypeArgs.js ++++ new.genericTypeReferencesRequireTypeArgs.js +@@= skipped -13, +13 lines =@@ + + + //// [genericTypeReferencesRequireTypeArgs.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { return null; }; +- return C; +-}()); ++class C { ++ foo() { return null; } ++} + var c1; // error + var i1; // error + var c2; // should be an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeUsedWithoutTypeArguments1.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeUsedWithoutTypeArguments1.js.diff new file mode 100644 index 0000000000..1650cbf3f3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeUsedWithoutTypeArguments1.js.diff @@ -0,0 +1,13 @@ +--- old.genericTypeUsedWithoutTypeArguments1.js ++++ new.genericTypeUsedWithoutTypeArguments1.js +@@= skipped -5, +5 lines =@@ + + + //// [genericTypeUsedWithoutTypeArguments1.js] +-var Bar = /** @class */ (function () { +- function Bar() { +- } +- return Bar; +-}()); ++class Bar { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeWithCallableMembers.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeWithCallableMembers.js.diff index 50080f93ee..53ec8834aa 100644 --- a/testdata/baselines/reference/submodule/compiler/genericTypeWithCallableMembers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericTypeWithCallableMembers.js.diff @@ -1,11 +1,24 @@ --- old.genericTypeWithCallableMembers.js +++ new.genericTypeWithCallableMembers.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [genericTypeWithCallableMembers.js] - class C { +-var C = /** @class */ (function () { +- function C(data, data2) { ++class C { + data; + data2; - constructor(data, data2) { ++ constructor(data, data2) { this.data = data; - this.data2 = data2; \ No newline at end of file + this.data2 = data2; + } +- C.prototype.create = function () { ++ create() { + var x = new this.data(); // no error + var x2 = new this.data2(); // was error, shouldn't be +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericTypeWithNonGenericBaseMisMatch.js.diff b/testdata/baselines/reference/submodule/compiler/genericTypeWithNonGenericBaseMisMatch.js.diff new file mode 100644 index 0000000000..aa7b59dd43 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericTypeWithNonGenericBaseMisMatch.js.diff @@ -0,0 +1,17 @@ +--- old.genericTypeWithNonGenericBaseMisMatch.js ++++ new.genericTypeWithNonGenericBaseMisMatch.js +@@= skipped -11, +11 lines =@@ + + + //// [genericTypeWithNonGenericBaseMisMatch.js] +-var X = /** @class */ (function () { +- function X() { +- } +- X.prototype.f = function (a) { }; +- return X; +-}()); ++class X { ++ f(a) { } ++} + var x = new X(); + var i = x; // Should not be allowed -- type of 'f' is incompatible with 'I' \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericWithCallSignatures1.js.diff b/testdata/baselines/reference/submodule/compiler/genericWithCallSignatures1.js.diff index 2666903efc..fa58171c19 100644 --- a/testdata/baselines/reference/submodule/compiler/genericWithCallSignatures1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericWithCallSignatures1.js.diff @@ -1,10 +1,19 @@ --- old.genericWithCallSignatures1.js +++ new.genericWithCallSignatures1.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + //// [genericWithCallSignatures_0.js] //// [genericWithCallSignatures_1.js] /// - class MyClass { +-var MyClass = /** @class */ (function () { +- function MyClass() { +- } +- MyClass.prototype.myMethod = function () { ++class MyClass { + callableThing; - myMethod() { ++ myMethod() { var x = this.callableThing(); - } \ No newline at end of file +- }; +- return MyClass; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericWithIndexerOfTypeParameterType1.js.diff b/testdata/baselines/reference/submodule/compiler/genericWithIndexerOfTypeParameterType1.js.diff index f1d35d5475..e473bd89d3 100644 --- a/testdata/baselines/reference/submodule/compiler/genericWithIndexerOfTypeParameterType1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericWithIndexerOfTypeParameterType1.js.diff @@ -1,13 +1,22 @@ --- old.genericWithIndexerOfTypeParameterType1.js +++ new.genericWithIndexerOfTypeParameterType1.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + var value: string = lazyArray.array()["test"]; // used to be an error //// [genericWithIndexerOfTypeParameterType1.js] - class LazyArray { -- constructor() { +-var LazyArray = /** @class */ (function () { +- function LazyArray() { - this.objects = {}; - } +- LazyArray.prototype.array = function () { ++class LazyArray { + objects = {}; - array() { ++ array() { return this.objects; - } \ No newline at end of file +- }; +- return LazyArray; +-}()); ++ } ++} + var lazyArray = new LazyArray(); + var value = lazyArray.array()["test"]; // used to be an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericWithNoConstraintComparableWithCurlyCurly.js.diff b/testdata/baselines/reference/submodule/compiler/genericWithNoConstraintComparableWithCurlyCurly.js.diff index b70eed9488..06cc0b6826 100644 --- a/testdata/baselines/reference/submodule/compiler/genericWithNoConstraintComparableWithCurlyCurly.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericWithNoConstraintComparableWithCurlyCurly.js.diff @@ -6,5 +6,32 @@ //// [genericWithNoConstraintComparableWithCurlyCurly.js] -"use strict"; function foo() { - let x = {}; - x; \ No newline at end of file +- var x = {}; ++ let x = {}; + x; + } + function bar() { +- var x = {}; ++ let x = {}; + x; + } + function baz() { +- var x = {}; ++ let x = {}; + x; + } + function bat() { +- var x = {}; ++ let x = {}; + x; + } + function no() { +- var x = {}; ++ let x = {}; + x; // should error + } + function yes() { +- var x = {}; ++ let x = {}; + x; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericWithOpenTypeParameters1.js.diff b/testdata/baselines/reference/submodule/compiler/genericWithOpenTypeParameters1.js.diff new file mode 100644 index 0000000000..f30c0b2124 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericWithOpenTypeParameters1.js.diff @@ -0,0 +1,25 @@ +--- old.genericWithOpenTypeParameters1.js ++++ new.genericWithOpenTypeParameters1.js +@@= skipped -13, +13 lines =@@ + + + //// [genericWithOpenTypeParameters1.js] +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.foo = function (x) { return null; }; +- return B; +-}()); ++class B { ++ foo(x) { return null; } ++} + var x; + x.foo(1); // no error +-var f = function (x) { return x.foo(1); }; // error +-var f2 = function (x) { return x.foo(1); }; // error +-var f3 = function (x) { return x.foo(1); }; // error +-var f4 = function (x) { return x.foo(1); }; // no error ++var f = (x) => { return x.foo(1); }; // error ++var f2 = (x) => { return x.foo(1); }; // error ++var f3 = (x) => { return x.foo(1); }; // error ++var f4 = (x) => { return x.foo(1); }; // no error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/generics3.js.diff b/testdata/baselines/reference/submodule/compiler/generics3.js.diff index 6d3d981dfe..51f8dbe838 100644 --- a/testdata/baselines/reference/submodule/compiler/generics3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/generics3.js.diff @@ -1,10 +1,17 @@ --- old.generics3.js +++ new.generics3.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + a = b; // Ok - should be identical //// [generics3.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var a; - var b; \ No newline at end of file + var b; + a = b; // Ok - should be identical \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/generics4.js.diff b/testdata/baselines/reference/submodule/compiler/generics4.js.diff index eaa7c739b5..65a7a46018 100644 --- a/testdata/baselines/reference/submodule/compiler/generics4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/generics4.js.diff @@ -1,10 +1,17 @@ --- old.generics4.js +++ new.generics4.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + a = b; // Not ok - return types of "f" are different //// [generics4.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var a; - var b; \ No newline at end of file + var b; + a = b; // Not ok - return types of "f" are different \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/generics4NoError.js.diff b/testdata/baselines/reference/submodule/compiler/generics4NoError.js.diff index 52dcce6db6..b9b6eab727 100644 --- a/testdata/baselines/reference/submodule/compiler/generics4NoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/generics4NoError.js.diff @@ -1,10 +1,16 @@ --- old.generics4NoError.js +++ new.generics4NoError.js -@@= skipped -9, +9 lines =@@ +@@= skipped -8, +8 lines =@@ + //// [generics4NoError.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var a; - var b; \ No newline at end of file + var b; diff --git a/testdata/baselines/reference/submodule/compiler/genericsAndHigherOrderFunctions.js.diff b/testdata/baselines/reference/submodule/compiler/genericsAndHigherOrderFunctions.js.diff new file mode 100644 index 0000000000..9663346115 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericsAndHigherOrderFunctions.js.diff @@ -0,0 +1,18 @@ +--- old.genericsAndHigherOrderFunctions.js ++++ new.genericsAndHigherOrderFunctions.js +@@= skipped -20, +20 lines =@@ + + //// [genericsAndHigherOrderFunctions.js] + // no errors expected +-var combine = function (f) { +- return function (g) { +- return function (x) { return f(g(x)); }; +- }; +-}; +-var foo = function (g) { +- return function (h) { +- return function (f) { return h(combine(f)(g)); }; +- }; +-}; ++var combine = (f) => (g) => (x) => f(g(x)); ++var foo = (g) => (h) => (f) => h(combine(f)(g)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericsManyTypeParameters.types.diff b/testdata/baselines/reference/submodule/compiler/genericsManyTypeParameters.types.diff new file mode 100644 index 0000000000..100b6a468a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericsManyTypeParameters.types.diff @@ -0,0 +1,20 @@ +--- old.genericsManyTypeParameters.types ++++ new.genericsManyTypeParameters.types +@@= skipped -1, +1 lines =@@ + + === genericsManyTypeParameters.ts === + function Foo< +->Foo : (x1: a1, y1: a21, z1: a31, a1: a41, b1: a51, c1: a61, x2: a119, y2: a22, z2: a32, a2: a42, b2: a52, c2: a62, x3: a219, y3: a23, z3: a33, a3: a43, b3: a53, c3: a63, x4: a319, y4: a24, z4: a34, a4: a44, b4: a54, c4: a64, x5: a419, y5: a25, z5: a35, a5: a45, b5: a55, c5: a65, x6: a519, y6: a26, z6: a36, a6: a46, b6: a56, c6: a66, x7: a619, y7: a27, z7: a37, a7: a47, b7: a57, c7: a67, x8: a71, y8: a28, z8: a38, a8: a48, b8: a58, c8: a68, x9: a81, y9: a29, z9: a39, a9: a49, b9: a59, c9: a69, x10: a91, y12: a210, z10: a310, a10: a410, b10: a510, c10: a610, x11: a111, y13: a211, z11: a311, a11: a411, b11: a511, c11: a611, x12: a112, y14: a212, z12: a312, a12: a412, b12: a512, c12: a612, x13: a113, y15: a213, z13: a313, a13: a413, b13: a513, c13: a613, x14: a114, y16: a214, z14: a314, a14: a414, b14: a514, c14: a614, x15: a115, y17: a215, z15: a315, a15: a415, b15: a515, c15: a615, x16: a116, y18: a216, z16: a316, a16: a416, b16: a516, c16: a616, x17: a117, y19: a217, z17: a317, a17: a417, b17: a517, c17: a617, x18: a118, y10: a218, z18: a318, a18: a418, b18: a518, c18: a618) => (a1 | a21 | a31 | a41 | a51 | a61 | a119 | a22 | a32 | a42 | a52 | a62 | a219 | a23 | a33 | a43 | a53 | a63 | a319 | a24 | a34 | a44 | a54 | a64 | a419 | a25 | a35 | a45 | a55 | a65 | a519 | a26 | a36 | a46 | a56 | a66 | a619 | a27 | a37 | a47 | a57 | a67 | a71 | a28 | a38 | a48 | a58 | a68 | a81 | a29 | a39 | a49 | a59 | a69 | a91 | a210 | a310 | a410 | a510 | a610 | a111 | a211 | a311 | a411 | a511 | a611 | a112 | a212 | a312 | a412 | a512 | a612 | a113 | a213 | a313 | a413 | a513 | a613 | a114 | a214 | a314 | a414 | a514 | a614 | a115 | a215 | a315 | a415 | a515 | a615 | a116 | a216 | a316 | a416 | a516 | a616 | a117 | a217 | a317 | a417 | a517 | a617 | a118 | a218 | a318 | a418 | a518 | a618)[] ++>Foo : (x1: a1, y1: a21, z1: a31, a1: a41, b1: a51, c1: a61, x2: a119, y2: a22, z2: a32, a2: a42, b2: a52, c2: a62, x3: a219, y3: a23, z3: a33, a3: a43, b3: a53, c3: a63, x4: a319, y4: a24, z4: a34, a4: a44, b4: a54, c4: a64, x5: a419, y5: a25, z5: a35, a5: a45, b5: a55, c5: a65, x6: a519, y6: a26, z6: a36, a6: a46, b6: a56, c6: a66, x7: a619, y7: a27, z7: a37, a7: a47, b7: a57, c7: a67, x8: a71, y8: a28, z8: a38, a8: a48, b8: a58, c8: a68, x9: a81, y9: a29, z9: a39, a9: a49, b9: a59, c9: a69, x10: a91, y12: a210, z10: a310, a10: a410, b10: a510, c10: a610, x11: a111, y13: a211, z11: a311, a11: a411, b11: a511, c11: a611, x12: a112, y14: a212, z12: a312, a12: a412, b12: a512, c12: a612, x13: a113, y15: a213, z13: a313, a13: a413, b13: a513, c13: a613, x14: a114, y16: a214, z14: a314, a14: a414, b14: a514, c14: a614, x15: a115, y17: a215, z15: a315, a15: a415, b15: a515, c15: a615, x16: a116, y18: a216, z16: a316, a16: a416, b16: a516, c16: a616, x17: a117, y19: a217, z17: a317, a17: a417, b17: a517, c17: a617, x18: a118, y10: a218, z18: a318, a18: a418, b18: a518, c18: a618) => (a1 | a111 | a112 | a113 | a114 | a115 | a116 | a117 | a118 | a119 | a21 | a210 | a211 | a212 | a213 | a214 | a215 | a216 | a217 | a218 | a219 | a22 | a23 | a24 | a25 | a26 | a27 | a28 | a29 | a31 | a310 | a311 | a312 | a313 | a314 | a315 | a316 | a317 | a318 | a319 | a32 | a33 | a34 | a35 | a36 | a37 | a38 | a39 | a41 | a410 | a411 | a412 | a413 | a414 | a415 | a416 | a417 | a418 | a419 | a42 | a43 | a44 | a45 | a46 | a47 | a48 | a49 | a51 | a510 | a511 | a512 | a513 | a514 | a515 | a516 | a517 | a518 | a519 | a52 | a53 | a54 | a55 | a56 | a57 | a58 | a59 | a61 | a610 | a611 | a612 | a613 | a614 | a615 | a616 | a617 | a618 | a619 | a62 | a63 | a64 | a65 | a66 | a67 | a68 | a69 | a71 | a81 | a91)[] + + a1, a21, a31, a41, a51, a61, + a119, a22, a32, a42, a52, a62, +@@= skipped -168, +168 lines =@@ + ) + { + return [x1 , y1 , z1 , a1 , b1 , c1, +->[x1 , y1 , z1 , a1 , b1 , c1, x2 , y2 , z2 , a2 , b2 , c2, x3 , y3 , z3 , a3 , b3 , c3, x4 , y4 , z4 , a4 , b4 , c4, x5 , y5 , z5 , a5 , b5 , c5, x6 , y6 , z6 , a6 , b6 , c6, x7 , y7 , z7 , a7 , b7 , c7, x8 , y8 , z8 , a8 , b8 , c8, x9 , y9 , z9 , a9 , b9 , c9, x10 , y12 , z10 , a10 , b10 , c10, x11 , y13 , z11 , a11 , b11 , c11, x12 , y14 , z12 , a12 , b12 , c12, x13 , y15 , z13 , a13 , b13 , c13, x14 , y16 , z14 , a14 , b14 , c14, x15 , y17 , z15 , a15 , b15 , c15, x16 , y18 , z16 , a16 , b16 , c16, x17 , y19 , z17 , a17 , b17 , c17, x18 , y10 , z18 , a18 , b18 , c18] : (a1 | a21 | a31 | a41 | a51 | a61 | a119 | a22 | a32 | a42 | a52 | a62 | a219 | a23 | a33 | a43 | a53 | a63 | a319 | a24 | a34 | a44 | a54 | a64 | a419 | a25 | a35 | a45 | a55 | a65 | a519 | a26 | a36 | a46 | a56 | a66 | a619 | a27 | a37 | a47 | a57 | a67 | a71 | a28 | a38 | a48 | a58 | a68 | a81 | a29 | a39 | a49 | a59 | a69 | a91 | a210 | a310 | a410 | a510 | a610 | a111 | a211 | a311 | a411 | a511 | a611 | a112 | a212 | a312 | a412 | a512 | a612 | a113 | a213 | a313 | a413 | a513 | a613 | a114 | a214 | a314 | a414 | a514 | a614 | a115 | a215 | a315 | a415 | a515 | a615 | a116 | a216 | a316 | a416 | a516 | a616 | a117 | a217 | a317 | a417 | a517 | a617 | a118 | a218 | a318 | a418 | a518 | a618)[] ++>[x1 , y1 , z1 , a1 , b1 , c1, x2 , y2 , z2 , a2 , b2 , c2, x3 , y3 , z3 , a3 , b3 , c3, x4 , y4 , z4 , a4 , b4 , c4, x5 , y5 , z5 , a5 , b5 , c5, x6 , y6 , z6 , a6 , b6 , c6, x7 , y7 , z7 , a7 , b7 , c7, x8 , y8 , z8 , a8 , b8 , c8, x9 , y9 , z9 , a9 , b9 , c9, x10 , y12 , z10 , a10 , b10 , c10, x11 , y13 , z11 , a11 , b11 , c11, x12 , y14 , z12 , a12 , b12 , c12, x13 , y15 , z13 , a13 , b13 , c13, x14 , y16 , z14 , a14 , b14 , c14, x15 , y17 , z15 , a15 , b15 , c15, x16 , y18 , z16 , a16 , b16 , c16, x17 , y19 , z17 , a17 , b17 , c17, x18 , y10 , z18 , a18 , b18 , c18] : (a1 | a111 | a112 | a113 | a114 | a115 | a116 | a117 | a118 | a119 | a21 | a210 | a211 | a212 | a213 | a214 | a215 | a216 | a217 | a218 | a219 | a22 | a23 | a24 | a25 | a26 | a27 | a28 | a29 | a31 | a310 | a311 | a312 | a313 | a314 | a315 | a316 | a317 | a318 | a319 | a32 | a33 | a34 | a35 | a36 | a37 | a38 | a39 | a41 | a410 | a411 | a412 | a413 | a414 | a415 | a416 | a417 | a418 | a419 | a42 | a43 | a44 | a45 | a46 | a47 | a48 | a49 | a51 | a510 | a511 | a512 | a513 | a514 | a515 | a516 | a517 | a518 | a519 | a52 | a53 | a54 | a55 | a56 | a57 | a58 | a59 | a61 | a610 | a611 | a612 | a613 | a614 | a615 | a616 | a617 | a618 | a619 | a62 | a63 | a64 | a65 | a66 | a67 | a68 | a69 | a71 | a81 | a91)[] + >x1 : a1 + >y1 : a21 + >z1 : a31 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericsWithDuplicateTypeParameters1.js.diff b/testdata/baselines/reference/submodule/compiler/genericsWithDuplicateTypeParameters1.js.diff new file mode 100644 index 0000000000..e2562158b3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/genericsWithDuplicateTypeParameters1.js.diff @@ -0,0 +1,20 @@ +--- old.genericsWithDuplicateTypeParameters1.js ++++ new.genericsWithDuplicateTypeParameters1.js +@@= skipped -20, +20 lines =@@ + //// [genericsWithDuplicateTypeParameters1.js] + function f() { } + function f2(a, b) { return null; } +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.f = function () { }; +- C.prototype.f2 = function (a, b) { return null; }; +- return C; +-}()); ++class C { ++ f() { } ++ f2(a, b) { return null; } ++} + var m = { + a: function f() { }, + b: function f2(a, b) { return null; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/genericsWithoutTypeParameters1.js.diff b/testdata/baselines/reference/submodule/compiler/genericsWithoutTypeParameters1.js.diff index 2ac2c3883f..f39634e8a9 100644 --- a/testdata/baselines/reference/submodule/compiler/genericsWithoutTypeParameters1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/genericsWithoutTypeParameters1.js.diff @@ -1,11 +1,43 @@ --- old.genericsWithoutTypeParameters1.js +++ new.genericsWithoutTypeParameters1.js -@@= skipped -47, +47 lines =@@ +@@= skipped -35, +35 lines =@@ + } + + //// [genericsWithoutTypeParameters1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { return null; }; +- return C; +-}()); ++class C { ++ foo() { return null; } ++} + var c1; + var i1; + var c2; +@@= skipped -13, +10 lines =@@ + function foo(x, y) { } + function foo2(x, y) { } var x = { a: new C() }; - var x2 = { a: { bar() { return 1; } } }; - class D { +-var x2 = { a: { bar: function () { return 1; } } }; +-var D = /** @class */ (function () { +- function D() { +- } +- return D; +-}()); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++var x2 = { a: { bar() { return 1; } } }; ++class D { + x; + y; - } - class A { ++} ++class A { ++} + function f(x) { + return null; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js index 698c5faf79..7a352d95c4 100644 --- a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js +++ b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js @@ -4,7 +4,7 @@ declare function _(value: Array): _; declare function _(value: T): _; -declare module _ { +declare namespace _ { export function each( //list: List, //iterator: ListIterator, @@ -19,7 +19,7 @@ declare class _ { each(iterator: _.ListIterator, context?: any): void; } -module MyModule { +namespace MyModule { export class MyClass { public get myGetter() { var obj:any = {}; diff --git a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js.diff b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js.diff new file mode 100644 index 0000000000..b82a5f8d8c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js.diff @@ -0,0 +1,26 @@ +--- old.getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js ++++ new.getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js +@@= skipped -31, +31 lines =@@ + //// [getAccessorWithImpliedReturnTypeAndFunctionClassMerge.js] + var MyModule; + (function (MyModule) { +- var MyClass = /** @class */ (function () { +- function MyClass() { ++ class MyClass { ++ get myGetter() { ++ var obj = {}; ++ return obj; + } +- Object.defineProperty(MyClass.prototype, "myGetter", { +- get: function () { +- var obj = {}; +- return obj; +- }, +- enumerable: false, +- configurable: true +- }); +- return MyClass; +- }()); ++ } + MyModule.MyClass = MyClass; + })(MyModule || (MyModule = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols index c3f3746403..fce59c1342 100644 --- a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols +++ b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols @@ -18,11 +18,11 @@ declare function _(value: T): _; >_ : Symbol(_, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 0), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 45), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 1, 38), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 12, 1)) >T : Symbol(T, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 1, 19)) -declare module _ { +declare namespace _ { >_ : Symbol(_, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 0), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 45), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 1, 38), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 12, 1)) export function each( ->each : Symbol(each, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 3, 18)) +>each : Symbol(each, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 3, 21)) >T : Symbol(T, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 4, 25)) //list: List, @@ -58,11 +58,11 @@ declare class _ { >context : Symbol(context, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 15, 43)) } -module MyModule { +namespace MyModule { >MyModule : Symbol(MyModule, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 16, 1)) export class MyClass { ->MyClass : Symbol(MyClass, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 18, 17)) +>MyClass : Symbol(MyClass, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 18, 20)) public get myGetter() { >myGetter : Symbol(MyClass.myGetter, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 19, 26)) diff --git a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols.diff b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols.diff new file mode 100644 index 0000000000..9394b678b6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols.diff @@ -0,0 +1,11 @@ +--- old.getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols ++++ new.getAccessorWithImpliedReturnTypeAndFunctionClassMerge.symbols +@@= skipped -4, +4 lines =@@ + >_ : Symbol(_, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 0), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 45), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 1, 38), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 12, 1)) + >T : Symbol(T, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 19)) + >value : Symbol(value, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 22)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 19)) + >_ : Symbol(_, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 0), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 45), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 1, 38), Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 12, 1)) + >T : Symbol(T, Decl(getAccessorWithImpliedReturnTypeAndFunctionClassMerge.ts, 0, 19)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.types b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.types index 73e169ac04..4ea0841544 100644 --- a/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.types +++ b/testdata/baselines/reference/submodule/compiler/getAccessorWithImpliedReturnTypeAndFunctionClassMerge.types @@ -9,7 +9,7 @@ declare function _(value: T): _; >_ : typeof _ >value : T -declare module _ { +declare namespace _ { >_ : typeof _ export function each( @@ -38,7 +38,7 @@ declare class _ { >context : any } -module MyModule { +namespace MyModule { >MyModule : typeof MyModule export class MyClass { diff --git a/testdata/baselines/reference/submodule/compiler/getAndSetAsMemberNames.js.diff b/testdata/baselines/reference/submodule/compiler/getAndSetAsMemberNames.js.diff index 69c31c0317..f0ef74308e 100644 --- a/testdata/baselines/reference/submodule/compiler/getAndSetAsMemberNames.js.diff +++ b/testdata/baselines/reference/submodule/compiler/getAndSetAsMemberNames.js.diff @@ -1,34 +1,62 @@ --- old.getAndSetAsMemberNames.js +++ new.getAndSetAsMemberNames.js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + //// [getAndSetAsMemberNames.js] - class C1 { -- constructor() { +-var C1 = /** @class */ (function () { +- function C1() { - this.get = 1; - } +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- C3.prototype.set = function (x) { ++class C1 { + set; + get = 1; - } - class C2 { ++} ++class C2 { + set; - } - class C3 { - set(x) { -@@= skipped -12, +12 lines =@@ - } - } - class C4 { -- constructor() { ++} ++class C3 { ++ set(x) { + return x + 1; +- }; +- return C3; +-}()); +-var C4 = /** @class */ (function () { +- function C4() { - this.get = true; - } -+ get = true; - } - class C5 { -- constructor() { +- return C4; +-}()); +-var C5 = /** @class */ (function () { +- function C5() { - this.set = function () { return true; }; - } +- C5.prototype.get = function () { return true; }; +- Object.defineProperty(C5.prototype, "t", { +- set: function (x) { }, +- enumerable: false, +- configurable: true +- }); +- return C5; +-}()); ++ } ++} ++class C4 { ++ get = true; ++} ++class C5 { + set = function () { return true; }; - get() { return true; } - set t(x) { } - } \ No newline at end of file ++ get() { return true; } ++ set t(x) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType.js.diff b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType.js.diff new file mode 100644 index 0000000000..d444c13d2f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType.js.diff @@ -0,0 +1,24 @@ +--- old.getAndSetNotIdenticalType.js ++++ new.getAndSetNotIdenticalType.js +@@= skipped -8, +8 lines =@@ + } + + //// [getAndSetNotIdenticalType.js] +-var C = /** @class */ (function () { +- function C() { ++class C { ++ get x() { ++ return 1; + } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return 1; +- }, +- set: function (v) { }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++ set x(v) { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType2.js.diff b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType2.js.diff index 3c5e0132a9..9a6fd31b80 100644 --- a/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType2.js.diff @@ -1,13 +1,41 @@ --- old.getAndSetNotIdenticalType2.js +++ new.getAndSetNotIdenticalType2.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + x.x = r; //// [getAndSetNotIdenticalType2.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return this.data; +- }, +- set: function (v) { +- this.data = v; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class A { + foo; - } - class C { ++} ++class C { + data; - get x() { - return this.data; - } \ No newline at end of file ++ get x() { ++ return this.data; ++ } ++ set x(v) { ++ this.data = v; ++ } ++} + var x = new C(); + var r = x.x; + x.x = r; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType3.js.diff b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType3.js.diff index 69ce5f0e8e..8626ad819d 100644 --- a/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/getAndSetNotIdenticalType3.js.diff @@ -1,13 +1,41 @@ --- old.getAndSetNotIdenticalType3.js +++ new.getAndSetNotIdenticalType3.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + x.x = r; //// [getAndSetNotIdenticalType3.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "x", { +- get: function () { +- return this.data; +- }, +- set: function (v) { +- this.data = v; +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class A { + foo; - } - class C { ++} ++class C { + data; - get x() { - return this.data; - } \ No newline at end of file ++ get x() { ++ return this.data; ++ } ++ set x(v) { ++ this.data = v; ++ } ++} + var x = new C(); + var r = x.x; + x.x = r; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.js.diff b/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.js.diff index 6faee97c2a..a7f4f74cbd 100644 --- a/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.js.diff +++ b/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.js.diff @@ -6,4 +6,5 @@ //// [getParameterNameAtPosition.js] -"use strict"; -// Repro from #30171 - cases(fn(opts => { })); \ No newline at end of file +-cases(fn(function (opts) { })); ++cases(fn(opts => { })); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.symbols.diff b/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.symbols.diff new file mode 100644 index 0000000000..1381eba9a6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getParameterNameAtPosition.symbols.diff @@ -0,0 +1,11 @@ +--- old.getParameterNameAtPosition.symbols ++++ new.getParameterNameAtPosition.symbols +@@= skipped -5, +5 lines =@@ + interface Mock extends Function { + >Mock : Symbol(Mock, Decl(getParameterNameAtPosition.ts, 0, 0)) + >Y : Symbol(Y, Decl(getParameterNameAtPosition.ts, 2, 15)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + (...args: Y): any; + >args : Symbol(args, Decl(getParameterNameAtPosition.ts, 3, 5)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getSetEnumerable.js.diff b/testdata/baselines/reference/submodule/compiler/getSetEnumerable.js.diff new file mode 100644 index 0000000000..9b7ccc51c1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getSetEnumerable.js.diff @@ -0,0 +1,64 @@ +--- old.getSetEnumerable.js ++++ new.getSetEnumerable.js +@@= skipped -28, +28 lines =@@ + + + //// [getSetEnumerable.js] +-var GetSetEnumerableClassGet = /** @class */ (function () { +- function GetSetEnumerableClassGet() { +- } +- Object.defineProperty(GetSetEnumerableClassGet.prototype, "prop", { +- get: function () { return true; }, +- enumerable: false, +- configurable: true +- }); +- return GetSetEnumerableClassGet; +-}()); +-var GetSetEnumerableClassSet = /** @class */ (function () { +- function GetSetEnumerableClassSet() { +- } +- Object.defineProperty(GetSetEnumerableClassSet.prototype, "prop", { +- set: function (value) { }, +- enumerable: false, +- configurable: true +- }); +- return GetSetEnumerableClassSet; +-}()); +-var GetSetEnumerableClassGetSet = /** @class */ (function () { +- function GetSetEnumerableClassGetSet() { +- } +- Object.defineProperty(GetSetEnumerableClassGetSet.prototype, "prop", { +- get: function () { return true; }, +- set: function (value) { }, +- enumerable: false, +- configurable: true +- }); +- return GetSetEnumerableClassGetSet; +-}()); +-var GetSetEnumerableObjectGet = { +- get prop() { return true; } +-}; +-var GetSetEnumerableObjectSet = { +- set prop(value) { } +-}; +-var GetSetEnumerableObjectGetSet = { ++class GetSetEnumerableClassGet { ++ get prop() { return true; } ++} ++class GetSetEnumerableClassSet { ++ set prop(value) { } ++} ++class GetSetEnumerableClassGetSet { ++ get prop() { return true; } ++ set prop(value) { } ++} ++const GetSetEnumerableObjectGet = { ++ get prop() { return true; } ++}; ++const GetSetEnumerableObjectSet = { ++ set prop(value) { } ++}; ++const GetSetEnumerableObjectGetSet = { + get prop() { return true; }, + set prop(value) { } + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.js.diff b/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.js.diff new file mode 100644 index 0000000000..3e605634a1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.js.diff @@ -0,0 +1,71 @@ +--- old.getterControlFlowStrictNull.js ++++ new.getterControlFlowStrictNull.js +@@= skipped -32, +32 lines =@@ + } + + //// [getterControlFlowStrictNull.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.a = function () { ++class A { ++ a() { + if (Math.random() > 0.5) { + return ''; + } + // it does error here as expected +- }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- Object.defineProperty(B.prototype, "a", { +- get: function () { +- if (Math.random() > 0.5) { +- return ''; +- } +- // it should error here because it returns undefined +- }, +- enumerable: false, +- configurable: true +- }); +- return B; +-}()); +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "a", { +- get: function () { +- if (Math.random() > 0.5) { +- return 0; +- } +- // it should error here because it returns undefined +- }, +- set: function (value) { +- }, +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++ } ++} ++class B { ++ get a() { ++ if (Math.random() > 0.5) { ++ return ''; ++ } ++ // it should error here because it returns undefined ++ } ++} ++class C { ++ get a() { ++ if (Math.random() > 0.5) { ++ return 0; ++ } ++ // it should error here because it returns undefined ++ } ++ set a(value) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.symbols.diff b/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.symbols.diff new file mode 100644 index 0000000000..1178bd9f5a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getterControlFlowStrictNull.symbols.diff @@ -0,0 +1,29 @@ +--- old.getterControlFlowStrictNull.symbols ++++ new.getterControlFlowStrictNull.symbols +@@= skipped -8, +8 lines =@@ + + if (Math.random() > 0.5) { + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return ''; +@@= skipped -17, +17 lines =@@ + + if (Math.random() > 0.5) { + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return ''; +@@= skipped -17, +17 lines =@@ + + if (Math.random() > 0.5) { + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getterMissingReturnError.js.diff b/testdata/baselines/reference/submodule/compiler/getterMissingReturnError.js.diff new file mode 100644 index 0000000000..71af9c17b6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getterMissingReturnError.js.diff @@ -0,0 +1,20 @@ +--- old.getterMissingReturnError.js ++++ new.getterMissingReturnError.js +@@= skipped -8, +8 lines =@@ + + + //// [getterMissingReturnError.js] +-var test = /** @class */ (function () { +- function test() { ++class test { ++ get p2() { + } +- Object.defineProperty(test.prototype, "p2", { +- get: function () { +- }, +- enumerable: false, +- configurable: true +- }); +- return test; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getterSetterSubtypeAssignment.types.diff b/testdata/baselines/reference/submodule/compiler/getterSetterSubtypeAssignment.types.diff new file mode 100644 index 0000000000..14c44cb4b6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getterSetterSubtypeAssignment.types.diff @@ -0,0 +1,20 @@ +--- old.getterSetterSubtypeAssignment.types ++++ new.getterSetterSubtypeAssignment.types +@@= skipped -111, +111 lines =@@ + >x : number + >typeof this._x === 'number' ? this._x : Number(this._x) : number + >typeof this._x === 'number' : boolean +->typeof this._x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof this._x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >this._x : string | number + >this : this + >_x : string | number +@@= skipped -132, +132 lines =@@ + >x : number + >typeof this._x === 'number' ? this._x : this._x.bar : number + >typeof this._x === 'number' : boolean +->typeof this._x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof this._x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >this._x : number | Foo + >this : this + >_x : number | Foo \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/getterThatThrowsShouldNotNeedReturn.js.diff b/testdata/baselines/reference/submodule/compiler/getterThatThrowsShouldNotNeedReturn.js.diff new file mode 100644 index 0000000000..fb079b15d2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/getterThatThrowsShouldNotNeedReturn.js.diff @@ -0,0 +1,29 @@ +--- old.getterThatThrowsShouldNotNeedReturn.js ++++ new.getterThatThrowsShouldNotNeedReturn.js +@@= skipped -11, +11 lines =@@ + + + //// [getterThatThrowsShouldNotNeedReturn.js] +-var Greeter = /** @class */ (function () { +- function Greeter() { +- } +- Object.defineProperty(Greeter.prototype, "greet", { +- get: function () { +- throw ''; // should not raise an error +- }, +- enumerable: false, +- configurable: true +- }); +- Greeter.prototype.greeting = function () { +- throw ''; // should not raise an error +- }; +- return Greeter; +-}()); ++class Greeter { ++ get greet() { ++ throw ''; // should not raise an error ++ } ++ greeting() { ++ throw ''; // should not raise an error ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/gettersAndSetters.types.diff b/testdata/baselines/reference/submodule/compiler/gettersAndSetters.types.diff new file mode 100644 index 0000000000..ddcc94f353 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/gettersAndSetters.types.diff @@ -0,0 +1,10 @@ +--- old.gettersAndSetters.types ++++ new.gettersAndSetters.types +@@= skipped -150, +150 lines =@@ + + if (typeof x === "string") { + >typeof x === "string" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >"string" : "string" diff --git a/testdata/baselines/reference/submodule/compiler/gettersAndSettersAccessibility.js.diff b/testdata/baselines/reference/submodule/compiler/gettersAndSettersAccessibility.js.diff new file mode 100644 index 0000000000..58f6e929af --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/gettersAndSettersAccessibility.js.diff @@ -0,0 +1,22 @@ +--- old.gettersAndSettersAccessibility.js ++++ new.gettersAndSettersAccessibility.js +@@= skipped -7, +7 lines =@@ + + + //// [gettersAndSettersAccessibility.js] +-var C99 = /** @class */ (function () { +- function C99() { +- } +- Object.defineProperty(C99.prototype, "Baz", { +- get: function () { return 0; }, +- set: function (n) { } // error - accessors do not agree in visibility +- , +- enumerable: false, +- configurable: true +- }); +- return C99; +-}()); ++class C99 { ++ get Baz() { return 0; } ++ set Baz(n) { } // error - accessors do not agree in visibility ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/gettersAndSettersErrors.js.diff b/testdata/baselines/reference/submodule/compiler/gettersAndSettersErrors.js.diff index 6f0f1df6b9..4448e0a3a8 100644 --- a/testdata/baselines/reference/submodule/compiler/gettersAndSettersErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/gettersAndSettersErrors.js.diff @@ -1,18 +1,51 @@ --- old.gettersAndSettersErrors.js +++ new.gettersAndSettersErrors.js -@@= skipped -19, +19 lines =@@ +@@= skipped -18, +18 lines =@@ + //// [gettersAndSettersErrors.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.Foo = 0; // error - duplicate identifier Foo - confirmed - } - get Foo() { return "foo"; } // ok - set Foo(foo) { } // ok +- Object.defineProperty(C.prototype, "Foo", { +- get: function () { return "foo"; } // ok +- , +- set: function (foo) { } // ok +- , +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "Goo", { +- get: function (v) { return null; } // error - getters must not have a parameter +- , +- set: function (v) { } // error - setters must not specify a return type +- , +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); +-var E = /** @class */ (function () { +- function E() { +- } +- Object.defineProperty(E.prototype, "Baz", { +- get: function () { return 0; }, +- set: function (n) { } // error - accessors do not agree in visibility +- , +- enumerable: false, +- configurable: true +- }); +- return E; +-}()); ++class C { ++ get Foo() { return "foo"; } // ok ++ set Foo(foo) { } // ok + Foo = 0; // error - duplicate identifier Foo - confirmed - get Goo(v) { return null; } // error - getters must not have a parameter -- set Goo(v): string { } // error - setters must not specify a return type ++ get Goo(v) { return null; } // error - getters must not have a parameter + set Goo(v) { } // error - setters must not specify a return type - } - class E { - get Baz() { return 0; } \ No newline at end of file ++} ++class E { ++ get Baz() { return 0; } ++ set Baz(n) { } // error - accessors do not agree in visibility ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/gettersAndSettersTypesAgree.js.diff b/testdata/baselines/reference/submodule/compiler/gettersAndSettersTypesAgree.js.diff new file mode 100644 index 0000000000..88d35a4a92 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/gettersAndSettersTypesAgree.js.diff @@ -0,0 +1,35 @@ +--- old.gettersAndSettersTypesAgree.js ++++ new.gettersAndSettersTypesAgree.js +@@= skipped -12, +12 lines =@@ + var o2 = {get Foo(){return 0;}, set Foo(val:number){}}; // ok - types agree + + //// [gettersAndSettersTypesAgree.js] +-var C = /** @class */ (function () { +- function C() { +- } +- Object.defineProperty(C.prototype, "Foo", { +- get: function () { return "foo"; } // ok +- , +- set: function (foo) { } // ok - type inferred from getter return statement +- , +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C.prototype, "Bar", { +- get: function () { return "foo"; } // ok +- , +- set: function (bar) { } // ok - type must be declared +- , +- enumerable: false, +- configurable: true +- }); +- return C; +-}()); ++class C { ++ get Foo() { return "foo"; } // ok ++ set Foo(foo) { } // ok - type inferred from getter return statement ++ get Bar() { return "foo"; } // ok ++ set Bar(bar) { } // ok - type must be declared ++} + var o1 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree (inference) + var o2 = { get Foo() { return 0; }, set Foo(val) { } }; // ok - types agree \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/global.js b/testdata/baselines/reference/submodule/compiler/global.js index 77f3d21e74..ce7dded330 100644 --- a/testdata/baselines/reference/submodule/compiler/global.js +++ b/testdata/baselines/reference/submodule/compiler/global.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/global.ts] //// //// [global.ts] -module M { +namespace M { export function f(y:number) { return x+y; } diff --git a/testdata/baselines/reference/submodule/compiler/global.symbols b/testdata/baselines/reference/submodule/compiler/global.symbols index 660a92f84d..1cfdade946 100644 --- a/testdata/baselines/reference/submodule/compiler/global.symbols +++ b/testdata/baselines/reference/submodule/compiler/global.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/global.ts] //// === global.ts === -module M { +namespace M { >M : Symbol(M, Decl(global.ts, 0, 0)) export function f(y:number) { ->f : Symbol(f, Decl(global.ts, 0, 10)) +>f : Symbol(f, Decl(global.ts, 0, 13)) >y : Symbol(y, Decl(global.ts, 1, 22)) return x+y; @@ -18,8 +18,8 @@ var x=10; >x : Symbol(x, Decl(global.ts, 6, 3)) M.f(3); ->M.f : Symbol(M.f, Decl(global.ts, 0, 10)) +>M.f : Symbol(M.f, Decl(global.ts, 0, 13)) >M : Symbol(M, Decl(global.ts, 0, 0)) ->f : Symbol(M.f, Decl(global.ts, 0, 10)) +>f : Symbol(M.f, Decl(global.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/global.types b/testdata/baselines/reference/submodule/compiler/global.types index a3d0f887c9..4087ec4e3e 100644 --- a/testdata/baselines/reference/submodule/compiler/global.types +++ b/testdata/baselines/reference/submodule/compiler/global.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/global.ts] //// === global.ts === -module M { +namespace M { >M : typeof M export function f(y:number) { diff --git a/testdata/baselines/reference/submodule/compiler/globalFunctionAugmentationOverload.symbols.diff b/testdata/baselines/reference/submodule/compiler/globalFunctionAugmentationOverload.symbols.diff new file mode 100644 index 0000000000..88d5965f8a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/globalFunctionAugmentationOverload.symbols.diff @@ -0,0 +1,11 @@ +--- old.globalFunctionAugmentationOverload.symbols ++++ new.globalFunctionAugmentationOverload.symbols +@@= skipped -3, +3 lines =@@ + declare function expect(spy: Function): void; + >expect : Symbol(expect, Decl(mod.d.ts, 0, 0), Decl(mine.ts, 2, 16)) + >spy : Symbol(spy, Decl(mod.d.ts, 0, 24)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + declare module "mod" { + >"mod" : Symbol("mod", Decl(mod.d.ts, 0, 45)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/globalIsContextualKeyword.js.diff b/testdata/baselines/reference/submodule/compiler/globalIsContextualKeyword.js.diff new file mode 100644 index 0000000000..824394da37 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/globalIsContextualKeyword.js.diff @@ -0,0 +1,24 @@ +--- old.globalIsContextualKeyword.js ++++ new.globalIsContextualKeyword.js +@@= skipped -19, +19 lines =@@ + + //// [globalIsContextualKeyword.js] + function a() { +- var global = 1; ++ let global = 1; + } + function b() { +- var global = /** @class */ (function () { +- function global() { +- } +- return global; +- }()); ++ class global { ++ } + } + function foo(global) { + } +-var obj = { ++let obj = { + global: "123" + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/globalThis.symbols.diff b/testdata/baselines/reference/submodule/compiler/globalThis.symbols.diff new file mode 100644 index 0000000000..e098993556 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/globalThis.symbols.diff @@ -0,0 +1,9 @@ +--- old.globalThis.symbols ++++ new.globalThis.symbols +@@= skipped -3, +3 lines =@@ + var __e = Math.E; // should not generate 'this.Math.E' + >__e : Symbol(__e, Decl(globalThis.ts, 0, 3)) + >Math.E : Symbol(Math.E, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >E : Symbol(Math.E, Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/globalThisCapture.js.diff b/testdata/baselines/reference/submodule/compiler/globalThisCapture.js.diff new file mode 100644 index 0000000000..639c2493ef --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/globalThisCapture.js.diff @@ -0,0 +1,13 @@ +--- old.globalThisCapture.js ++++ new.globalThisCapture.js +@@= skipped -10, +10 lines =@@ + + + //// [globalThisCapture.js] +-var _this = this; + // Add a lambda to ensure global 'this' capture is triggered +-(function () { return _this.window; }); ++(() => this.window); + var parts = []; + // Ensure that the generated code is correct + parts[0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/grammarAmbiguities1.js.diff b/testdata/baselines/reference/submodule/compiler/grammarAmbiguities1.js.diff new file mode 100644 index 0000000000..9feec59e6c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/grammarAmbiguities1.js.diff @@ -0,0 +1,27 @@ +--- old.grammarAmbiguities1.js ++++ new.grammarAmbiguities1.js +@@= skipped -12, +12 lines =@@ + + + //// [grammarAmbiguities1.js] +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.foo = function () { }; +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- B.prototype.bar = function () { }; +- return B; +-}()); ++class A { ++ foo() { } ++} ++class B { ++ bar() { } ++} + function f(x) { return x; } + function g(x) { return f(x); } + g(7); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/heterogeneousArrayAndOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/heterogeneousArrayAndOverloads.js.diff new file mode 100644 index 0000000000..1ad287e0d1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/heterogeneousArrayAndOverloads.js.diff @@ -0,0 +1,23 @@ +--- old.heterogeneousArrayAndOverloads.js ++++ new.heterogeneousArrayAndOverloads.js +@@= skipped -13, +13 lines =@@ + } + + //// [heterogeneousArrayAndOverloads.js] +-var arrTest = /** @class */ (function () { +- function arrTest() { +- } +- arrTest.prototype.test = function (arg1) { }; +- arrTest.prototype.callTest = function () { ++class arrTest { ++ test(arg1) { } ++ callTest() { + this.test([1, 2, 3, 5]); + this.test(["hi"]); + this.test([]); + this.test([1, 2, "hi", 5]); // Error +- }; +- return arrTest; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/higherOrderMappedIndexLookupInference.js.diff b/testdata/baselines/reference/submodule/compiler/higherOrderMappedIndexLookupInference.js.diff new file mode 100644 index 0000000000..bdd01219b2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/higherOrderMappedIndexLookupInference.js.diff @@ -0,0 +1,8 @@ +--- old.higherOrderMappedIndexLookupInference.js ++++ new.higherOrderMappedIndexLookupInference.js +@@= skipped -41, +41 lines =@@ + a = b; + b = a; + } +-var h = f; ++const h = f; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/homomorphicMappedTypeNesting.symbols.diff b/testdata/baselines/reference/submodule/compiler/homomorphicMappedTypeNesting.symbols.diff new file mode 100644 index 0000000000..c1188ac4db --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/homomorphicMappedTypeNesting.symbols.diff @@ -0,0 +1,11 @@ +--- old.homomorphicMappedTypeNesting.symbols ++++ new.homomorphicMappedTypeNesting.symbols +@@= skipped -39, +39 lines =@@ + declare function fnBad>>(...args: T): Test>>; + >fnBad : Symbol(fnBad, Decl(homomorphicMappedTypeNesting.ts, 10, 44)) + >T : Symbol(T, Decl(homomorphicMappedTypeNesting.ts, 12, 23)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Box : Symbol(Box, Decl(homomorphicMappedTypeNesting.ts, 0, 0)) + >args : Symbol(args, Decl(homomorphicMappedTypeNesting.ts, 12, 53)) + >T : Symbol(T, Decl(homomorphicMappedTypeNesting.ts, 12, 23)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.js.diff b/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.js.diff new file mode 100644 index 0000000000..7524c29e2d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.js.diff @@ -0,0 +1,25 @@ +--- old.identicalGenericConditionalsWithInferRelated.js ++++ new.identicalGenericConditionalsWithInferRelated.js +@@= skipped -34, +34 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + function f(arg) { +- var x = null; +- var y = null; ++ let x = null; ++ let y = null; + x = y; // is err, should be ok + y = x; // is err, should be ok + } +-var Y = /** @class */ (function () { +- function Y() { +- } +- Y.prototype.decode = function (ctor) { ++class Y { ++ decode(ctor) { + throw new Error(); +- }; +- return Y; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.symbols.diff b/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.symbols.diff new file mode 100644 index 0000000000..0f730a7a19 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/identicalGenericConditionalsWithInferRelated.symbols.diff @@ -0,0 +1,11 @@ +--- old.identicalGenericConditionalsWithInferRelated.symbols ++++ new.identicalGenericConditionalsWithInferRelated.symbols +@@= skipped -56, +56 lines =@@ + + T extends String ? string : + >T : Symbol(T, Decl(identicalGenericConditionalsWithInferRelated.ts, 12, 25)) +->String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more) ++>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + T + >T : Symbol(T, Decl(identicalGenericConditionalsWithInferRelated.ts, 12, 25)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/identicalTypesNoDifferByCheckOrder.js.diff b/testdata/baselines/reference/submodule/compiler/identicalTypesNoDifferByCheckOrder.js.diff new file mode 100644 index 0000000000..4ef179743b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/identicalTypesNoDifferByCheckOrder.js.diff @@ -0,0 +1,26 @@ +--- old.identicalTypesNoDifferByCheckOrder.js ++++ new.identicalTypesNoDifferByCheckOrder.js +@@= skipped -38, +38 lines =@@ + needsComponentOfSomeProps2({ renderAs: comp2 }); + + //// [identicalTypesNoDifferByCheckOrder.js] +-function needsComponentOfSomeProps3() { +- var x = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- x[_i] = arguments[_i]; +- } +-} +-var comp3 = null; ++function needsComponentOfSomeProps3(...x) { } ++const comp3 = null; + needsComponentOfSomeProps3({ renderAs: comp3 }); +-function needsComponentOfSomeProps2() { +- var x = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- x[_i] = arguments[_i]; +- } +-} +-var comp2 = null; ++function needsComponentOfSomeProps2(...x) { } ++const comp2 = null; + needsComponentOfSomeProps2({ renderAs: comp2 }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/identifierStartAfterNumericLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/identifierStartAfterNumericLiteral.js.diff new file mode 100644 index 0000000000..50a8d14d3c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/identifierStartAfterNumericLiteral.js.diff @@ -0,0 +1,11 @@ +--- old.identifierStartAfterNumericLiteral.js ++++ new.identifierStartAfterNumericLiteral.js +@@= skipped -29, +29 lines =@@ + + + //// [identifierStartAfterNumericLiteral.js] +-var valueIn = 3 in [null]; ++let valueIn = 3 in [null]; + 3; + a[null]; + 123; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff index 39292a7044..58a0eb23ef 100644 --- a/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/ignoredJsxAttributes.js.diff @@ -9,7 +9,13 @@ +/// // Repro from #44797 -var React = require("react"); +-var props = { +const React = require("react"); - let props = { ++let props = { foo: "", - "data-yadda": 42, // Error \ No newline at end of file + "data-yadda": 42, // Error + }; +-var x1 = React.createElement(Yadda, { foo: "hello", "data-yadda": 42 }); +-var x2 = React.createElement(Yadda, { bar: "hello", "data-yadda": 42 }); // Error ++let x1 = React.createElement(Yadda, { foo: "hello", "data-yadda": 42 }); ++let x2 = React.createElement(Yadda, { bar: "hello", "data-yadda": 42 }); // Error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/illegalModifiersOnClassElements.js.diff b/testdata/baselines/reference/submodule/compiler/illegalModifiersOnClassElements.js.diff index 8f7fb384ca..09f04b096e 100644 --- a/testdata/baselines/reference/submodule/compiler/illegalModifiersOnClassElements.js.diff +++ b/testdata/baselines/reference/submodule/compiler/illegalModifiersOnClassElements.js.diff @@ -1,11 +1,15 @@ --- old.illegalModifiersOnClassElements.js +++ new.illegalModifiersOnClassElements.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + } //// [illegalModifiersOnClassElements.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.bar = 1; - } +- return C; +-}()); ++class C { + export bar = 1; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/illegalSuperCallsInConstructor.js.diff b/testdata/baselines/reference/submodule/compiler/illegalSuperCallsInConstructor.js.diff index a94d173b8b..96ef7f91d8 100644 --- a/testdata/baselines/reference/submodule/compiler/illegalSuperCallsInConstructor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/illegalSuperCallsInConstructor.js.diff @@ -1,10 +1,57 @@ --- old.illegalSuperCallsInConstructor.js +++ new.illegalSuperCallsInConstructor.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + } //// [illegalSuperCallsInConstructor.js] - class Base { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- var _this = this; +- var r2 = function () { return _this = _super.call(this) || this; }; +- var r3 = function () { _this = _super.call(this) || this; }; +- var r4 = function () { _this = _super.call(this) || this; }; ++class Base { + x; - } - class Derived extends Base { - constructor() { \ No newline at end of file ++} ++class Derived extends Base { ++ constructor() { ++ var r2 = () => super(); ++ var r3 = () => { super(); }; ++ var r4 = function () { super(); }; + var r5 = { + get foo() { +- _this = _super.call(this) || this; ++ super(); + return 1; + }, + set foo(v) { +- _this = _super.call(this) || this; ++ super(); + } + }; +- return _this; + } +- return Derived; +-}(Base)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementArrayInterface.symbols.diff b/testdata/baselines/reference/submodule/compiler/implementArrayInterface.symbols.diff new file mode 100644 index 0000000000..3a6a35ca38 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implementArrayInterface.symbols.diff @@ -0,0 +1,11 @@ +--- old.implementArrayInterface.symbols ++++ new.implementArrayInterface.symbols +@@= skipped -3, +3 lines =@@ + declare class MyArray implements Array { + >MyArray : Symbol(MyArray, Decl(implementArrayInterface.ts, 0, 0)) + >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(implementArrayInterface.ts, 0, 22)) + + toString(): string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementClausePrecedingExtends.js.diff b/testdata/baselines/reference/submodule/compiler/implementClausePrecedingExtends.js.diff index d88f002055..adde265281 100644 --- a/testdata/baselines/reference/submodule/compiler/implementClausePrecedingExtends.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implementClausePrecedingExtends.js.diff @@ -1,10 +1,38 @@ --- old.implementClausePrecedingExtends.js +++ new.implementClausePrecedingExtends.js -@@= skipped -5, +5 lines =@@ +@@= skipped -4, +4 lines =@@ + class D implements C extends C { } //// [implementClausePrecedingExtends.js] - class C { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D; +-}(C)); ++class C { + foo; - } - class D extends C { - } \ No newline at end of file ++} ++class D extends C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementGenericWithMismatchedTypes.js.diff b/testdata/baselines/reference/submodule/compiler/implementGenericWithMismatchedTypes.js.diff index 62094db9bf..e951dff8e6 100644 --- a/testdata/baselines/reference/submodule/compiler/implementGenericWithMismatchedTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implementGenericWithMismatchedTypes.js.diff @@ -6,6 +6,29 @@ //// [implementGenericWithMismatchedTypes.js] -// no errors because in the derived types the best common type for T's value is Object -// and that matches the original signature for assignability since we treat its T's as Object - class C { - foo(x) { - return null; \ No newline at end of file +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function (x) { +- return null; +- }; +- return C; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- C2.prototype.foo = function (x) { +- return null; +- }; +- return C2; +-}()); ++class C { ++ foo(x) { ++ return null; ++ } ++} ++class C2 { ++ foo(x) { ++ return null; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementInterfaceAnyMemberWithVoid.js.diff b/testdata/baselines/reference/submodule/compiler/implementInterfaceAnyMemberWithVoid.js.diff new file mode 100644 index 0000000000..28d486f4c1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implementInterfaceAnyMemberWithVoid.js.diff @@ -0,0 +1,16 @@ +--- old.implementInterfaceAnyMemberWithVoid.js ++++ new.implementInterfaceAnyMemberWithVoid.js +@@= skipped -11, +11 lines =@@ + + + //// [implementInterfaceAnyMemberWithVoid.js] +-var Bug = /** @class */ (function () { +- function Bug() { ++class Bug { ++ foo(value) { + } +- Bug.prototype.foo = function (value) { +- }; +- return Bug; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementPublicPropertyAsPrivate.js.diff b/testdata/baselines/reference/submodule/compiler/implementPublicPropertyAsPrivate.js.diff index d43d1500fc..5ec19a68ad 100644 --- a/testdata/baselines/reference/submodule/compiler/implementPublicPropertyAsPrivate.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implementPublicPropertyAsPrivate.js.diff @@ -1,11 +1,15 @@ --- old.implementPublicPropertyAsPrivate.js +++ new.implementPublicPropertyAsPrivate.js -@@= skipped -9, +9 lines =@@ +@@= skipped -8, +8 lines =@@ + } //// [implementPublicPropertyAsPrivate.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.x = 0; // should raise error at class decl - } +- return C; +-}()); ++class C { + x = 0; // should raise error at class decl - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementsClauseAlreadySeen.js.diff b/testdata/baselines/reference/submodule/compiler/implementsClauseAlreadySeen.js.diff new file mode 100644 index 0000000000..aa4f77f813 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implementsClauseAlreadySeen.js.diff @@ -0,0 +1,22 @@ +--- old.implementsClauseAlreadySeen.js ++++ new.implementsClauseAlreadySeen.js +@@= skipped -8, +8 lines =@@ + } + + //// [implementsClauseAlreadySeen.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- D.prototype.baz = function () { }; +- return D; +-}()); ++class C { ++} ++class D { ++ baz() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementsInClassExpression.js.diff b/testdata/baselines/reference/submodule/compiler/implementsInClassExpression.js.diff new file mode 100644 index 0000000000..6370fea4ed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implementsInClassExpression.js.diff @@ -0,0 +1,15 @@ +--- old.implementsInClassExpression.js ++++ new.implementsInClassExpression.js +@@= skipped -9, +9 lines =@@ + } + + //// [implementsInClassExpression.js] +-var cls = /** @class */ (function () { +- function class_1() { +- } +- class_1.prototype.doThing = function () { }; +- return class_1; +-}()); ++let cls = class { ++ doThing() { } ++}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implementsIncorrectlyNoAssertion.js.diff b/testdata/baselines/reference/submodule/compiler/implementsIncorrectlyNoAssertion.js.diff index f73d1b3ccb..92f83cbd59 100644 --- a/testdata/baselines/reference/submodule/compiler/implementsIncorrectlyNoAssertion.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implementsIncorrectlyNoAssertion.js.diff @@ -1,9 +1,15 @@ --- old.implementsIncorrectlyNoAssertion.js +++ new.implementsIncorrectlyNoAssertion.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [implementsIncorrectlyNoAssertion.js] - class Baz { +-var Baz = /** @class */ (function () { +- function Baz() { +- } +- return Baz; +-}()); ++class Baz { + x; + y; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.errors.txt b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.errors.txt index 009472aac2..c8af1f253a 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.errors.txt @@ -10,7 +10,7 @@ implicitAnyAmbients.ts(22,13): error TS7005: Variable 'y' implicitly has an 'any ==== implicitAnyAmbients.ts (9 errors) ==== - declare module m { + declare namespace m { var x; // error ~ !!! error TS7005: Variable 'x' implicitly has an 'any' type. @@ -46,7 +46,7 @@ implicitAnyAmbients.ts(22,13): error TS7005: Variable 'y' implicitly has an 'any foo3(x: any): any; } - module n { + namespace n { var y; // error ~ !!! error TS7005: Variable 'y' implicitly has an 'any' type. diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.js b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.js index 2951389166..70c34cdcf2 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.js +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/implicitAnyAmbients.ts] //// //// [implicitAnyAmbients.ts] -declare module m { +declare namespace m { var x; // error var y: any; @@ -21,7 +21,7 @@ declare module m { foo3(x: any): any; } - module n { + namespace n { var y; // error } diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.symbols b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.symbols index f8fbb6be68..c6c14f9f18 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.symbols +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/implicitAnyAmbients.ts] //// === implicitAnyAmbients.ts === -declare module m { +declare namespace m { >m : Symbol(m, Decl(implicitAnyAmbients.ts, 0, 0)) var x; // error @@ -52,7 +52,7 @@ declare module m { >x : Symbol(x, Decl(implicitAnyAmbients.ts, 17, 13)) } - module n { + namespace n { >n : Symbol(n, Decl(implicitAnyAmbients.ts, 18, 5)) var y; // error diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.types b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.types index 61afca0a09..27d2d5522d 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.types +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyAmbients.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/implicitAnyAmbients.ts] //// === implicitAnyAmbients.ts === -declare module m { +declare namespace m { >m : typeof m var x; // error @@ -50,7 +50,7 @@ declare module m { >x : any } - module n { + namespace n { >n : typeof n var y; // error diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyAnyReturningFunction.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyAnyReturningFunction.js.diff new file mode 100644 index 0000000000..209098c000 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyAnyReturningFunction.js.diff @@ -0,0 +1,27 @@ +--- old.implicitAnyAnyReturningFunction.js ++++ new.implicitAnyAnyReturningFunction.js +@@= skipped -29, +29 lines =@@ + var someLocal = {}; + return someLocal; + } +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.A = function () { ++class C { ++ A() { + return ""; +- }; +- C.prototype.B = function () { ++ } ++ B() { + var someLocal = {}; + return someLocal; +- }; +- return C; +-}()); ++ } ++} + + + //// [implicitAnyAnyReturningFunction.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyCastedValue.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyCastedValue.js.diff index ff04f34854..b0acf8623e 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyCastedValue.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyCastedValue.js.diff @@ -1,26 +1,68 @@ --- old.implicitAnyCastedValue.js +++ new.implicitAnyCastedValue.js -@@= skipped -87, +87 lines =@@ +@@= skipped -86, +86 lines =@@ + function foo() { return "hello world"; // this should not be an error } - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.bar = null; // this should be an error - this.foo = undefined; // this should be an error -- } ++class C { + bar = null; // this should be an error + foo = undefined; // this should be an error - get tempVar() { - return 0; // this should not be an error - } -@@= skipped -15, +13 lines =@@ ++ get tempVar() { ++ return 0; // this should not be an error } - } - class C1 { -- constructor() { +- Object.defineProperty(C.prototype, "tempVar", { +- get: function () { +- return 0; // this should not be an error +- }, +- enumerable: false, +- configurable: true +- }); +- C.prototype.returnBarWithCase = function () { ++ returnBarWithCase() { + return this.bar; +- }; +- C.prototype.returnFooWithCase = function () { ++ } ++ returnFooWithCase() { + return this.foo; // this should not be an error +- }; +- return C; +-}()); +-var C1 = /** @class */ (function () { +- function C1() { - this.getValue = null; // this should be an error - } +- Object.defineProperty(C1.prototype, "castedGet", { +- get: function () { +- return this.getValue; // this should not be an error +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(C1.prototype, "notCastedGet", { +- get: function () { +- return this.getValue; // this should not be an error +- }, +- enumerable: false, +- configurable: true +- }); +- return C1; +-}()); ++ } ++} ++class C1 { + getValue = null; // this should be an error - get castedGet() { - return this.getValue; // this should not be an error - } \ No newline at end of file ++ get castedGet() { ++ return this.getValue; // this should not be an error ++ } ++ get notCastedGet() { ++ return this.getValue; // this should not be an error ++ } ++} + function castedNull() { + return null; // this should not be an error + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.js.diff new file mode 100644 index 0000000000..9de662aee2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionExprWithoutFormalType.js.diff @@ -0,0 +1,24 @@ +--- old.implicitAnyDeclareFunctionExprWithoutFormalType.js ++++ new.implicitAnyDeclareFunctionExprWithoutFormalType.js +@@= skipped -20, +20 lines =@@ + + //// [implicitAnyDeclareFunctionExprWithoutFormalType.js] + // these should be errors for implicit any parameter +-var lambda = function (l1) { }; // Error at "l1" +-var lambd2 = function (ll1, ll2) { }; // Error at "ll1" ++var lambda = (l1) => { }; // Error at "l1" ++var lambd2 = (ll1, ll2) => { }; // Error at "ll1" + var lamda3 = function myLambda3(myParam) { }; +-var lamda4 = function () { return null; }; ++var lamda4 = () => { return null; }; + // these should be error for implicit any return type + var lambda5 = function temp() { return null; }; +-var lambda6 = function () { return null; }; ++var lambda6 = () => { return null; }; + var lambda7 = function temp() { return undefined; }; +-var lambda8 = function () { return undefined; }; ++var lambda8 = () => { return undefined; }; + // this shouldn't be an error +-var lambda9 = function () { return 5; }; ++var lambda9 = () => { return 5; }; + var lambda10 = function temp1() { return 5; }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionWithoutFormalType.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionWithoutFormalType.js.diff new file mode 100644 index 0000000000..b17e17c9aa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareFunctionWithoutFormalType.js.diff @@ -0,0 +1,29 @@ +--- old.implicitAnyDeclareFunctionWithoutFormalType.js ++++ new.implicitAnyDeclareFunctionWithoutFormalType.js +@@= skipped -20, +20 lines =@@ + ; // error at "y"; no error at "x" + function func2(a, b, c) { } + ; // error at "a,b,c" +-function func3() { +- var args = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- args[_i] = arguments[_i]; +- } +-} ++function func3(...args) { } + ; // error at "args" +-function func4(z, w) { +- if (z === void 0) { z = null; } +- if (w === void 0) { w = undefined; } +-} ++function func4(z = null, w = undefined) { } + ; // error at "z,w" + // these shouldn't be errors +-function noError1(x, y) { +- if (x === void 0) { x = 3; } +- if (y === void 0) { y = 2; } +-} ++function noError1(x = 3, y = 2) { } + ; + function noError2(x, y) { } + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareMemberWithoutType2.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareMemberWithoutType2.js.diff index dbe48fb1da..a9c7baa0a1 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareMemberWithoutType2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareMemberWithoutType2.js.diff @@ -1,14 +1,19 @@ --- old.implicitAnyDeclareMemberWithoutType2.js +++ new.implicitAnyDeclareMemberWithoutType2.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + //// [implicitAnyDeclareMemberWithoutType2.js] // this should be an error - class C { -- constructor(c1, c2, c3) { +-var C = /** @class */ (function () { +- function C(c1, c2, c3) { - this.x = null; // error at "x" - } // error at "c1, c2" +- C.prototype.funcOfC = function (f1, f2, f3) { }; // error at "f1,f2" +- return C; +-}()); ++class C { + x = null; // error at "x" + x1; // no error + constructor(c1, c2, c3) { } // error at "c1, c2" - funcOfC(f1, f2, f3) { } // error at "f1,f2" - } \ No newline at end of file ++ funcOfC(f1, f2, f3) { } // error at "f1,f2" ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareTypePropertyWithoutType.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareTypePropertyWithoutType.js.diff new file mode 100644 index 0000000000..5535b98db6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyDeclareTypePropertyWithoutType.js.diff @@ -0,0 +1,17 @@ +--- old.implicitAnyDeclareTypePropertyWithoutType.js ++++ new.implicitAnyDeclareTypePropertyWithoutType.js +@@= skipped -19, +19 lines =@@ + + + //// [implicitAnyDeclareTypePropertyWithoutType.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++ constructor() { } ++} + // this should be an error + var x; // error at "y,z" + var x1; // error at "z1" \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.js.diff index 4a540bbd84..06b883c118 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.js.diff @@ -1,13 +1,43 @@ --- old.implicitAnyFromCircularInference.js +++ new.implicitAnyFromCircularInference.js -@@= skipped -75, +75 lines =@@ +@@= skipped -65, +65 lines =@@ + return f1(); + }; + // Error expected +-var f2 = function () { return f2(); }; ++var f2 = () => f2(); + // Error expected + function h() { + return foo(); +@@= skipped -9, +9 lines =@@ + } } function foo(x) { return "abc"; } - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.s = foo(this); - } +- return C; +-}()); +-var D = /** @class */ (function () { +- function D() { +- } +- Object.defineProperty(D.prototype, "x", { +- // Error expected +- get: function () { +- return this.x; +- }, +- enumerable: false, +- configurable: true +- }); +- return D; +-}()); ++class C { + s = foo(this); - } - class D { - // Error expected \ No newline at end of file ++} ++class D { ++ // Error expected ++ get x() { ++ return this.x; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.symbols.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.symbols.diff new file mode 100644 index 0000000000..4d23843dbe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyFromCircularInference.symbols.diff @@ -0,0 +1,11 @@ +--- old.implicitAnyFromCircularInference.symbols ++++ new.implicitAnyFromCircularInference.symbols +@@= skipped -17, +17 lines =@@ + // Error expected + var d: Array; + >d : Symbol(d, Decl(implicitAnyFromCircularInference.ts, 8, 3)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >d : Symbol(d, Decl(implicitAnyFromCircularInference.ts, 8, 3)) + + function f() { return f; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionInvocationWithAnyArguements.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionInvocationWithAnyArguements.js.diff new file mode 100644 index 0000000000..d86f8e19be --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionInvocationWithAnyArguements.js.diff @@ -0,0 +1,26 @@ +--- old.implicitAnyFunctionInvocationWithAnyArguements.js ++++ new.implicitAnyFunctionInvocationWithAnyArguements.js +@@= skipped -51, +51 lines =@@ + function testFuncLiteral(funcLit) { } + ; + // this should not be an error +-testFunctionExprC2(function (v1, v2) { return 1; }); ++testFunctionExprC2((v1, v2) => 1); + testObjLiteral(objL); + testFuncLiteral(funcL); + var k = temp1(null); +@@= skipped -11, +11 lines =@@ + noError(undefined, []); + noError(null, [null, undefined]); + noError(undefined, anyArray); +-var C = /** @class */ (function () { +- function C(emtpyArray, variable) { ++class C { ++ constructor(emtpyArray, variable) { + } +- return C; +-}()); ++} + var newC = new C([], undefined); + var newC1 = new C([], arg0); + var newC2 = new C([], null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionReturnNullOrUndefined.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionReturnNullOrUndefined.js.diff new file mode 100644 index 0000000000..179c380dc0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyFunctionReturnNullOrUndefined.js.diff @@ -0,0 +1,26 @@ +--- old.implicitAnyFunctionReturnNullOrUndefined.js ++++ new.implicitAnyFunctionReturnNullOrUndefined.js +@@= skipped -29, +29 lines =@@ + // this should be an error + function nullWidenFunction() { return null; } // error at "nullWidenFunction" + function undefinedWidenFunction() { return undefined; } // error at "undefinedWidenFunction" +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.nullWidenFuncOfC = function () { ++class C { ++ nullWidenFuncOfC() { + return null; +- }; +- C.prototype.underfinedWidenFuncOfC = function () { ++ } ++ underfinedWidenFuncOfC() { + return undefined; +- }; +- return C; +-}()); ++ } ++} + // this should not be an error + function foo1() { return null; } + function bar1() { return undefined; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyGenerics.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyGenerics.js.diff index ab3d7c8c42..8193439f5d 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyGenerics.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyGenerics.js.diff @@ -1,10 +1,29 @@ --- old.implicitAnyGenerics.js +++ new.implicitAnyGenerics.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + //// [implicitAnyGenerics.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + x; - } ++} var c = new C(); - var c2 = new C(); \ No newline at end of file + var c2 = new C(); + var c3 = new C(); + var c4 = new C(); +-var D = /** @class */ (function () { +- function D(x) { +- } +- return D; +-}()); ++class D { ++ constructor(x) { } ++} + var d = new D(null); + var d2 = new D(1); + var d3 = new D(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.js.diff index 90c35bb6b2..a70cb12547 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyGetAndSetAccessorWithAnyReturnType.js.diff @@ -1,13 +1,65 @@ --- old.implicitAnyGetAndSetAccessorWithAnyReturnType.js +++ new.implicitAnyGetAndSetAccessorWithAnyReturnType.js -@@= skipped -27, +27 lines =@@ +@@= skipped -26, +26 lines =@@ + //// [implicitAnyGetAndSetAccessorWithAnyReturnType.js] // these should be errors - class GetAndSet { -- constructor() { +-var GetAndSet = /** @class */ (function () { +- function GetAndSet() { - this.getAndSet = null; // error at "getAndSet" - } +- Object.defineProperty(GetAndSet.prototype, "haveGetAndSet", { +- get: function () { +- return this.getAndSet; +- }, +- // this shouldn't be an error +- set: function (value) { +- this.getAndSet = value; +- }, +- enumerable: false, +- configurable: true +- }); +- return GetAndSet; +-}()); +-var SetterOnly = /** @class */ (function () { +- function SetterOnly() { +- } +- Object.defineProperty(SetterOnly.prototype, "haveOnlySet", { +- set: function (newXValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return SetterOnly; +-}()); +-var GetterOnly = /** @class */ (function () { +- function GetterOnly() { +- } +- Object.defineProperty(GetterOnly.prototype, "haveOnlyGet", { +- get: function () { +- return null; +- }, +- enumerable: false, +- configurable: true +- }); +- return GetterOnly; +-}()); ++class GetAndSet { + getAndSet = null; // error at "getAndSet" - get haveGetAndSet() { - return this.getAndSet; - } \ No newline at end of file ++ get haveGetAndSet() { ++ return this.getAndSet; ++ } ++ // this shouldn't be an error ++ set haveGetAndSet(value) { ++ this.getAndSet = value; ++ } ++} ++class SetterOnly { ++ set haveOnlySet(newXValue) { ++ } ++} ++class GetterOnly { ++ get haveOnlyGet() { ++ return null; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.errors.txt b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.errors.txt index 25bf7f3416..a5044abfaf 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.errors.txt @@ -4,7 +4,7 @@ implicitAnyInAmbientDeclaration.ts(6,31): error TS7006: Parameter 'x' implicitly ==== implicitAnyInAmbientDeclaration.ts (3 errors) ==== - module Test { + namespace Test { declare class C { public publicMember; // this should be an error ~~~~~~~~~~~~ diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.js b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.js index f8e3d8d2b1..b03e847dd7 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.js +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/implicitAnyInAmbientDeclaration.ts] //// //// [implicitAnyInAmbientDeclaration.ts] -module Test { +namespace Test { declare class C { public publicMember; // this should be an error private privateMember; // this should not be an error diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.symbols b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.symbols index c8590d861d..1c560aae73 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.symbols +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/implicitAnyInAmbientDeclaration.ts] //// === implicitAnyInAmbientDeclaration.ts === -module Test { +namespace Test { >Test : Symbol(Test, Decl(implicitAnyInAmbientDeclaration.ts, 0, 0)) declare class C { ->C : Symbol(C, Decl(implicitAnyInAmbientDeclaration.ts, 0, 13)) +>C : Symbol(C, Decl(implicitAnyInAmbientDeclaration.ts, 0, 16)) public publicMember; // this should be an error >publicMember : Symbol(C.publicMember, Decl(implicitAnyInAmbientDeclaration.ts, 1, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.types b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.types index aa2ceb4983..1ad1567f6f 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.types +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyInAmbientDeclaration.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/implicitAnyInAmbientDeclaration.ts] //// === implicitAnyInAmbientDeclaration.ts === -module Test { +namespace Test { >Test : typeof Test declare class C { diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyInCatch.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyInCatch.js.diff new file mode 100644 index 0000000000..d3abe7a2cf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyInCatch.js.diff @@ -0,0 +1,19 @@ +--- old.implicitAnyInCatch.js ++++ new.implicitAnyInCatch.js +@@= skipped -22, +22 lines =@@ + if (error.number === -2147024809) { } + } + for (var key in this) { } +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.temp = function () { ++class C { ++ temp() { + for (var x in this) { + } +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitAnyWidenToAny.js.diff b/testdata/baselines/reference/submodule/compiler/implicitAnyWidenToAny.js.diff index 7134967875..325c7df383 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitAnyWidenToAny.js.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitAnyWidenToAny.js.diff @@ -1,10 +1,17 @@ --- old.implicitAnyWidenToAny.js +++ new.implicitAnyWidenToAny.js -@@= skipped -36, +36 lines =@@ +@@= skipped -35, +35 lines =@@ + var widenArray = [null, undefined]; // error at "widenArray" var emptyArray = []; // these should not be error - class AnimalObj { +-var AnimalObj = /** @class */ (function () { +- function AnimalObj() { +- } +- return AnimalObj; +-}()); ++class AnimalObj { + x; - } ++} var foo = 5; - var bar = "Hello World"; \ No newline at end of file + var bar = "Hello World"; + var foo1 = null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitConstParameters.js.diff b/testdata/baselines/reference/submodule/compiler/implicitConstParameters.js.diff new file mode 100644 index 0000000000..fc69aecfb6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitConstParameters.js.diff @@ -0,0 +1,57 @@ +--- old.implicitConstParameters.js ++++ new.implicitConstParameters.js +@@= skipped -62, +62 lines =@@ + } + function fn(x) { + if (typeof x === 'number') { +- doSomething(function () { return x.toFixed(); }); ++ doSomething(() => x.toFixed()); + } + } + function f1(x) { + if (!x) { + return; + } +- doSomething(function () { return x.length; }); ++ doSomething(() => x.length); + } + function f2(x) { + if (x) { +- doSomething(function () { +- doSomething(function () { return x.length; }); ++ doSomething(() => { ++ doSomething(() => x.length); + }); + } + } +@@= skipped -20, +20 lines =@@ + inner(); + function inner() { + if (x) { +- doSomething(function () { return x.length; }); ++ doSomething(() => x.length); + } + } + } + function f4(x) { + x = "abc"; + if (x) { +- doSomething(function () { return x.length; }); ++ doSomething(() => x.length); + } + } + function f5(x) { + if (x) { +- doSomething(function () { return x.length; }); ++ doSomething(() => x.length); + } + x = "abc"; // causes x to be considered non-const + } + function f6(x) { +- var y = x || ""; ++ const y = x || ""; + if (x) { +- doSomething(function () { return y.length; }); ++ doSomething(() => y.length); + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/implicitConstParameters.types.diff b/testdata/baselines/reference/submodule/compiler/implicitConstParameters.types.diff index 236c150fec..ac4bef5ca8 100644 --- a/testdata/baselines/reference/submodule/compiler/implicitConstParameters.types.diff +++ b/testdata/baselines/reference/submodule/compiler/implicitConstParameters.types.diff @@ -9,6 +9,12 @@ >x : string | number if (typeof x === 'number') { + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'number' : "number" + @@= skipped -14, +14 lines =@@ >doSomething : (cb: () => void) => void >() => x.toFixed() : () => string diff --git a/testdata/baselines/reference/submodule/compiler/implicitIndexSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/implicitIndexSignatures.js.diff new file mode 100644 index 0000000000..2305f9d6f8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/implicitIndexSignatures.js.diff @@ -0,0 +1,97 @@ +--- old.implicitIndexSignatures.js ++++ new.implicitIndexSignatures.js +@@= skipped -60, +60 lines =@@ + + + //// [implicitIndexSignatures.js] +-var empty1 = {}; +-var empty2; +-var names1 = { a: "foo", b: "bar" }; +-var names2; +-var map; ++const empty1 = {}; ++let empty2; ++const names1 = { a: "foo", b: "bar" }; ++let names2; ++let map; + map = { x: "xxx", y: "yyy" }; + map = empty1; + map = empty2; + map = names1; + map = names2; + function f1() { +- var o1 = { a: 1, b: 2 }; +- var o2; +- var v1 = getStringIndexValue(o1); +- var v2 = getStringIndexValue(o2); ++ const o1 = { a: 1, b: 2 }; ++ let o2; ++ const v1 = getStringIndexValue(o1); ++ const v2 = getStringIndexValue(o2); + } + function f2() { +- var o1 = { a: "1", b: "2" }; +- var o2; +- var v1 = getStringIndexValue(o1); +- var v2 = getStringIndexValue(o2); ++ const o1 = { a: "1", b: "2" }; ++ let o2; ++ const v1 = getStringIndexValue(o1); ++ const v2 = getStringIndexValue(o2); + } + function f3() { +- var o1 = { a: 1, b: "2" }; +- var o2; +- var v1 = getStringIndexValue(o1); +- var v2 = getStringIndexValue(o2); ++ const o1 = { a: 1, b: "2" }; ++ let o2; ++ const v1 = getStringIndexValue(o1); ++ const v2 = getStringIndexValue(o2); + } + function f4() { +- var o1 = { 0: "0", 1: "1", count: 2 }; +- var o2; +- var v1 = getStringIndexValue(o1); +- var v2 = getStringIndexValue(o2); +- var v3 = getNumberIndexValue(o1); +- var v4 = getNumberIndexValue(o2); ++ const o1 = { 0: "0", 1: "1", count: 2 }; ++ let o2; ++ const v1 = getStringIndexValue(o1); ++ const v2 = getStringIndexValue(o2); ++ const v3 = getNumberIndexValue(o1); ++ const v4 = getNumberIndexValue(o2); + } + function f5() { +- var E1; ++ let E1; + (function (E1) { + E1[E1["A"] = 0] = "A"; + E1[E1["B"] = 1] = "B"; + })(E1 || (E1 = {})); +- var E2; ++ let E2; + (function (E2) { + E2["A"] = "A"; + E2["B"] = "B"; + })(E2 || (E2 = {})); +- var E3; ++ let E3; + (function (E3) { + E3[E3["A"] = 0] = "A"; + E3["B"] = "B"; + })(E3 || (E3 = {})); +- var v1 = getStringIndexValue(E1); +- var v2 = getStringIndexValue(E2); +- var v3 = getStringIndexValue(E3); +- var v4 = getNumberIndexValue(E1); +- var v5 = getNumberIndexValue(E2); +- var v6 = getNumberIndexValue(E3); ++ const v1 = getStringIndexValue(E1); ++ const v2 = getStringIndexValue(E2); ++ const v3 = getStringIndexValue(E3); ++ const v4 = getNumberIndexValue(E1); ++ const v5 = getNumberIndexValue(E2); ++ const v6 = getNumberIndexValue(E3); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=commonjs).js.diff new file mode 100644 index 0000000000..247619fe90 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=commonjs).js.diff @@ -0,0 +1,23 @@ +--- old.impliedNodeFormatEmit1(module=commonjs).js ++++ new.impliedNodeFormatEmit1(module=commonjs).js +@@= skipped -39, +39 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -12, +12 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=esnext).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=esnext).js.diff new file mode 100644 index 0000000000..5af3c0fadc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=esnext).js.diff @@ -0,0 +1,28 @@ +--- old.impliedNodeFormatEmit1(module=esnext).js ++++ new.impliedNodeFormatEmit1(module=esnext).js +@@= skipped -34, +34 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._ = void 0; + exports._ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + export {}; + //// [h.mjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=preserve).js.diff new file mode 100644 index 0000000000..fcace311b1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit1(module=preserve).js.diff @@ -0,0 +1,26 @@ +--- old.impliedNodeFormatEmit1(module=preserve).js ++++ new.impliedNodeFormatEmit1(module=preserve).js +@@= skipped -34, +34 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] +-export var _ = 0; ++export const _ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + //// [h.mjs] + //// [i.cjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=commonjs).js.diff new file mode 100644 index 0000000000..6da4daeb24 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=commonjs).js.diff @@ -0,0 +1,23 @@ +--- old.impliedNodeFormatEmit2(module=commonjs).js ++++ new.impliedNodeFormatEmit2(module=commonjs).js +@@= skipped -42, +42 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -12, +12 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=esnext).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=esnext).js.diff new file mode 100644 index 0000000000..83a61b3f18 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=esnext).js.diff @@ -0,0 +1,28 @@ +--- old.impliedNodeFormatEmit2(module=esnext).js ++++ new.impliedNodeFormatEmit2(module=esnext).js +@@= skipped -37, +37 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._ = void 0; + exports._ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + export {}; + //// [h.mjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=preserve).js.diff new file mode 100644 index 0000000000..3894ece8f5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit2(module=preserve).js.diff @@ -0,0 +1,26 @@ +--- old.impliedNodeFormatEmit2(module=preserve).js ++++ new.impliedNodeFormatEmit2(module=preserve).js +@@= skipped -37, +37 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] +-export var _ = 0; ++export const _ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + //// [h.mjs] + //// [i.cjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=commonjs).js.diff new file mode 100644 index 0000000000..c80433b3b0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=commonjs).js.diff @@ -0,0 +1,23 @@ +--- old.impliedNodeFormatEmit3(module=commonjs).js ++++ new.impliedNodeFormatEmit3(module=commonjs).js +@@= skipped -44, +44 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -12, +12 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=esnext).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=esnext).js.diff new file mode 100644 index 0000000000..63726b1a95 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=esnext).js.diff @@ -0,0 +1,28 @@ +--- old.impliedNodeFormatEmit3(module=esnext).js ++++ new.impliedNodeFormatEmit3(module=esnext).js +@@= skipped -39, +39 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._ = void 0; + exports._ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + export {}; + //// [h.mjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=preserve).js.diff new file mode 100644 index 0000000000..4d3cad58a9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit3(module=preserve).js.diff @@ -0,0 +1,26 @@ +--- old.impliedNodeFormatEmit3(module=preserve).js ++++ new.impliedNodeFormatEmit3(module=preserve).js +@@= skipped -39, +39 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] +-export var _ = 0; ++export const _ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + //// [h.mjs] + //// [i.cjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=commonjs).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=commonjs).js.diff new file mode 100644 index 0000000000..920c50d677 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=commonjs).js.diff @@ -0,0 +1,23 @@ +--- old.impliedNodeFormatEmit4(module=commonjs).js ++++ new.impliedNodeFormatEmit4(module=commonjs).js +@@= skipped -44, +44 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +@@= skipped -12, +12 lines =@@ + exports._ = void 0; + exports._ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=esnext).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=esnext).js.diff new file mode 100644 index 0000000000..ed687831dc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=esnext).js.diff @@ -0,0 +1,28 @@ +--- old.impliedNodeFormatEmit4(module=esnext).js ++++ new.impliedNodeFormatEmit4(module=esnext).js +@@= skipped -39, +39 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports._ = void 0; + exports._ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + export {}; + //// [h.mjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=preserve).js.diff new file mode 100644 index 0000000000..0c46dd7814 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/impliedNodeFormatEmit4(module=preserve).js.diff @@ -0,0 +1,26 @@ +--- old.impliedNodeFormatEmit4(module=preserve).js ++++ new.impliedNodeFormatEmit4(module=preserve).js +@@= skipped -39, +39 lines =@@ + + + //// [a.js] +-export var _ = 0; ++export const _ = 0; + //// [b.mjs] +-export var _ = 0; ++export const _ = 0; + //// [c.cjs] +-export var _ = 0; ++export const _ = 0; + //// [d.js] +-export var _ = 0; ++export const _ = 0; + //// [e.mjs] +-export var _ = 0; ++export const _ = 0; + //// [f.mjs] +-export var _ = 0; ++export const _ = 0; + //// [g.js] + //// [h.mjs] + //// [i.cjs] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.js b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.js index 9cbf6241d8..7bf47e92b7 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.js +++ b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule.ts] //// //// [importAliasAnExternalModuleInsideAnInternalModule_file0.ts] -export module m { +export namespace m { export function foo() { } } //// [importAliasAnExternalModuleInsideAnInternalModule_file1.ts] import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0'); -module m_private { +namespace m_private { //import r2 = require('m'); // would be error export import C = r; // no error C.m.foo(); diff --git a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.symbols b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.symbols index 361e03cb7c..62f35d0590 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.symbols @@ -4,27 +4,27 @@ import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0'); >r : Symbol(r, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 0)) -module m_private { +namespace m_private { >m_private : Symbol(m_private, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 80)) //import r2 = require('m'); // would be error export import C = r; // no error ->C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 18)) +>C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 21)) >r : Symbol(r, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 0)) C.m.foo(); ->C.m.foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17)) +>C.m.foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 20)) >C.m : Symbol(C.m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0)) ->C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 18)) +>C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 21)) >m : Symbol(C.m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0)) ->foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17)) +>foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 20)) } === importAliasAnExternalModuleInsideAnInternalModule_file0.ts === -export module m { +export namespace m { >m : Symbol(m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0)) export function foo() { } ->foo : Symbol(foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17)) +>foo : Symbol(foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.types b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.types index 09dc99072c..ede43b726c 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.types +++ b/testdata/baselines/reference/submodule/compiler/importAliasAnExternalModuleInsideAnInternalModule.types @@ -4,7 +4,7 @@ import r = require('./importAliasAnExternalModuleInsideAnInternalModule_file0'); >r : typeof r -module m_private { +namespace m_private { >m_private : typeof m_private //import r2 = require('m'); // would be error @@ -22,7 +22,7 @@ module m_private { } === importAliasAnExternalModuleInsideAnInternalModule_file0.ts === -export module m { +export namespace m { >m : typeof m export function foo() { } diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.js.diff index 43328100a6..e0714c2bd7 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.js.diff @@ -17,8 +17,17 @@ + let Thing; (function (Thing) { var Internal = My.Internal; - class Foo { +- var Foo = /** @class */ (function () { +- function Foo() { ++ class Foo { + _which; - constructor() { ++ constructor() { Internal.getThing(); - 0 /* Internal.WhichThing.A */ ? "foo" : "bar"; \ No newline at end of file + 0 /* Internal.WhichThing.A */ ? "foo" : "bar"; + } +- return Foo; +- }()); ++ } + Thing.Foo = Foo; + })(Thing = SomeOther.Thing || (SomeOther.Thing = {})); + })(SomeOther || (SomeOther = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff new file mode 100644 index 0000000000..1831817a3a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importAliasFromNamespace.types.diff @@ -0,0 +1,11 @@ +--- old.importAliasFromNamespace.types ++++ new.importAliasFromNamespace.types +@@= skipped -25, +25 lines =@@ + >getThing : () => void + + Internal.WhichThing.A ? "foo" : "bar"; +->Internal.WhichThing.A ? "foo" : "bar" : "foo" | "bar" ++>Internal.WhichThing.A ? "foo" : "bar" : "bar" | "foo" + >Internal.WhichThing.A : Internal.WhichThing.A + >Internal.WhichThing : typeof Internal.WhichThing + >Internal : typeof Internal \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.js.diff b/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.js.diff new file mode 100644 index 0000000000..ff1daf1341 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importAliasInModuleAugmentation.js.diff @@ -0,0 +1,11 @@ +--- old.importAliasInModuleAugmentation.js ++++ new.importAliasInModuleAugmentation.js +@@= skipped -25, +25 lines =@@ + (function (A) { + A.y = 34; + })(A || (A = {})); +-var m = x; +-var s = { s: "" }; ++const m = x; ++let s = { s: "" }; + void s.s; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js index 2ddc62326b..29239db9dc 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js +++ b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/importAliasWithDottedName.ts] //// //// [importAliasWithDottedName.ts] -module M { +namespace M { export var x = 1; - export module N { + export namespace N { export var y = 2; } } -module A { +namespace A { import N = M.N; var r = N.y; var r2 = M.N.y; diff --git a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js.diff b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js.diff new file mode 100644 index 0000000000..c88f8eb268 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.js.diff @@ -0,0 +1,11 @@ +--- old.importAliasWithDottedName.js ++++ new.importAliasWithDottedName.js +@@= skipped -17, +17 lines =@@ + var M; + (function (M) { + M.x = 1; +- var N; ++ let N; + (function (N) { + N.y = 2; + })(N = M.N || (M.N = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.symbols b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.symbols index e469345580..2b46c831c1 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/importAliasWithDottedName.ts] //// === importAliasWithDottedName.ts === -module M { +namespace M { >M : Symbol(M, Decl(importAliasWithDottedName.ts, 0, 0)) export var x = 1; >x : Symbol(x, Decl(importAliasWithDottedName.ts, 1, 14)) - export module N { + export namespace N { >N : Symbol(N, Decl(importAliasWithDottedName.ts, 1, 21)) export var y = 2; @@ -15,18 +15,18 @@ module M { } } -module A { +namespace A { >A : Symbol(A, Decl(importAliasWithDottedName.ts, 5, 1)) import N = M.N; ->N : Symbol(N, Decl(importAliasWithDottedName.ts, 7, 10)) +>N : Symbol(N, Decl(importAliasWithDottedName.ts, 7, 13)) >M : Symbol(M, Decl(importAliasWithDottedName.ts, 0, 0)) >N : Symbol(N, Decl(importAliasWithDottedName.ts, 1, 21)) var r = N.y; >r : Symbol(r, Decl(importAliasWithDottedName.ts, 9, 7)) >N.y : Symbol(N.y, Decl(importAliasWithDottedName.ts, 3, 18)) ->N : Symbol(N, Decl(importAliasWithDottedName.ts, 7, 10)) +>N : Symbol(N, Decl(importAliasWithDottedName.ts, 7, 13)) >y : Symbol(N.y, Decl(importAliasWithDottedName.ts, 3, 18)) var r2 = M.N.y; diff --git a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.types b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.types index 595eae4a1a..72fe7098c1 100644 --- a/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.types +++ b/testdata/baselines/reference/submodule/compiler/importAliasWithDottedName.types @@ -1,14 +1,14 @@ //// [tests/cases/compiler/importAliasWithDottedName.ts] //// === importAliasWithDottedName.ts === -module M { +namespace M { >M : typeof M export var x = 1; >x : number >1 : 1 - export module N { + export namespace N { >N : typeof N export var y = 2; @@ -17,7 +17,7 @@ module M { } } -module A { +namespace A { >A : typeof A import N = M.N; diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt b/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt index 4d825215ae..df4c60f111 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.errors.txt @@ -2,11 +2,11 @@ importAnImport.ts(6,23): error TS2694: Namespace 'c.a.b' has no exported member ==== importAnImport.ts (1 errors) ==== - module c.a.b { + namespace c.a.b { import ma = a; } - module m0 { + namespace m0 { import m8 = c.a.b.ma; ~~ !!! error TS2694: Namespace 'c.a.b' has no exported member 'ma'. diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.js b/testdata/baselines/reference/submodule/compiler/importAnImport.js index 09340e89d8..176741fc03 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.js +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/importAnImport.ts] //// //// [importAnImport.ts] -module c.a.b { +namespace c.a.b { import ma = a; } -module m0 { +namespace m0 { import m8 = c.a.b.ma; } diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols index 7685c053ed..ed629967ae 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/importAnImport.ts] //// === importAnImport.ts === -module c.a.b { +namespace c.a.b { >c : Symbol(c, Decl(importAnImport.ts, 0, 0)) ->a : Symbol(a, Decl(importAnImport.ts, 0, 9)) ->b : Symbol(ma.b, Decl(importAnImport.ts, 0, 11)) +>a : Symbol(a, Decl(importAnImport.ts, 0, 12)) +>b : Symbol(ma.b, Decl(importAnImport.ts, 0, 14)) import ma = a; ->ma : Symbol(ma, Decl(importAnImport.ts, 0, 14)) ->a : Symbol(ma, Decl(importAnImport.ts, 0, 9)) +>ma : Symbol(ma, Decl(importAnImport.ts, 0, 17)) +>a : Symbol(ma, Decl(importAnImport.ts, 0, 12)) } -module m0 { +namespace m0 { >m0 : Symbol(m0, Decl(importAnImport.ts, 2, 1)) import m8 = c.a.b.ma; ->m8 : Symbol(m8, Decl(importAnImport.ts, 4, 11)) +>m8 : Symbol(m8, Decl(importAnImport.ts, 4, 14)) >c : Symbol(c, Decl(importAnImport.ts, 0, 0)) ->a : Symbol(c.a, Decl(importAnImport.ts, 0, 9)) ->b : Symbol(c.a.b, Decl(importAnImport.ts, 0, 11)) +>a : Symbol(c.a, Decl(importAnImport.ts, 0, 12)) +>b : Symbol(c.a.b, Decl(importAnImport.ts, 0, 14)) } diff --git a/testdata/baselines/reference/submodule/compiler/importAnImport.types b/testdata/baselines/reference/submodule/compiler/importAnImport.types index 55bf868def..193c808d98 100644 --- a/testdata/baselines/reference/submodule/compiler/importAnImport.types +++ b/testdata/baselines/reference/submodule/compiler/importAnImport.types @@ -1,13 +1,13 @@ //// [tests/cases/compiler/importAnImport.ts] //// === importAnImport.ts === -module c.a.b { +namespace c.a.b { import ma = a; >ma : any >a : any } -module m0 { +namespace m0 { import m8 = c.a.b.ma; >m8 : any >c : any diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.errors.txt b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.errors.txt index 574ac8736d..beae948499 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.errors.txt @@ -2,7 +2,7 @@ importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration ==== importAndVariableDeclarationConflict1.ts (1 errors) ==== - module m { + namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js index fd5ae88222..d860144449 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict1.ts] //// //// [importAndVariableDeclarationConflict1.ts] -module m { +namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.symbols b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.symbols index 523da5202b..542b713e88 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict1.ts] //// === importAndVariableDeclarationConflict1.ts === -module m { +namespace m { >m : Symbol(m, Decl(importAndVariableDeclarationConflict1.ts, 0, 0)) export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.types b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.types index e31ba0a5ce..5aa89022dc 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.types +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict1.ts] //// === importAndVariableDeclarationConflict1.ts === -module m { +namespace m { >m : typeof globalThis.m export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js index 77267e73bd..5171f78ad0 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict2.ts] //// //// [importAndVariableDeclarationConflict2.ts] -module m { +namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff index 13ec517e67..e7d7e92e5a 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff @@ -5,6 +5,15 @@ m_1.m = ''; })(m || (m = {})); -var x = m.m; - class C { - foo() { - var x = ''; \ No newline at end of file +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class C { ++ foo() { + var x = ''; +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.symbols b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.symbols index 0dc212fd06..73f89385fe 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict2.ts] //// === importAndVariableDeclarationConflict2.ts === -module m { +namespace m { >m : Symbol(m, Decl(importAndVariableDeclarationConflict2.ts, 0, 0)) export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.types b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.types index db9acf9b8d..70b43cea4c 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.types +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict2.ts] //// === importAndVariableDeclarationConflict2.ts === -module m { +namespace m { >m : typeof globalThis.m export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.errors.txt b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.errors.txt index 9a1eba6ab3..c3030a9acc 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.errors.txt @@ -3,7 +3,7 @@ importAndVariableDeclarationConflict3.ts(6,8): error TS2300: Duplicate identifie ==== importAndVariableDeclarationConflict3.ts (2 errors) ==== - module m { + namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js index 2850f1e4f3..7b1360fd91 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict3.ts] //// //// [importAndVariableDeclarationConflict3.ts] -module m { +namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.symbols b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.symbols index c47dbcbb45..b93e3adc5f 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict3.ts] //// === importAndVariableDeclarationConflict3.ts === -module m { +namespace m { >m : Symbol(m, Decl(importAndVariableDeclarationConflict3.ts, 0, 0)) export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.types b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.types index 5a97848863..f67af2bc13 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.types +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict3.ts] //// === importAndVariableDeclarationConflict3.ts === -module m { +namespace m { >m : typeof globalThis.m export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.errors.txt b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.errors.txt index 9cb9846938..da3ac923df 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.errors.txt @@ -2,7 +2,7 @@ importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration ==== importAndVariableDeclarationConflict4.ts (1 errors) ==== - module m { + namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js index 5502f2132c..a0fd08f18b 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict4.ts] //// //// [importAndVariableDeclarationConflict4.ts] -module m { +namespace m { export var m = ''; } diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.symbols b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.symbols index 2701a60eac..43db850158 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.symbols +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict4.ts] //// === importAndVariableDeclarationConflict4.ts === -module m { +namespace m { >m : Symbol(m, Decl(importAndVariableDeclarationConflict4.ts, 0, 0)) export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.types b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.types index b6fcc639d8..2331bee650 100644 --- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.types +++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importAndVariableDeclarationConflict4.ts] //// === importAndVariableDeclarationConflict4.ts === -module m { +namespace m { >m : typeof globalThis.m export var m = ''; diff --git a/testdata/baselines/reference/submodule/compiler/importAsBaseClass.js.diff b/testdata/baselines/reference/submodule/compiler/importAsBaseClass.js.diff index b6981328a5..bf077c1e94 100644 --- a/testdata/baselines/reference/submodule/compiler/importAsBaseClass.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importAsBaseClass.js.diff @@ -1,10 +1,45 @@ --- old.importAsBaseClass.js +++ new.importAsBaseClass.js -@@= skipped -20, +20 lines =@@ +@@= skipped -13, +13 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Greeter = void 0; +-var Greeter = /** @class */ (function () { +- function Greeter() { +- } +- Greeter.prototype.greet = function () { return 'greet'; }; +- return Greeter; +-}()); ++class Greeter { ++ greet() { return 'greet'; } ++} + exports.Greeter = Greeter; //// [importAsBaseClass_1.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var Greeter = require("./importAsBaseClass_0"); +-var Hello = /** @class */ (function (_super) { +- __extends(Hello, _super); +- function Hello() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Hello; +-}(Greeter)); +const Greeter = require("./importAsBaseClass_0"); - class Hello extends Greeter { - } \ No newline at end of file ++class Hello extends Greeter { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importDecl.js b/testdata/baselines/reference/submodule/compiler/importDecl.js index 498d3db2c3..d4cbbdb733 100644 --- a/testdata/baselines/reference/submodule/compiler/importDecl.js +++ b/testdata/baselines/reference/submodule/compiler/importDecl.js @@ -43,7 +43,7 @@ export var x4 = m4.x; export var d4 = m4.d; export var f4 = m4.foo(); -export module m1 { +export namespace m1 { export var x2 = m4.x; export var d2 = m4.d; export var f2 = m4.foo(); @@ -64,7 +64,7 @@ export var useFncOnly_m4_f4 = fncOnly_m4.foo(); // only used privately no need to emit import private_m4 = require("./importDecl_require3"); -export module usePrivate_m4_m1 { +export namespace usePrivate_m4_m1 { var x3 = private_m4.x; var d3 = private_m4.d; var f3 = private_m4.foo(); diff --git a/testdata/baselines/reference/submodule/compiler/importDecl.js.diff b/testdata/baselines/reference/submodule/compiler/importDecl.js.diff index 91fad09376..56120d8f23 100644 --- a/testdata/baselines/reference/submodule/compiler/importDecl.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importDecl.js.diff @@ -1,38 +1,66 @@ --- old.importDecl.js +++ new.importDecl.js -@@= skipped -86, +86 lines =@@ +@@= skipped -85, +85 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = exports.d = void 0; exports.foo = foo; - class d { +-var d = /** @class */ (function () { +- function d() { +- } +- return d; +-}()); ++class d { + foo; - } ++} exports.d = d; function foo() { return null; } -@@= skipped -9, +10 lines =@@ + //// [importDecl_require1.js] +@@= skipped -12, +10 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.d = void 0; exports.foo = foo; - class d { +-var d = /** @class */ (function () { +- function d() { +- } +- return d; +-}()); ++class d { + bar; - } ++} exports.d = d; var x; -@@= skipped -10, +11 lines =@@ + function foo() { return null; } +@@= skipped -13, +11 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = exports.d = void 0; exports.foo = foo; - class d { +-var d = /** @class */ (function () { +- function d() { +- } +- return d; +-}()); ++class d { + baz; - } ++} exports.d = d; function foo() { return null; } -@@= skipped -9, +10 lines =@@ + //// [importDecl_require3.js] +@@= skipped -12, +10 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.x = exports.d = void 0; exports.foo = foo; - class d { +-var d = /** @class */ (function () { +- function d() { +- } +- return d; +-}()); ++class d { + bing; - } ++} exports.d = d; function foo() { return null; } -@@= skipped -17, +18 lines =@@ + //// [importDecl_require4.js] +@@= skipped -21, +19 lines =@@ /// /// /// diff --git a/testdata/baselines/reference/submodule/compiler/importDecl.symbols b/testdata/baselines/reference/submodule/compiler/importDecl.symbols index af601eade8..82a5a42a77 100644 --- a/testdata/baselines/reference/submodule/compiler/importDecl.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDecl.symbols @@ -27,7 +27,7 @@ export var f4 = m4.foo(); >m4 : Symbol(m4, Decl(importDecl_1.ts, 0, 0)) >foo : Symbol(m4.foo, Decl(importDecl_require.ts, 3, 16)) -export module m1 { +export namespace m1 { >m1 : Symbol(m1, Decl(importDecl_1.ts, 8, 25)) export var x2 = m4.x; @@ -97,7 +97,7 @@ export var useFncOnly_m4_f4 = fncOnly_m4.foo(); import private_m4 = require("./importDecl_require3"); >private_m4 : Symbol(private_m4, Decl(importDecl_1.ts, 27, 47)) -export module usePrivate_m4_m1 { +export namespace usePrivate_m4_m1 { >usePrivate_m4_m1 : Symbol(usePrivate_m4_m1, Decl(importDecl_1.ts, 30, 53)) var x3 = private_m4.x; diff --git a/testdata/baselines/reference/submodule/compiler/importDecl.types b/testdata/baselines/reference/submodule/compiler/importDecl.types index 7fe3699e61..a5a424e994 100644 --- a/testdata/baselines/reference/submodule/compiler/importDecl.types +++ b/testdata/baselines/reference/submodule/compiler/importDecl.types @@ -28,7 +28,7 @@ export var f4 = m4.foo(); >m4 : typeof m4 >foo : () => m4.d -export module m1 { +export namespace m1 { >m1 : typeof m1 export var x2 = m4.x; @@ -102,7 +102,7 @@ export var useFncOnly_m4_f4 = fncOnly_m4.foo(); import private_m4 = require("./importDecl_require3"); >private_m4 : typeof private_m4 -export module usePrivate_m4_m1 { +export namespace usePrivate_m4_m1 { >usePrivate_m4_m1 : typeof usePrivate_m4_m1 var x3 = private_m4.x; diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.errors.txt b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.errors.txt index eb9308554d..1209a7c728 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.errors.txt @@ -3,7 +3,7 @@ importDeclWithDeclareModifier.ts(5,29): error TS2694: Namespace 'x' has no expor ==== importDeclWithDeclareModifier.ts (2 errors) ==== - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.js b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.js index cdf57bab56..ab36dd40b6 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclWithDeclareModifier.ts] //// //// [importDeclWithDeclareModifier.ts] -module x { +namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.symbols b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.symbols index 7a83e14d40..f2d61e3f4e 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/importDeclWithDeclareModifier.ts] //// === importDeclWithDeclareModifier.ts === -module x { +namespace x { >x : Symbol(x, Decl(importDeclWithDeclareModifier.ts, 0, 0)) interface c { ->c : Symbol(c, Decl(importDeclWithDeclareModifier.ts, 0, 10)) +>c : Symbol(c, Decl(importDeclWithDeclareModifier.ts, 0, 13)) } } declare export import a = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.types b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.types index 7750fbd387..e609d561e3 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifier.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclWithDeclareModifier.ts] //// === importDeclWithDeclareModifier.ts === -module x { +namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.errors.txt b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.errors.txt index b1b5a0c638..f48bdd1c66 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.errors.txt @@ -3,7 +3,7 @@ importDeclWithDeclareModifierInAmbientContext.ts(6,5): error TS1038: A 'declare' ==== importDeclWithDeclareModifierInAmbientContext.ts (1 errors) ==== declare module "m" { - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.js b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.js index 82997e3c4f..78e8e8afd9 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.js @@ -2,7 +2,7 @@ //// [importDeclWithDeclareModifierInAmbientContext.ts] declare module "m" { - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.symbols b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.symbols index 7a6cf62195..937e3b0be1 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.symbols @@ -4,17 +4,17 @@ declare module "m" { >"m" : Symbol("m", Decl(importDeclWithDeclareModifierInAmbientContext.ts, 0, 0)) - module x { + namespace x { >x : Symbol(x, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 0, 20)) interface c { ->c : Symbol(c, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 1, 14)) +>c : Symbol(c, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 1, 17)) } } declare export import a = x.c; >a : Symbol(a, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 4, 5)) >x : Symbol(x, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 0, 20)) ->c : Symbol(a, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 1, 14)) +>c : Symbol(a, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 1, 17)) var b: a; >b : Symbol(b, Decl(importDeclWithDeclareModifierInAmbientContext.ts, 6, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.types b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.types index 2a1de19a89..f735fb0af5 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithDeclareModifierInAmbientContext.types @@ -4,7 +4,7 @@ declare module "m" { >"m" : typeof import("m") - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.errors.txt b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.errors.txt index 173d467902..d4420d401f 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.errors.txt @@ -4,7 +4,7 @@ importDeclWithExportModifierAndExportAssignment.ts(6,1): error TS2309: An export ==== importDeclWithExportModifierAndExportAssignment.ts (3 errors) ==== - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js index 8f2fc5436e..6b46c393c6 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts] //// //// [importDeclWithExportModifierAndExportAssignment.ts] -module x { +namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.symbols b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.symbols index bbd7af6fa6..e19bd9b860 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts] //// === importDeclWithExportModifierAndExportAssignment.ts === -module x { +namespace x { >x : Symbol(x, Decl(importDeclWithExportModifierAndExportAssignment.ts, 0, 0)) interface c { ->c : Symbol(c, Decl(importDeclWithExportModifierAndExportAssignment.ts, 0, 10)) +>c : Symbol(c, Decl(importDeclWithExportModifierAndExportAssignment.ts, 0, 13)) } } export import a = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.types b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.types index b6bf49e8d8..ce855765b4 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclWithExportModifierAndExportAssignment.ts] //// === importDeclWithExportModifierAndExportAssignment.ts === -module x { +namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt index 62cde19a93..d8b4056217 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.errors.txt @@ -3,7 +3,7 @@ importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts(7,5): error T ==== importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts (1 errors) ==== declare module "m" { - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.js b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.js index d8df861def..eb8c785efd 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.js @@ -2,7 +2,7 @@ //// [importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts] declare module "m" { - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.symbols b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.symbols index a932be2e65..0785b37363 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.symbols @@ -4,17 +4,17 @@ declare module "m" { >"m" : Symbol("m", Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 0, 0)) - module x { + namespace x { >x : Symbol(x, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 0, 20)) interface c { ->c : Symbol(c, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 1, 14)) +>c : Symbol(c, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 1, 17)) } } export import a = x.c; >a : Symbol(a, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 4, 5)) >x : Symbol(x, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 0, 20)) ->c : Symbol(a, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 1, 14)) +>c : Symbol(a, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 1, 17)) export = x; >x : Symbol(x, Decl(importDeclWithExportModifierAndExportAssignmentInAmbientContext.ts, 0, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.types b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.types index 4d2c8d64f5..8e4695f8a9 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignmentInAmbientContext.types @@ -4,7 +4,7 @@ declare module "m" { >"m" : typeof import("m") - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.js b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.js index b6ffef3fd7..cfa076bf7c 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.js @@ -2,7 +2,7 @@ //// [importDeclWithExportModifierInAmbientContext.ts] declare module "m" { - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.symbols b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.symbols index 4be395391b..6cc25ea6fa 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.symbols @@ -4,17 +4,17 @@ declare module "m" { >"m" : Symbol("m", Decl(importDeclWithExportModifierInAmbientContext.ts, 0, 0)) - module x { + namespace x { >x : Symbol(x, Decl(importDeclWithExportModifierInAmbientContext.ts, 0, 20)) interface c { ->c : Symbol(c, Decl(importDeclWithExportModifierInAmbientContext.ts, 1, 14)) +>c : Symbol(c, Decl(importDeclWithExportModifierInAmbientContext.ts, 1, 17)) } } export import a = x.c; >a : Symbol(a, Decl(importDeclWithExportModifierInAmbientContext.ts, 4, 5)) >x : Symbol(x, Decl(importDeclWithExportModifierInAmbientContext.ts, 0, 20)) ->c : Symbol(a, Decl(importDeclWithExportModifierInAmbientContext.ts, 1, 14)) +>c : Symbol(a, Decl(importDeclWithExportModifierInAmbientContext.ts, 1, 17)) var b: a; >b : Symbol(b, Decl(importDeclWithExportModifierInAmbientContext.ts, 6, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.types b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.types index f923641662..b2375c99e0 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierInAmbientContext.types @@ -4,7 +4,7 @@ declare module "m" { >"m" : typeof import("m") - module x { + namespace x { interface c { } } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.errors.txt b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.errors.txt index 5599c20033..6c83b73a0e 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.errors.txt @@ -2,7 +2,7 @@ importDeclarationInModuleDeclaration1.ts(2,25): error TS1147: Import declaration ==== importDeclarationInModuleDeclaration1.ts (1 errors) ==== - module m2 { + namespace m2 { import m3 = require("use_glo_M1_public"); ~~~~~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. diff --git a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.js b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.js index 7adef9ef3f..4eeb39cb03 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.js +++ b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclarationInModuleDeclaration1.ts] //// //// [importDeclarationInModuleDeclaration1.ts] -module m2 { +namespace m2 { import m3 = require("use_glo_M1_public"); } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.symbols b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.symbols index 9c812528c2..c851642d1b 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.symbols +++ b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.symbols @@ -1,9 +1,9 @@ //// [tests/cases/compiler/importDeclarationInModuleDeclaration1.ts] //// === importDeclarationInModuleDeclaration1.ts === -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(importDeclarationInModuleDeclaration1.ts, 0, 0)) import m3 = require("use_glo_M1_public"); ->m3 : Symbol(m3, Decl(importDeclarationInModuleDeclaration1.ts, 0, 11)) +>m3 : Symbol(m3, Decl(importDeclarationInModuleDeclaration1.ts, 0, 14)) } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.types b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.types index fd4b182f26..a46f1b2c50 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.types +++ b/testdata/baselines/reference/submodule/compiler/importDeclarationInModuleDeclaration1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importDeclarationInModuleDeclaration1.ts] //// === importDeclarationInModuleDeclaration1.ts === -module m2 { +namespace m2 { import m3 = require("use_glo_M1_public"); >m3 : any } diff --git a/testdata/baselines/reference/submodule/compiler/importDeclarationUsedAsTypeQuery.js.diff b/testdata/baselines/reference/submodule/compiler/importDeclarationUsedAsTypeQuery.js.diff index 442c525bff..880f6d7381 100644 --- a/testdata/baselines/reference/submodule/compiler/importDeclarationUsedAsTypeQuery.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importDeclarationUsedAsTypeQuery.js.diff @@ -1,10 +1,17 @@ --- old.importDeclarationUsedAsTypeQuery.js +++ new.importDeclarationUsedAsTypeQuery.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.B = void 0; - class B { +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); ++class B { + id; - } ++} exports.B = B; - //// [importDeclarationUsedAsTypeQuery_1.js] \ No newline at end of file + //// [importDeclarationUsedAsTypeQuery_1.js] + "use strict"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff b/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff index 40839fa8be..561dd440a2 100644 --- a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff @@ -6,4 +6,5 @@ })(globals || (globals = {})); -var Foo = globals.toString.Blah; //// [index.js] - const Foo = {}; \ No newline at end of file +-var Foo = {}; ++const Foo = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importHelpers.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpers.js.diff index 832953b793..f289aaf078 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpers.js.diff @@ -5,16 +5,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.result = exports.B = exports.A = void 0; -var tslib_1 = require("tslib"); - class A { - } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} exports.A = A; - class B extends A { - } +-var B = /** @class */ (function (_super) { +- tslib_1.__extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class B extends A { ++} exports.B = B; --let C = (() => { -- let C = class C { -- method(x) { -- } +-var C = /** @class */ (function () { +- function C() { ++@dec ++class C { ++ method(x) { + } +- C.prototype.method = function (x) { - }; - tslib_1.__decorate([ - tslib_1.__param(0, dec), @@ -26,17 +41,34 @@ - dec - ], C); - return C; --})(); -+@dec -+class C { -+ method(x) { -+ } +-}()); +} function id(x) { return x; } - exports.result = id `hello world`; +-exports.result = id(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["hello world"], ["hello world"]))); +-var templateObject_1; ++exports.result = id `hello world`; //// [script.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { +- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } +- return cooked; +-}; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -49,14 +81,22 @@ -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - class A { - } - class B extends A { - } --let C = (() => { -- let C = class C { -- method(x) { -- } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function (x) { - }; - __decorate([ - __param(0, dec), @@ -68,7 +108,11 @@ - dec - ], C); - return C; --})(); +-}()); ++class A { ++} ++class B extends A { ++} +@dec +class C { + method(x) { @@ -76,4 +120,6 @@ +} function id(x) { return x; - } \ No newline at end of file + } +-var result = id(__makeTemplateObject(["hello world"], ["hello world"])); ++const result = id `hello world`; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importHelpers.symbols.diff b/testdata/baselines/reference/submodule/compiler/importHelpers.symbols.diff index de9c2fe80d..b5558fe213 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpers.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpers.symbols.diff @@ -6,12 +6,14 @@ export declare function __extends(d: Function, b: Function): void; ->__extends : Symbol(__extends, Decl(tslib.d.ts, --, --)) ->d : Symbol(d, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->b : Symbol(b, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__extends : Symbol(__extends, Decl(tslib.d.ts, 0, 0)) +>d : Symbol(d, Decl(tslib.d.ts, 0, 34)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->b : Symbol(b, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b : Symbol(b, Decl(tslib.d.ts, 0, 46)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __assign(t: any, ...sources: any[]): any; ->__assign : Symbol(__assign, Decl(tslib.d.ts, --, --)) @@ -24,12 +26,13 @@ export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; ->__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --)) ->decorators : Symbol(decorators, Decl(tslib.d.ts, --, --)) -+>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) -+>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->target : Symbol(target, Decl(tslib.d.ts, --, --)) ->key : Symbol(key, Decl(tslib.d.ts, --, --)) ->desc : Symbol(desc, Decl(tslib.d.ts, --, --)) ++>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) ++>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>target : Symbol(target, Decl(tslib.d.ts, 2, 58)) +>key : Symbol(key, Decl(tslib.d.ts, 2, 71)) +>desc : Symbol(desc, Decl(tslib.d.ts, 2, 94)) @@ -38,34 +41,39 @@ ->__param : Symbol(__param, Decl(tslib.d.ts, --, --)) ->paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --)) ->decorator : Symbol(decorator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__param : Symbol(__param, Decl(tslib.d.ts, 2, 112)) +>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, 3, 32)) +>decorator : Symbol(decorator, Decl(tslib.d.ts, 3, 51)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __metadata(metadataKey: any, metadataValue: any): Function; ->__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --)) ->metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --)) ->metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__metadata : Symbol(__metadata, Decl(tslib.d.ts, 3, 83)) +>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, 4, 35)) +>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, 4, 52)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; ->__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --)) ->thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --)) ->_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --)) ->P : Symbol(P, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, 4, 83)) +>thisArg : Symbol(thisArg, Decl(tslib.d.ts, 5, 34)) +>_arguments : Symbol(_arguments, Decl(tslib.d.ts, 5, 47)) +>P : Symbol(P, Decl(tslib.d.ts, 5, 64)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>generator : Symbol(generator, Decl(tslib.d.ts, 5, 77)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray; ->__makeTemplateObject : Symbol(__makeTemplateObject, Decl(tslib.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js.diff index d22dc7aef7..b77583d960 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js.diff @@ -1,8 +1,25 @@ --- old.importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js +++ new.importHelpersCommonJSJavaScript(verbatimmodulesyntax=false).js -@@= skipped -48, +48 lines =@@ - } - class Bar extends Foo { - } +@@= skipped -44, +44 lines =@@ + + + //// [index.js] +-var tslib_1 = require("tslib"); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- tslib_1.__extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Bar; +-}(Foo)); ++class Foo { ++} ++class Bar extends Foo { ++} +export = Bar; module.exports = Bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js.diff index ee2afeda7a..09df244396 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js.diff @@ -1,8 +1,25 @@ --- old.importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js +++ new.importHelpersCommonJSJavaScript(verbatimmodulesyntax=true).js -@@= skipped -48, +48 lines =@@ - } - class Bar extends Foo { - } +@@= skipped -44, +44 lines =@@ + + + //// [index.js] +-var tslib_1 = require("tslib"); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- tslib_1.__extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Bar; +-}(Foo)); ++class Foo { ++} ++class Bar extends Foo { ++} +export = Bar; module.exports = Bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersInAmbientContext.symbols.diff b/testdata/baselines/reference/submodule/compiler/importHelpersInAmbientContext.symbols.diff index 0718c82c2f..6e7dee868c 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersInAmbientContext.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersInAmbientContext.symbols.diff @@ -6,12 +6,14 @@ export declare function __extends(d: Function, b: Function): void; ->__extends : Symbol(__extends, Decl(tslib.d.ts, --, --)) ->d : Symbol(d, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->b : Symbol(b, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__extends : Symbol(__extends, Decl(tslib.d.ts, 0, 0)) +>d : Symbol(d, Decl(tslib.d.ts, 0, 34)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->b : Symbol(b, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b : Symbol(b, Decl(tslib.d.ts, 0, 46)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __assign(t: any, ...sources: any[]): any; ->__assign : Symbol(__assign, Decl(tslib.d.ts, --, --)) @@ -32,12 +34,13 @@ export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; ->__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --)) ->decorators : Symbol(decorators, Decl(tslib.d.ts, --, --)) -+>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 2, 69)) -+>decorators : Symbol(decorators, Decl(tslib.d.ts, 3, 35)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->target : Symbol(target, Decl(tslib.d.ts, --, --)) ->key : Symbol(key, Decl(tslib.d.ts, --, --)) ->desc : Symbol(desc, Decl(tslib.d.ts, --, --)) ++>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 2, 69)) ++>decorators : Symbol(decorators, Decl(tslib.d.ts, 3, 35)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>target : Symbol(target, Decl(tslib.d.ts, 3, 58)) +>key : Symbol(key, Decl(tslib.d.ts, 3, 71)) +>desc : Symbol(desc, Decl(tslib.d.ts, 3, 94)) @@ -46,43 +49,49 @@ ->__param : Symbol(__param, Decl(tslib.d.ts, --, --)) ->paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --)) ->decorator : Symbol(decorator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__param : Symbol(__param, Decl(tslib.d.ts, 3, 112)) +>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, 4, 32)) +>decorator : Symbol(decorator, Decl(tslib.d.ts, 4, 51)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __metadata(metadataKey: any, metadataValue: any): Function; ->__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --)) ->metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --)) ->metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__metadata : Symbol(__metadata, Decl(tslib.d.ts, 4, 83)) +>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, 5, 35)) +>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, 5, 52)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; ->__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --)) ->thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --)) ->_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --)) ->P : Symbol(P, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, 5, 83)) +>thisArg : Symbol(thisArg, Decl(tslib.d.ts, 6, 34)) +>_arguments : Symbol(_arguments, Decl(tslib.d.ts, 6, 47)) +>P : Symbol(P, Decl(tslib.d.ts, 6, 64)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>generator : Symbol(generator, Decl(tslib.d.ts, 6, 77)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __generator(thisArg: any, body: Function): any; ->__generator : Symbol(__generator, Decl(tslib.d.ts, --, --)) ->thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --)) ->body : Symbol(body, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__generator : Symbol(__generator, Decl(tslib.d.ts, 6, 104)) +>thisArg : Symbol(thisArg, Decl(tslib.d.ts, 7, 36)) +>body : Symbol(body, Decl(tslib.d.ts, 7, 49)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __exportStar(m: any, exports: any): void; ->__exportStar : Symbol(__exportStar, Decl(tslib.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.js.diff index 0953e78b12..7061bef589 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.js.diff @@ -5,16 +5,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.B = exports.A = void 0; -var tslib_1 = require("tslib"); - class A { - } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} exports.A = A; - class B extends A { - } +-var B = /** @class */ (function (_super) { +- tslib_1.__extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class B extends A { ++} exports.B = B; --let C = (() => { -- let C = class C { -- method(x) { -- } +-var C = /** @class */ (function () { +- function C() { ++@dec ++class C { ++ method(x) { + } +- C.prototype.method = function (x) { - }; - tslib_1.__decorate([ - tslib_1.__param(0, dec), @@ -26,13 +41,24 @@ - dec - ], C); - return C; --})(); -+@dec -+class C { -+ method(x) { -+ } +-}()); +} //// [script.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -45,14 +71,22 @@ -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - class A { - } - class B extends A { - } --let C = (() => { -- let C = class C { -- method(x) { -- } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function (x) { - }; - __decorate([ - __param(0, dec), @@ -64,7 +98,11 @@ - dec - ], C); - return C; --})(); +-}()); ++class A { ++} ++class B extends A { ++} +@dec +class C { + method(x) { diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.symbols.diff b/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.symbols.diff index c41fc7d7fc..489b07f87e 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersInIsolatedModules.symbols.diff @@ -6,12 +6,14 @@ export declare function __extends(d: Function, b: Function): void; ->__extends : Symbol(__extends, Decl(tslib.d.ts, --, --)) ->d : Symbol(d, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->b : Symbol(b, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__extends : Symbol(__extends, Decl(tslib.d.ts, 0, 0)) +>d : Symbol(d, Decl(tslib.d.ts, 0, 34)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->b : Symbol(b, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b : Symbol(b, Decl(tslib.d.ts, 0, 46)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __assign(t: any, ...sources: any[]): any; ->__assign : Symbol(__assign, Decl(tslib.d.ts, --, --)) @@ -24,12 +26,13 @@ export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; ->__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --)) ->decorators : Symbol(decorators, Decl(tslib.d.ts, --, --)) -+>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) -+>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->target : Symbol(target, Decl(tslib.d.ts, --, --)) ->key : Symbol(key, Decl(tslib.d.ts, --, --)) ->desc : Symbol(desc, Decl(tslib.d.ts, --, --)) ++>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) ++>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>target : Symbol(target, Decl(tslib.d.ts, 2, 58)) +>key : Symbol(key, Decl(tslib.d.ts, 2, 71)) +>desc : Symbol(desc, Decl(tslib.d.ts, 2, 94)) @@ -38,31 +41,36 @@ ->__param : Symbol(__param, Decl(tslib.d.ts, --, --)) ->paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --)) ->decorator : Symbol(decorator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__param : Symbol(__param, Decl(tslib.d.ts, 2, 112)) +>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, 3, 32)) +>decorator : Symbol(decorator, Decl(tslib.d.ts, 3, 51)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __metadata(metadataKey: any, metadataValue: any): Function; ->__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --)) ->metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --)) ->metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__metadata : Symbol(__metadata, Decl(tslib.d.ts, 3, 83)) +>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, 4, 35)) +>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, 4, 52)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; ->__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --)) ->thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --)) ->_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --)) ->P : Symbol(P, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, 4, 83)) +>thisArg : Symbol(thisArg, Decl(tslib.d.ts, 5, 34)) +>_arguments : Symbol(_arguments, Decl(tslib.d.ts, 5, 47)) +>P : Symbol(P, Decl(tslib.d.ts, 5, 64)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>generator : Symbol(generator, Decl(tslib.d.ts, 5, 77)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.js.diff index 0727e4623f..2d4ed85a27 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.js.diff @@ -8,4 +8,10 @@ +const tslib_1 = require("tslib"); exports.x = React.createElement("span", tslib_1.__assign({}, o)); //// [script.js] - var __assign = (this && this.__assign) || function () { \ No newline at end of file + var __assign = (this && this.__assign) || function () { +@@= skipped -14, +14 lines =@@ + }; + return __assign.apply(this, arguments); + }; +-var x = React.createElement("span", __assign({}, o)); ++const x = React.createElement("span", __assign({}, o)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.symbols.diff b/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.symbols.diff index 941b519187..2804e2a492 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersInTsx.symbols.diff @@ -6,12 +6,14 @@ export declare function __extends(d: Function, b: Function): void; ->__extends : Symbol(__extends, Decl(tslib.d.ts, --, --)) ->d : Symbol(d, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->b : Symbol(b, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__extends : Symbol(__extends, Decl(tslib.d.ts, 0, 0)) +>d : Symbol(d, Decl(tslib.d.ts, 0, 34)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->b : Symbol(b, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>b : Symbol(b, Decl(tslib.d.ts, 0, 46)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __assign(t: any, ...sources: any[]): any; ->__assign : Symbol(__assign, Decl(tslib.d.ts, --, --)) @@ -24,12 +26,13 @@ export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any; ->__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --)) ->decorators : Symbol(decorators, Decl(tslib.d.ts, --, --)) -+>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) -+>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ->target : Symbol(target, Decl(tslib.d.ts, --, --)) ->key : Symbol(key, Decl(tslib.d.ts, --, --)) ->desc : Symbol(desc, Decl(tslib.d.ts, --, --)) ++>__decorate : Symbol(__decorate, Decl(tslib.d.ts, 1, 65)) ++>decorators : Symbol(decorators, Decl(tslib.d.ts, 2, 35)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>target : Symbol(target, Decl(tslib.d.ts, 2, 58)) +>key : Symbol(key, Decl(tslib.d.ts, 2, 71)) +>desc : Symbol(desc, Decl(tslib.d.ts, 2, 94)) @@ -38,31 +41,36 @@ ->__param : Symbol(__param, Decl(tslib.d.ts, --, --)) ->paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --)) ->decorator : Symbol(decorator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__param : Symbol(__param, Decl(tslib.d.ts, 2, 112)) +>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, 3, 32)) +>decorator : Symbol(decorator, Decl(tslib.d.ts, 3, 51)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __metadata(metadataKey: any, metadataValue: any): Function; ->__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --)) ->metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --)) ->metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__metadata : Symbol(__metadata, Decl(tslib.d.ts, 3, 83)) +>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, 4, 35)) +>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, 4, 52)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any; ->__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --)) ->thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --)) ->_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --)) ->P : Symbol(P, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, 4, 83)) +>thisArg : Symbol(thisArg, Decl(tslib.d.ts, 5, 34)) +>_arguments : Symbol(_arguments, Decl(tslib.d.ts, 5, 47)) +>P : Symbol(P, Decl(tslib.d.ts, 5, 64)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) -->generator : Symbol(generator, Decl(tslib.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>generator : Symbol(generator, Decl(tslib.d.ts, 5, 77)) - >Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpers.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpers.js.diff index 0ac6654328..fdda9ef1e7 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpers.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpers.js.diff @@ -7,16 +7,31 @@ -var tslib_1 = require("tslib"); +const tslib_1 = require("tslib"); tslib_1.__exportStar(require("./other"), exports); - class A { - } -@@= skipped -8, +8 lines =@@ - class B extends A { - } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} + exports.A = A; +-var B = /** @class */ (function (_super) { +- tslib_1.__extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class B extends A { ++} exports.B = B; --let C = (() => { -- let C = class C { -- method(x) { -- } +-var C = /** @class */ (function () { +- function C() { ++@dec ++class C { ++ method(x) { + } +- C.prototype.method = function (x) { - }; - tslib_1.__decorate([ - tslib_1.__param(0, dec), @@ -28,16 +43,30 @@ - dec - ], C); - return C; --})(); -+@dec -+class C { -+ method(x) { -+ } +-}()); +-var o = { a: 1 }; +-var y = tslib_1.__assign({}, o); +-var x = tslib_1.__rest(y, []); +} - const o = { a: 1 }; - const y = tslib_1.__assign({}, o); - const x = tslib_1.__rest(y, []); ++const o = { a: 1 }; ++const y = tslib_1.__assign({}, o); ++const x = tslib_1.__rest(y, []); //// [script.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -50,14 +79,22 @@ -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - class A { - } - class B extends A { - } --let C = (() => { -- let C = class C { -- method(x) { -- } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function (x) { - }; - __decorate([ - __param(0, dec), @@ -69,7 +106,11 @@ - dec - ], C); - return C; --})(); +-}()); ++class A { ++} ++class B extends A { ++} +@dec +class C { + method(x) { diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpersForAsyncGenerators.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpersForAsyncGenerators.js.diff index 623b1326fc..38abffdd97 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpersForAsyncGenerators.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersNoHelpersForAsyncGenerators.js.diff @@ -6,10 +6,23 @@ exports.f = f; -var tslib_1 = require("tslib"); -function f() { -- return tslib_1.__asyncGenerator(this, arguments, function* f_1() { -- yield tslib_1.__await(1); -- yield yield tslib_1.__await(2); -- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues([3]))); +- return tslib_1.__asyncGenerator(this, arguments, function f_1() { +- return tslib_1.__generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, tslib_1.__await(1)]; +- case 1: +- _a.sent(); +- return [4 /*yield*/, tslib_1.__await(2)]; +- case 2: return [4 /*yield*/, _a.sent()]; +- case 3: +- _a.sent(); +- return [5 /*yield**/, tslib_1.__values(tslib_1.__asyncDelegator(tslib_1.__asyncValues([3])))]; +- case 4: return [4 /*yield*/, tslib_1.__await.apply(void 0, [_a.sent()])]; +- case 5: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); - }); +async function* f() { + await 1; diff --git a/testdata/baselines/reference/submodule/compiler/importHelpersNoModule.js.diff b/testdata/baselines/reference/submodule/compiler/importHelpersNoModule.js.diff index aa0453ed96..c6cd8b0add 100644 --- a/testdata/baselines/reference/submodule/compiler/importHelpersNoModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importHelpersNoModule.js.diff @@ -5,16 +5,31 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.B = exports.A = void 0; -var tslib_1 = require("tslib"); - class A { - } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { ++} exports.A = A; - class B extends A { - } +-var B = /** @class */ (function (_super) { +- tslib_1.__extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class B extends A { ++} exports.B = B; --let C = (() => { -- let C = class C { -- method(x) { -- } +-var C = /** @class */ (function () { +- function C() { ++@dec ++class C { ++ method(x) { + } +- C.prototype.method = function (x) { - }; - tslib_1.__decorate([ - tslib_1.__param(0, dec), @@ -26,13 +41,24 @@ - dec - ], C); - return C; --})(); -+@dec -+class C { -+ method(x) { -+ } +-}()); +} //// [script.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); @@ -45,14 +71,22 @@ -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; - class A { - } - class B extends A { - } --let C = (() => { -- let C = class C { -- method(x) { -- } +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.method = function (x) { - }; - __decorate([ - __param(0, dec), @@ -64,7 +98,11 @@ - dec - ], C); - return C; --})(); +-}()); ++class A { ++} ++class B extends A { ++} +@dec +class C { + method(x) { diff --git a/testdata/baselines/reference/submodule/compiler/importInTypePosition.js b/testdata/baselines/reference/submodule/compiler/importInTypePosition.js index 841b6ee71a..3f635f4e8c 100644 --- a/testdata/baselines/reference/submodule/compiler/importInTypePosition.js +++ b/testdata/baselines/reference/submodule/compiler/importInTypePosition.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importInTypePosition.ts] //// //// [importInTypePosition.ts] -module A { +namespace A { export class Point { constructor(public x: number, public y: number) { } } @@ -9,12 +9,12 @@ module A { } // no code gen expected -module B { +namespace B { import a = A; //Error generates 'var = ;' } // no code gen expected -module C { +namespace C { import a = A; //Error generates 'var = ;' var m: typeof a; diff --git a/testdata/baselines/reference/submodule/compiler/importInTypePosition.js.diff b/testdata/baselines/reference/submodule/compiler/importInTypePosition.js.diff index 7e7d934e7f..465611ffe5 100644 --- a/testdata/baselines/reference/submodule/compiler/importInTypePosition.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importInTypePosition.js.diff @@ -1,15 +1,24 @@ --- old.importInTypePosition.js +++ new.importInTypePosition.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + //// [importInTypePosition.js] var A; (function (A) { - class Point { +- var Point = /** @class */ (function () { +- function Point(x, y) { ++ class Point { + x; + y; - constructor(x, y) { ++ constructor(x, y) { this.x = x; this.y = y; -@@= skipped -11, +13 lines =@@ + } +- return Point; +- }()); ++ } + A.Point = Point; + A.Origin = new Point(0, 0); + })(A || (A = {})); // no code gen expected var C; (function (C) { diff --git a/testdata/baselines/reference/submodule/compiler/importInTypePosition.symbols b/testdata/baselines/reference/submodule/compiler/importInTypePosition.symbols index f23a874df0..0926d2fdba 100644 --- a/testdata/baselines/reference/submodule/compiler/importInTypePosition.symbols +++ b/testdata/baselines/reference/submodule/compiler/importInTypePosition.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/importInTypePosition.ts] //// === importInTypePosition.ts === -module A { +namespace A { >A : Symbol(A, Decl(importInTypePosition.ts, 0, 0)) export class Point { ->Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 10)) +>Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 13)) constructor(public x: number, public y: number) { } >x : Symbol(Point.x, Decl(importInTypePosition.ts, 2, 20)) @@ -13,33 +13,33 @@ module A { } export var Origin = new Point(0, 0); >Origin : Symbol(Origin, Decl(importInTypePosition.ts, 4, 14)) ->Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 10)) +>Point : Symbol(Point, Decl(importInTypePosition.ts, 0, 13)) } // no code gen expected -module B { +namespace B { >B : Symbol(B, Decl(importInTypePosition.ts, 5, 1)) import a = A; //Error generates 'var = ;' ->a : Symbol(a, Decl(importInTypePosition.ts, 8, 10)) +>a : Symbol(a, Decl(importInTypePosition.ts, 8, 13)) >A : Symbol(a, Decl(importInTypePosition.ts, 0, 0)) } // no code gen expected -module C { +namespace C { >C : Symbol(C, Decl(importInTypePosition.ts, 11, 1)) import a = A; //Error generates 'var = ;' ->a : Symbol(a, Decl(importInTypePosition.ts, 13, 10)) +>a : Symbol(a, Decl(importInTypePosition.ts, 13, 13)) >A : Symbol(a, Decl(importInTypePosition.ts, 0, 0)) var m: typeof a; >m : Symbol(m, Decl(importInTypePosition.ts, 16, 7)) ->a : Symbol(a, Decl(importInTypePosition.ts, 13, 10)) +>a : Symbol(a, Decl(importInTypePosition.ts, 13, 13)) var p: a.Point; >p : Symbol(p, Decl(importInTypePosition.ts, 17, 7), Decl(importInTypePosition.ts, 18, 7)) ->a : Symbol(a, Decl(importInTypePosition.ts, 13, 10)) ->Point : Symbol(a.Point, Decl(importInTypePosition.ts, 0, 10)) +>a : Symbol(a, Decl(importInTypePosition.ts, 13, 13)) +>Point : Symbol(a.Point, Decl(importInTypePosition.ts, 0, 13)) var p = { x: 0, y: 0 }; >p : Symbol(p, Decl(importInTypePosition.ts, 17, 7), Decl(importInTypePosition.ts, 18, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/importInTypePosition.types b/testdata/baselines/reference/submodule/compiler/importInTypePosition.types index cdcf37e026..4e6defc45f 100644 --- a/testdata/baselines/reference/submodule/compiler/importInTypePosition.types +++ b/testdata/baselines/reference/submodule/compiler/importInTypePosition.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importInTypePosition.ts] //// === importInTypePosition.ts === -module A { +namespace A { >A : typeof A export class Point { @@ -20,14 +20,14 @@ module A { } // no code gen expected -module B { +namespace B { import a = A; //Error generates 'var = ;' >a : typeof a >A : typeof a } // no code gen expected -module C { +namespace C { >C : typeof C import a = A; //Error generates 'var = ;' diff --git a/testdata/baselines/reference/submodule/compiler/importInsideModule.errors.txt b/testdata/baselines/reference/submodule/compiler/importInsideModule.errors.txt index 6eef346a36..55981bf406 100644 --- a/testdata/baselines/reference/submodule/compiler/importInsideModule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importInsideModule.errors.txt @@ -3,7 +3,7 @@ importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsid ==== importInsideModule_file2.ts (2 errors) ==== - export module myModule { + export namespace myModule { import foo = require("importInsideModule_file1"); ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1147: Import declarations in a namespace cannot reference a module. diff --git a/testdata/baselines/reference/submodule/compiler/importInsideModule.js b/testdata/baselines/reference/submodule/compiler/importInsideModule.js index 98743ed4a9..d38a91de94 100644 --- a/testdata/baselines/reference/submodule/compiler/importInsideModule.js +++ b/testdata/baselines/reference/submodule/compiler/importInsideModule.js @@ -4,7 +4,7 @@ export var x = 1; //// [importInsideModule_file2.ts] -export module myModule { +export namespace myModule { import foo = require("importInsideModule_file1"); var a = foo.x; } diff --git a/testdata/baselines/reference/submodule/compiler/importInsideModule.symbols b/testdata/baselines/reference/submodule/compiler/importInsideModule.symbols index db4c35b6c9..7301c87a0c 100644 --- a/testdata/baselines/reference/submodule/compiler/importInsideModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/importInsideModule.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/importInsideModule.ts] //// === importInsideModule_file2.ts === -export module myModule { +export namespace myModule { >myModule : Symbol(myModule, Decl(importInsideModule_file2.ts, 0, 0)) import foo = require("importInsideModule_file1"); ->foo : Symbol(foo, Decl(importInsideModule_file2.ts, 0, 24)) +>foo : Symbol(foo, Decl(importInsideModule_file2.ts, 0, 27)) var a = foo.x; >a : Symbol(a, Decl(importInsideModule_file2.ts, 2, 7)) ->foo : Symbol(foo, Decl(importInsideModule_file2.ts, 0, 24)) +>foo : Symbol(foo, Decl(importInsideModule_file2.ts, 0, 27)) } diff --git a/testdata/baselines/reference/submodule/compiler/importInsideModule.types b/testdata/baselines/reference/submodule/compiler/importInsideModule.types index c8701750ca..0534226dae 100644 --- a/testdata/baselines/reference/submodule/compiler/importInsideModule.types +++ b/testdata/baselines/reference/submodule/compiler/importInsideModule.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importInsideModule.ts] //// === importInsideModule_file2.ts === -export module myModule { +export namespace myModule { >myModule : typeof myModule import foo = require("importInsideModule_file1"); diff --git a/testdata/baselines/reference/submodule/compiler/importNonExportedMember4.js.diff b/testdata/baselines/reference/submodule/compiler/importNonExportedMember4.js.diff new file mode 100644 index 0000000000..d904a73f34 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importNonExportedMember4.js.diff @@ -0,0 +1,16 @@ +--- old.importNonExportedMember4.js ++++ new.importNonExportedMember4.js +@@= skipped -8, +8 lines =@@ + + //// [a.js] + "use strict"; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + module.exports = Foo; + //// [b.js] + "use strict"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importNonExportedMember5.js.diff b/testdata/baselines/reference/submodule/compiler/importNonExportedMember5.js.diff new file mode 100644 index 0000000000..d9a64b9abe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importNonExportedMember5.js.diff @@ -0,0 +1,16 @@ +--- old.importNonExportedMember5.js ++++ new.importNonExportedMember5.js +@@= skipped -8, +8 lines =@@ + + //// [a.js] + "use strict"; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + module.exports = Foo; + //// [b.js] + "use strict"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importNonExportedMember6.js.diff b/testdata/baselines/reference/submodule/compiler/importNonExportedMember6.js.diff new file mode 100644 index 0000000000..8d7ff1f810 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importNonExportedMember6.js.diff @@ -0,0 +1,16 @@ +--- old.importNonExportedMember6.js ++++ new.importNonExportedMember6.js +@@= skipped -7, +7 lines =@@ + import { Foo } from './a'; + + //// [a.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + export {}; + //// [b.js] + export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importNonExportedMember7.js.diff b/testdata/baselines/reference/submodule/compiler/importNonExportedMember7.js.diff new file mode 100644 index 0000000000..72c4003d42 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importNonExportedMember7.js.diff @@ -0,0 +1,16 @@ +--- old.importNonExportedMember7.js ++++ new.importNonExportedMember7.js +@@= skipped -7, +7 lines =@@ + import { Foo } from './a'; + + //// [a.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + export {}; + //// [b.js] + export {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importNotElidedWhenNotFound.js.diff b/testdata/baselines/reference/submodule/compiler/importNotElidedWhenNotFound.js.diff index 0e3fd5bab2..495b9c2ee1 100644 --- a/testdata/baselines/reference/submodule/compiler/importNotElidedWhenNotFound.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importNotElidedWhenNotFound.js.diff @@ -1,22 +1,54 @@ --- old.importNotElidedWhenNotFound.js +++ new.importNotElidedWhenNotFound.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + //// [importNotElidedWhenNotFound.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var file_1 = require("file"); -var other_file_1 = require("other_file"); -+const file_1 = require("file"); -+const other_file_1 = require("other_file"); - class Y extends other_file_1.default { - constructor() { - super(file_1.default); - } - } +-var Y = /** @class */ (function (_super) { +- __extends(Y, _super); +- function Y() { +- return _super.call(this, file_1.default) || this; +- } +- return Y; +-}(other_file_1.default)); -var file2_1 = require("file2"); -var file3_1 = require("file3"); +-var Q = /** @class */ (function (_super) { +- __extends(Q, _super); +- function Q() { +- return _super.call(this, file2_1.default, file3_1.default) || this; +- } +- return Q; +-}(other_file_1.default)); ++const file_1 = require("file"); ++const other_file_1 = require("other_file"); ++class Y extends other_file_1.default { ++ constructor() { ++ super(file_1.default); ++ } ++} +const file2_1 = require("file2"); +const file3_1 = require("file3"); - class Q extends other_file_1.default { - constructor() { - super(file2_1.default, file3_1.default); \ No newline at end of file ++class Q extends other_file_1.default { ++ constructor() { ++ super(file2_1.default, file3_1.default); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.js b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.js index 9209b981f8..f3bc33ded5 100644 --- a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.js +++ b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/importOnAliasedIdentifiers.ts] //// //// [importOnAliasedIdentifiers.ts] -module A { +namespace A { export interface X { s: string } export var X: X; } -module B { +namespace B { interface A { n: number } import Y = A; // Alias only for module A import Z = A.X; // Alias for both type and member A.X diff --git a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols index 3f25176c11..0dff9478e5 100644 --- a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols +++ b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/importOnAliasedIdentifiers.ts] //// === importOnAliasedIdentifiers.ts === -module A { +namespace A { >A : Symbol(A, Decl(importOnAliasedIdentifiers.ts, 0, 0)) export interface X { s: string } ->X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) +>X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) >s : Symbol(X.s, Decl(importOnAliasedIdentifiers.ts, 1, 24)) export var X: X; ->X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) ->X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) +>X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) +>X : Symbol(X, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) } -module B { +namespace B { >B : Symbol(B, Decl(importOnAliasedIdentifiers.ts, 3, 1)) interface A { n: number } ->A : Symbol(A, Decl(importOnAliasedIdentifiers.ts, 4, 10)) +>A : Symbol(A, Decl(importOnAliasedIdentifiers.ts, 4, 13)) >n : Symbol(A.n, Decl(importOnAliasedIdentifiers.ts, 5, 17)) import Y = A; // Alias only for module A @@ -26,7 +26,7 @@ module B { import Z = A.X; // Alias for both type and member A.X >Z : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 6, 17)) >A : Symbol(Y, Decl(importOnAliasedIdentifiers.ts, 0, 0)) ->X : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) +>X : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) var v: Z = Z; >v : Symbol(v, Decl(importOnAliasedIdentifiers.ts, 8, 7)) diff --git a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols.diff b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols.diff index b2175e4a60..1a9eb98519 100644 --- a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.symbols.diff @@ -4,8 +4,8 @@ import Z = A.X; // Alias for both type and member A.X >Z : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 6, 17)) >A : Symbol(Y, Decl(importOnAliasedIdentifiers.ts, 0, 0)) -->X : Symbol(Y.X, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) -+>X : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 0, 10), Decl(importOnAliasedIdentifiers.ts, 2, 14)) +->X : Symbol(Y.X, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) ++>X : Symbol(Z, Decl(importOnAliasedIdentifiers.ts, 0, 13), Decl(importOnAliasedIdentifiers.ts, 2, 14)) var v: Z = Z; >v : Symbol(v, Decl(importOnAliasedIdentifiers.ts, 8, 7)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.types b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.types index 22184fd33f..c4178d1d83 100644 --- a/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.types +++ b/testdata/baselines/reference/submodule/compiler/importOnAliasedIdentifiers.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/importOnAliasedIdentifiers.ts] //// === importOnAliasedIdentifiers.ts === -module A { +namespace A { >A : typeof A export interface X { s: string } @@ -10,7 +10,7 @@ module A { export var X: X; >X : X } -module B { +namespace B { >B : typeof B interface A { n: number } diff --git a/testdata/baselines/reference/submodule/compiler/importTypeGenericArrowTypeParenthesized.js.diff b/testdata/baselines/reference/submodule/compiler/importTypeGenericArrowTypeParenthesized.js.diff index e12f973bdb..54a900bffb 100644 --- a/testdata/baselines/reference/submodule/compiler/importTypeGenericArrowTypeParenthesized.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importTypeGenericArrowTypeParenthesized.js.diff @@ -5,11 +5,16 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.works2 = exports.works1 = exports.fail2 = exports.fail1 = void 0; -var module_1 = require("module"); +-exports.fail1 = (0, module_1.fn)(function (x) { return x; }); +const module_1 = require("module"); - exports.fail1 = (0, module_1.fn)((x) => x); ++exports.fail1 = (0, module_1.fn)((x) => x); exports.fail2 = (0, module_1.fn)(function (x) { return x; -@@= skipped -10, +10 lines =@@ + }); +-exports.works1 = (0, module_1.fn)(function (x) { return x; }); +-exports.works2 = (0, module_1.fn)(function (x) { return x; }); ++exports.works1 = (0, module_1.fn)((x) => x); ++exports.works2 = (0, module_1.fn)(x => x); //// [index.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/importUsedInExtendsList1.js.diff b/testdata/baselines/reference/submodule/compiler/importUsedInExtendsList1.js.diff index dbd7527ee1..9fddfcfe39 100644 --- a/testdata/baselines/reference/submodule/compiler/importUsedInExtendsList1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importUsedInExtendsList1.js.diff @@ -1,18 +1,47 @@ --- old.importUsedInExtendsList1.js +++ new.importUsedInExtendsList1.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Super = void 0; - class Super { +-var Super = /** @class */ (function () { +- function Super() { +- } +- return Super; +-}()); ++class Super { + foo; - } ++} exports.Super = Super; //// [importUsedInExtendsList1_1.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); /// -var foo = require("./importUsedInExtendsList1_require"); +-var Sub = /** @class */ (function (_super) { +- __extends(Sub, _super); +- function Sub() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Sub; +-}(foo.Super)); +const foo = require("./importUsedInExtendsList1_require"); - class Sub extends foo.Super { - } - var s; \ No newline at end of file ++class Sub extends foo.Super { ++} + var s; + var r = s.foo; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.symbols.diff b/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.symbols.diff new file mode 100644 index 0000000000..ddf26f0404 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.symbols.diff @@ -0,0 +1,20 @@ +--- old.importedAliasedConditionalTypeInstantiation.symbols ++++ new.importedAliasedConditionalTypeInstantiation.symbols +@@= skipped -18, +18 lines =@@ + >TResult : Symbol(TResult, Decl(index.d.ts, 0, 33)) + + ) => void | Promise; +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + >TResult : Symbol(TResult, Decl(index.d.ts, 0, 33)) + + export type Callback = (error?: Error | string | null, result?: TResult) => void; +@@= skipped -61, +61 lines =@@ + >result : Symbol(result, Decl(index.d.ts, 9, 9)) + >S : Symbol(S, Decl(index.d.ts, 8, 25)) + >additional : Symbol(additional, Decl(index.d.ts, 9, 19)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + + (result: S, additional?: any, done?: () => {}): void; + >result : Symbol(result, Decl(index.d.ts, 10, 9)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.types.diff b/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.types.diff new file mode 100644 index 0000000000..51711c7488 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/importedAliasedConditionalTypeInstantiation.types.diff @@ -0,0 +1,16 @@ +--- old.importedAliasedConditionalTypeInstantiation.types ++++ new.importedAliasedConditionalTypeInstantiation.types +@@= skipped -84, +84 lines =@@ + >Handler : any + + type Actual = lambdaTester.Verifier>; +->Actual : lambdaTester.VerifierFn | lambdaTester.VerifierFn | lambdaTester.VerifierFn ++>Actual : lambdaTester.VerifierFn | lambdaTester.VerifierFn | lambdaTester.VerifierFn + >lambdaTester : any + >lambdaTester : any + + type Expected = lambdaTester.Verifier>>; +->Expected : lambdaTester.VerifierFn | lambdaTester.VerifierFn | lambdaTester.VerifierFn ++>Expected : lambdaTester.VerifierFn | lambdaTester.VerifierFn | lambdaTester.VerifierFn + >lambdaTester : any + >lambdaTester : any diff --git a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.errors.txt b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.errors.txt index a32d53424e..37e65602a9 100644 --- a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.errors.txt @@ -4,20 +4,20 @@ importedModuleAddToGlobal.ts(15,23): error TS2833: Cannot find namespace 'b'. Di ==== importedModuleAddToGlobal.ts (1 errors) ==== // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C - module A { + namespace A { import b = B; import c = C; } - module B { + namespace B { import a = A; export class B { } } - module C { + namespace C { import a = A; function hello(): b.B { return null; } ~ !!! error TS2833: Cannot find namespace 'b'. Did you mean 'B'? -!!! related TS2728 importedModuleAddToGlobal.ts:8:8: 'B' is declared here. +!!! related TS2728 importedModuleAddToGlobal.ts:8:11: 'B' is declared here. } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js index b1a5c7da45..e6cba4adbb 100644 --- a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js +++ b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js @@ -3,17 +3,17 @@ //// [importedModuleAddToGlobal.ts] // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C -module A { +namespace A { import b = B; import c = C; } -module B { +namespace B { import a = A; export class B { } } -module C { +namespace C { import a = A; function hello(): b.B { return null; } } diff --git a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js.diff index 97d3481289..a1feb4972a 100644 --- a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js.diff +++ b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.js.diff @@ -4,9 +4,14 @@ //// [importedModuleAddToGlobal.js] var B; (function (B_1) { +- var B = /** @class */ (function () { +- function B() { +- } +- return B; +- }()); + var a = A; - class B { - } ++ class B { ++ } B_1.B = B; })(B || (B = {})); var C; diff --git a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.symbols b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.symbols index f69c46d107..def1d433b5 100644 --- a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.symbols +++ b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.symbols @@ -3,11 +3,11 @@ === importedModuleAddToGlobal.ts === // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C -module A { +namespace A { >A : Symbol(A, Decl(importedModuleAddToGlobal.ts, 0, 0)) import b = B; ->b : Symbol(b, Decl(importedModuleAddToGlobal.ts, 2, 10)) +>b : Symbol(b, Decl(importedModuleAddToGlobal.ts, 2, 13)) >B : Symbol(b, Decl(importedModuleAddToGlobal.ts, 5, 1)) import c = C; @@ -15,22 +15,22 @@ module A { >C : Symbol(c, Decl(importedModuleAddToGlobal.ts, 10, 1)) } -module B { +namespace B { >B : Symbol(B, Decl(importedModuleAddToGlobal.ts, 5, 1)) import a = A; ->a : Symbol(a, Decl(importedModuleAddToGlobal.ts, 7, 10)) +>a : Symbol(a, Decl(importedModuleAddToGlobal.ts, 7, 13)) >A : Symbol(a, Decl(importedModuleAddToGlobal.ts, 0, 0)) export class B { } >B : Symbol(B, Decl(importedModuleAddToGlobal.ts, 8, 17)) } -module C { +namespace C { >C : Symbol(C, Decl(importedModuleAddToGlobal.ts, 10, 1)) import a = A; ->a : Symbol(a, Decl(importedModuleAddToGlobal.ts, 12, 10)) +>a : Symbol(a, Decl(importedModuleAddToGlobal.ts, 12, 13)) >A : Symbol(a, Decl(importedModuleAddToGlobal.ts, 0, 0)) function hello(): b.B { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.types b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.types index cd09fffb49..503666571e 100644 --- a/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.types +++ b/testdata/baselines/reference/submodule/compiler/importedModuleAddToGlobal.types @@ -3,7 +3,7 @@ === importedModuleAddToGlobal.ts === // Binding for an import statement in a typeref position is being added to the global scope // Shouldn't compile b.B is not defined in C -module A { +namespace A { import b = B; >b : typeof b >B : typeof b @@ -13,7 +13,7 @@ module A { >C : typeof c } -module B { +namespace B { >B : typeof globalThis.B import a = A; @@ -24,7 +24,7 @@ module B { >B : B } -module C { +namespace C { >C : typeof C import a = A; diff --git a/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.errors.txt.diff new file mode 100644 index 0000000000..860afd9186 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.inDoesNotOperateOnPrimitiveTypes.errors.txt ++++ new.inDoesNotOperateOnPrimitiveTypes.errors.txt +@@= skipped -13, +13 lines =@@ + Type 'string' is not assignable to type 'object'. + inDoesNotOperateOnPrimitiveTypes.ts(36,14): error TS2322: Type 'T' is not assignable to type 'object'. + inDoesNotOperateOnPrimitiveTypes.ts(41,12): error TS2322: Type 'T' is not assignable to type 'object'. +- Type 'object | "hello"' is not assignable to type 'object'. ++ Type '"hello" | object' is not assignable to type 'object'. + Type 'string' is not assignable to type 'object'. + inDoesNotOperateOnPrimitiveTypes.ts(53,14): error TS2322: Type 'T | U' is not assignable to type 'object'. + Type 'T' is not assignable to type 'object'. +@@= skipped -78, +78 lines =@@ + "key" in thing; // Ok (because narrowing is impossible) + ~~~~~ + !!! error TS2322: Type 'T' is not assignable to type 'object'. +-!!! error TS2322: Type 'object | "hello"' is not assignable to type 'object'. ++!!! error TS2322: Type '"hello" | object' is not assignable to type 'object'. + !!! error TS2322: Type 'string' is not assignable to type 'object'. + } + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.js.diff b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.js.diff new file mode 100644 index 0000000000..040931a6e2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.js.diff @@ -0,0 +1,15 @@ +--- old.inDoesNotOperateOnPrimitiveTypes.js ++++ new.inDoesNotOperateOnPrimitiveTypes.js +@@= skipped -68, +68 lines =@@ + + + //// [inDoesNotOperateOnPrimitiveTypes.js] +-var validHasKey = function (thing, key) { ++const validHasKey = (thing, key) => { + return key in thing; // Ok + }; +-var alsoValidHasKey = function (thing, key) { ++const alsoValidHasKey = (thing, key) => { + return key in thing; // Ok (as T may be instantiated with a valid type) + }; + function invalidHasKey(thing, key) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.types.diff b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.types.diff index 59ae60aca2..78e85066dd 100644 --- a/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/inDoesNotOperateOnPrimitiveTypes.types.diff @@ -1,6 +1,15 @@ --- old.inDoesNotOperateOnPrimitiveTypes.types +++ new.inDoesNotOperateOnPrimitiveTypes.types -@@= skipped -85, +85 lines =@@ +@@= skipped -73, +73 lines =@@ + + if (typeof thing === "object") { + >typeof thing === "object" : boolean +->typeof thing : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof thing : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >thing : T | U + >"object" : "object" + +@@= skipped -12, +12 lines =@@ } function union3(thing: T | string | number) { @@ -9,7 +18,21 @@ >thing : string | number | T "key" in thing; // Error (because narrowing is possible) -@@= skipped -27, +27 lines =@@ +@@= skipped -11, +11 lines =@@ + if (typeof thing !== "string" && typeof thing !== "number") { + >typeof thing !== "string" && typeof thing !== "number" : boolean + >typeof thing !== "string" : boolean +->typeof thing : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof thing : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >thing : string | number | T + >"string" : "string" + >typeof thing !== "number" : boolean +->typeof thing : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof thing : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >thing : number | T + >"number" : "number" + +@@= skipped -16, +16 lines =@@ } function union4(thing: T) { @@ -26,4 +49,12 @@ +>union5 : (p: T | U) => void >p : T | U - // For consistency, this should probably not be an error, because useful \ No newline at end of file + // For consistency, this should probably not be an error, because useful +@@= skipped -18, +18 lines =@@ + + if (typeof p === "object") { + >typeof p === "object" : boolean +->typeof p : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof p : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >p : T | U + >"object" : "object" diff --git a/testdata/baselines/reference/submodule/compiler/inKeywordAndIntersection.js.diff b/testdata/baselines/reference/submodule/compiler/inKeywordAndIntersection.js.diff index bc115a2d7f..660cea33a2 100644 --- a/testdata/baselines/reference/submodule/compiler/inKeywordAndIntersection.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inKeywordAndIntersection.js.diff @@ -5,17 +5,35 @@ //// [inKeywordAndIntersection.js] -"use strict"; - class A { -- constructor() { +-var A = /** @class */ (function () { +- function A() { - this.a = 0; - } -+ a = 0; - } - class B { -- constructor() { +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { - this.b = 0; - } +- return B; +-}()); ++class A { ++ a = 0; ++} ++class B { + b = 0; - } ++} function f10(obj) { - if (obj instanceof Object) { \ No newline at end of file + if (obj instanceof Object) { + obj; // A & { x: string } | B +@@= skipped -21, +14 lines =@@ + obj; // Error + } + } +-var instance = {}; +-var ClassOne = {}; ++const instance = {}; ++const ClassOne = {}; + if (instance instanceof ClassOne) { + instance.one(); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=false).types.diff b/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=false).types.diff index 0dad3fa1c0..0c3ff2c960 100644 --- a/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=false).types.diff +++ b/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=false).types.diff @@ -1,6 +1,42 @@ --- old.inKeywordTypeguard(strict=false).types +++ new.inKeywordTypeguard(strict=false).types -@@= skipped -965, +965 lines =@@ +@@= skipped -484, +484 lines =@@ + >x && typeof x === "object" : boolean + >x : unknown + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"object" : "object" + >"a" in x : boolean +@@= skipped -19, +19 lines =@@ + >x && typeof x === "object" : boolean + >x : unknown + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"object" : "object" + >"a" in x : boolean +@@= skipped -105, +105 lines =@@ + >x && typeof x === "object" : boolean + >x : T + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : T + >"object" : "object" + >"a" in x : boolean +@@= skipped -19, +19 lines =@@ + >x && typeof x === "object" : boolean + >x : T + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : T + >"object" : "object" + >"a" in x : boolean +@@= skipped -338, +338 lines =@@ } function f14(x: { a: string | undefined }) { @@ -49,7 +85,16 @@ } } -@@= skipped -75, +75 lines =@@ +@@= skipped -41, +41 lines =@@ + >typeof value === "object" && value !== null && "prop" in value : boolean + >typeof value === "object" && value !== null : boolean + >typeof value === "object" : boolean +->typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >value : A + >"object" : "object" + >value !== null : boolean +@@= skipped -34, +34 lines =@@ // Repro from #51501 function isHTMLTable(table: T): boolean { diff --git a/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=true).types.diff b/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=true).types.diff index 7c1b5f737d..d05cf1d03a 100644 --- a/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=true).types.diff +++ b/testdata/baselines/reference/submodule/compiler/inKeywordTypeguard(strict=true).types.diff @@ -1,6 +1,42 @@ --- old.inKeywordTypeguard(strict=true).types +++ new.inKeywordTypeguard(strict=true).types -@@= skipped -946, +946 lines =@@ +@@= skipped -484, +484 lines =@@ + >x && typeof x === "object" : unknown + >x : unknown + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : {} + >"object" : "object" + >"a" in x : boolean +@@= skipped -19, +19 lines =@@ + >x && typeof x === "object" : unknown + >x : unknown + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : {} + >"object" : "object" + >"a" in x : boolean +@@= skipped -105, +105 lines =@@ + >x && typeof x === "object" : boolean + >x : T + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : NonNullable + >"object" : "object" + >"a" in x : boolean +@@= skipped -19, +19 lines =@@ + >x && typeof x === "object" : boolean + >x : T + >typeof x === "object" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : NonNullable + >"object" : "object" + >"a" in x : boolean +@@= skipped -319, +319 lines =@@ } function f13(x: { a?: string }) { @@ -27,7 +63,21 @@ } } -@@= skipped -129, +129 lines =@@ +@@= skipped -79, +79 lines =@@ + >typeof value === "object" && value !== null && "prop" in value : boolean + >typeof value === "object" && value !== null : boolean + >typeof value === "object" : boolean +->typeof value : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof value : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >value : A + >"object" : "object" + >value !== null : boolean +->value : (A & object) | (A & null) ++>value : (A & null) | (A & object) + >"prop" in value : boolean + >"prop" : "prop" + >value : A & object +@@= skipped -50, +50 lines =@@ // Repro from #51549 const f =

(a: P & {}) => { diff --git a/testdata/baselines/reference/submodule/compiler/inOperatorWithGeneric.js.diff b/testdata/baselines/reference/submodule/compiler/inOperatorWithGeneric.js.diff new file mode 100644 index 0000000000..298c299937 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inOperatorWithGeneric.js.diff @@ -0,0 +1,19 @@ +--- old.inOperatorWithGeneric.js ++++ new.inOperatorWithGeneric.js +@@= skipped -8, +8 lines =@@ + } + + //// [inOperatorWithGeneric.js] +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function (x) { ++class C { ++ foo(x) { + for (var p in x) { + } +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.js.diff b/testdata/baselines/reference/submodule/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.js.diff index 690e72a056..8ee4692d38 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incompatibleAssignmentOfIdenticallyNamedTypes.js.diff @@ -1,10 +1,19 @@ --- old.incompatibleAssignmentOfIdenticallyNamedTypes.js +++ new.incompatibleAssignmentOfIdenticallyNamedTypes.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + //// [incompatibleAssignmentOfIdenticallyNamedTypes.js] - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.fn = function () { ++class Foo { + x; - fn() { ++ fn() { this.x = a; - } \ No newline at end of file +- }; +- return Foo; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.errors.txt b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.errors.txt index f890ae46cc..7d18b6f21a 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.errors.txt @@ -12,11 +12,11 @@ incompatibleExports1.ts(16,5): error TS2309: An export assignment cannot be used } declare module "baz" { - export module a { + export namespace a { export var b: number; } - module c { + namespace c { export var c: string; } diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.js b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.js index ea907be634..765077fb45 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.js +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.js @@ -8,11 +8,11 @@ declare module "foo" { } declare module "baz" { - export module a { + export namespace a { export var b: number; } - module c { + namespace c { export var c: string; } diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols index 65fcc50a78..9e3a580ba4 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols @@ -20,14 +20,14 @@ declare module "foo" { declare module "baz" { >"baz" : Symbol("baz", Decl(incompatibleExports1.ts, 4, 1)) - export module a { + export namespace a { >a : Symbol(a, Decl(incompatibleExports1.ts, 6, 22)) export var b: number; >b : Symbol(b, Decl(incompatibleExports1.ts, 8, 18)) } - module c { + namespace c { >c : Symbol(c, Decl(incompatibleExports1.ts, 9, 5)) export var c: string; diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols.diff b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols.diff new file mode 100644 index 0000000000..7b7d57dd6e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.symbols.diff @@ -0,0 +1,11 @@ +--- old.incompatibleExports1.symbols ++++ new.incompatibleExports1.symbols +@@= skipped -10, +10 lines =@@ + interface y { a: Date } + >y : Symbol(y, Decl(incompatibleExports1.ts, 1, 36)) + >a : Symbol(y.a, Decl(incompatibleExports1.ts, 2, 17)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + export = y; + >y : Symbol(y, Decl(incompatibleExports1.ts, 1, 36)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.types b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.types index 2a90234c53..1c05570040 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleExports1.types +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports1.types @@ -17,14 +17,14 @@ declare module "foo" { declare module "baz" { >"baz" : typeof import("baz") - export module a { + export namespace a { >a : typeof a export var b: number; >b : number } - module c { + namespace c { >c : typeof import("baz") export var c: string; diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleExports2.symbols.diff b/testdata/baselines/reference/submodule/compiler/incompatibleExports2.symbols.diff new file mode 100644 index 0000000000..5c8b4c1619 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incompatibleExports2.symbols.diff @@ -0,0 +1,11 @@ +--- old.incompatibleExports2.symbols ++++ new.incompatibleExports2.symbols +@@= skipped -10, +10 lines =@@ + interface y { a: Date } + >y : Symbol(y, Decl(incompatibleExports2.ts, 1, 36)) + >a : Symbol(y.a, Decl(incompatibleExports2.ts, 2, 17)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + export = y; + >y : Symbol(y, Decl(incompatibleExports2.ts, 1, 36)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleTypes.js.diff b/testdata/baselines/reference/submodule/compiler/incompatibleTypes.js.diff index 2c450f57f9..2bdf9c55f5 100644 --- a/testdata/baselines/reference/submodule/compiler/incompatibleTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incompatibleTypes.js.diff @@ -1,13 +1,62 @@ --- old.incompatibleTypes.js +++ new.incompatibleTypes.js -@@= skipped -88, +88 lines =@@ +@@= skipped -77, +77 lines =@@ + + + //// [incompatibleTypes.js] +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.p1 = function () { ++class C1 { ++ p1() { + return "s"; +- }; +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { } - } - class C3 { +- C2.prototype.p1 = function (n) { ++} ++class C2 { ++ p1(n) { + return 0; +- }; +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); +-var C4 = /** @class */ (function () { +- function C4() { +- } +- return C4; +-}()); ++ } ++} ++class C3 { + p1; - } - class C4 { ++} ++class C4 { + p1; - } ++} function if1(a) { } - var c1; \ No newline at end of file + var c1; + var c2; +@@= skipped -36, +26 lines =@@ + } + function bar() { + var map; +- foo(function () { ++ foo(() => { + map = {}; + }); + } + var o1 = { e: 0, f: 0 }; + var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; + var i1c1 = 5; +-var fp1 = function (a) { return 0; }; ++var fp1 = a => 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompatibleTypes.types.diff b/testdata/baselines/reference/submodule/compiler/incompatibleTypes.types.diff new file mode 100644 index 0000000000..7c153d948d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incompatibleTypes.types.diff @@ -0,0 +1,11 @@ +--- old.incompatibleTypes.types ++++ new.incompatibleTypes.types +@@= skipped -157, +157 lines =@@ + >0 : 0 + + var a1 = [{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }]; +->a1 : ({ e: number; f: number; g?: undefined; } | { e: number; g: number; f?: undefined; })[] ++>a1 : ({ e: number; f: number; g?: undefined; } | { f?: undefined; e: number; g: number; })[] + >[{ e: 0, f: 0 }, { e: 0, f: 0 }, { e: 0, g: 0 }] : ({ e: number; f: number; } | { e: number; g: number; })[] + >{ e: 0, f: 0 } : { e: number; f: number; } + >e : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incompleteObjectLiteral1.js.diff b/testdata/baselines/reference/submodule/compiler/incompleteObjectLiteral1.js.diff index 3727aeda49..97540c8df6 100644 --- a/testdata/baselines/reference/submodule/compiler/incompleteObjectLiteral1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incompleteObjectLiteral1.js.diff @@ -4,6 +4,6 @@ var x = tt; //// [incompleteObjectLiteral1.js] --var tt = { aa }; +-var tt = { aa: aa }; +var tt = { aa, }; var x = tt; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incorrectClassOverloadChain.js.diff b/testdata/baselines/reference/submodule/compiler/incorrectClassOverloadChain.js.diff index c16faff268..7087fca9e4 100644 --- a/testdata/baselines/reference/submodule/compiler/incorrectClassOverloadChain.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incorrectClassOverloadChain.js.diff @@ -1,11 +1,15 @@ --- old.incorrectClassOverloadChain.js +++ new.incorrectClassOverloadChain.js -@@= skipped -8, +8 lines =@@ +@@= skipped -7, +7 lines =@@ + } //// [incorrectClassOverloadChain.js] - class C { -- constructor() { +-var C = /** @class */ (function () { +- function C() { - this.x = 1; - } +- return C; +-}()); ++class C { + x = 1; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.js.diff b/testdata/baselines/reference/submodule/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.js.diff new file mode 100644 index 0000000000..76cf786189 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incorrectNumberOfTypeArgumentsDuringErrorReporting.js.diff @@ -0,0 +1,11 @@ +--- old.incorrectNumberOfTypeArgumentsDuringErrorReporting.js ++++ new.incorrectNumberOfTypeArgumentsDuringErrorReporting.js +@@= skipped -24, +24 lines =@@ + + + //// [incorrectNumberOfTypeArgumentsDuringErrorReporting.js] +-var fn = function (opts) { return 'Z'; }; ++const fn = (opts) => 'Z'; + fn({ + a: { x: 'X', y: 'Y' }, + b: {}, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementOnNullAssertion.js.diff b/testdata/baselines/reference/submodule/compiler/incrementOnNullAssertion.js.diff index 8966d0349f..4056559afe 100644 --- a/testdata/baselines/reference/submodule/compiler/incrementOnNullAssertion.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incrementOnNullAssertion.js.diff @@ -5,6 +5,17 @@ //// [incrementOnNullAssertion.js] -"use strict"; - const x = 'bar'; - let foo = {}; - if (foo[x] === undefined) { \ No newline at end of file +-var x = 'bar'; +-var foo = {}; ++const x = 'bar'; ++let foo = {}; + if (foo[x] === undefined) { + foo[x] = 1; + } + else { +- var nu = foo[x]; +- var n = foo[x]; ++ let nu = foo[x]; ++ let n = foo[x]; + foo[x]++; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementOnTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/incrementOnTypeParameter.js.diff index 01020d2c8f..6081717038 100644 --- a/testdata/baselines/reference/submodule/compiler/incrementOnTypeParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/incrementOnTypeParameter.js.diff @@ -1,10 +1,21 @@ --- old.incrementOnTypeParameter.js +++ new.incrementOnTypeParameter.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + //// [incrementOnTypeParameter.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- C.prototype.foo = function () { ++class C { + a; - foo() { ++ foo() { this.a++; - for (var i, j = 0; j < 10; i++) { \ No newline at end of file + for (var i, j = 0; j < 10; i++) { + } +- }; +- return C; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementalConfig.js.diff b/testdata/baselines/reference/submodule/compiler/incrementalConfig.js.diff new file mode 100644 index 0000000000..648b329b68 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incrementalConfig.js.diff @@ -0,0 +1,8 @@ +--- old.incrementalConfig.js ++++ new.incrementalConfig.js +@@= skipped -4, +4 lines =@@ + + + //// [a.js] +-var x = 10; ++const x = 10; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementalInvalid.js.diff b/testdata/baselines/reference/submodule/compiler/incrementalInvalid.js.diff new file mode 100644 index 0000000000..cc36fdf4ca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incrementalInvalid.js.diff @@ -0,0 +1,8 @@ +--- old.incrementalInvalid.js ++++ new.incrementalInvalid.js +@@= skipped -5, +5 lines =@@ + + + //// [incrementalInvalid.js] +-var x = 10; ++const x = 10; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/incrementalTsBuildInfoFile.js.diff b/testdata/baselines/reference/submodule/compiler/incrementalTsBuildInfoFile.js.diff new file mode 100644 index 0000000000..1fe4ecc09c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/incrementalTsBuildInfoFile.js.diff @@ -0,0 +1,8 @@ +--- old.incrementalTsBuildInfoFile.js ++++ new.incrementalTsBuildInfoFile.js +@@= skipped -6, +6 lines =@@ + + + //// [a.js] +-var x = 10; ++const x = 10; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols.diff b/testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols.diff new file mode 100644 index 0000000000..652cebc40c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexAt(target=esnext).symbols.diff @@ -0,0 +1,11 @@ +--- old.indexAt(target=esnext).symbols ++++ new.indexAt(target=esnext).symbols +@@= skipped -15, +15 lines =@@ + + new Uint8Array().at(0); + >new Uint8Array().at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) +->Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 4 more) ++>Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 3 more) + >at : Symbol(Uint8Array.at, Decl(lib.es2022.array.d.ts, --, --)) + + new Uint8ClampedArray().at(0); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexClassByNumber.js.diff b/testdata/baselines/reference/submodule/compiler/indexClassByNumber.js.diff new file mode 100644 index 0000000000..623567ce61 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexClassByNumber.js.diff @@ -0,0 +1,15 @@ +--- old.indexClassByNumber.js ++++ new.indexClassByNumber.js +@@= skipped -10, +10 lines =@@ + + //// [indexClassByNumber.js] + // Shouldn't be able to index a class instance by a number (unless it has declared a number index signature) +-var foo = /** @class */ (function () { +- function foo() { +- } +- return foo; +-}()); ++class foo { ++} + var f = new foo(); + f[0] = 4; // Shouldn't be allowed \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexIntoArraySubclass.symbols.diff b/testdata/baselines/reference/submodule/compiler/indexIntoArraySubclass.symbols.diff new file mode 100644 index 0000000000..af59ecb24d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexIntoArraySubclass.symbols.diff @@ -0,0 +1,11 @@ +--- old.indexIntoArraySubclass.symbols ++++ new.indexIntoArraySubclass.symbols +@@= skipped -3, +3 lines =@@ + interface Foo2 extends Array { } + >Foo2 : Symbol(Foo2, Decl(indexIntoArraySubclass.ts, 0, 0)) + >T : Symbol(T, Decl(indexIntoArraySubclass.ts, 0, 15)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(indexIntoArraySubclass.ts, 0, 15)) + + var x2: Foo2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js index 00b8d7e38e..5eb647365d 100644 --- a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js +++ b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/indexIntoEnum.ts] //// //// [indexIntoEnum.ts] -module M { +namespace M { enum E { } diff --git a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js.diff b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js.diff new file mode 100644 index 0000000000..2238bdb2e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.js.diff @@ -0,0 +1,11 @@ +--- old.indexIntoEnum.js ++++ new.indexIntoEnum.js +@@= skipped -10, +10 lines =@@ + //// [indexIntoEnum.js] + var M; + (function (M) { +- var E; ++ let E; + (function (E) { + })(E || (E = {})); + var x = E[0]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.symbols b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.symbols index 52f901fc02..7e212ea907 100644 --- a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.symbols +++ b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.symbols @@ -1,13 +1,13 @@ //// [tests/cases/compiler/indexIntoEnum.ts] //// === indexIntoEnum.ts === -module M { +namespace M { >M : Symbol(M, Decl(indexIntoEnum.ts, 0, 0)) enum E { } ->E : Symbol(E, Decl(indexIntoEnum.ts, 0, 10)) +>E : Symbol(E, Decl(indexIntoEnum.ts, 0, 13)) var x = E[0]; >x : Symbol(x, Decl(indexIntoEnum.ts, 4, 7)) ->E : Symbol(E, Decl(indexIntoEnum.ts, 0, 10)) +>E : Symbol(E, Decl(indexIntoEnum.ts, 0, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.types b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.types index 3d8bf57cb3..95ce245ca4 100644 --- a/testdata/baselines/reference/submodule/compiler/indexIntoEnum.types +++ b/testdata/baselines/reference/submodule/compiler/indexIntoEnum.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/indexIntoEnum.ts] //// === indexIntoEnum.ts === -module M { +namespace M { >M : typeof M enum E { } diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.js.diff index 668ef038cc..3f69013e3b 100644 --- a/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureMustHaveTypeAnnotation.js.diff @@ -1,11 +1,22 @@ --- old.indexSignatureMustHaveTypeAnnotation.js +++ new.indexSignatureMustHaveTypeAnnotation.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + } //// [indexSignatureMustHaveTypeAnnotation.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C { + // Used to be indexer, now it is a computed property + [x]; - } - class C2 { - } \ No newline at end of file ++} ++class C2 { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureTypeCheck2.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureTypeCheck2.js.diff new file mode 100644 index 0000000000..be0028c894 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureTypeCheck2.js.diff @@ -0,0 +1,16 @@ +--- old.indexSignatureTypeCheck2.js ++++ new.indexSignatureTypeCheck2.js +@@= skipped -16, +16 lines =@@ + } + + //// [indexSignatureTypeCheck2.js] +-var IPropertySet = /** @class */ (function () { +- function IPropertySet() { +- } +- return IPropertySet; +-}()); ++class IPropertySet { ++} + var ps = null; + var index = "hello"; + ps[index] = 12; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureWithAccessibilityModifier.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureWithAccessibilityModifier.js.diff new file mode 100644 index 0000000000..093c8dd126 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureWithAccessibilityModifier.js.diff @@ -0,0 +1,13 @@ +--- old.indexSignatureWithAccessibilityModifier.js ++++ new.indexSignatureWithAccessibilityModifier.js +@@= skipped -9, +9 lines =@@ + } + + //// [indexSignatureWithAccessibilityModifier.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer.js.diff index 041cecec97..038a636f25 100644 --- a/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer.js.diff @@ -1,9 +1,15 @@ --- old.indexSignatureWithInitializer.js +++ new.indexSignatureWithInitializer.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + } //// [indexSignatureWithInitializer.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-x = 0; ++class C { + [x = 0]; - } --x = 0; \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer1.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer1.js.diff new file mode 100644 index 0000000000..5c65797d81 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureWithInitializer1.js.diff @@ -0,0 +1,13 @@ +--- old.indexSignatureWithInitializer1.js ++++ new.indexSignatureWithInitializer1.js +@@= skipped -5, +5 lines =@@ + } + + //// [indexSignatureWithInitializer1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureWithTrailingComma.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureWithTrailingComma.js.diff new file mode 100644 index 0000000000..6bf66efcec --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureWithTrailingComma.js.diff @@ -0,0 +1,13 @@ +--- old.indexSignatureWithTrailingComma.js ++++ new.indexSignatureWithTrailingComma.js +@@= skipped -14, +14 lines =@@ + + + //// [indexSignatureWithTrailingComma.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexSignatureWithoutTypeAnnotation1.js.diff b/testdata/baselines/reference/submodule/compiler/indexSignatureWithoutTypeAnnotation1.js.diff new file mode 100644 index 0000000000..8e9cff1530 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexSignatureWithoutTypeAnnotation1.js.diff @@ -0,0 +1,13 @@ +--- old.indexSignatureWithoutTypeAnnotation1.js ++++ new.indexSignatureWithoutTypeAnnotation1.js +@@= skipped -5, +5 lines =@@ + } + + //// [indexSignatureWithoutTypeAnnotation1.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexTypeCheck.js.diff b/testdata/baselines/reference/submodule/compiler/indexTypeCheck.js.diff index ae21b64986..2d81f3bdb0 100644 --- a/testdata/baselines/reference/submodule/compiler/indexTypeCheck.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexTypeCheck.js.diff @@ -1,13 +1,20 @@ --- old.indexTypeCheck.js +++ new.indexTypeCheck.js -@@= skipped -78, +78 lines =@@ +@@= skipped -77, +77 lines =@@ + yellow[blue]; // error var x; x[0]; - class Benchmark { -- constructor() { +-var Benchmark = /** @class */ (function () { +- function Benchmark() { - this.results = {}; - } +- Benchmark.prototype.addTimingFor = function (name, timing) { ++class Benchmark { + results = {}; - addTimingFor(name, timing) { ++ addTimingFor(name, timing) { this.results[name] = this.results[name]; - } \ No newline at end of file +- }; +- return Benchmark; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexTypeNoSubstitutionTemplateLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/indexTypeNoSubstitutionTemplateLiteral.js.diff index d2902f02fc..6ad4e94f10 100644 --- a/testdata/baselines/reference/submodule/compiler/indexTypeNoSubstitutionTemplateLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexTypeNoSubstitutionTemplateLiteral.js.diff @@ -6,4 +6,5 @@ //// [indexTypeNoSubstitutionTemplateLiteral.js] -"use strict"; function Foo() { } - Foo[`b`] = function () { }; \ No newline at end of file +-Foo["b"] = function () { }; ++Foo[`b`] = function () { }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNull.js.diff b/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNull.js.diff new file mode 100644 index 0000000000..6a9290ec2f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNull.js.diff @@ -0,0 +1,16 @@ +--- old.indexWithUndefinedAndNull.js ++++ new.indexWithUndefinedAndNull.js +@@= skipped -15, +15 lines =@@ + + + //// [indexWithUndefinedAndNull.js] +-var n; +-var s; +-var str = n[undefined]; ++let n; ++let s; ++let str = n[undefined]; + str = n[null]; +-var num = s[undefined]; ++let num = s[undefined]; + num = s[null]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNullStrictNullChecks.js.diff b/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNullStrictNullChecks.js.diff new file mode 100644 index 0000000000..db91b77d82 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexWithUndefinedAndNullStrictNullChecks.js.diff @@ -0,0 +1,16 @@ +--- old.indexWithUndefinedAndNullStrictNullChecks.js ++++ new.indexWithUndefinedAndNullStrictNullChecks.js +@@= skipped -15, +15 lines =@@ + + + //// [indexWithUndefinedAndNullStrictNullChecks.js] +-var n; +-var s; +-var str = n[undefined]; ++let n; ++let s; ++let str = n[undefined]; + str = n[null]; +-var num = s[undefined]; ++let num = s[undefined]; + num = s[null]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.js.diff b/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.js.diff index bb689e478b..5407e5211f 100644 --- a/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexWithoutParamType2.js.diff @@ -1,9 +1,15 @@ --- old.indexWithoutParamType2.js +++ new.indexWithoutParamType2.js -@@= skipped -7, +7 lines =@@ +@@= skipped -6, +6 lines =@@ + } //// [indexWithoutParamType2.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { + // Used to be indexer, now it is a computed property + [x]; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessCanBeHighOrder.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessCanBeHighOrder.js.diff new file mode 100644 index 0000000000..ec14be5e6d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessCanBeHighOrder.js.diff @@ -0,0 +1,15 @@ +--- old.indexedAccessCanBeHighOrder.js ++++ new.indexedAccessCanBeHighOrder.js +@@= skipped -14, +14 lines =@@ + + //// [indexedAccessCanBeHighOrder.js] + function impl(a, b) { +- var item = get(a, b); ++ const item = get(a, b); + return find(item); + } +-var o = { x: 42 }; +-var r = impl(o, "x"); ++const o = { x: 42 }; ++const r = impl(o, "x"); + r[0][r[1]] = o[r[1]]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessConstraints.types.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessConstraints.types.diff new file mode 100644 index 0000000000..f6c64f701b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessConstraints.types.diff @@ -0,0 +1,10 @@ +--- old.indexedAccessConstraints.types ++++ new.indexedAccessConstraints.types +@@= skipped -24, +24 lines =@@ + + if (typeof fn !== 'function') { + >typeof fn !== 'function' : boolean +->typeof fn : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof fn : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >fn : T[K] + >'function' : "function" diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js.diff index 607b38a997..aafd8438fe 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js.diff @@ -1,11 +1,39 @@ --- old.indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js +++ new.indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js -@@= skipped -25, +25 lines =@@ +@@= skipped -24, +24 lines =@@ + } //// [indexedAccessKeyofNestedSimplifiedSubstituteUnwrapped.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + foo; - } - class B extends A { ++} ++class B extends A { + foo; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessNormalization.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessNormalization.js.diff index 5595f810a2..c7bba7ce02 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessNormalization.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessNormalization.js.diff @@ -7,5 +7,15 @@ -"use strict"; -// Repro from from #43152 function f1(mymap, k) { - const elemofM = mymap[k]; - g(elemofM); \ No newline at end of file +- var elemofM = mymap[k]; ++ const elemofM = mymap[k]; + g(elemofM); + } + function f2(mymap, k, z) { +- var q1 = z; +- var q2 = z; +- var q3 = z; ++ const q1 = z; ++ const q2 = z; ++ const q3 = z; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessPrivateMemberOfGenericConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessPrivateMemberOfGenericConstraint.js.diff index c7e396eb0d..3be913f227 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessPrivateMemberOfGenericConstraint.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessPrivateMemberOfGenericConstraint.js.diff @@ -1,11 +1,22 @@ --- old.indexedAccessPrivateMemberOfGenericConstraint.js +++ new.indexedAccessPrivateMemberOfGenericConstraint.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [indexedAccessPrivateMemberOfGenericConstraint.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); ++class A { + a; - } - class B { ++} ++class B { + a; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff index 2f676bbe24..057057142f 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.js.diff @@ -5,8 +5,50 @@ //// [indexedAccessRelation.js] "use strict"; -// Repro from #14723 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.setState = function (state) { }; +- return Component; +-}()); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Comp = /** @class */ (function (_super) { +- __extends(Comp, _super); +- function Comp() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Comp.prototype.foo = function (a) { +// Repro from #14723 - class Component { - setState(state) { } - } \ No newline at end of file ++class Component { ++ setState(state) { } ++} ++class Foo { ++} ++class Comp extends Component { ++ foo(a) { + this.setState({ a: a }); +- }; +- return Comp; +-}(Component)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.types.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.types.diff new file mode 100644 index 0000000000..99e840c6fe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessRelation.types.diff @@ -0,0 +1,14 @@ +--- old.indexedAccessRelation.types ++++ new.indexedAccessRelation.types +@@= skipped -28, +28 lines =@@ + + this.setState({ a: a }); + >this.setState({ a: a }) : void +->this.setState : (state: Pick, K>) => void ++>this.setState : (state: Pick, K>) => void + >this : this +->setState : (state: Pick, K>) => void ++>setState : (state: Pick, K>) => void + >{ a: a } : { a: T; } + >a : T + >a : T \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff index 1fcf56ce47..1c61c32dc0 100644 --- a/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexedAccessTypeConstraints.js.diff @@ -5,10 +5,66 @@ //// [indexedAccessTypeConstraints.js] "use strict"; -// Repro from #14557 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar = exports.Foo = void 0; - class Parent { +-var Parent = /** @class */ (function () { +- function Parent(data) { ++class Parent { + data; - constructor(data) { ++ constructor(data) { this.data = data; - } \ No newline at end of file + } +- Parent.prototype.getData = function () { ++ getData() { + return this.data; +- }; +- return Parent; +-}()); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- Foo.prototype.getContent = function () { ++} ++class Foo extends Parent { ++ getContent() { + return this.getData().get('content'); +- }; +- return Foo; +-}(Parent)); ++ } ++} + exports.Foo = Foo; +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Bar.prototype.getContent = function () { ++class Bar extends Parent { ++ getContent() { + return this.getData().get('content'); +- }; +- return Bar; +-}(Parent)); ++ } ++} + exports.Bar = Bar; + // Repro from #14557 + function foo(x, y) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexer2A.js.diff b/testdata/baselines/reference/submodule/compiler/indexer2A.js.diff new file mode 100644 index 0000000000..19a9ce7708 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexer2A.js.diff @@ -0,0 +1,21 @@ +--- old.indexer2A.js ++++ new.indexer2A.js +@@= skipped -9, +9 lines =@@ + var directChildrenMap = {}; + + //// [indexer2A.js] +-var IHeapObjectProperty = /** @class */ (function () { +- function IHeapObjectProperty() { +- } +- return IHeapObjectProperty; +-}()); +-var IDirectChildrenMap = /** @class */ (function () { +- function IDirectChildrenMap() { +- } +- return IDirectChildrenMap; +-}()); ++class IHeapObjectProperty { ++} ++class IDirectChildrenMap { ++} + var directChildrenMap = {}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexer3.symbols.diff b/testdata/baselines/reference/submodule/compiler/indexer3.symbols.diff new file mode 100644 index 0000000000..068430a581 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexer3.symbols.diff @@ -0,0 +1,14 @@ +--- old.indexer3.symbols ++++ new.indexer3.symbols +@@= skipped -3, +3 lines =@@ + var dateMap: { [x: string]: Date; } = {} + >dateMap : Symbol(dateMap, Decl(indexer3.ts, 0, 3)) + >x : Symbol(x, Decl(indexer3.ts, 0, 16)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var r: Date = dateMap["hello"] // result type includes indexer using BCT + >r : Symbol(r, Decl(indexer3.ts, 1, 3)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >dateMap : Symbol(dateMap, Decl(indexer3.ts, 0, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/indexerA.js.diff b/testdata/baselines/reference/submodule/compiler/indexerA.js.diff index 78a18af335..d5ac1bd85f 100644 --- a/testdata/baselines/reference/submodule/compiler/indexerA.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexerA.js.diff @@ -1,10 +1,23 @@ --- old.indexerA.js +++ new.indexerA.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + jq[0].id; //// [indexerA.js] - class JQueryElement { +-var JQueryElement = /** @class */ (function () { +- function JQueryElement() { +- } +- return JQueryElement; +-}()); +-var JQuery = /** @class */ (function () { +- function JQuery() { +- } +- return JQuery; +-}()); ++class JQueryElement { + id; - } - class JQuery { - } \ No newline at end of file ++} ++class JQuery { ++} + var jq = { 0: { id: "a" }, 1: { id: "b" } }; + jq[0].id; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexerAsOptional.js.diff b/testdata/baselines/reference/submodule/compiler/indexerAsOptional.js.diff new file mode 100644 index 0000000000..220d3a280f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexerAsOptional.js.diff @@ -0,0 +1,13 @@ +--- old.indexerAsOptional.js ++++ new.indexerAsOptional.js +@@= skipped -11, +11 lines =@@ + } + + //// [indexerAsOptional.js] +-var indexSig2 = /** @class */ (function () { +- function indexSig2() { +- } +- return indexSig2; +-}()); ++class indexSig2 { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexerConstraints2.js.diff b/testdata/baselines/reference/submodule/compiler/indexerConstraints2.js.diff index e0830d23cd..743f866797 100644 --- a/testdata/baselines/reference/submodule/compiler/indexerConstraints2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexerConstraints2.js.diff @@ -1,13 +1,90 @@ --- old.indexerConstraints2.js +++ new.indexerConstraints2.js -@@= skipped -84, +84 lines =@@ +@@= skipped -83, +83 lines =@@ + //// [indexerConstraints2.js] - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + a; - } - class B extends A { ++} ++class B extends A { + b; - } ++} // Inheritance - class F { \ No newline at end of file +-var F = /** @class */ (function () { +- function F() { +- } +- return F; +-}()); +-var G = /** @class */ (function (_super) { +- __extends(G, _super); +- function G() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return G; +-}(F)); ++class F { ++} ++class G extends F { ++} + // Other way +-var H = /** @class */ (function () { +- function H() { +- } +- return H; +-}()); +-var I = /** @class */ (function (_super) { +- __extends(I, _super); +- function I() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return I; +-}(H)); ++class H { ++} ++class I extends H { ++} + // With hidden indexer +-var J = /** @class */ (function () { +- function J() { +- } +- return J; +-}()); +-var K = /** @class */ (function (_super) { +- __extends(K, _super); +- function K() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return K; +-}(J)); ++class J { ++} ++class K extends J { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexerConstraints2.types.diff b/testdata/baselines/reference/submodule/compiler/indexerConstraints2.types.diff new file mode 100644 index 0000000000..ad2d7f22c4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexerConstraints2.types.diff @@ -0,0 +1,11 @@ +--- old.indexerConstraints2.types ++++ new.indexerConstraints2.types +@@= skipped -117, +117 lines =@@ + + interface S { + [u: "foo" | "bar"]: A; +->u : "foo" | "bar" ++>u : "bar" | "foo" + } + + type Key = string; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexerReturningTypeParameter1.js.diff b/testdata/baselines/reference/submodule/compiler/indexerReturningTypeParameter1.js.diff new file mode 100644 index 0000000000..7e77065247 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexerReturningTypeParameter1.js.diff @@ -0,0 +1,20 @@ +--- old.indexerReturningTypeParameter1.js ++++ new.indexerReturningTypeParameter1.js +@@= skipped -17, +17 lines =@@ + //// [indexerReturningTypeParameter1.js] + var a; + var r = a.groupBy(); +-var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.groupBy = function () { ++class c { ++ groupBy() { + return null; +- }; +- return c; +-}()); ++ } ++} + var a2; + var r2 = a2.groupBy(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexerSignatureWithRestParam.js.diff b/testdata/baselines/reference/submodule/compiler/indexerSignatureWithRestParam.js.diff new file mode 100644 index 0000000000..eb9c401e07 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indexerSignatureWithRestParam.js.diff @@ -0,0 +1,13 @@ +--- old.indexerSignatureWithRestParam.js ++++ new.indexerSignatureWithRestParam.js +@@= skipped -9, +9 lines =@@ + } + + //// [indexerSignatureWithRestParam.js] +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indexingTypesWithNever.js.diff b/testdata/baselines/reference/submodule/compiler/indexingTypesWithNever.js.diff index 0f15a0403c..caf1836620 100644 --- a/testdata/baselines/reference/submodule/compiler/indexingTypesWithNever.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indexingTypesWithNever.js.diff @@ -5,6 +5,17 @@ //// [indexingTypesWithNever.js] -"use strict"; - // Should be never - const result3 = genericFn1({ c: "ctest", d: "dtest" }); - // Should be never \ No newline at end of file +-// Should be never +-var result3 = genericFn1({ c: "ctest", d: "dtest" }); +-// Should be never +-var result4 = genericFn2({ e: "etest", f: "ftest" }); +-// Should be never +-var result5 = genericFn3({ g: "gtest", h: "htest" }, "g", "h"); // 'g' & 'h' will reduce to never +-var result6 = obj[key]; ++// Should be never ++const result3 = genericFn1({ c: "ctest", d: "dtest" }); ++// Should be never ++const result4 = genericFn2({ e: "etest", f: "ftest" }); ++// Should be never ++const result5 = genericFn3({ g: "gtest", h: "htest" }, "g", "h"); // 'g' & 'h' will reduce to never ++const result6 = obj[key]; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.errors.txt.diff new file mode 100644 index 0000000000..02a29a6a64 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.errors.txt.diff @@ -0,0 +1,39 @@ +--- old.indirectDiscriminantAndExcessProperty.errors.txt ++++ new.indirectDiscriminantAndExcessProperty.errors.txt +@@= skipped -0, +0 lines =@@ +-indirectDiscriminantAndExcessProperty.ts(9,5): error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. +-indirectDiscriminantAndExcessProperty.ts(15,5): error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. +-indirectDiscriminantAndExcessProperty.ts(22,5): error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. ++indirectDiscriminantAndExcessProperty.ts(9,5): error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. ++indirectDiscriminantAndExcessProperty.ts(15,5): error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. ++indirectDiscriminantAndExcessProperty.ts(22,5): error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. + + + ==== indirectDiscriminantAndExcessProperty.ts (3 errors) ==== +@@= skipped -13, +13 lines =@@ + thing({ + type: foo1, + ~~~~ +-!!! error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. ++!!! error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. + !!! related TS6500 indirectDiscriminantAndExcessProperty.ts:2:9: The expected type comes from property 'type' which is declared here on type 'Blah' + abc: "hello!" + }); +@@= skipped -9, +9 lines =@@ + thing({ + type: foo2, + ~~~~ +-!!! error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. ++!!! error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. + !!! related TS6500 indirectDiscriminantAndExcessProperty.ts:2:9: The expected type comes from property 'type' which is declared here on type 'Blah' + abc: "hello!", + extra: 123, +@@= skipped -10, +10 lines =@@ + thing({ + type: bar, + ~~~~ +-!!! error TS2322: Type 'string' is not assignable to type '"foo" | "bar"'. ++!!! error TS2322: Type 'string' is not assignable to type '"bar" | "foo"'. + !!! related TS6500 indirectDiscriminantAndExcessProperty.ts:2:9: The expected type comes from property 'type' which is declared here on type 'Blah' + xyz: 123, + extra: 123, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.js.diff b/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.js.diff new file mode 100644 index 0000000000..5dfd84fd3d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indirectDiscriminantAndExcessProperty.js.diff @@ -0,0 +1,24 @@ +--- old.indirectDiscriminantAndExcessProperty.js ++++ new.indirectDiscriminantAndExcessProperty.js +@@= skipped -30, +30 lines =@@ + //// [indirectDiscriminantAndExcessProperty.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var foo1 = "foo"; ++let foo1 = "foo"; + thing({ + type: foo1, + abc: "hello!" + }); +-var foo2 = "foo"; ++let foo2 = "foo"; + thing({ + type: foo2, + abc: "hello!", + extra: 123, + }); +-var bar = "bar"; ++let bar = "bar"; + thing({ + type: bar, + xyz: 123, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indirectSelfReference.js.diff b/testdata/baselines/reference/submodule/compiler/indirectSelfReference.js.diff new file mode 100644 index 0000000000..a0dd9027fe --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indirectSelfReference.js.diff @@ -0,0 +1,39 @@ +--- old.indirectSelfReference.js ++++ new.indirectSelfReference.js +@@= skipped -4, +4 lines =@@ + class b extends a{ } + + //// [indirectSelfReference.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function (_super) { +- __extends(a, _super); +- function a() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return a; +-}(b)); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a extends b { ++} ++class b extends a { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indirectSelfReferenceGeneric.js.diff b/testdata/baselines/reference/submodule/compiler/indirectSelfReferenceGeneric.js.diff new file mode 100644 index 0000000000..6ebd319e7f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/indirectSelfReferenceGeneric.js.diff @@ -0,0 +1,39 @@ +--- old.indirectSelfReferenceGeneric.js ++++ new.indirectSelfReferenceGeneric.js +@@= skipped -4, +4 lines =@@ + class b extends a { } + + //// [indirectSelfReferenceGeneric.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function (_super) { +- __extends(a, _super); +- function a() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return a; +-}(b)); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a extends b { ++} ++class b extends a { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/indirectTypeParameterReferences.js.diff b/testdata/baselines/reference/submodule/compiler/indirectTypeParameterReferences.js.diff index aaa080d08a..4ba647f2b6 100644 --- a/testdata/baselines/reference/submodule/compiler/indirectTypeParameterReferences.js.diff +++ b/testdata/baselines/reference/submodule/compiler/indirectTypeParameterReferences.js.diff @@ -5,6 +5,26 @@ //// [indirectTypeParameterReferences.js] -// Repro from #19043 - const flowtypes = (b) => { - const combined = (fn) => null; - const literal = (fn) => null; \ No newline at end of file +-var flowtypes = function (b) { +- var combined = function (fn) { return null; }; +- var literal = function (fn) { return null; }; +- return { combined: combined, literal: literal }; ++const flowtypes = (b) => { ++ const combined = (fn) => null; ++ const literal = (fn) => null; ++ return { combined, literal }; + }; +-var _a = flowtypes({ b: 'b-value' }), combined = _a.combined, literal = _a.literal; +-literal(function (aPlusB) { ++const { combined, literal } = flowtypes({ b: 'b-value' }); ++literal(aPlusB => { + aPlusB.b; + aPlusB.a; + }); +-combined(function (comb) { ++combined(comb => { + comb.b; + comb.a; + }); +-var n = f(2).a; ++let n = f(2).a; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes1.js.diff b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes1.js.diff index a1b7198aca..014e79979e 100644 --- a/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes1.js.diff @@ -1,10 +1,75 @@ --- old.inferFromGenericFunctionReturnTypes1.js +++ new.inferFromGenericFunctionReturnTypes1.js -@@= skipped -76, +76 lines =@@ +@@= skipped -75, +75 lines =@@ + //// [inferFromGenericFunctionReturnTypes1.js] // Repro from #15680 // This is a contrived class. We could do the same thing with Observables, etc. - class SetOf { +-var SetOf = /** @class */ (function () { +- function SetOf() { +- } +- SetOf.prototype.add = function (a) { ++class SetOf { + _store; - add(a) { ++ add(a) { this._store.push(a); - } \ No newline at end of file +- }; +- SetOf.prototype.transform = function (transformer) { ++ } ++ transform(transformer) { + return transformer(this); +- }; +- SetOf.prototype.forEach = function (fn) { +- this._store.forEach(function (a, i) { return fn(a, i); }); +- }; +- return SetOf; +-}()); ++ } ++ forEach(fn) { ++ this._store.forEach((a, i) => fn(a, i)); ++ } ++} + /* ... etc ... */ +-function compose() { +- var fns = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- fns[_i] = arguments[_i]; +- } +- return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; ++function compose(...fns) { ++ return (x) => fns.reduce((prev, fn) => fn(prev), x); + } + function map(fn) { +- return function (a) { +- var b = new SetOf(); +- a.forEach(function (x) { return b.add(fn(x)); }); ++ return (a) => { ++ const b = new SetOf(); ++ a.forEach(x => b.add(fn(x))); + return b; + }; + } + function filter(predicate) { +- return function (a) { +- var result = new SetOf(); +- a.forEach(function (x) { ++ return (a) => { ++ const result = new SetOf(); ++ a.forEach(x => { + if (predicate(x)) + result.add(x); + }); + return result; + }; + } +-var testSet = new SetOf(); ++const testSet = new SetOf(); + testSet.add(1); + testSet.add(2); + testSet.add(3); +-testSet.transform(compose(filter(function (x) { return x % 1 === 0; }), map(function (x) { return x + x; }), map(function (x) { return x + '!!!'; }), map(function (x) { return x.toUpperCase(); }))); +-testSet.transform(compose(filter(function (x) { return x % 1 === 0; }), map(function (x) { return x + x; }), map(function (x) { return 123; }), // Whoops a bug +-map(function (x) { return x.toUpperCase(); }) // causes an error! ++testSet.transform(compose(filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()))); ++testSet.transform(compose(filter(x => x % 1 === 0), map(x => x + x), map(x => 123), // Whoops a bug ++map(x => x.toUpperCase()) // causes an error! + )); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes2.js.diff b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes2.js.diff index cd32713c1e..8c8336474c 100644 --- a/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes2.js.diff @@ -1,10 +1,95 @@ --- old.inferFromGenericFunctionReturnTypes2.js +++ new.inferFromGenericFunctionReturnTypes2.js -@@= skipped -110, +110 lines =@@ - let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); +@@= skipped -97, +97 lines =@@ + + + //// [inferFromGenericFunctionReturnTypes2.js] +-var f1 = function (s) { return s.length; }; +-var f2 = wrap(function (s) { return s.length; }); +-var f3 = arrayize(wrap(function (s) { return s.length; })); +-var f4 = combine(wrap(function (s) { return s.length; }), wrap(function (n) { return n >= 10; })); +-foo(wrap(function (s) { return s.length; })); +-var a1 = ["a", "b"].map(function (s) { return s.length; }); +-var a2 = ["a", "b"].map(wrap(function (s) { return s.length; })); +-var a3 = ["a", "b"].map(wrap(arrayize(function (s) { return s.length; }))); +-var a4 = ["a", "b"].map(combine(wrap(function (s) { return s.length; }), wrap(function (n) { return n > 10; }))); +-var a5 = ["a", "b"].map(combine(identity, wrap(function (s) { return s.length; }))); +-var a6 = ["a", "b"].map(combine(wrap(function (s) { return s.length; }), identity)); ++let f1 = s => s.length; ++let f2 = wrap(s => s.length); ++let f3 = arrayize(wrap(s => s.length)); ++let f4 = combine(wrap(s => s.length), wrap(n => n >= 10)); ++foo(wrap(s => s.length)); ++let a1 = ["a", "b"].map(s => s.length); ++let a2 = ["a", "b"].map(wrap(s => s.length)); ++let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); ++let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); ++let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); ++let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); // This is a contrived class. We could do the same thing with Observables, etc. - class SetOf { +-var SetOf = /** @class */ (function () { +- function SetOf() { +- } +- SetOf.prototype.add = function (a) { ++class SetOf { + _store; - add(a) { ++ add(a) { this._store.push(a); - } \ No newline at end of file +- }; +- SetOf.prototype.transform = function (transformer) { ++ } ++ transform(transformer) { + return transformer(this); +- }; +- SetOf.prototype.forEach = function (fn) { +- this._store.forEach(function (a, i) { return fn(a, i); }); +- }; +- return SetOf; +-}()); ++ } ++ forEach(fn) { ++ this._store.forEach((a, i) => fn(a, i)); ++ } ++} + /* ... etc ... */ +-function compose() { +- var fns = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- fns[_i] = arguments[_i]; +- } +- return function (x) { return fns.reduce(function (prev, fn) { return fn(prev); }, x); }; ++function compose(...fns) { ++ return (x) => fns.reduce((prev, fn) => fn(prev), x); + } + function map(fn) { +- return function (a) { +- var b = new SetOf(); +- a.forEach(function (x) { return b.add(fn(x)); }); ++ return (a) => { ++ const b = new SetOf(); ++ a.forEach(x => b.add(fn(x))); + return b; + }; + } + function filter(predicate) { +- return function (a) { +- var result = new SetOf(); +- a.forEach(function (x) { ++ return (a) => { ++ const result = new SetOf(); ++ a.forEach(x => { + if (predicate(x)) + result.add(x); + }); + return result; + }; + } +-var testSet = new SetOf(); ++const testSet = new SetOf(); + testSet.add(1); + testSet.add(2); + testSet.add(3); +-var t1 = testSet.transform(compose(filter(function (x) { return x % 1 === 0; }), map(function (x) { return x + x; }), map(function (x) { return x + '!!!'; }), map(function (x) { return x.toUpperCase(); }))); +-var t2 = testSet.transform(compose(filter(function (x) { return x % 1 === 0; }), identity, map(function (x) { return x + '!!!'; }), map(function (x) { return x.toUpperCase(); }))); ++const t1 = testSet.transform(compose(filter(x => x % 1 === 0), map(x => x + x), map(x => x + '!!!'), map(x => x.toUpperCase()))); ++const t2 = testSet.transform(compose(filter(x => x % 1 === 0), identity, map(x => x + '!!!'), map(x => x.toUpperCase()))); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes3.types.diff b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes3.types.diff new file mode 100644 index 0000000000..7dbb71fe92 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferFromGenericFunctionReturnTypes3.types.diff @@ -0,0 +1,20 @@ +--- old.inferFromGenericFunctionReturnTypes3.types ++++ new.inferFromGenericFunctionReturnTypes3.types +@@= skipped -98, +98 lines =@@ + + interface FolderContentItem { + type: 'folder' | 'file'; +->type : "folder" | "file" ++>type : "file" | "folder" + } + + let a: FolderContentItem[] = []; +@@= skipped -303, +303 lines =@@ + >age : number + + position: "STRIKER" | "GOALKEEPER", +->position : "STRIKER" | "GOALKEEPER" ++>position : "GOALKEEPER" | "STRIKER" + + }; + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferObjectTypeFromStringLiteralToKeyof.js.diff b/testdata/baselines/reference/submodule/compiler/inferObjectTypeFromStringLiteralToKeyof.js.diff new file mode 100644 index 0000000000..9388847166 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferObjectTypeFromStringLiteralToKeyof.js.diff @@ -0,0 +1,10 @@ +--- old.inferObjectTypeFromStringLiteralToKeyof.js ++++ new.inferObjectTypeFromStringLiteralToKeyof.js +@@= skipped -8, +8 lines =@@ + + + //// [inferObjectTypeFromStringLiteralToKeyof.js] +-var x = inference1(two); +-var y = inference2({ a: 1, b: 2, c: 3, d: function (n) { return n; } }, two); ++const x = inference1(two); ++const y = inference2({ a: 1, b: 2, c: 3, d(n) { return n; } }, two); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferParameterWithMethodCallInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/inferParameterWithMethodCallInitializer.js.diff new file mode 100644 index 0000000000..222a538d9c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferParameterWithMethodCallInitializer.js.diff @@ -0,0 +1,42 @@ +--- old.inferParameterWithMethodCallInitializer.js ++++ new.inferParameterWithMethodCallInitializer.js +@@= skipped -25, +25 lines =@@ + function getNumber() { + return 1; + } +-var Example = /** @class */ (function () { +- function Example() { +- } +- Example.prototype.getNumber = function () { ++class Example { ++ getNumber() { + return 1; +- }; +- Example.prototype.doSomething = function (a) { +- if (a === void 0) { a = this.getNumber(); } ++ } ++ doSomething(a = this.getNumber()) { + return a; +- }; +- return Example; +-}()); +-function weird(a) { +- if (a === void 0) { a = this.getNumber(); } ++ } ++} ++function weird(a = this.getNumber()) { + return a; + } +-var Weird = /** @class */ (function () { +- function Weird() { +- } +- Weird.prototype.doSomething = function (a) { +- if (a === void 0) { a = this.getNumber(); } ++class Weird { ++ doSomething(a = this.getNumber()) { + return a; +- }; +- return Weird; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferRestArgumentsMappedTuple.js.diff b/testdata/baselines/reference/submodule/compiler/inferRestArgumentsMappedTuple.js.diff index 4cd9ba6912..bbcb6134a9 100644 --- a/testdata/baselines/reference/submodule/compiler/inferRestArgumentsMappedTuple.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferRestArgumentsMappedTuple.js.diff @@ -5,5 +5,7 @@ //// [inferRestArgumentsMappedTuple.js] -"use strict"; - const myPrimitiveTupleOld = extractPrimitivesOld({ primitive: "" }, { primitive: 0 }); - const myPrimitiveTupleNew = extractPrimitivesNew({ primitive: "" }, { primitive: 0 }); \ No newline at end of file +-var myPrimitiveTupleOld = extractPrimitivesOld({ primitive: "" }, { primitive: 0 }); +-var myPrimitiveTupleNew = extractPrimitivesNew({ primitive: "" }, { primitive: 0 }); ++const myPrimitiveTupleOld = extractPrimitivesOld({ primitive: "" }, { primitive: 0 }); ++const myPrimitiveTupleNew = extractPrimitivesNew({ primitive: "" }, { primitive: 0 }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferSecondaryParameter.symbols.diff b/testdata/baselines/reference/submodule/compiler/inferSecondaryParameter.symbols.diff new file mode 100644 index 0000000000..fee1116caa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferSecondaryParameter.symbols.diff @@ -0,0 +1,20 @@ +--- old.inferSecondaryParameter.symbols ++++ new.inferSecondaryParameter.symbols +@@= skipped -7, +7 lines =@@ + >m : Symbol(Ib.m, Decl(inferSecondaryParameter.ts, 2, 14)) + >test : Symbol(test, Decl(inferSecondaryParameter.ts, 2, 17)) + >fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 2, 30)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + var b: Ib = { m: function (test: string, fn: Function) { } }; + >b : Symbol(b, Decl(inferSecondaryParameter.ts, 4, 3)) +@@= skipped -8, +8 lines =@@ + >m : Symbol(m, Decl(inferSecondaryParameter.ts, 4, 13)) + >test : Symbol(test, Decl(inferSecondaryParameter.ts, 4, 27)) + >fn : Symbol(fn, Decl(inferSecondaryParameter.ts, 4, 40)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + b.m("test", function (bug) { + >b.m : Symbol(Ib.m, Decl(inferSecondaryParameter.ts, 2, 14)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferSetterParamType.js.diff b/testdata/baselines/reference/submodule/compiler/inferSetterParamType.js.diff new file mode 100644 index 0000000000..9bf4daf99b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferSetterParamType.js.diff @@ -0,0 +1,48 @@ +--- old.inferSetterParamType.js ++++ new.inferSetterParamType.js +@@= skipped -20, +20 lines =@@ + + + //// [inferSetterParamType.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Object.defineProperty(Foo.prototype, "bar", { +- get: function () { +- return 0; +- }, +- set: function (n) { +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo; +-}()); +-var Foo2 = /** @class */ (function () { +- function Foo2() { +- } +- Object.defineProperty(Foo2.prototype, "bar", { +- get: function () { +- return 0; // should be an error - can't coerce infered return type to match setter annotated type +- }, +- set: function (n) { +- }, +- enumerable: false, +- configurable: true +- }); +- return Foo2; +-}()); ++class Foo { ++ get bar() { ++ return 0; ++ } ++ set bar(n) { ++ } ++} ++class Foo2 { ++ get bar() { ++ return 0; // should be an error - can't coerce infered return type to match setter annotated type ++ } ++ set bar(n) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferStringLiteralUnionForBindingElement.js.diff b/testdata/baselines/reference/submodule/compiler/inferStringLiteralUnionForBindingElement.js.diff new file mode 100644 index 0000000000..8781a2fca9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferStringLiteralUnionForBindingElement.js.diff @@ -0,0 +1,31 @@ +--- old.inferStringLiteralUnionForBindingElement.js ++++ new.inferStringLiteralUnionForBindingElement.js +@@= skipped -25, +25 lines =@@ + + //// [inferStringLiteralUnionForBindingElement.js] + function func1() { +- var firstKey = func({ keys: ["aa", "bb"] }).firstKey; +- var a = firstKey; +- var keys = func({ keys: ["aa", "bb"] }).keys; +- var b = keys; ++ const { firstKey } = func({ keys: ["aa", "bb"] }); ++ const a = firstKey; ++ const { keys } = func({ keys: ["aa", "bb"] }); ++ const b = keys; + } + function func2() { +- var _a = func({ keys: ["aa", "bb"] }), keys = _a.keys, firstKey = _a.firstKey; +- var a = firstKey; +- var b = keys; ++ const { keys, firstKey } = func({ keys: ["aa", "bb"] }); ++ const a = firstKey; ++ const b = keys; + } + function func3() { +- var x = func({ keys: ["aa", "bb"] }); +- var a = x.firstKey; +- var b = x.keys; ++ const x = func({ keys: ["aa", "bb"] }); ++ const a = x.firstKey; ++ const b = x.keys; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferTupleFromBindingPattern.js.diff b/testdata/baselines/reference/submodule/compiler/inferTupleFromBindingPattern.js.diff new file mode 100644 index 0000000000..f8ca2f7a72 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferTupleFromBindingPattern.js.diff @@ -0,0 +1,8 @@ +--- old.inferTupleFromBindingPattern.js ++++ new.inferTupleFromBindingPattern.js +@@= skipped -5, +5 lines =@@ + + + //// [inferTupleFromBindingPattern.js] +-var _a = f(function () { return [1, "hi", true]; }), e1 = _a[0], e2 = _a[1], e3 = _a[2]; ++const [e1, e2, e3] = f(() => [1, "hi", true]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferTypeArgumentsInSignatureWithRestParameters.js.diff b/testdata/baselines/reference/submodule/compiler/inferTypeArgumentsInSignatureWithRestParameters.js.diff new file mode 100644 index 0000000000..2a3932aa2e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferTypeArgumentsInSignatureWithRestParameters.js.diff @@ -0,0 +1,30 @@ +--- old.inferTypeArgumentsInSignatureWithRestParameters.js ++++ new.inferTypeArgumentsInSignatureWithRestParameters.js +@@= skipped -13, +13 lines =@@ + + + //// [inferTypeArgumentsInSignatureWithRestParameters.js] +-function f(array) { +- var args = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- args[_i - 1] = arguments[_i]; +- } +-} +-function g(array) { +- var args = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- args[_i - 1] = arguments[_i]; +- } +-} +-function h(nonarray) { +- var args = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- args[_i - 1] = arguments[_i]; +- } +-} ++function f(array, ...args) { } ++function g(array, ...args) { } ++function h(nonarray, ...args) { } + function i(array, opt) { } + var a = [1, 2, 3, 4, 5]; + f(a); // OK \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.js.diff index 4d4403e0ed..a9b79cbcbc 100644 --- a/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.js.diff @@ -6,17 +6,43 @@ //// [inferTypeParameterConstraints.js] -"use strict"; -// Repro from #42636 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); // https://github.com/microsoft/TypeScript/issues/57286#issuecomment-1927920336 - class BaseClass { - fake() { -@@= skipped -9, +7 lines =@@ - } - } - class Klass extends BaseClass { -- constructor() { -- super(...arguments); -- this.child = true; +-var BaseClass = /** @class */ (function () { +- function BaseClass() { - } +- BaseClass.prototype.fake = function () { ++class BaseClass { ++ fake() { + throw new Error(""); +- }; +- return BaseClass; +-}()); +-var Klass = /** @class */ (function (_super) { +- __extends(Klass, _super); +- function Klass() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.child = true; +- return _this; + } +- return Klass; +-}(BaseClass)); ++} ++class Klass extends BaseClass { + child = true; - } ++} m.child; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.types.diff b/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.types.diff new file mode 100644 index 0000000000..4ef64168d9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferTypeParameterConstraints.types.diff @@ -0,0 +1,11 @@ +--- old.inferTypeParameterConstraints.types ++++ new.inferTypeParameterConstraints.types +@@= skipped -9, +9 lines =@@ + >IsSub : IsSub + + type E0 = IsSub<[1, 2, 3, 4], [2, 3, 4]>; // [1 | 2 | 3 | 4] +->E0 : [1 | 4 | 2 | 3] ++>E0 : [1 | 2 | 3 | 4] + + type E1 = [1, 2, 3, 4] extends [...infer B, 2, 3, 4, ...any[]] ? B : never; // unknown[] + >E1 : unknown[] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.errors.txt.diff index 0a87fa8093..b4700ec845 100644 --- a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.errors.txt.diff @@ -4,7 +4,7 @@ Type 'number' is not assignable to type 'string'. inferTypePredicates.ts(115,7): error TS2322: Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'. --inferTypePredicates.ts(133,7): error TS2740: Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. +-inferTypePredicates.ts(133,7): error TS2740: Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 38 more. +inferTypePredicates.ts(133,7): error TS2322: Type 'object' is not assignable to type 'Date'. + Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. inferTypePredicates.ts(205,7): error TS2741: Property 'z' is missing in type 'C1' but required in type 'C2'. @@ -14,7 +14,7 @@ if (flakyIsDate(maybeDate)) { let t: Date = maybeDate; // should error ~ --!!! error TS2740: Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. +-!!! error TS2740: Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 38 more. +!!! error TS2322: Type 'object' is not assignable to type 'Date'. +!!! error TS2322: Type '{}' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. } else { diff --git a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.js.diff b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.js.diff index e93a7ca535..fd8f4d2b73 100644 --- a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.js.diff @@ -1,39 +1,309 @@ --- old.inferTypePredicates.js +++ new.inferTypePredicates.js -@@= skipped -318, +318 lines =@@ - const numsOrNull = [1, 2, 3, 4, null]; - const filteredNumsTruthy = numsOrNull.filter(x => !!x); // should error - const filteredNumsNonNullish = numsOrNull.filter(x => x !== null); // should ok --const evenSquaresInline = // should error +@@= skipped -315, +315 lines =@@ + + //// [inferTypePredicates.js] + // https://github.com/microsoft/TypeScript/issues/16069 +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var numsOrNull = [1, 2, 3, 4, null]; +-var filteredNumsTruthy = numsOrNull.filter(function (x) { return !!x; }); // should error +-var filteredNumsNonNullish = numsOrNull.filter(function (x) { return x !== null; }); // should ok +-var evenSquaresInline = // should error - [1, 2, 3, 4] -+const evenSquaresInline = [1, 2, 3, 4] - .map(x => x % 2 === 0 ? x * x : null) - .filter(x => !!x); // tests truthiness, not non-nullishness - const isTruthy = (x) => !!x; --const evenSquares = // should error +- .map(function (x) { return x % 2 === 0 ? x * x : null; }) +- .filter(function (x) { return !!x; }); // tests truthiness, not non-nullishness +-var isTruthy = function (x) { return !!x; }; +-var evenSquares = // should error - [1, 2, 3, 4] +- .map(function (x) { return x % 2 === 0 ? x * x : null; }) ++const numsOrNull = [1, 2, 3, 4, null]; ++const filteredNumsTruthy = numsOrNull.filter(x => !!x); // should error ++const filteredNumsNonNullish = numsOrNull.filter(x => x !== null); // should ok ++const evenSquaresInline = [1, 2, 3, 4] ++ .map(x => x % 2 === 0 ? x * x : null) ++ .filter(x => !!x); // tests truthiness, not non-nullishness ++const isTruthy = (x) => !!x; +const evenSquares = [1, 2, 3, 4] - .map(x => x % 2 === 0 ? x * x : null) ++ .map(x => x % 2 === 0 ? x * x : null) .filter(isTruthy); --const evenSquaresNonNull = // should ok +-var evenSquaresNonNull = // should ok - [1, 2, 3, 4] +- .map(function (x) { return x % 2 === 0 ? x * x : null; }) +- .filter(function (x) { return x !== null; }); +const evenSquaresNonNull = [1, 2, 3, 4] - .map(x => x % 2 === 0 ? x * x : null) - .filter(x => x !== null); ++ .map(x => x % 2 === 0 ? x * x : null) ++ .filter(x => x !== null); function isNonNull(x) { -@@= skipped -149, +146 lines =@@ - } + return x !== null; + } + // factoring out a boolean works thanks to aliased discriminants + function isNonNullVar(x) { +- var ok = x !== null; ++ const ok = x !== null; + return ok; + } + function isNonNullGeneric(x) { + return x !== null; + } + // Type guards can flow between functions +-var myGuard = function (o) { return !!o; }; +-var mySecondGuard = function (o) { return myGuard(o); }; +-var myArray = []; +-var result = myArray +- .map(function (arr) { return arr.list; }) +- .filter(function (arr) { return arr && arr.length; }) +- .map(function (arr) { return arr // should error +- .filter(function (obj) { return obj && obj.data; }) +- .map(function (obj) { return JSON.parse(obj.data); }); } // should error ++const myGuard = (o) => !!o; ++const mySecondGuard = (o) => myGuard(o); ++const myArray = []; ++const result = myArray ++ .map((arr) => arr.list) ++ .filter((arr) => arr && arr.length) ++ .map((arr) => arr // should error ++ .filter((obj) => obj && obj.data) ++ .map(obj => JSON.parse(obj.data)) // should error + ); +-var result2 = myArray +- .map(function (arr) { return arr.list; }) +- .filter(function (arr) { return !!arr; }) +- .filter(function (arr) { return arr.length; }) +- .map(function (arr) { return arr // should ok +- .filter(function (obj) { return obj; }) ++const result2 = myArray ++ .map((arr) => arr.list) ++ .filter((arr) => !!arr) ++ .filter(arr => arr.length) ++ .map((arr) => arr // should ok ++ .filter((obj) => obj) + // inferring a guard here would require https://github.com/microsoft/TypeScript/issues/42384 +- .filter(function (obj) { return !!obj.data; }) +- .map(function (obj) { return JSON.parse(obj.data); }); }); +-var list = []; +-var resultBars = list.filter(function (value) { return 'bar' in value; }); // should ok ++ .filter(obj => !!obj.data) ++ .map(obj => JSON.parse(obj.data))); ++const list = []; ++const resultBars = list.filter((value) => 'bar' in value); // should ok + function isBarNonNull(x) { + return ('bar' in x); + } +-var fooOrBar = list[0]; ++const fooOrBar = list[0]; + if (isBarNonNull(fooOrBar)) { +- var t = fooOrBar; // should ok ++ const t = fooOrBar; // should ok + } + // https://github.com/microsoft/TypeScript/issues/38390#issuecomment-626019466 + // Ryan's example (currently legal): +-var a = [1, "foo", 2, "bar"].filter(function (x) { return typeof x === "string"; }); ++const a = [1, "foo", 2, "bar"].filter(x => typeof x === "string"); + a.push(10); + // Defer to explicit type guards, even when they're incorrect. + function backwardsGuard(x) { +@@= skipped -84, +66 lines =@@ + return typeof x === 'string'; + } + if (isString(strOrNum)) { +- var t = strOrNum; // should ok ++ let t = strOrNum; // should ok + } + else { +- var t = strOrNum; // should ok ++ let t = strOrNum; // should ok + } + function flakyIsString(x) { + return typeof x === 'string' && Math.random() > 0.5; + } + if (flakyIsString(strOrNum)) { +- var t = strOrNum; // should error ++ let t = strOrNum; // should error + } + else { +- var t = strOrNum; // should error ++ let t = strOrNum; // should error + } + function isDate(x) { + return x instanceof Date; +@@= skipped -21, +21 lines =@@ + return x instanceof Date && Math.random() > 0.5; + } + if (isDate(maybeDate)) { +- var t = maybeDate; // should ok ++ let t = maybeDate; // should ok + } + else { +- var t = maybeDate; // should ok ++ let t = maybeDate; // should ok + } + if (flakyIsDate(maybeDate)) { +- var t = maybeDate; // should error ++ let t = maybeDate; // should error + } + else { +- var t = maybeDate; // should ok ++ let t = maybeDate; // should ok + } + // This should not infer a type guard since the value on which we do the refinement + // is not related to the original parameter. +@@= skipped -18, +18 lines =@@ + return typeof x === 'string'; + } + function irrelevantIsNumberDestructuring(x) { +- x = [Math.random() < 0.5 ? "string" : 123][0]; ++ [x] = [Math.random() < 0.5 ? "string" : 123]; + return typeof x === 'string'; + } + // Cannot infer a type guard for either param because of the false case. +@@= skipped -22, +22 lines =@@ + return typeof __x === 'string'; } - class C2 extends C1 { -- constructor() { -- super(...arguments); -- this.z = 0; + // could infer a type guard here but it doesn't seem that helpful. +-var booleanIdentity = function (x) { return x; }; ++const booleanIdentity = (x) => x; + // we infer "x is number | true" which is accurate but of debatable utility. +-var numOrBoolean = function (x) { return typeof x === 'number' || x; }; +-var Inferrer = /** @class */ (function () { +- function Inferrer() { - } -+ z = 0; +- Inferrer.prototype.isNumber = function (x) { ++const numOrBoolean = (x) => typeof x === 'number' || x; ++class Inferrer { ++ isNumber(x) { + return typeof x === 'number'; +- }; +- return Inferrer; +-}()); +-var inf = new Inferrer(); ++ } ++} ++const inf = new Inferrer(); + if (inf.isNumber(numOrStr)) { +- var t = numOrStr; // should ok ++ let t = numOrStr; // should ok + } + else { +- var t = numOrStr; // should ok ++ let t = numOrStr; // should ok } + // Type predicates are not inferred on "this" +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.isC2 = function () { ++class C1 { ++ isC2() { + return this instanceof C2; +- }; +- return C1; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.z = 0; +- return _this; + } +- return C2; +-}(C1)); ++} ++class C2 extends C1 { ++ z = 0; ++} if (c.isC2()) { - let c2 = c; // should error -@@= skipped -155, +152 lines =@@ +- var c2 = c; // should error ++ let c2 = c; // should error + } +-function doNotRefineDestructuredParam(_a) { +- var x = _a.x, y = _a.y; ++function doNotRefineDestructuredParam({ x, y }) { + return typeof x === 'number'; + } + // The type predicate must remain valid when the function is called with subtypes. +@@= skipped -60, +47 lines =@@ + str.charAt(0); // should OK + } + else { +- var t = str; // should OK ++ let t = str; // should OK + } + // infer a union type + function isNumOrStr(x) { + return (typeof x === "number" || typeof x === "string"); + } + if (isNumOrStr(unk)) { +- var t = unk; // should ok ++ let t = unk; // should ok + } + // A function can be a type predicate even if it throws. + function assertAndPredicate(x) { +@@= skipped -17, +17 lines =@@ + return typeof x === 'string'; + } + if (assertAndPredicate(snd)) { +- var t = snd; // should error ++ let t = snd; // should error + } + function isNumberWithThis(x) { + return typeof x === 'number'; +@@= skipped -8, +8 lines =@@ + function narrowFromAny(x) { + return typeof x === 'number'; + } +-var noInferenceFromRest = function () { +- var f = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- f[_i] = arguments[_i]; +- } +- return f[0] === "a"; +-}; +-var noInferenceFromImpossibleRest = function () { +- var f = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- f[_i] = arguments[_i]; +- } +- return typeof f === "undefined"; +-}; +-function inferWithRest(x) { +- var f = []; +- for (var _i = 1; _i < arguments.length; _i++) { +- f[_i - 1] = arguments[_i]; +- } ++const noInferenceFromRest = (...f) => f[0] === "a"; ++const noInferenceFromImpossibleRest = (...f) => typeof f === "undefined"; ++function inferWithRest(x, ...f) { + return typeof x === 'string'; + } +-var foobarPred = function (fb) { return fb.type === "foo"; }; ++const foobarPred = (fb) => fb.type === "foo"; + if (foobarPred(foobar)) { + foobar.foo; + } + // https://github.com/microsoft/TypeScript/issues/60778 +-var arrTest = [1, 2, null, 3].filter(function (x) { return (x != null); }); ++const arrTest = [1, 2, null, 3].filter((x) => (x != null)); + function isEmptyString(x) { +- var rv = x === ""; ++ const rv = x === ""; + return rv; + } + function isAnimal(something) { +@@= skipped -118, +102 lines =@@ declare let snd: string | number | Date; declare function isNumberWithThis(this: Date, x: number | string): x is number; declare function narrowFromAny(x: any): x is number; diff --git a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.symbols.diff b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.symbols.diff new file mode 100644 index 0000000000..9c4fe41e0a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.symbols.diff @@ -0,0 +1,126 @@ +--- old.inferTypePredicates.symbols ++++ new.inferTypePredicates.symbols +@@= skipped -183, +183 lines =@@ + >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) + >obj : Symbol(obj, Decl(inferTypePredicates.ts, 53, 9)) + >JSON.parse : Symbol(JSON.parse, Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >parse : Symbol(JSON.parse, Decl(lib.es5.d.ts, --, --)) + >obj.data : Symbol(data, Decl(inferTypePredicates.ts, 44, 14)) + >obj : Symbol(obj, Decl(inferTypePredicates.ts, 53, 9)) +@@= skipped -60, +60 lines =@@ + >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) + >obj : Symbol(obj, Decl(inferTypePredicates.ts, 64, 9)) + >JSON.parse : Symbol(JSON.parse, Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >parse : Symbol(JSON.parse, Decl(lib.es5.d.ts, --, --)) + >obj.data : Symbol(data, Decl(inferTypePredicates.ts, 44, 14)) + >obj : Symbol(obj, Decl(inferTypePredicates.ts, 64, 9)) +@@= skipped -117, +117 lines =@@ + return typeof x === 'string' && Math.random() > 0.5; + >x : Symbol(x, Decl(inferTypePredicates.ts, 108, 23)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + } + if (flakyIsString(strOrNum)) { +@@= skipped -23, +23 lines =@@ + + return x instanceof Date; + >x : Symbol(x, Decl(inferTypePredicates.ts, 117, 16)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + } + function flakyIsDate(x: object) { + >flakyIsDate : Symbol(flakyIsDate, Decl(inferTypePredicates.ts, 119, 1)) +@@= skipped -8, +8 lines =@@ + + return x instanceof Date && Math.random() > 0.5; + >x : Symbol(x, Decl(inferTypePredicates.ts, 120, 21)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + } + +@@= skipped -15, +15 lines =@@ + + let t: Date = maybeDate; // should ok + >t : Symbol(t, Decl(inferTypePredicates.ts, 126, 5)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >maybeDate : Symbol(maybeDate, Decl(inferTypePredicates.ts, 124, 11)) + + } else { +@@= skipped -15, +15 lines =@@ + + let t: Date = maybeDate; // should error + >t : Symbol(t, Decl(inferTypePredicates.ts, 132, 5)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >maybeDate : Symbol(maybeDate, Decl(inferTypePredicates.ts, 124, 11)) + + } else { +@@= skipped -18, +18 lines =@@ + x = Math.random() < 0.5 ? "string" : 123; + >x : Symbol(x, Decl(inferTypePredicates.ts, 139, 28)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return typeof x === 'string'; +@@= skipped -13, +13 lines =@@ + [x] = [Math.random() < 0.5 ? "string" : 123]; + >x : Symbol(x, Decl(inferTypePredicates.ts, 143, 41)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + return typeof x === 'string'; +@@= skipped -230, +230 lines =@@ + function assertAndPredicate(x: string | number | Date) { + >assertAndPredicate : Symbol(assertAndPredicate, Decl(inferTypePredicates.ts, 239, 1)) + >x : Symbol(x, Decl(inferTypePredicates.ts, 242, 28)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + if (x instanceof Date) { + >x : Symbol(x, Decl(inferTypePredicates.ts, 242, 28)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + throw new Error(); + >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +@@= skipped -15, +15 lines =@@ + + declare let snd: string | number | Date; + >snd : Symbol(snd, Decl(inferTypePredicates.ts, 249, 11)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + if (assertAndPredicate(snd)) { + >assertAndPredicate : Symbol(assertAndPredicate, Decl(inferTypePredicates.ts, 239, 1)) +@@= skipped -14, +14 lines =@@ + function isNumberWithThis(this: Date, x: number | string) { + >isNumberWithThis : Symbol(isNumberWithThis, Decl(inferTypePredicates.ts, 252, 1)) + >this : Symbol(this, Decl(inferTypePredicates.ts, 254, 26)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >x : Symbol(x, Decl(inferTypePredicates.ts, 254, 37)) + + return typeof x === 'number'; +@@= skipped -68, +68 lines =@@ + // https://github.com/microsoft/TypeScript/issues/60778 + const arrTest: Array = [1, 2, null, 3].filter( + >arrTest : Symbol(arrTest, Decl(inferTypePredicates.ts, 280, 5)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >[1, 2, null, 3].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.types.diff b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.types.diff index 27e41e4855..7c951e5742 100644 --- a/testdata/baselines/reference/submodule/compiler/inferTypePredicates.types.diff +++ b/testdata/baselines/reference/submodule/compiler/inferTypePredicates.types.diff @@ -66,7 +66,16 @@ >obj.data : string | undefined >obj : MyObj >data : string | undefined -@@= skipped -94, +94 lines =@@ +@@= skipped -81, +81 lines =@@ + >x => typeof x === "string" : (x: string | number) => x is string + >x : string | number + >typeof x === "string" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >"string" : "string" + +@@= skipped -13, +13 lines =@@ // Defer to explicit type guards, even when they're incorrect. function backwardsGuard(x: number|string): x is number { @@ -75,7 +84,80 @@ >x : string | number return typeof x === 'string'; -@@= skipped -233, +233 lines =@@ + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + } +@@= skipped -17, +17 lines =@@ + + return typeof x === 'string'; + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + } +@@= skipped -30, +30 lines =@@ + return typeof x === 'string' && Math.random() > 0.5; + >typeof x === 'string' && Math.random() > 0.5 : boolean + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + >Math.random() > 0.5 : boolean +@@= skipped -105, +105 lines =@@ + + return typeof x === 'string'; + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + } +@@= skipped -25, +25 lines =@@ + + return typeof x === 'string'; + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + } +@@= skipped -14, +14 lines =@@ + return typeof x === 'number' && typeof y === 'number'; + >typeof x === 'number' && typeof y === 'number' : boolean + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'number' : "number" + >typeof y === 'number' : boolean +->typeof y : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof y : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >y : string | number + >'number' : "number" + } +@@= skipped -16, +16 lines =@@ + + if (typeof x === 'string') { + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + +@@= skipped -19, +19 lines =@@ + + return typeof b === 'string'; + >typeof b === 'string' : boolean +->typeof b : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof b : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >b : string | number + >'string' : "string" + } // Checks that there are no string escaping issues function dunderguard(__x: number | string) { @@ -84,7 +166,22 @@ >__x : string | number return typeof __x === 'string'; -@@= skipped -32, +32 lines =@@ + >typeof __x === 'string' : boolean +->typeof __x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof __x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >__x : string | number + >'string' : "string" + } +@@= skipped -31, +31 lines =@@ + >x : number | boolean + >typeof x === 'number' || x : boolean + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : number | boolean + >'number' : "number" + >x : boolean +@@= skipped -8, +8 lines =@@ // inferred guards in methods interface NumberInferrer { isNumber(x: number | string): x is number; @@ -101,6 +198,12 @@ >x : string | number return typeof x === 'number'; + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'number' : "number" + } @@= skipped -27, +27 lines =@@ if (inf.isNumber(numOrStr)) { @@ -113,7 +216,57 @@ >numOrStr : string | number let t: number = numOrStr; // should ok -@@= skipped -199, +199 lines =@@ +@@= skipped -59, +59 lines =@@ + + return typeof x === 'number'; + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : number | null + >'number' : "number" + } +@@= skipped -13, +13 lines =@@ + return typeof x === "string" && x.length < 10; + >typeof x === "string" && x.length < 10 : boolean + >typeof x === "string" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"string" : "string" + >x.length < 10 : boolean +@@= skipped -40, +40 lines =@@ + + return typeof x === "string"; + >typeof x === "string" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"string" : "string" + } +@@= skipped -31, +31 lines =@@ + >(typeof x === "number" || typeof x === "string") : boolean + >typeof x === "number" || typeof x === "string" : boolean + >typeof x === "number" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"number" : "number" + >typeof x === "string" : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : unknown + >"string" : "string" + } +@@= skipped -37, +37 lines =@@ + } + return typeof x === 'string'; + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'string' : "string" + } +@@= skipped -19, +19 lines =@@ } function isNumberWithThis(this: Date, x: number | string) { @@ -122,7 +275,41 @@ >this : Date >x : string | number -@@= skipped -66, +66 lines =@@ + return typeof x === 'number'; + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | number + >'number' : "number" + } +@@= skipped -17, +17 lines =@@ + + return typeof x === 'number'; + >typeof x === 'number' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : any + >'number' : "number" + } +@@= skipped -20, +20 lines =@@ + >(...f: []) => typeof f === "undefined" : () => boolean + >f : [] + >typeof f === "undefined" : boolean +->typeof f : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof f : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >f : [] + >"undefined" : "undefined" + +@@= skipped -11, +11 lines =@@ + + return typeof x === 'string'; + >typeof x === 'string' : boolean +->typeof x : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" ++>typeof x : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" + >x : string | null + >'string' : "string" + } +@@= skipped -18, +18 lines =@@ >bar : string const foobarPred = (fb: typeof foobar) => fb.type === "foo"; diff --git a/testdata/baselines/reference/submodule/compiler/inferenceAndSelfReferentialConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceAndSelfReferentialConstraint.js.diff index 97cadbab15..ea8f1ac054 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceAndSelfReferentialConstraint.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceAndSelfReferentialConstraint.js.diff @@ -7,4 +7,32 @@ -// @strict function test(arg) { return arg; - } \ No newline at end of file + } +-var res1 = test({ +- foo: true, +- bar: function () { +- } +-}); +-var res2 = test({ +- foo: true, +- bar: function () { +- } +-}); +-var res3 = test({ +- foo: true, +- bar: function () { ++const res1 = test({ ++ foo: true, ++ bar() { ++ } ++}); ++const res2 = test({ ++ foo: true, ++ bar: function () { ++ } ++}); ++const res3 = test({ ++ foo: true, ++ bar: () => { + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.js.diff index e1171aedfc..e5690da3c1 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.js.diff @@ -6,5 +6,29 @@ //// [inferenceDoesNotAddUndefinedOrNull.js] -"use strict"; function flatMapChildren(node, cb) { - const result = []; - node.forEachChild(child => { \ No newline at end of file +- var result = []; +- node.forEachChild(function (child) { +- var value = cb(child); ++ const result = []; ++ node.forEachChild(child => { ++ const value = cb(child); + if (value !== undefined) { +- result.push.apply(result, toArray(value)); ++ result.push(...toArray(value)); + } + }); + return result; + } + function flatMapChildren2(node, cb) { +- var result = []; +- node.forEachChild(function (child) { +- var value = cb(child); ++ const result = []; ++ node.forEachChild(child => { ++ const value = cb(child); + if (value !== null) { +- result.push.apply(result, toArray(value)); ++ result.push(...toArray(value)); + } + }); + return result; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.symbols.diff b/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.symbols.diff new file mode 100644 index 0000000000..f9d98c34aa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferenceDoesNotAddUndefinedOrNull.symbols.diff @@ -0,0 +1,11 @@ +--- old.inferenceDoesNotAddUndefinedOrNull.symbols ++++ new.inferenceDoesNotAddUndefinedOrNull.symbols +@@= skipped -4, +4 lines =@@ + >NodeArray : Symbol(NodeArray, Decl(inferenceDoesNotAddUndefinedOrNull.ts, 0, 0)) + >T : Symbol(T, Decl(inferenceDoesNotAddUndefinedOrNull.ts, 0, 20)) + >Node : Symbol(Node, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(inferenceDoesNotAddUndefinedOrNull.ts, 0, 63)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(inferenceDoesNotAddUndefinedOrNull.ts, 0, 20)) + + interface Node { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js.diff index 0ed5930844..9ce4b3f766 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js.diff @@ -1,21 +1,49 @@ --- old.inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js +++ new.inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js -@@= skipped -38, +38 lines =@@ +@@= skipped -37, +37 lines =@@ + //// [inferenceDoesntCompareAgainstUninstantiatedTypeParameter.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - class ClassA { +-var ClassA = /** @class */ (function () { +- function ClassA(entity, settings) { ++class ClassA { + entity; + settings; - constructor(entity, settings) { ++ constructor(entity, settings) { this.entity = entity; this.settings = settings; } - } - class ConcreteClass { -- constructor() { +- return ClassA; +-}()); +-var ConcreteClass = /** @class */ (function () { +- function ConcreteClass() { - this.theName = 'myClass'; - } +- return ConcreteClass; +-}()); ++} ++class ConcreteClass { + theName = 'myClass'; - } ++} var thisGetsTheFalseError = new ClassA(new ConcreteClass(), { - values: o => [ \ No newline at end of file +- values: function (o) { return [ ++ values: o => [ + { + value: o.theName, +- func: function (x) { return 'asdfkjhgfdfghjkjhgfdfghjklkjhgfdfghjklkjhgfghj'; } ++ func: x => 'asdfkjhgfdfghjkjhgfdfghjklkjhgfdfghjklkjhgfghj' + } +- ]; } ++ ] + }); + var thisIsOk = new ClassA(new ConcreteClass(), { +- values: function (o) { return [ ++ values: o => [ + { + value: o.theName, +- func: function (x) { return 'asdfkjhgfdfghjkjhgfdfghjklkjhgfdfghjklkjhgfghj'; } ++ func: x => 'asdfkjhgfdfghjkjhgfdfghjklkjhgfdfghjklkjhgfghj' + } +- ]; } ++ ] + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceFromParameterlessLambda.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceFromParameterlessLambda.js.diff new file mode 100644 index 0000000000..831036b1e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferenceFromParameterlessLambda.js.diff @@ -0,0 +1,8 @@ +--- old.inferenceFromParameterlessLambda.js ++++ new.inferenceFromParameterlessLambda.js +@@= skipped -14, +14 lines =@@ + //// [inferenceFromParameterlessLambda.js] + function foo(o, i) { } + // Infer string from second argument because it isn't context sensitive +-foo(function (n) { return n.length; }, function () { return 'hi'; }); ++foo(n => n.length, () => 'hi'); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceOfNullableObjectTypesWithCommonBase.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceOfNullableObjectTypesWithCommonBase.js.diff index 3cc48e4afe..3eacd40841 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceOfNullableObjectTypesWithCommonBase.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceOfNullableObjectTypesWithCommonBase.js.diff @@ -6,5 +6,8 @@ //// [inferenceOfNullableObjectTypesWithCommonBase.js] -"use strict"; function equal(a, b) { } - let v = null; +-var v = null; ++let v = null; + equal(v, v); + equal(v, v); equal(v, v); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceOptionalProperties.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceOptionalProperties.js.diff index f6f5b4c989..9cb0c4c8e7 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceOptionalProperties.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceOptionalProperties.js.diff @@ -5,6 +5,10 @@ //// [inferenceOptionalProperties.js] -"use strict"; - const y1 = test(x1); - const y2 = test(x2); - var v1; \ No newline at end of file +-var y1 = test(x1); +-var y2 = test(x2); ++const y1 = test(x1); ++const y2 = test(x2); + var v1; + var v1; + var v2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesStrict.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesStrict.js.diff index fb8998eacf..f5ce0ddf52 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesStrict.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesStrict.js.diff @@ -5,6 +5,10 @@ //// [inferenceOptionalPropertiesStrict.js] -"use strict"; - const y1 = test(x1); - const y2 = test(x2); - var v1; \ No newline at end of file +-var y1 = test(x1); +-var y2 = test(x2); ++const y1 = test(x1); ++const y2 = test(x2); + var v1; + var v1; + var v2; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesToIndexSignatures.types.diff b/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesToIndexSignatures.types.diff index 9db921b175..13cbcd6edd 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesToIndexSignatures.types.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceOptionalPropertiesToIndexSignatures.types.diff @@ -18,7 +18,18 @@ let a4 = foo(x4); // string | number >a4 : string | number -@@= skipped -42, +42 lines =@@ +@@= skipped -22, +22 lines =@@ + >'value2' : "value2" + + const obj = { +->obj : { param2?: string | undefined; param1: string; } +->{ param1: 'value1', ...(param2 ? {param2} : {})} : { param2?: string | undefined; param1: string; } ++>obj : { param1: string; param2?: string | undefined; } ++>{ param1: 'value1', ...(param2 ? {param2} : {})} : { param1: string; param2?: string | undefined; } + + param1: 'value1', + >param1 : string +@@= skipped -20, +20 lines =@@ const query = Object.entries(obj).map( >query : string >Object.entries(obj).map( ([k, v]) => `${k}=${encodeURIComponent(v)}`).join('&') : string @@ -31,10 +42,12 @@ +>Object.entries : { (o: ArrayLike | { [s: string]: T; }): [string, T][]; (o: {}): [string, any][]; } >Object : ObjectConstructor ->entries : { (o: { [s: string]: T; } | ArrayLike): [string, T][]; (o: {}): [string, any][]; } +->obj : { param2?: string | undefined; param1: string; } +>entries : { (o: ArrayLike | { [s: string]: T; }): [string, T][]; (o: {}): [string, any][]; } - >obj : { param1: string; param2?: string | undefined; } ++>obj : { param1: string; param2?: string | undefined; } >map : (callbackfn: (value: [string, string], index: number, array: [string, string][]) => U, thisArg?: any) => U[] + ([k, v]) => `${k}=${encodeURIComponent(v)}` @@= skipped -21, +21 lines =@@ >v : string diff --git a/testdata/baselines/reference/submodule/compiler/inferenceShouldFailOnEvolvingArrays.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceShouldFailOnEvolvingArrays.js.diff index f5f285ddd1..c0c6f0e6e3 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceShouldFailOnEvolvingArrays.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceShouldFailOnEvolvingArrays.js.diff @@ -7,4 +7,20 @@ -"use strict"; // repro from https://github.com/Microsoft/TypeScript/issues/25675 // The type of `arg` blocks inference but simplifies to T. - function logLength(arg) { \ No newline at end of file + function logLength(arg) { +@@= skipped -8, +7 lines =@@ + return arg; + } + logLength(42); // error +-var z; ++let z; + z = logLength(42); // no error; T is inferred as `any` + function logFirstLength(arg) { + console.log(arg[0].length); + return arg; + } + logFirstLength([42]); // error +-var zz = []; ++let zz = []; + zz.push(logLength(42)); // no error; T is inferred as `any` + zz = logFirstLength([42]); // no error; T is inferred as `any[]` \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.js.diff b/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.js.diff index 5e6da2c637..e5f3acf04b 100644 --- a/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.js.diff @@ -5,6 +5,10 @@ //// [inferenceUnionOfObjectsMappedContextualType.js] -"use strict"; - const test = { +-var test = { ++const test = { key: 'someDate', - caption: 'My Date', \ No newline at end of file + caption: 'My Date', +- formatter: function (value) { return value ? value.toString() : '-'; } // value: any ++ formatter: (value) => value ? value.toString() : '-' // value: any + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.symbols.diff b/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.symbols.diff new file mode 100644 index 0000000000..3eb4613275 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferenceUnionOfObjectsMappedContextualType.symbols.diff @@ -0,0 +1,11 @@ +--- old.inferenceUnionOfObjectsMappedContextualType.symbols ++++ new.inferenceUnionOfObjectsMappedContextualType.symbols +@@= skipped -5, +5 lines =@@ + + someDate: Date | null; + >someDate : Symbol(someDate, Decl(inferenceUnionOfObjectsMappedContextualType.ts, 0, 15)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + } & ({ id: string; } | { id: number; }) + >id : Symbol(id, Decl(inferenceUnionOfObjectsMappedContextualType.ts, 2, 6)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod1.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod1.js.diff new file mode 100644 index 0000000000..a458c22700 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod1.js.diff @@ -0,0 +1,8 @@ +--- old.inferentialTypingObjectLiteralMethod1.js ++++ new.inferentialTypingObjectLiteralMethod1.js +@@= skipped -7, +7 lines =@@ + foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); + + //// [inferentialTypingObjectLiteralMethod1.js] +-foo("", { method: function (p1) { return p1.length; } }, { method: function (p2) { return undefined; } }); ++foo("", { method(p1) { return p1.length; } }, { method(p2) { return undefined; } }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod2.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod2.js.diff new file mode 100644 index 0000000000..805b8b13f5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingObjectLiteralMethod2.js.diff @@ -0,0 +1,8 @@ +--- old.inferentialTypingObjectLiteralMethod2.js ++++ new.inferentialTypingObjectLiteralMethod2.js +@@= skipped -7, +7 lines =@@ + foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }); + + //// [inferentialTypingObjectLiteralMethod2.js] +-foo("", { method: function (p1) { return p1.length; } }, { method: function (p2) { return undefined; } }); ++foo("", { method(p1) { return p1.length; } }, { method(p2) { return undefined; } }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType1.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType1.js.diff new file mode 100644 index 0000000000..f0ad09d279 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType1.js.diff @@ -0,0 +1,8 @@ +--- old.inferentialTypingUsingApparentType1.js ++++ new.inferentialTypingUsingApparentType1.js +@@= skipped -10, +10 lines =@@ + function foo(x) { + return undefined; + } +-foo(function (x) { return x.length; }); ++foo(x => x.length); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType2.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType2.js.diff new file mode 100644 index 0000000000..295c5b216a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType2.js.diff @@ -0,0 +1,8 @@ +--- old.inferentialTypingUsingApparentType2.js ++++ new.inferentialTypingUsingApparentType2.js +@@= skipped -10, +10 lines =@@ + function foo(x) { + return undefined; + } +-foo({ m: function (x) { return x.length; } }); ++foo({ m(x) { return x.length; } }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType3.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType3.js.diff index a1e83c8ca7..bbeeaa1792 100644 --- a/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingUsingApparentType3.js.diff @@ -1,10 +1,42 @@ --- old.inferentialTypingUsingApparentType3.js +++ new.inferentialTypingUsingApparentType3.js -@@= skipped -39, +39 lines =@@ +@@= skipped -28, +28 lines =@@ + person.fields.id; + + //// [inferentialTypingUsingApparentType3.js] +-var CharField = /** @class */ (function () { +- function CharField() { +- } +- CharField.prototype.clean = function (input) { ++class CharField { ++ clean(input) { + return "Yup"; +- }; +- return CharField; +-}()); +-var NumberField = /** @class */ (function () { +- function NumberField() { } - } - class ObjectField { +- NumberField.prototype.clean = function (input) { ++} ++class NumberField { ++ clean(input) { + return 123; +- }; +- return NumberField; +-}()); +-var ObjectField = /** @class */ (function () { +- function ObjectField(fields) { ++ } ++} ++class ObjectField { + fields; - constructor(fields) { ++ constructor(fields) { this.fields = fields; - } \ No newline at end of file + } +- return ObjectField; +-}()); ++} + var person = new ObjectField({ + id: new NumberField(), + name: new CharField() \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeNested.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeNested.js.diff new file mode 100644 index 0000000000..6aebf9728d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeNested.js.diff @@ -0,0 +1,8 @@ +--- old.inferentialTypingWithFunctionTypeNested.js ++++ new.inferentialTypingWithFunctionTypeNested.js +@@= skipped -6, +6 lines =@@ + var s = map("", () => { return { x: identity }; }); + + //// [inferentialTypingWithFunctionTypeNested.js] +-var s = map("", function () { return { x: identity }; }); ++var s = map("", () => { return { x: identity }; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.js.diff b/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.js.diff new file mode 100644 index 0000000000..c2d0a3ac16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferentialTypingWithFunctionTypeSyntacticScenarios.js.diff @@ -0,0 +1,11 @@ +--- old.inferentialTypingWithFunctionTypeSyntacticScenarios.js ++++ new.inferentialTypingWithFunctionTypeSyntacticScenarios.js +@@= skipped -42, +42 lines =@@ + // index expression + s = map("", dottedIdentity['x']); + // function call +-s = map("", (function () { return identity; })()); ++s = map("", (() => identity)()); + var ic; + s = map("", new ic()); + // assignment \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferredFunctionReturnTypeIsEmptyType.types.diff b/testdata/baselines/reference/submodule/compiler/inferredFunctionReturnTypeIsEmptyType.types.diff new file mode 100644 index 0000000000..052869bfca --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferredFunctionReturnTypeIsEmptyType.types.diff @@ -0,0 +1,11 @@ +--- old.inferredFunctionReturnTypeIsEmptyType.types ++++ new.inferredFunctionReturnTypeIsEmptyType.types +@@= skipped -1, +1 lines =@@ + + === inferredFunctionReturnTypeIsEmptyType.ts === + function foo() { +->foo : () => 42 | "42" ++>foo : () => "42" | 42 + + if (true) { + >true : true \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferredNonidentifierTypesGetQuotes.js.diff b/testdata/baselines/reference/submodule/compiler/inferredNonidentifierTypesGetQuotes.js.diff new file mode 100644 index 0000000000..61fe69e911 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferredNonidentifierTypesGetQuotes.js.diff @@ -0,0 +1,13 @@ +--- old.inferredNonidentifierTypesGetQuotes.js ++++ new.inferredNonidentifierTypesGetQuotes.js +@@= skipped -5, +5 lines =@@ + var y = [{ ["a-b"]: "string" }, {}]; + + //// [inferredNonidentifierTypesGetQuotes.js] +-var _a; + var x = [{ "a-b": "string" }, {}]; +-var y = [(_a = {}, _a["a-b"] = "string", _a), {}]; ++var y = [{ ["a-b"]: "string" }, {}]; + + + //// [inferredNonidentifierTypesGetQuotes.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferredRestTypeFixedOnce.js.diff b/testdata/baselines/reference/submodule/compiler/inferredRestTypeFixedOnce.js.diff new file mode 100644 index 0000000000..b3f66c8627 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferredRestTypeFixedOnce.js.diff @@ -0,0 +1,10 @@ +--- old.inferredRestTypeFixedOnce.js ++++ new.inferredRestTypeFixedOnce.js +@@= skipped -6, +6 lines =@@ + + //// [inferredRestTypeFixedOnce.js] + function wrap(_) { } +-wrap(function (_a) { +- var _b = _a === void 0 ? {} : _a, cancelable = _b.cancelable; +-}); ++wrap(({ cancelable } = {}) => { }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferredReturnTypeIncorrectReuse1.js.diff b/testdata/baselines/reference/submodule/compiler/inferredReturnTypeIncorrectReuse1.js.diff new file mode 100644 index 0000000000..eef140d354 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferredReturnTypeIncorrectReuse1.js.diff @@ -0,0 +1,14 @@ +--- old.inferredReturnTypeIncorrectReuse1.js ++++ new.inferredReturnTypeIncorrectReuse1.js +@@= skipped -35, +35 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + exports.out2 = exports.out = void 0; + /** Type<(In: string) => number> */ +-exports.out = t.pipe(function (s) { return parseInt(s); }); ++exports.out = t.pipe(s => parseInt(s)); + /** Type<(In: string) => number> */ +-exports.out2 = t2.pipe(function (s) { return parseInt(s); }); ++exports.out2 = t2.pipe(s => parseInt(s)); + + + //// [inferredReturnTypeIncorrectReuse1.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType1.js.diff b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType1.js.diff new file mode 100644 index 0000000000..c69a9d760d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType1.js.diff @@ -0,0 +1,8 @@ +--- old.inferringAnyFunctionType1.js ++++ new.inferringAnyFunctionType1.js +@@= skipped -11, +11 lines =@@ + function f(p) { + return p; + } +-var v = f([function (x) { return x; }]); ++var v = f([x => x]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType2.js.diff b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType2.js.diff new file mode 100644 index 0000000000..7b052dd3d8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType2.js.diff @@ -0,0 +1,8 @@ +--- old.inferringAnyFunctionType2.js ++++ new.inferringAnyFunctionType2.js +@@= skipped -10, +10 lines =@@ + function f(p) { + return p; + } +-var v = f([function (x) { return x; }]); ++var v = f([x => x]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType3.js.diff b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType3.js.diff new file mode 100644 index 0000000000..2c1102f969 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType3.js.diff @@ -0,0 +1,8 @@ +--- old.inferringAnyFunctionType3.js ++++ new.inferringAnyFunctionType3.js +@@= skipped -10, +10 lines =@@ + function f(p) { + return p; + } +-var v = f([function (x) { return x; }]); ++var v = f([x => x]); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType4.js.diff b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType4.js.diff new file mode 100644 index 0000000000..1b735f1604 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType4.js.diff @@ -0,0 +1,8 @@ +--- old.inferringAnyFunctionType4.js ++++ new.inferringAnyFunctionType4.js +@@= skipped -10, +10 lines =@@ + function f(p) { + return p; + } +-var v = f(function (x) { return x; }); ++var v = f(x => x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType5.js.diff b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType5.js.diff new file mode 100644 index 0000000000..df215a09e8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringAnyFunctionType5.js.diff @@ -0,0 +1,8 @@ +--- old.inferringAnyFunctionType5.js ++++ new.inferringAnyFunctionType5.js +@@= skipped -10, +10 lines =@@ + function f(p) { + return p; + } +-var v = f({ q: function (x) { return x; } }); ++var v = f({ q: x => x }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inferringReturnTypeFromConstructSignatureGeneric.js.diff b/testdata/baselines/reference/submodule/compiler/inferringReturnTypeFromConstructSignatureGeneric.js.diff new file mode 100644 index 0000000000..a96b933ac0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inferringReturnTypeFromConstructSignatureGeneric.js.diff @@ -0,0 +1,68 @@ +--- old.inferringReturnTypeFromConstructSignatureGeneric.js ++++ new.inferringReturnTypeFromConstructSignatureGeneric.js +@@= skipped -36, +36 lines =@@ + + + //// [inferringReturnTypeFromConstructSignatureGeneric.js] +-var GenericObject = /** @class */ (function () { +- function GenericObject() { +- } +- GenericObject.prototype.give = function (value) { +- return value; +- }; +- return GenericObject; +-}()); +-var GenericNumber = /** @class */ (function () { +- function GenericNumber() { +- } +- GenericNumber.prototype.give = function (value) { +- return value; +- }; +- return GenericNumber; +-}()); +-var GenericNumberOrString = /** @class */ (function () { +- function GenericNumberOrString() { +- } +- GenericNumberOrString.prototype.give = function (value) { +- return value; +- }; +- return GenericNumberOrString; +-}()); ++class GenericObject { ++ give(value) { ++ return value; ++ } ++} ++class GenericNumber { ++ give(value) { ++ return value; ++ } ++} ++class GenericNumberOrString { ++ give(value) { ++ return value; ++ } ++} + function g(type) { + return new type(); + } +-var g1 = g(GenericObject); ++const g1 = g(GenericObject); + g1.give({}); +-var g2 = g(GenericNumber); ++const g2 = g(GenericNumber); + g2.give(1); +-var g3 = g(GenericNumberOrString); ++const g3 = g(GenericNumberOrString); + g3.give(1); + g3.give('1'); + // repro from #35636 +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var g4 = g(C); ++class C { ++} ++const g4 = g(C); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff index bccf326f67..3814e4fa3e 100644 --- a/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff +++ b/testdata/baselines/reference/submodule/compiler/infiniteConstraints.js.diff @@ -6,5 +6,11 @@ "use strict"; -// Both of the following types trigger the recursion limiter in getImmediateBaseConstraint Object.defineProperty(exports, "__esModule", { value: true }); - const out = myBug({ obj1: { a: "test" } }); - const noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") }); \ No newline at end of file +-var out = myBug({ obj1: { a: "test" } }); +-var noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") }); +-var shouldBeNoError = ensureNoDuplicates({ main: value("test") }); +-var shouldBeError = ensureNoDuplicates({ main: value("dup"), alternate: value("dup") }); ++const out = myBug({ obj1: { a: "test" } }); ++const noError = ensureNoDuplicates({ main: value("test"), alternate: value("test2") }); ++const shouldBeNoError = ensureNoDuplicates({ main: value("test") }); ++const shouldBeError = ensureNoDuplicates({ main: value("dup"), alternate: value("dup") }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.js.diff index 10412b7bbd..8696a84ba6 100644 --- a/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.js.diff +++ b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.js.diff @@ -1,16 +1,42 @@ --- old.infinitelyExpandingOverloads.js +++ new.infinitelyExpandingOverloads.js -@@= skipped -29, +29 lines =@@ +@@= skipped -28, +28 lines =@@ + } //// [infinitelyExpandingOverloads.js] - class Validator2 { -+ _subscription; - } - class ViewModel { -- constructor() { +-var Validator2 = /** @class */ (function () { +- function Validator2() { +- } +- return Validator2; +-}()); +-var ViewModel = /** @class */ (function () { +- function ViewModel() { - this.validationPlacements = new Array(); - } +- return ViewModel; +-}()); +-var Widget = /** @class */ (function () { +- function Widget(viewModelType) { +- } +- Object.defineProperty(Widget.prototype, "options", { +- get: function () { +- return null; +- }, +- enumerable: false, +- configurable: true +- }); +- return Widget; +-}()); ++class Validator2 { ++ _subscription; ++} ++class ViewModel { + validationPlacements = new Array(); - } - class Widget { - constructor(viewModelType) { \ No newline at end of file ++} ++class Widget { ++ constructor(viewModelType) { ++ } ++ get options() { ++ return null; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.symbols.diff b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.symbols.diff new file mode 100644 index 0000000000..de6de0ec70 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingOverloads.symbols.diff @@ -0,0 +1,15 @@ +--- old.infinitelyExpandingOverloads.symbols ++++ new.infinitelyExpandingOverloads.symbols +@@= skipped -58, +58 lines =@@ + + public validationPlacements: Array> = new Array>(); + >validationPlacements : Symbol(ViewModel.validationPlacements, Decl(infinitelyExpandingOverloads.ts, 15, 25)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >ValidationPlacement2 : Symbol(ValidationPlacement2, Decl(infinitelyExpandingOverloads.ts, 5, 1)) + >TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 15, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >ValidationPlacement2 : Symbol(ValidationPlacement2, Decl(infinitelyExpandingOverloads.ts, 5, 1)) + >TValue : Symbol(TValue, Decl(infinitelyExpandingOverloads.ts, 15, 16)) + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/infinitelyExpandingTypesNonGenericBase.js.diff b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingTypesNonGenericBase.js.diff index 6370cdf603..73b6bb4dc1 100644 --- a/testdata/baselines/reference/submodule/compiler/infinitelyExpandingTypesNonGenericBase.js.diff +++ b/testdata/baselines/reference/submodule/compiler/infinitelyExpandingTypesNonGenericBase.js.diff @@ -1,15 +1,49 @@ --- old.infinitelyExpandingTypesNonGenericBase.js +++ new.infinitelyExpandingTypesNonGenericBase.js -@@= skipped -27, +27 lines =@@ +@@= skipped -26, +26 lines =@@ + //// [infinitelyExpandingTypesNonGenericBase.js] - class Functionality { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Functionality = /** @class */ (function () { +- function Functionality() { +- } +- return Functionality; +-}()); +-var Base = /** @class */ (function () { +- function Base() { +- } +- return Base; +-}()); +-var A = /** @class */ (function (_super) { +- __extends(A, _super); +- function A() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A; +-}(Base)); ++class Functionality { + property; - } - class Base { - } - class A extends Base { ++} ++class Base { ++} ++class A extends Base { + options; - } ++} function o(type) { - } \ No newline at end of file + } + o(A); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritFromGenericTypeParameter.js.diff b/testdata/baselines/reference/submodule/compiler/inheritFromGenericTypeParameter.js.diff new file mode 100644 index 0000000000..fe72624345 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritFromGenericTypeParameter.js.diff @@ -0,0 +1,30 @@ +--- old.inheritFromGenericTypeParameter.js ++++ new.inheritFromGenericTypeParameter.js +@@= skipped -4, +4 lines =@@ + interface I extends T { } + + //// [inheritFromGenericTypeParameter.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(T)); ++class C extends T { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.js.diff b/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.js.diff index 91045dc88f..3c3b663686 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromDifferentOrigins.js.diff @@ -1,11 +1,22 @@ --- old.inheritSameNamePrivatePropertiesFromDifferentOrigins.js +++ new.inheritSameNamePrivatePropertiesFromDifferentOrigins.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + } //// [inheritSameNamePrivatePropertiesFromDifferentOrigins.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C { + x; - } - class C2 { ++} ++class C2 { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromSameOrigin.js.diff b/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromSameOrigin.js.diff index a4bcd08fe6..fc9b0f0475 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromSameOrigin.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritSameNamePrivatePropertiesFromSameOrigin.js.diff @@ -1,10 +1,47 @@ --- old.inheritSameNamePrivatePropertiesFromSameOrigin.js +++ new.inheritSameNamePrivatePropertiesFromSameOrigin.js -@@= skipped -13, +13 lines =@@ +@@= skipped -12, +12 lines =@@ + } //// [inheritSameNamePrivatePropertiesFromSameOrigin.js] - class B { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B = /** @class */ (function () { +- function B() { +- } +- return B; +-}()); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(B)); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C2; +-}(B)); ++class B { + x; - } - class C extends B { - } \ No newline at end of file ++} ++class C extends B { ++} ++class C2 extends B { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritSameNamePropertiesWithDifferentVisibility.js.diff b/testdata/baselines/reference/submodule/compiler/inheritSameNamePropertiesWithDifferentVisibility.js.diff index 048b9c927e..6411b3e46e 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritSameNamePropertiesWithDifferentVisibility.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritSameNamePropertiesWithDifferentVisibility.js.diff @@ -1,11 +1,22 @@ --- old.inheritSameNamePropertiesWithDifferentVisibility.js +++ new.inheritSameNamePropertiesWithDifferentVisibility.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + } //// [inheritSameNamePropertiesWithDifferentVisibility.js] - class C { +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); ++class C { + x; - } - class C2 { ++} ++class C2 { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritance.js.diff b/testdata/baselines/reference/submodule/compiler/inheritance.js.diff index 2fcf118ba6..e657223681 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritance.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritance.js.diff @@ -1,29 +1,97 @@ --- old.inheritance.js +++ new.inheritance.js -@@= skipped -37, +37 lines =@@ +@@= skipped -36, +36 lines =@@ + //// [inheritance.js] - class B1 { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var B1 = /** @class */ (function () { +- function B1() { +- } +- return B1; +-}()); +-var B2 = /** @class */ (function () { +- function B2() { +- } +- return B2; +-}()); +-var D1 = /** @class */ (function (_super) { +- __extends(D1, _super); +- function D1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D1; +-}(B1)); +-var D2 = /** @class */ (function (_super) { +- __extends(D2, _super); +- function D2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D2; +-}(B2)); +-var N = /** @class */ (function () { +- function N() { +- } +- return N; +-}()); +-var ND = /** @class */ (function (_super) { +- __extends(ND, _super); +- function ND() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ND; +-}(N)); +-var Good = /** @class */ (function () { +- function Good() { +- this.f = function () { return 0; }; +- } +- Good.prototype.g = function () { return 0; }; +- return Good; +-}()); +-var Baad = /** @class */ (function (_super) { +- __extends(Baad, _super); +- function Baad() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Baad.prototype.f = function () { return 0; }; +- Baad.prototype.g = function (n) { return 0; }; +- return Baad; +-}(Good)); ++class B1 { + x; - } - class B2 { ++} ++class B2 { + x; - } - class D1 extends B1 { - } - class D2 extends B2 { - } - class N { ++} ++class D1 extends B1 { ++} ++class D2 extends B2 { ++} ++class N { + y; - } - class ND extends N { ++} ++class ND extends N { + y; - } - class Good { -- constructor() { -- this.f = function () { return 0; }; -- } ++} ++class Good { + f = function () { return 0; }; - g() { return 0; } - } - class Baad extends Good { \ No newline at end of file ++ g() { return 0; } ++} ++class Baad extends Good { ++ f() { return 0; } ++ g(n) { return 0; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritance1.js.diff b/testdata/baselines/reference/submodule/compiler/inheritance1.js.diff index 4f41828894..eaaec4c856 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritance1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritance1.js.diff @@ -1,10 +1,90 @@ --- old.inheritance1.js +++ new.inheritance1.js -@@= skipped -64, +64 lines =@@ +@@= skipped -63, +63 lines =@@ + l1 = c; //// [inheritance1.js] - class Control { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Control = /** @class */ (function () { +- function Control() { +- } +- return Control; +-}()); +-var Button = /** @class */ (function (_super) { +- __extends(Button, _super); +- function Button() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Button.prototype.select = function () { }; +- return Button; +-}(Control)); +-var TextBox = /** @class */ (function (_super) { +- __extends(TextBox, _super); +- function TextBox() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- TextBox.prototype.select = function () { }; +- return TextBox; +-}(Control)); +-var ImageBase = /** @class */ (function (_super) { +- __extends(ImageBase, _super); +- function ImageBase() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ImageBase; +-}(Control)); +-var Image1 = /** @class */ (function (_super) { +- __extends(Image1, _super); +- function Image1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Image1; +-}(Control)); +-var Locations = /** @class */ (function () { +- function Locations() { +- } +- Locations.prototype.select = function () { }; +- return Locations; +-}()); +-var Locations1 = /** @class */ (function () { +- function Locations1() { +- } +- Locations1.prototype.select = function () { }; +- return Locations1; +-}()); ++class Control { + state; - } - class Button extends Control { - select() { } \ No newline at end of file ++} ++class Button extends Control { ++ select() { } ++} ++class TextBox extends Control { ++ select() { } ++} ++class ImageBase extends Control { ++} ++class Image1 extends Control { ++} ++class Locations { ++ select() { } ++} ++class Locations1 { ++ select() { } ++} + var sc; + var c; + var b; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollision.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollision.js.diff new file mode 100644 index 0000000000..0538af104c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollision.js.diff @@ -0,0 +1,50 @@ +--- old.inheritanceGrandParentPrivateMemberCollision.js ++++ new.inheritanceGrandParentPrivateMemberCollision.js +@@= skipped -12, +12 lines =@@ + + + //// [inheritanceGrandParentPrivateMemberCollision.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.myMethod = function () { }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C.prototype.myMethod = function () { }; +- return C; +-}(B)); ++class A { ++ myMethod() { } ++} ++class B extends A { ++} ++class C extends B { ++ myMethod() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js.diff new file mode 100644 index 0000000000..427995b3f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js.diff @@ -0,0 +1,50 @@ +--- old.inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js ++++ new.inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js +@@= skipped -12, +12 lines =@@ + + + //// [inheritanceGrandParentPrivateMemberCollisionWithPublicMember.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.myMethod = function () { }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C.prototype.myMethod = function () { }; +- return C; +-}(B)); ++class A { ++ myMethod() { } ++} ++class B extends A { ++} ++class C extends B { ++ myMethod() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js.diff new file mode 100644 index 0000000000..e688487920 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js.diff @@ -0,0 +1,50 @@ +--- old.inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js ++++ new.inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js +@@= skipped -12, +12 lines =@@ + + + //// [inheritanceGrandParentPublicMemberCollisionWithPrivateMember.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.myMethod = function () { }; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- C.prototype.myMethod = function () { }; +- return C; +-}(B)); ++class A { ++ myMethod() { } ++} ++class B extends A { ++} ++class C extends B { ++ myMethod() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingAccessor.js.diff new file mode 100644 index 0000000000..160c2e31c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingAccessor.js.diff @@ -0,0 +1,65 @@ +--- old.inheritanceMemberAccessorOverridingAccessor.js ++++ new.inheritanceMemberAccessorOverridingAccessor.js +@@= skipped -19, +19 lines =@@ + } + + //// [inheritanceMemberAccessorOverridingAccessor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a.prototype, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b.prototype, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++class a { ++ get x() { ++ return "20"; ++ } ++ set x(aValue) { ++ } ++} ++class b extends a { ++ get x() { ++ return "20"; ++ } ++ set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingMethod.js.diff new file mode 100644 index 0000000000..1723ea3252 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingMethod.js.diff @@ -0,0 +1,56 @@ +--- old.inheritanceMemberAccessorOverridingMethod.js ++++ new.inheritanceMemberAccessorOverridingMethod.js +@@= skipped -16, +16 lines =@@ + } + + //// [inheritanceMemberAccessorOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.prototype.x = function () { ++class a { ++ x() { + return "20"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b.prototype, "x", { +- get: function () { +- return function () { return "20"; }; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++ } ++} ++class b extends a { ++ get x() { ++ return () => "20"; ++ } ++ set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingProperty.js.diff index 72082ed696..f10313bcb3 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberAccessorOverridingProperty.js.diff @@ -1,10 +1,52 @@ --- old.inheritanceMemberAccessorOverridingProperty.js +++ new.inheritanceMemberAccessorOverridingProperty.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + } //// [inheritanceMemberAccessorOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b.prototype, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++class a { + x; - } - class b extends a { - get x() { \ No newline at end of file ++} ++class b extends a { ++ get x() { ++ return "20"; ++ } ++ set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingAccessor.js.diff new file mode 100644 index 0000000000..5a20044b63 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingAccessor.js.diff @@ -0,0 +1,57 @@ +--- old.inheritanceMemberFuncOverridingAccessor.js ++++ new.inheritanceMemberFuncOverridingAccessor.js +@@= skipped -16, +16 lines =@@ + } + + //// [inheritanceMemberFuncOverridingAccessor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a.prototype, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.prototype.x = function () { +- return "20"; +- }; +- return b; +-}(a)); ++class a { ++ get x() { ++ return "20"; ++ } ++ set x(aValue) { ++ } ++} ++class b extends a { ++ x() { ++ return "20"; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingMethod.js.diff new file mode 100644 index 0000000000..9e656c8345 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingMethod.js.diff @@ -0,0 +1,46 @@ +--- old.inheritanceMemberFuncOverridingMethod.js ++++ new.inheritanceMemberFuncOverridingMethod.js +@@= skipped -13, +13 lines =@@ + } + + //// [inheritanceMemberFuncOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.prototype.x = function () { ++class a { ++ x() { + return "10"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- b.prototype.x = function () { ++} ++class b extends a { ++ x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingProperty.js.diff index 75445c5242..902f861557 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberFuncOverridingProperty.js.diff @@ -1,10 +1,43 @@ --- old.inheritanceMemberFuncOverridingProperty.js +++ new.inheritanceMemberFuncOverridingProperty.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + } //// [inheritanceMemberFuncOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.prototype.x = function () { ++class a { + x; - } - class b extends a { - x() { \ No newline at end of file ++} ++class b extends a { ++ x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingAccessor.js.diff index 2c31dbe4d9..274aa5eadb 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingAccessor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingAccessor.js.diff @@ -1,16 +1,55 @@ --- old.inheritanceMemberPropertyOverridingAccessor.js +++ new.inheritanceMemberPropertyOverridingAccessor.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + } //// [inheritanceMemberPropertyOverridingAccessor.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a.prototype, "x", { +- get: function () { +- return this.__x; +- }, +- set: function (aValue) { +- this.__x = aValue; +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { + __x; - get x() { - return this.__x; - } -@@= skipped -8, +9 lines =@@ - } - } - class b extends a { ++ get x() { ++ return this.__x; ++ } ++ set x(aValue) { ++ this.__x = aValue; ++ } ++} ++class b extends a { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingMethod.js.diff index dc2d8f8274..6d543e82f1 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingMethod.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingMethod.js.diff @@ -1,8 +1,42 @@ --- old.inheritanceMemberPropertyOverridingMethod.js +++ new.inheritanceMemberPropertyOverridingMethod.js -@@= skipped -17, +17 lines =@@ - } +@@= skipped -11, +11 lines =@@ } - class b extends a { + + //// [inheritanceMemberPropertyOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.prototype.x = function () { ++class a { ++ x() { + return "20"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return b; +-}(a)); ++} ++class b extends a { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingProperty.js.diff index daf9cca6b4..6c68252996 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceMemberPropertyOverridingProperty.js.diff @@ -1,11 +1,39 @@ --- old.inheritanceMemberPropertyOverridingProperty.js +++ new.inheritanceMemberPropertyOverridingProperty.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [inheritanceMemberPropertyOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { + x; - } - class b extends a { ++} ++class b extends a { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.js.diff new file mode 100644 index 0000000000..dd0355721f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.js.diff @@ -0,0 +1,40 @@ +--- old.inheritanceOfGenericConstructorMethod1.js ++++ new.inheritanceOfGenericConstructorMethod1.js +@@= skipped -9, +9 lines =@@ + + + //// [inheritanceOfGenericConstructorMethod1.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { ++} ++class B extends A { ++} + var a = new A(); + var b1 = new B(); // no error + var b2 = new B(); // no error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.symbols.diff b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.symbols.diff new file mode 100644 index 0000000000..394301e7a8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod1.symbols.diff @@ -0,0 +1,26 @@ +--- old.inheritanceOfGenericConstructorMethod1.symbols ++++ new.inheritanceOfGenericConstructorMethod1.symbols +@@= skipped -13, +13 lines =@@ + var a = new A(); + >a : Symbol(a, Decl(inheritanceOfGenericConstructorMethod1.ts, 2, 3)) + >A : Symbol(A, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 0)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var b1 = new B(); // no error + >b1 : Symbol(b1, Decl(inheritanceOfGenericConstructorMethod1.ts, 3, 3)) +@@= skipped -9, +9 lines =@@ + var b2: B = new B(); // no error + >b2 : Symbol(b2, Decl(inheritanceOfGenericConstructorMethod1.ts, 4, 3)) + >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + var b3 = new B(); // error, could not select overload for 'new' expression + >b3 : Symbol(b3, Decl(inheritanceOfGenericConstructorMethod1.ts, 5, 3)) + >B : Symbol(B, Decl(inheritanceOfGenericConstructorMethod1.ts, 0, 14)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js index 1d58b13be4..08a9fb7c85 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts] //// //// [inheritanceOfGenericConstructorMethod2.ts] -module M { +namespace M { export class C1 { } export class C2 { } } -module N { +namespace N { export class D1 extends M.C1 { } export class D2 extends M.C2 { } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js.diff new file mode 100644 index 0000000000..af103e228a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.js.diff @@ -0,0 +1,64 @@ +--- old.inheritanceOfGenericConstructorMethod2.js ++++ new.inheritanceOfGenericConstructorMethod2.js +@@= skipped -16, +16 lines =@@ + + + //// [inheritanceOfGenericConstructorMethod2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + var M; + (function (M) { +- var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +- }()); ++ class C1 { ++ } + M.C1 = C1; +- var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +- }()); ++ class C2 { ++ } + M.C2 = C2; + })(M || (M = {})); + var N; + (function (N) { +- var D1 = /** @class */ (function (_super) { +- __extends(D1, _super); +- function D1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D1; +- }(M.C1)); ++ class D1 extends M.C1 { ++ } + N.D1 = D1; +- var D2 = /** @class */ (function (_super) { +- __extends(D2, _super); +- function D2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return D2; +- }(M.C2)); ++ class D2 extends M.C2 { ++ } + N.D2 = D2; + })(N || (N = {})); + var c = new M.C2(); // no error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.symbols b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.symbols index cb5ab879b9..a746da5b1f 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.symbols +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts] //// === inheritanceOfGenericConstructorMethod2.ts === -module M { +namespace M { >M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0)) export class C1 { } ->C1 : Symbol(C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10)) +>C1 : Symbol(C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 13)) export class C2 { } >C2 : Symbol(C2, Decl(inheritanceOfGenericConstructorMethod2.ts, 1, 22)) >T : Symbol(T, Decl(inheritanceOfGenericConstructorMethod2.ts, 2, 19)) } -module N { +namespace N { >N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1)) export class D1 extends M.C1 { } ->D1 : Symbol(D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10)) ->M.C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10)) +>D1 : Symbol(D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 13)) +>M.C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 13)) >M : Symbol(M, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 0)) ->C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 10)) +>C1 : Symbol(M.C1, Decl(inheritanceOfGenericConstructorMethod2.ts, 0, 13)) export class D2 extends M.C2 { } >D2 : Symbol(D2, Decl(inheritanceOfGenericConstructorMethod2.ts, 5, 35)) @@ -37,9 +37,9 @@ var c = new M.C2(); // no error var n = new N.D1(); // no error >n : Symbol(n, Decl(inheritanceOfGenericConstructorMethod2.ts, 10, 3)) ->N.D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10)) +>N.D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 13)) >N : Symbol(N, Decl(inheritanceOfGenericConstructorMethod2.ts, 3, 1)) ->D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 10)) +>D1 : Symbol(N.D1, Decl(inheritanceOfGenericConstructorMethod2.ts, 4, 13)) var n2 = new N.D2(); // error >n2 : Symbol(n2, Decl(inheritanceOfGenericConstructorMethod2.ts, 11, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.types b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.types index a4a12fd63f..fcf8170513 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.types +++ b/testdata/baselines/reference/submodule/compiler/inheritanceOfGenericConstructorMethod2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/inheritanceOfGenericConstructorMethod2.ts] //// === inheritanceOfGenericConstructorMethod2.ts === -module M { +namespace M { >M : typeof M export class C1 { } @@ -10,7 +10,7 @@ module M { export class C2 { } >C2 : C2 } -module N { +namespace N { >N : typeof N export class D1 extends M.C1 { } diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingAccessor.js.diff new file mode 100644 index 0000000000..c0b2470318 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingAccessor.js.diff @@ -0,0 +1,65 @@ +--- old.inheritanceStaticAccessorOverridingAccessor.js ++++ new.inheritanceStaticAccessorOverridingAccessor.js +@@= skipped -19, +19 lines =@@ + } + + //// [inheritanceStaticAccessorOverridingAccessor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++class a { ++ static get x() { ++ return "20"; ++ } ++ static set x(aValue) { ++ } ++} ++class b extends a { ++ static get x() { ++ return "20"; ++ } ++ static set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingMethod.js.diff new file mode 100644 index 0000000000..d7c82a1cd5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingMethod.js.diff @@ -0,0 +1,57 @@ +--- old.inheritanceStaticAccessorOverridingMethod.js ++++ new.inheritanceStaticAccessorOverridingMethod.js +@@= skipped -16, +16 lines =@@ + } + + //// [inheritanceStaticAccessorOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.x = function () { +- return "20"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++class a { ++ static x() { ++ return "20"; ++ } ++} ++class b extends a { ++ static get x() { ++ return "20"; ++ } ++ static set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingProperty.js.diff index cf2ed2a431..8c70aca2dc 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticAccessorOverridingProperty.js.diff @@ -1,10 +1,52 @@ --- old.inheritanceStaticAccessorOverridingProperty.js +++ new.inheritanceStaticAccessorOverridingProperty.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + } //// [inheritanceStaticAccessorOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Object.defineProperty(b, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return b; +-}(a)); ++class a { + static x; - } - class b extends a { - static get x() { \ No newline at end of file ++} ++class b extends a { ++ static get x() { ++ return "20"; ++ } ++ static set x(aValue) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessor.js.diff new file mode 100644 index 0000000000..008c54f6eb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessor.js.diff @@ -0,0 +1,57 @@ +--- old.inheritanceStaticFuncOverridingAccessor.js ++++ new.inheritanceStaticFuncOverridingAccessor.js +@@= skipped -16, +16 lines =@@ + } + + //// [inheritanceStaticFuncOverridingAccessor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a, "x", { +- get: function () { +- return "20"; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.x = function () { +- return "20"; +- }; +- return b; +-}(a)); ++class a { ++ static get x() { ++ return "20"; ++ } ++ static set x(aValue) { ++ } ++} ++class b extends a { ++ static x() { ++ return "20"; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.js.diff new file mode 100644 index 0000000000..e30ceb7af9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingAccessorOfFuncType.js.diff @@ -0,0 +1,52 @@ +--- old.inheritanceStaticFuncOverridingAccessorOfFuncType.js ++++ new.inheritanceStaticFuncOverridingAccessorOfFuncType.js +@@= skipped -13, +13 lines =@@ + } + + //// [inheritanceStaticFuncOverridingAccessorOfFuncType.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a, "x", { +- get: function () { +- return null; +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.x = function () { ++class a { ++ static get x() { ++ return null; ++ } ++} ++class b extends a { ++ static x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingMethod.js.diff new file mode 100644 index 0000000000..3235ea3e2b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingMethod.js.diff @@ -0,0 +1,46 @@ +--- old.inheritanceStaticFuncOverridingMethod.js ++++ new.inheritanceStaticFuncOverridingMethod.js +@@= skipped -13, +13 lines =@@ + } + + //// [inheritanceStaticFuncOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.x = function () { ++class a { ++ static x() { + return "10"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- b.x = function () { ++} ++class b extends a { ++ static x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingProperty.js.diff index ff982b1966..b8285f93e9 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingProperty.js.diff @@ -1,10 +1,43 @@ --- old.inheritanceStaticFuncOverridingProperty.js +++ new.inheritanceStaticFuncOverridingProperty.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + } //// [inheritanceStaticFuncOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.x = function () { ++class a { + static x; - } - class b extends a { - static x() { \ No newline at end of file ++} ++class b extends a { ++ static x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingPropertyOfFuncType.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingPropertyOfFuncType.js.diff index ab3dc65636..1f74a80783 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingPropertyOfFuncType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFuncOverridingPropertyOfFuncType.js.diff @@ -1,10 +1,43 @@ --- old.inheritanceStaticFuncOverridingPropertyOfFuncType.js +++ new.inheritanceStaticFuncOverridingPropertyOfFuncType.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + } //// [inheritanceStaticFuncOverridingPropertyOfFuncType.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.x = function () { ++class a { + static x; - } - class b extends a { - static x() { \ No newline at end of file ++} ++class b extends a { ++ static x() { + return "20"; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFunctionOverridingInstanceProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFunctionOverridingInstanceProperty.js.diff index 9477742dc4..acc8a8911c 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticFunctionOverridingInstanceProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticFunctionOverridingInstanceProperty.js.diff @@ -1,10 +1,43 @@ --- old.inheritanceStaticFunctionOverridingInstanceProperty.js +++ new.inheritanceStaticFunctionOverridingInstanceProperty.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + } //// [inheritanceStaticFunctionOverridingInstanceProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- b.x = function () { ++class a { + x; - } - class b extends a { - static x() { \ No newline at end of file ++} ++class b extends a { ++ static x() { + return new b().x; +- }; +- return b; +-}(a)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersCompatible.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersCompatible.js.diff index d1d9f489fc..3269ccef32 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersCompatible.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersCompatible.js.diff @@ -1,11 +1,39 @@ --- old.inheritanceStaticMembersCompatible.js +++ new.inheritanceStaticMembersCompatible.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [inheritanceStaticMembersCompatible.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { + static x; - } - class b extends a { ++} ++class b extends a { + static x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersIncompatible.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersIncompatible.js.diff index 433c2c04ae..8767e779f8 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersIncompatible.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticMembersIncompatible.js.diff @@ -1,11 +1,39 @@ --- old.inheritanceStaticMembersIncompatible.js +++ new.inheritanceStaticMembersIncompatible.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [inheritanceStaticMembersIncompatible.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { + static x; - } - class b extends a { ++} ++class b extends a { + static x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingAccessor.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingAccessor.js.diff index 24e8d15fcf..afcfc565bd 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingAccessor.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingAccessor.js.diff @@ -1,8 +1,54 @@ --- old.inheritanceStaticPropertyOverridingAccessor.js +++ new.inheritanceStaticPropertyOverridingAccessor.js -@@= skipped -22, +22 lines =@@ - } +@@= skipped -13, +13 lines =@@ } - class b extends a { + + //// [inheritanceStaticPropertyOverridingAccessor.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- Object.defineProperty(a, "x", { +- get: function () { +- return null; +- ; +- }, +- set: function (aValue) { +- }, +- enumerable: false, +- configurable: true +- }); +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { ++ static get x() { ++ return null; ++ ; ++ } ++ static set x(aValue) { ++ } ++} ++class b extends a { + static x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingMethod.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingMethod.js.diff index 8c9b4b2722..41c881ba35 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingMethod.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingMethod.js.diff @@ -1,8 +1,42 @@ --- old.inheritanceStaticPropertyOverridingMethod.js +++ new.inheritanceStaticPropertyOverridingMethod.js -@@= skipped -17, +17 lines =@@ - } +@@= skipped -11, +11 lines =@@ } - class b extends a { + + //// [inheritanceStaticPropertyOverridingMethod.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- a.x = function () { ++class a { ++ static x() { + return "20"; +- }; +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return b; +-}(a)); ++} ++class b extends a { + static x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingProperty.js.diff b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingProperty.js.diff index bea5240e93..0b42232ad8 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingProperty.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inheritanceStaticPropertyOverridingProperty.js.diff @@ -1,11 +1,39 @@ --- old.inheritanceStaticPropertyOverridingProperty.js +++ new.inheritanceStaticPropertyOverridingProperty.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [inheritanceStaticPropertyOverridingProperty.js] - class a { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var a = /** @class */ (function () { +- function a() { +- } +- return a; +-}()); +-var b = /** @class */ (function (_super) { +- __extends(b, _super); +- function b() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return b; +-}(a)); ++class a { + static x; - } - class b extends a { ++} ++class b extends a { + static x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.js.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.js.diff new file mode 100644 index 0000000000..d0218bffdc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorPropertyContextualType.js.diff @@ -0,0 +1,35 @@ +--- old.inheritedConstructorPropertyContextualType.js ++++ new.inheritedConstructorPropertyContextualType.js +@@= skipped -14, +14 lines =@@ + } + + //// [inheritedConstructorPropertyContextualType.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Assignment = /** @class */ (function (_super) { +- __extends(Assignment, _super); +- function Assignment() { +- var _this = _super.call(this) || this; +- _this.state = { version: 2 }; +- return _this; ++class Assignment extends Base { ++ constructor() { ++ super(); ++ this.state = { version: 2 }; + } +- return Assignment; +-}(Base)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams.js.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams.js.diff new file mode 100644 index 0000000000..b924d7854d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams.js.diff @@ -0,0 +1,45 @@ +--- old.inheritedConstructorWithRestParams.js ++++ new.inheritedConstructorWithRestParams.js +@@= skipped -16, +16 lines =@@ + new Derived(3); + + //// [inheritedConstructorWithRestParams.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Base = /** @class */ (function () { +- function Base() { +- var a = []; +- for (var _i = 0; _i < arguments.length; _i++) { +- a[_i] = arguments[_i]; +- } +- } +- return Base; +-}()); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(Base)); ++class Base { ++ constructor(...a) { } ++} ++class Derived extends Base { ++} + // Ok + new Derived("", ""); + new Derived(""); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams2.js.diff b/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams2.js.diff new file mode 100644 index 0000000000..d0af2600c8 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedConstructorWithRestParams2.js.diff @@ -0,0 +1,58 @@ +--- old.inheritedConstructorWithRestParams2.js ++++ new.inheritedConstructorWithRestParams2.js +@@= skipped -36, +36 lines =@@ + new Derived("", 3, "", ""); + + //// [inheritedConstructorWithRestParams2.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var IBaseBase = /** @class */ (function () { +- function IBaseBase(x) { +- } +- return IBaseBase; +-}()); +-var BaseBase2 = /** @class */ (function () { +- function BaseBase2(x) { +- } +- return BaseBase2; +-}()); +-var Base = /** @class */ (function (_super) { +- __extends(Base, _super); +- function Base() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Base; +-}(BaseBase)); +-var Derived = /** @class */ (function (_super) { +- __extends(Derived, _super); +- function Derived() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Derived; +-}(Base)); ++class IBaseBase { ++ constructor(x) { } ++} ++class BaseBase2 { ++ constructor(x) { } ++} ++class Base extends BaseBase { ++} ++class Derived extends Base { ++} + // Ok + new Derived("", ""); + new Derived("", 3); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.js.diff b/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.js.diff new file mode 100644 index 0000000000..1731979d16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.js.diff @@ -0,0 +1,9 @@ +--- old.inheritedFunctionAssignmentCompatibility.js ++++ new.inheritedFunctionAssignmentCompatibility.js +@@= skipped -11, +11 lines =@@ + + //// [inheritedFunctionAssignmentCompatibility.js] + function fn(cb) { } +-fn(function (a, b) { return true; }); ++fn((a, b) => true); + fn(function (a, b) { return true; }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.symbols.diff b/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.symbols.diff new file mode 100644 index 0000000000..97d9a1786c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedFunctionAssignmentCompatibility.symbols.diff @@ -0,0 +1,11 @@ +--- old.inheritedFunctionAssignmentCompatibility.symbols ++++ new.inheritedFunctionAssignmentCompatibility.symbols +@@= skipped -2, +2 lines =@@ + === inheritedFunctionAssignmentCompatibility.ts === + interface IResultCallback extends Function { } + >IResultCallback : Symbol(IResultCallback, Decl(inheritedFunctionAssignmentCompatibility.ts, 0, 0)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + function fn(cb: IResultCallback) { } + >fn : Symbol(fn, Decl(inheritedFunctionAssignmentCompatibility.ts, 0, 46)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedGenericCallSignature.symbols.diff b/testdata/baselines/reference/submodule/compiler/inheritedGenericCallSignature.symbols.diff new file mode 100644 index 0000000000..dafeb5abe9 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedGenericCallSignature.symbols.diff @@ -0,0 +1,10 @@ +--- old.inheritedGenericCallSignature.symbols ++++ new.inheritedGenericCallSignature.symbols +@@= skipped -34, +34 lines =@@ + var x: I2; + >x : Symbol(x, Decl(inheritedGenericCallSignature.ts, 19, 3)) + >I2 : Symbol(I2, Decl(inheritedGenericCallSignature.ts, 7, 19)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + diff --git a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.errors.txt b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.errors.txt index a5bd20735e..4e222f278f 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.errors.txt @@ -17,7 +17,7 @@ inheritedModuleMembersForClodule.ts(7,7): error TS2417: Class static side 'typeo !!! error TS2417: Type 'number' is not assignable to type 'string'. } - module D { + namespace D { export function foo(): number { return 0; }; diff --git a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js index 6d678092fe..07345b8841 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js +++ b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js @@ -10,7 +10,7 @@ class C { class D extends C { } -module D { +namespace D { export function foo(): number { return 0; }; diff --git a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js.diff b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js.diff new file mode 100644 index 0000000000..f1287cfab7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.js.diff @@ -0,0 +1,62 @@ +--- old.inheritedModuleMembersForClodule.js ++++ new.inheritedModuleMembersForClodule.js +@@= skipped -23, +23 lines =@@ + + + //// [inheritedModuleMembersForClodule.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { +- } +- C.foo = function () { ++class C { ++ static foo() { + return "123"; +- }; +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- return D; +-}(C)); ++} ++class D extends C { ++} + (function (D) { + function foo() { + return 0; +@@= skipped -37, +14 lines =@@ + D.foo = foo; + ; + })(D || (D = {})); +-var E = /** @class */ (function (_super) { +- __extends(E, _super); +- function E() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- E.bar = function () { ++class E extends D { ++ static bar() { + return this.foo(); +- }; +- return E; +-}(D)); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.symbols b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.symbols index 03b8d9c6c3..de30ad3d2f 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.symbols +++ b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.symbols @@ -16,11 +16,11 @@ class D extends C { >C : Symbol(C, Decl(inheritedModuleMembersForClodule.ts, 0, 0)) } -module D { +namespace D { >D : Symbol(D, Decl(inheritedModuleMembersForClodule.ts, 4, 1), Decl(inheritedModuleMembersForClodule.ts, 7, 1)) export function foo(): number { ->foo : Symbol(foo, Decl(inheritedModuleMembersForClodule.ts, 9, 10)) +>foo : Symbol(foo, Decl(inheritedModuleMembersForClodule.ts, 9, 13)) return 0; }; @@ -34,9 +34,9 @@ class E extends D { >bar : Symbol(E.bar, Decl(inheritedModuleMembersForClodule.ts, 15, 19)) return this.foo(); ->this.foo : Symbol(D.foo, Decl(inheritedModuleMembersForClodule.ts, 9, 10)) +>this.foo : Symbol(D.foo, Decl(inheritedModuleMembersForClodule.ts, 9, 13)) >this : Symbol(E, Decl(inheritedModuleMembersForClodule.ts, 13, 1)) ->foo : Symbol(D.foo, Decl(inheritedModuleMembersForClodule.ts, 9, 10)) +>foo : Symbol(D.foo, Decl(inheritedModuleMembersForClodule.ts, 9, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.types b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.types index 3f1b6a6835..3071e5e951 100644 --- a/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.types +++ b/testdata/baselines/reference/submodule/compiler/inheritedModuleMembersForClodule.types @@ -17,7 +17,7 @@ class D extends C { >C : C } -module D { +namespace D { >D : typeof D export function foo(): number { diff --git a/testdata/baselines/reference/submodule/compiler/initializePropertiesWithRenamedLet.js.diff b/testdata/baselines/reference/submodule/compiler/initializePropertiesWithRenamedLet.js.diff new file mode 100644 index 0000000000..ba6716b1f0 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/initializePropertiesWithRenamedLet.js.diff @@ -0,0 +1,26 @@ +--- old.initializePropertiesWithRenamedLet.js ++++ new.initializePropertiesWithRenamedLet.js +@@= skipped -19, +19 lines =@@ + //// [initializePropertiesWithRenamedLet.js] + var x0; + if (true) { +- var x0_1; +- var obj1 = { x0: x0_1 }; +- var obj2 = { x0: x0_1 }; ++ let x0; ++ var obj1 = { x0: x0 }; ++ var obj2 = { x0 }; + } + var x, y, z; + if (true) { +- var x_1 = { x: 0 }.x; +- var y_1 = { y: 0 }.y; +- var z_1; +- (z_1 = { z: 0 }.z); +- (z_1 = { z: 0 }.z); ++ let { x: x } = { x: 0 }; ++ let { y } = { y: 0 }; ++ let z; ++ ({ z: z } = { z: 0 }); ++ ({ z } = { z: 0 }); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.errors.txt.diff new file mode 100644 index 0000000000..b74513a9c6 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.errors.txt.diff @@ -0,0 +1,15 @@ +--- old.initializedDestructuringAssignmentTypes.errors.txt ++++ new.initializedDestructuringAssignmentTypes.errors.txt +@@= skipped -0, +0 lines =@@ +-initializedDestructuringAssignmentTypes.ts(3,3): error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'? ++initializedDestructuringAssignmentTypes.ts(3,3): error TS2339: Property 'toFixed' does not exist on type 'string'. + + + ==== initializedDestructuringAssignmentTypes.ts (1 errors) ==== +@@= skipped -5, +5 lines =@@ + + a.toFixed() + ~~~~~~~ +-!!! error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'? +-!!! related TS2728 lib.es2015.core.d.ts:--:--: 'fixed' is declared here. ++!!! error TS2339: Property 'toFixed' does not exist on type 'string'. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.js.diff b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.js.diff new file mode 100644 index 0000000000..e172a295f4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.js.diff @@ -0,0 +1,9 @@ +--- old.initializedDestructuringAssignmentTypes.js ++++ new.initializedDestructuringAssignmentTypes.js +@@= skipped -5, +5 lines =@@ + a.toFixed() + + //// [initializedDestructuringAssignmentTypes.js] +-var _a = ''.match('') || [], _b = _a[1], a = _b === void 0 ? '' : _b; ++const [, a = ''] = ''.match('') || []; + a.toFixed(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.symbols.diff b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.symbols.diff new file mode 100644 index 0000000000..ee552b8624 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.symbols.diff @@ -0,0 +1,13 @@ +--- old.initializedDestructuringAssignmentTypes.symbols ++++ new.initializedDestructuringAssignmentTypes.symbols +@@= skipped -2, +2 lines =@@ + === initializedDestructuringAssignmentTypes.ts === + const [, a = ''] = ''.match('') || []; + >a : Symbol(a, Decl(initializedDestructuringAssignmentTypes.ts, 0, 8)) +->''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->match : Symbol(String.match, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>''.match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) ++>match : Symbol(String.match, Decl(lib.es5.d.ts, --, --)) + + a.toFixed() + >a : Symbol(a, Decl(initializedDestructuringAssignmentTypes.ts, 0, 8)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.types.diff b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.types.diff index e62ae256bd..740504682b 100644 --- a/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/initializedDestructuringAssignmentTypes.types.diff @@ -1,13 +1,18 @@ --- old.initializedDestructuringAssignmentTypes.types +++ new.initializedDestructuringAssignmentTypes.types -@@= skipped -5, +5 lines =@@ +@@= skipped -1, +1 lines =@@ + + === initializedDestructuringAssignmentTypes.ts === + const [, a = ''] = ''.match('') || []; +-> : undefined + >a : string >'' : "" >''.match('') || [] : RegExpMatchArray | [] >''.match('') : RegExpMatchArray -->''.match : (regexp: string | RegExp) => RegExpMatchArray | null +->''.match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } +>''.match : (regexp: string | RegExp) => RegExpMatchArray >'' : "" -->match : (regexp: string | RegExp) => RegExpMatchArray | null +->match : { (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; } +>match : (regexp: string | RegExp) => RegExpMatchArray >'' : "" >[] : [] diff --git a/testdata/baselines/reference/submodule/compiler/initializerWithThisPropertyAccess.js.diff b/testdata/baselines/reference/submodule/compiler/initializerWithThisPropertyAccess.js.diff index 8148ce045f..ff0a195c62 100644 --- a/testdata/baselines/reference/submodule/compiler/initializerWithThisPropertyAccess.js.diff +++ b/testdata/baselines/reference/submodule/compiler/initializerWithThisPropertyAccess.js.diff @@ -5,50 +5,86 @@ //// [initializerWithThisPropertyAccess.js] -"use strict"; - class A { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var A = /** @class */ (function () { +- function A() { +- var _this = this; +- this.b = this.a; // Error +- this.c = function () { return _this.a; }; +- this.d = (new A()).a; ++class A { + a; + b = this.a; // Error + c = () => this.a; + d = (new A()).a; - constructor() { -- this.b = this.a; // Error -- this.c = () => this.a; -- this.d = (new A()).a; ++ constructor() { this.a = 1; } - } - class B extends A { -- constructor() { -- super(...arguments); -- this.x = this.a; +- return A; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.x = _this.a; +- return _this; - } -+ x = this.a; - } - class C { -- constructor() { +- return B; +-}(A)); +-var C = /** @class */ (function () { +- function C() { - this.b = this.a; - } +- return C; +-}()); ++} ++class B extends A { ++ x = this.a; ++} ++class C { + a; + b = this.a; - } ++} // Repro from #37979 - class Foo { +-var Foo = /** @class */ (function () { +- function Foo() { +- this.barProp = this.bar.prop; ++class Foo { + bar; + barProp = this.bar.prop; - constructor() { -- this.barProp = this.bar.prop; ++ constructor() { this.bar = new Bar(); } - } - class Bar { -- constructor() { +- return Foo; +-}()); +-var Bar = /** @class */ (function () { +- function Bar() { - this.prop = false; - } +- return Bar; +-}()); ++} ++class Bar { + prop = false; - } ++} -@@= skipped -51, +46 lines =@@ + //// [initializerWithThisPropertyAccess.d.ts] +@@= skipped -74, +46 lines =@@ } declare class Foo { private bar; diff --git a/testdata/baselines/reference/submodule/compiler/inlineConditionalHasSimilarAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/inlineConditionalHasSimilarAssignability.js.diff new file mode 100644 index 0000000000..9d1f039fbd --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/inlineConditionalHasSimilarAssignability.js.diff @@ -0,0 +1,19 @@ +--- old.inlineConditionalHasSimilarAssignability.js ++++ new.inlineConditionalHasSimilarAssignability.js +@@= skipped -19, +19 lines =@@ + + //// [inlineConditionalHasSimilarAssignability.js] + function foo(a) { +- var b = 0; ++ const b = 0; + a = b; // ok +- var c = 0; ++ const c = 0; + a = c; +- var d = 0; ++ const d = 0; + a = d; // ok +- var e = 0; ++ const e = 0; + a = e; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/inlinedAliasAssignableToConstraintSameAsAlias.js.diff b/testdata/baselines/reference/submodule/compiler/inlinedAliasAssignableToConstraintSameAsAlias.js.diff index e8e0360474..cbb1be99af 100644 --- a/testdata/baselines/reference/submodule/compiler/inlinedAliasAssignableToConstraintSameAsAlias.js.diff +++ b/testdata/baselines/reference/submodule/compiler/inlinedAliasAssignableToConstraintSameAsAlias.js.diff @@ -1,12 +1,21 @@ --- old.inlinedAliasAssignableToConstraintSameAsAlias.js +++ new.inlinedAliasAssignableToConstraintSameAsAlias.js -@@= skipped -28, +28 lines =@@ +@@= skipped -27, +27 lines =@@ + //// [inlinedAliasAssignableToConstraintSameAsAlias.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.whereRelated = function () { ++class A { + x; + y; + z; - whereRelated() { ++ whereRelated() { return 1; - } \ No newline at end of file +- }; +- return A; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases.errors.txt b/testdata/baselines/reference/submodule/compiler/innerAliases.errors.txt index 5f525bf3d9..3d1be51e5e 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/innerAliases.errors.txt @@ -3,20 +3,20 @@ innerAliases.ts(21,11): error TS2339: Property 'inner' does not exist on type 't ==== innerAliases.ts (2 errors) ==== - module A { - export module B { - export module C { + namespace A { + export namespace B { + export namespace C { export class Class1 {} } } } - module D { + namespace D { import inner = A.B.C; var c1 = new inner.Class1(); - export module E { + export namespace E { export class Class2 {} } } diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases.js b/testdata/baselines/reference/submodule/compiler/innerAliases.js index f30cdd048c..3eb59ac9ee 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases.js +++ b/testdata/baselines/reference/submodule/compiler/innerAliases.js @@ -1,20 +1,20 @@ //// [tests/cases/compiler/innerAliases.ts] //// //// [innerAliases.ts] -module A { - export module B { - export module C { +namespace A { + export namespace B { + export namespace C { export class Class1 {} } } } -module D { +namespace D { import inner = A.B.C; var c1 = new inner.Class1(); - export module E { + export namespace E { export class Class2 {} } } diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases.js.diff b/testdata/baselines/reference/submodule/compiler/innerAliases.js.diff new file mode 100644 index 0000000000..207bbaab21 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerAliases.js.diff @@ -0,0 +1,39 @@ +--- old.innerAliases.js ++++ new.innerAliases.js +@@= skipped -27, +27 lines =@@ + //// [innerAliases.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { +- var C; ++ let C; + (function (C) { +- var Class1 = /** @class */ (function () { +- function Class1() { +- } +- return Class1; +- }()); ++ class Class1 { ++ } + C.Class1 = Class1; + })(C = B.C || (B.C = {})); + })(B = A.B || (A.B = {})); +@@= skipped -17, +14 lines =@@ + (function (D) { + var inner = A.B.C; + var c1 = new inner.Class1(); +- var E; ++ let E; + (function (E) { +- var Class2 = /** @class */ (function () { +- function Class2() { +- } +- return Class2; +- }()); ++ class Class2 { ++ } + E.Class2 = Class2; + })(E = D.E || (D.E = {})); + })(D || (D = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases.symbols b/testdata/baselines/reference/submodule/compiler/innerAliases.symbols index a0d6e72e04..4437fc6189 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerAliases.symbols @@ -1,41 +1,41 @@ //// [tests/cases/compiler/innerAliases.ts] //// === innerAliases.ts === -module A { +namespace A { >A : Symbol(A, Decl(innerAliases.ts, 0, 0)) - export module B { ->B : Symbol(B, Decl(innerAliases.ts, 0, 10)) + export namespace B { +>B : Symbol(B, Decl(innerAliases.ts, 0, 13)) - export module C { ->C : Symbol(C, Decl(innerAliases.ts, 1, 21)) + export namespace C { +>C : Symbol(C, Decl(innerAliases.ts, 1, 24)) export class Class1 {} ->Class1 : Symbol(Class1, Decl(innerAliases.ts, 2, 25)) +>Class1 : Symbol(Class1, Decl(innerAliases.ts, 2, 28)) } } } -module D { +namespace D { >D : Symbol(D, Decl(innerAliases.ts, 6, 1)) import inner = A.B.C; ->inner : Symbol(inner, Decl(innerAliases.ts, 8, 10)) +>inner : Symbol(inner, Decl(innerAliases.ts, 8, 13)) >A : Symbol(A, Decl(innerAliases.ts, 0, 0)) ->B : Symbol(A.B, Decl(innerAliases.ts, 0, 10)) ->C : Symbol(inner, Decl(innerAliases.ts, 1, 21)) +>B : Symbol(A.B, Decl(innerAliases.ts, 0, 13)) +>C : Symbol(inner, Decl(innerAliases.ts, 1, 24)) var c1 = new inner.Class1(); >c1 : Symbol(c1, Decl(innerAliases.ts, 11, 7)) ->inner.Class1 : Symbol(inner.Class1, Decl(innerAliases.ts, 2, 25)) ->inner : Symbol(inner, Decl(innerAliases.ts, 8, 10)) ->Class1 : Symbol(inner.Class1, Decl(innerAliases.ts, 2, 25)) +>inner.Class1 : Symbol(inner.Class1, Decl(innerAliases.ts, 2, 28)) +>inner : Symbol(inner, Decl(innerAliases.ts, 8, 13)) +>Class1 : Symbol(inner.Class1, Decl(innerAliases.ts, 2, 28)) - export module E { + export namespace E { >E : Symbol(E, Decl(innerAliases.ts, 11, 32)) export class Class2 {} ->Class2 : Symbol(Class2, Decl(innerAliases.ts, 13, 21)) +>Class2 : Symbol(Class2, Decl(innerAliases.ts, 13, 24)) } } diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases.types b/testdata/baselines/reference/submodule/compiler/innerAliases.types index ebc314df70..8929cefdd4 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases.types +++ b/testdata/baselines/reference/submodule/compiler/innerAliases.types @@ -1,13 +1,13 @@ //// [tests/cases/compiler/innerAliases.ts] //// === innerAliases.ts === -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B - export module C { + export namespace C { >C : typeof C export class Class1 {} @@ -16,7 +16,7 @@ module A { } } -module D { +namespace D { >D : typeof D import inner = A.B.C; @@ -32,7 +32,7 @@ module D { >inner : typeof inner >Class1 : typeof inner.Class1 - export module E { + export namespace E { >E : typeof E export class Class2 {} diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases2.js b/testdata/baselines/reference/submodule/compiler/innerAliases2.js index c636a32907..4db5916cc2 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases2.js +++ b/testdata/baselines/reference/submodule/compiler/innerAliases2.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/innerAliases2.ts] //// //// [innerAliases2.ts] -module _provider { +namespace _provider { export class UsefulClass { public foo() { } } } -module consumer { +namespace consumer { import provider = _provider; var g:provider.UsefulClass= null; diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases2.js.diff b/testdata/baselines/reference/submodule/compiler/innerAliases2.js.diff new file mode 100644 index 0000000000..1ad6c22118 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerAliases2.js.diff @@ -0,0 +1,19 @@ +--- old.innerAliases2.js ++++ new.innerAliases2.js +@@= skipped -23, +23 lines =@@ + //// [innerAliases2.js] + var _provider; + (function (_provider) { +- var UsefulClass = /** @class */ (function () { +- function UsefulClass() { ++ class UsefulClass { ++ foo() { + } +- UsefulClass.prototype.foo = function () { +- }; +- return UsefulClass; +- }()); ++ } + _provider.UsefulClass = UsefulClass; + })(_provider || (_provider = {})); + var consumer; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases2.symbols b/testdata/baselines/reference/submodule/compiler/innerAliases2.symbols index 4a0587266b..e363910e46 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases2.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerAliases2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/innerAliases2.ts] //// === innerAliases2.ts === -module _provider { +namespace _provider { >_provider : Symbol(_provider, Decl(innerAliases2.ts, 0, 0)) export class UsefulClass { ->UsefulClass : Symbol(UsefulClass, Decl(innerAliases2.ts, 0, 18)) +>UsefulClass : Symbol(UsefulClass, Decl(innerAliases2.ts, 0, 21)) public foo() { >foo : Symbol(UsefulClass.foo, Decl(innerAliases2.ts, 1, 42)) @@ -13,30 +13,30 @@ module _provider { } } -module consumer { +namespace consumer { >consumer : Symbol(consumer, Decl(innerAliases2.ts, 5, 1)) import provider = _provider; ->provider : Symbol(provider, Decl(innerAliases2.ts, 7, 17)) +>provider : Symbol(provider, Decl(innerAliases2.ts, 7, 20)) >_provider : Symbol(provider, Decl(innerAliases2.ts, 0, 0)) var g:provider.UsefulClass= null; >g : Symbol(g, Decl(innerAliases2.ts, 10, 19)) ->provider : Symbol(provider, Decl(innerAliases2.ts, 7, 17)) ->UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 18)) +>provider : Symbol(provider, Decl(innerAliases2.ts, 7, 20)) +>UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 21)) function use():provider.UsefulClass { >use : Symbol(use, Decl(innerAliases2.ts, 10, 49)) ->provider : Symbol(provider, Decl(innerAliases2.ts, 7, 17)) ->UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 18)) +>provider : Symbol(provider, Decl(innerAliases2.ts, 7, 20)) +>UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 21)) var p2:provider.UsefulClass= new provider.UsefulClass(); >p2 : Symbol(p2, Decl(innerAliases2.ts, 13, 35)) ->provider : Symbol(provider, Decl(innerAliases2.ts, 7, 17)) ->UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 18)) ->provider.UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 18)) ->provider : Symbol(provider, Decl(innerAliases2.ts, 7, 17)) ->UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 18)) +>provider : Symbol(provider, Decl(innerAliases2.ts, 7, 20)) +>UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 21)) +>provider.UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 21)) +>provider : Symbol(provider, Decl(innerAliases2.ts, 7, 20)) +>UsefulClass : Symbol(provider.UsefulClass, Decl(innerAliases2.ts, 0, 21)) return p2; >p2 : Symbol(p2, Decl(innerAliases2.ts, 13, 35)) diff --git a/testdata/baselines/reference/submodule/compiler/innerAliases2.types b/testdata/baselines/reference/submodule/compiler/innerAliases2.types index f5a407aac7..2255abbc8f 100644 --- a/testdata/baselines/reference/submodule/compiler/innerAliases2.types +++ b/testdata/baselines/reference/submodule/compiler/innerAliases2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerAliases2.ts] //// === innerAliases2.ts === -module _provider { +namespace _provider { >_provider : typeof _provider export class UsefulClass { @@ -13,7 +13,7 @@ module _provider { } } -module consumer { +namespace consumer { >consumer : typeof consumer import provider = _provider; diff --git a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js index fbd80d6e63..bd7c43027e 100644 --- a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js +++ b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerBoundLambdaEmit.ts] //// //// [innerBoundLambdaEmit.ts] -module M { +namespace M { export class Foo { } var bar = () => { }; diff --git a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js.diff b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js.diff new file mode 100644 index 0000000000..ec40a381d5 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.js.diff @@ -0,0 +1,17 @@ +--- old.innerBoundLambdaEmit.js ++++ new.innerBoundLambdaEmit.js +@@= skipped -13, +13 lines =@@ + //// [innerBoundLambdaEmit.js] + var M; + (function (M) { +- var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +- }()); ++ class Foo { ++ } + M.Foo = Foo; +- var bar = function () { }; ++ var bar = () => { }; + })(M || (M = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols index 272bfb58b1..6c0a30b71b 100644 --- a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/innerBoundLambdaEmit.ts] //// === innerBoundLambdaEmit.ts === -module M { +namespace M { >M : Symbol(M, Decl(innerBoundLambdaEmit.ts, 0, 0)) export class Foo { ->Foo : Symbol(Foo, Decl(innerBoundLambdaEmit.ts, 0, 10)) +>Foo : Symbol(Foo, Decl(innerBoundLambdaEmit.ts, 0, 13)) } var bar = () => { }; >bar : Symbol(bar, Decl(innerBoundLambdaEmit.ts, 3, 7)) @@ -17,6 +17,6 @@ interface Array { toFoo(): M.Foo >toFoo : Symbol(Array.toFoo, Decl(innerBoundLambdaEmit.ts, 5, 20)) >M : Symbol(M, Decl(innerBoundLambdaEmit.ts, 0, 0)) ->Foo : Symbol(M.Foo, Decl(innerBoundLambdaEmit.ts, 0, 10)) +>Foo : Symbol(M.Foo, Decl(innerBoundLambdaEmit.ts, 0, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols.diff b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols.diff new file mode 100644 index 0000000000..6c23b8ef1d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.symbols.diff @@ -0,0 +1,13 @@ +--- old.innerBoundLambdaEmit.symbols ++++ new.innerBoundLambdaEmit.symbols +@@= skipped -10, +10 lines =@@ + >bar : Symbol(bar, Decl(innerBoundLambdaEmit.ts, 3, 7)) + } + interface Array { +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more) +->T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(innerBoundLambdaEmit.ts, 5, 16)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(innerBoundLambdaEmit.ts, 4, 1)) ++>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(innerBoundLambdaEmit.ts, 5, 16)) + + toFoo(): M.Foo + >toFoo : Symbol(Array.toFoo, Decl(innerBoundLambdaEmit.ts, 5, 20)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.types b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.types index c15b7b8d22..9e06345ae6 100644 --- a/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.types +++ b/testdata/baselines/reference/submodule/compiler/innerBoundLambdaEmit.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerBoundLambdaEmit.ts] //// === innerBoundLambdaEmit.ts === -module M { +namespace M { >M : typeof M export class Foo { diff --git a/testdata/baselines/reference/submodule/compiler/innerExtern.js b/testdata/baselines/reference/submodule/compiler/innerExtern.js index b83e6e7b46..05a9229ae9 100644 --- a/testdata/baselines/reference/submodule/compiler/innerExtern.js +++ b/testdata/baselines/reference/submodule/compiler/innerExtern.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/innerExtern.ts] //// //// [innerExtern.ts] -module A { - export declare module BB { +namespace A { + export declare namespace BB { export var Elephant; } - export module B { + export namespace B { export class C { x = BB.Elephant.X; } diff --git a/testdata/baselines/reference/submodule/compiler/innerExtern.js.diff b/testdata/baselines/reference/submodule/compiler/innerExtern.js.diff index 98a92f1e15..d94824273c 100644 --- a/testdata/baselines/reference/submodule/compiler/innerExtern.js.diff +++ b/testdata/baselines/reference/submodule/compiler/innerExtern.js.diff @@ -1,13 +1,21 @@ --- old.innerExtern.js +++ new.innerExtern.js -@@= skipped -20, +20 lines =@@ - let B; +@@= skipped -17, +17 lines =@@ + //// [innerExtern.js] + var A; + (function (A) { +- var B; ++ let B; (function (B) { - class C { -- constructor() { +- var C = /** @class */ (function () { +- function C() { - this.x = BB.Elephant.X; - } +- return C; +- }()); ++ class C { + x = BB.Elephant.X; - } ++ } B.C = C; - })(B = A.B || (A.B = {})); \ No newline at end of file + })(B = A.B || (A.B = {})); + })(A || (A = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/innerExtern.symbols b/testdata/baselines/reference/submodule/compiler/innerExtern.symbols index 440517ebf2..e123805e41 100644 --- a/testdata/baselines/reference/submodule/compiler/innerExtern.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerExtern.symbols @@ -1,25 +1,25 @@ //// [tests/cases/compiler/innerExtern.ts] //// === innerExtern.ts === -module A { +namespace A { >A : Symbol(A, Decl(innerExtern.ts, 0, 0)) - export declare module BB { ->BB : Symbol(BB, Decl(innerExtern.ts, 0, 10)) + export declare namespace BB { +>BB : Symbol(BB, Decl(innerExtern.ts, 0, 13)) export var Elephant; >Elephant : Symbol(Elephant, Decl(innerExtern.ts, 2, 18)) } - export module B { + export namespace B { >B : Symbol(B, Decl(innerExtern.ts, 3, 5)) export class C { ->C : Symbol(C, Decl(innerExtern.ts, 4, 21)) +>C : Symbol(C, Decl(innerExtern.ts, 4, 24)) x = BB.Elephant.X; >x : Symbol(C.x, Decl(innerExtern.ts, 5, 24)) >BB.Elephant : Symbol(BB.Elephant, Decl(innerExtern.ts, 2, 18)) ->BB : Symbol(BB, Decl(innerExtern.ts, 0, 10)) +>BB : Symbol(BB, Decl(innerExtern.ts, 0, 13)) >Elephant : Symbol(BB.Elephant, Decl(innerExtern.ts, 2, 18)) } } diff --git a/testdata/baselines/reference/submodule/compiler/innerExtern.types b/testdata/baselines/reference/submodule/compiler/innerExtern.types index 3978c2c528..957ad5fa4a 100644 --- a/testdata/baselines/reference/submodule/compiler/innerExtern.types +++ b/testdata/baselines/reference/submodule/compiler/innerExtern.types @@ -1,16 +1,16 @@ //// [tests/cases/compiler/innerExtern.ts] //// === innerExtern.ts === -module A { +namespace A { >A : typeof A - export declare module BB { + export declare namespace BB { >BB : typeof BB export var Elephant; >Elephant : any } - export module B { + export namespace B { >B : typeof B export class C { diff --git a/testdata/baselines/reference/submodule/compiler/innerFunc.js b/testdata/baselines/reference/submodule/compiler/innerFunc.js index 41116efabc..db475fa753 100644 --- a/testdata/baselines/reference/submodule/compiler/innerFunc.js +++ b/testdata/baselines/reference/submodule/compiler/innerFunc.js @@ -6,7 +6,7 @@ function salt() { return pepper(); } -module M { +namespace M { export function tungsten() { function oxygen() { return 6; }; return oxygen(); diff --git a/testdata/baselines/reference/submodule/compiler/innerFunc.symbols b/testdata/baselines/reference/submodule/compiler/innerFunc.symbols index c4c8f35117..a0b5b9b7f4 100644 --- a/testdata/baselines/reference/submodule/compiler/innerFunc.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerFunc.symbols @@ -11,11 +11,11 @@ function salt() { >pepper : Symbol(pepper, Decl(innerFunc.ts, 0, 17)) } -module M { +namespace M { >M : Symbol(M, Decl(innerFunc.ts, 3, 1)) export function tungsten() { ->tungsten : Symbol(tungsten, Decl(innerFunc.ts, 5, 10)) +>tungsten : Symbol(tungsten, Decl(innerFunc.ts, 5, 13)) function oxygen() { return 6; }; >oxygen : Symbol(oxygen, Decl(innerFunc.ts, 6, 32)) diff --git a/testdata/baselines/reference/submodule/compiler/innerFunc.types b/testdata/baselines/reference/submodule/compiler/innerFunc.types index eee7dcfd7f..43811ca426 100644 --- a/testdata/baselines/reference/submodule/compiler/innerFunc.types +++ b/testdata/baselines/reference/submodule/compiler/innerFunc.types @@ -13,7 +13,7 @@ function salt() { >pepper : () => number } -module M { +namespace M { >M : typeof M export function tungsten() { diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt b/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt index 1aa62fd7d5..6ff7e61c16 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/innerModExport1.errors.txt @@ -3,7 +3,7 @@ innerModExport1.ts(5,12): error TS1437: Namespace must be given a name. ==== innerModExport1.ts (2 errors) ==== - module Outer { + namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.js b/testdata/baselines/reference/submodule/compiler/innerModExport1.js index c9485c9b81..f5efac7e8b 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.js +++ b/testdata/baselines/reference/submodule/compiler/innerModExport1.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport1.ts] //// //// [innerModExport1.ts] -module Outer { +namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.symbols b/testdata/baselines/reference/submodule/compiler/innerModExport1.symbols index 395bd9f6cc..2c98ac82d7 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerModExport1.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport1.ts] //// === innerModExport1.ts === -module Outer { +namespace Outer { >Outer : Symbol(Outer, Decl(innerModExport1.ts, 0, 0)) // inner mod 1 diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport1.types b/testdata/baselines/reference/submodule/compiler/innerModExport1.types index e0baa87f7c..54f0b78bc6 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport1.types +++ b/testdata/baselines/reference/submodule/compiler/innerModExport1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport1.ts] //// === innerModExport1.ts === -module Outer { +namespace Outer { >Outer : typeof Outer // inner mod 1 diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt b/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt index 8ee2da64c1..1132230b92 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/innerModExport2.errors.txt @@ -6,7 +6,7 @@ innerModExport2.ts(20,7): error TS2551: Property 'NonExportFunc' does not exist ==== innerModExport2.ts (5 errors) ==== - module Outer { + namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.js b/testdata/baselines/reference/submodule/compiler/innerModExport2.js index b6a63a93f4..3720eee5ac 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.js +++ b/testdata/baselines/reference/submodule/compiler/innerModExport2.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport2.ts] //// //// [innerModExport2.ts] -module Outer { +namespace Outer { // inner mod 1 var non_export_var: number; diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.symbols b/testdata/baselines/reference/submodule/compiler/innerModExport2.symbols index 0c6e5fb712..af6dde3eb4 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.symbols +++ b/testdata/baselines/reference/submodule/compiler/innerModExport2.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport2.ts] //// === innerModExport2.ts === -module Outer { +namespace Outer { >Outer : Symbol(Outer, Decl(innerModExport2.ts, 0, 0)) // inner mod 1 diff --git a/testdata/baselines/reference/submodule/compiler/innerModExport2.types b/testdata/baselines/reference/submodule/compiler/innerModExport2.types index 0857e982ec..b4e2bbc051 100644 --- a/testdata/baselines/reference/submodule/compiler/innerModExport2.types +++ b/testdata/baselines/reference/submodule/compiler/innerModExport2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/innerModExport2.ts] //// === innerModExport2.ts === -module Outer { +namespace Outer { >Outer : typeof Outer // inner mod 1 diff --git a/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.symbols.diff b/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.symbols.diff new file mode 100644 index 0000000000..8f5a07f4ec --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.symbols.diff @@ -0,0 +1,21 @@ +--- old.innerTypeArgumentInference.symbols ++++ new.innerTypeArgumentInference.symbols +@@= skipped -1, +1 lines =@@ + + === innerTypeArgumentInference.ts === + interface Generator { (): T; } +->Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --), Decl(innerTypeArgumentInference.ts, 0, 0)) +->T : Symbol(T, Decl(lib.es2015.generator.d.ts, --, --), Decl(innerTypeArgumentInference.ts, 0, 20)) +->T : Symbol(T, Decl(lib.es2015.generator.d.ts, --, --), Decl(innerTypeArgumentInference.ts, 0, 20)) ++>Generator : Symbol(Generator, Decl(innerTypeArgumentInference.ts, 0, 0)) ++>T : Symbol(T, Decl(innerTypeArgumentInference.ts, 0, 20)) ++>T : Symbol(T, Decl(innerTypeArgumentInference.ts, 0, 20)) + + function Generate(func: Generator): U { + >Generate : Symbol(Generate, Decl(innerTypeArgumentInference.ts, 0, 33)) + >U : Symbol(U, Decl(innerTypeArgumentInference.ts, 1, 18)) + >func : Symbol(func, Decl(innerTypeArgumentInference.ts, 1, 21)) +->Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --), Decl(innerTypeArgumentInference.ts, 0, 0)) ++>Generator : Symbol(Generator, Decl(innerTypeArgumentInference.ts, 0, 0)) + >U : Symbol(U, Decl(innerTypeArgumentInference.ts, 1, 18)) + >U : Symbol(U, Decl(innerTypeArgumentInference.ts, 1, 18)) diff --git a/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.types.diff b/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.types.diff new file mode 100644 index 0000000000..074c99f717 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/innerTypeArgumentInference.types.diff @@ -0,0 +1,15 @@ +--- old.innerTypeArgumentInference.types ++++ new.innerTypeArgumentInference.types +@@= skipped -3, +3 lines =@@ + interface Generator { (): T; } + function Generate(func: Generator): U { + >Generate : (func: Generator) => U +->func : Generator ++>func : Generator + + return Generate(func); + >Generate(func) : U + >Generate : (func: Generator) => U +->func : Generator ++>func : Generator + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.js.diff b/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.js.diff index 4419386572..a4570282c6 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.js.diff @@ -4,33 +4,25 @@ //// [instanceAndStaticDeclarations1.js] // from spec --let Point = (() => { -- class Point { -- constructor(x, y) { -- this.x = x; -- this.y = y; -- } -- distance(p) { -- var dx = this.x - p.x; -- var dy = this.y - p.y; -- return Math.sqrt(dx * dx + dy * dy); -- } -- static distance(p1, p2) { return p1.distance(p2); } -- } -- Point.origin = new Point(0, 0); -- return Point; --})(); +-var Point = /** @class */ (function () { +- function Point(x, y) { +class Point { + x; + y; + constructor(x, y) { -+ this.x = x; -+ this.y = y; -+ } + this.x = x; + this.y = y; + } +- Point.prototype.distance = function (p) { + distance(p) { -+ var dx = this.x - p.x; -+ var dy = this.y - p.y; -+ return Math.sqrt(dx * dx + dy * dy); + var dx = this.x - p.x; + var dy = this.y - p.y; + return Math.sqrt(dx * dx + dy * dy); +- }; +- Point.distance = function (p1, p2) { return p1.distance(p2); }; +- Point.origin = new Point(0, 0); +- return Point; +-}()); + } + static origin = new Point(0, 0); + static distance(p1, p2) { return p1.distance(p2); } diff --git a/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.symbols.diff b/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.symbols.diff new file mode 100644 index 0000000000..a7e0c3804d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instanceAndStaticDeclarations1.symbols.diff @@ -0,0 +1,11 @@ +--- old.instanceAndStaticDeclarations1.symbols ++++ new.instanceAndStaticDeclarations1.symbols +@@= skipped -34, +34 lines =@@ + + return Math.sqrt(dx * dx + dy * dy); + >Math.sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >sqrt : Symbol(Math.sqrt, Decl(lib.es5.d.ts, --, --)) + >dx : Symbol(dx, Decl(instanceAndStaticDeclarations1.ts, 5, 11)) + >dx : Symbol(dx, Decl(instanceAndStaticDeclarations1.ts, 5, 11)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.js.diff index a94d32431a..acafaea1ff 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.js.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.js.diff @@ -1,34 +1,142 @@ --- old.instanceOfAssignability.js +++ new.instanceOfAssignability.js -@@= skipped -93, +93 lines =@@ +@@= skipped -91, +91 lines =@@ + + //// [instanceOfAssignability.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); // Derived1 is assignable to, but not a subtype of, Base - class Derived1 { +-var Derived1 = /** @class */ (function () { +- function Derived1() { +- } +- return Derived1; +-}()); ++class Derived1 { + foo; - } ++} // Derived2 is a subtype of Base that is not assignable to Derived1 - class Derived2 { +-var Derived2 = /** @class */ (function () { +- function Derived2() { +- } +- return Derived2; +-}()); +-var Animal = /** @class */ (function () { +- function Animal() { +- } +- return Animal; +-}()); +-var Mammal = /** @class */ (function (_super) { +- __extends(Mammal, _super); +- function Mammal() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Mammal; +-}(Animal)); +-var Giraffe = /** @class */ (function (_super) { +- __extends(Giraffe, _super); +- function Giraffe() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Giraffe; +-}(Mammal)); ++class Derived2 { + foo; + optional; - } - class Animal { ++} ++class Animal { + move; - } - class Mammal extends Animal { ++} ++class Mammal extends Animal { + milk; - } - class Giraffe extends Mammal { ++} ++class Giraffe extends Mammal { + neck; - } ++} function fn1(x) { if (x instanceof Array) { -@@= skipped -60, +66 lines =@@ + // 1.5: y: Array|Array + // Want: y: Array|Array +- var y = x; ++ let y = x; + } + } + function fn2(x) { + if (x instanceof Derived1) { + // 1.5: y: Base + // Want: y: Derived1 +- var y = x; ++ let y = x; + } + } + function fn3(x) { + if (x instanceof Derived2) { + // 1.5: y: Derived2 + // Want: Derived2 +- var y = x; ++ let y = x; } } - class ABC { + function fn4(x) { + if (x instanceof Derived1) { + // 1.5: y: {} + // Want: Derived1 +- var y = x; ++ let y = x; + } + } + function fn5(x) { + if (x instanceof Derived2) { + // 1.5: y: Derived1 + // Want: ??? +- var y = x; ++ let y = x; + } + } + function fn6(x) { + if (x instanceof Giraffe) { + // 1.5: y: Derived1 + // Want: ??? +- var y = x; ++ let y = x; + } + } + function fn7(x) { + if (x instanceof Array) { + // 1.5: y: Array|Array + // Want: y: Array|Array +- var y = x; +- } +-} +-var ABC = /** @class */ (function () { +- function ABC() { +- } +- return ABC; +-}()); ++ let y = x; ++ } ++} ++class ABC { + a; + b; + c; - } ++} function fn8(x) { - if (x instanceof ABC) { \ No newline at end of file + if (x instanceof ABC) { +- var y = x; ++ let y = x; + } + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.symbols.diff b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.symbols.diff new file mode 100644 index 0000000000..58161a760d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.symbols.diff @@ -0,0 +1,34 @@ +--- old.instanceOfAssignability.symbols ++++ new.instanceOfAssignability.symbols +@@= skipped -49, +49 lines =@@ + function fn1(x: Array|Array|boolean) { + >fn1 : Symbol(fn1, Decl(instanceOfAssignability.ts, 19, 38)) + >x : Symbol(x, Decl(instanceOfAssignability.ts, 21, 13)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + if(x instanceof Array) { + >x : Symbol(x, Decl(instanceOfAssignability.ts, 21, 13)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + // 1.5: y: Array|Array + // Want: y: Array|Array +@@= skipped -106, +106 lines =@@ + function fn7(x: Array|Array) { + >fn7 : Symbol(fn7, Decl(instanceOfAssignability.ts, 67, 1)) + >x : Symbol(x, Decl(instanceOfAssignability.ts, 69, 13)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + if(x instanceof Array) { + >x : Symbol(x, Decl(instanceOfAssignability.ts, 69, 13)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + // 1.5: y: Array|Array + // Want: y: Array|Array \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.types.diff b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.types.diff index 33a4692ca5..728293a40b 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.types.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceOfAssignability.types.diff @@ -5,16 +5,47 @@ function fn1(x: Array|Array|boolean) { ->fn1 : (x: Array | Array | boolean) => void +->x : boolean | number[] | string[] +>fn1 : (x: boolean | string[] | number[]) => void - >x : boolean | string[] | number[] ++>x : boolean | string[] | number[] if(x instanceof Array) { + >x instanceof Array : boolean +->x : boolean | number[] | string[] ++>x : boolean | string[] | number[] + >Array : ArrayConstructor + + // 1.5: y: Array|Array + // Want: y: Array|Array + let y = x; +->y : number[] | string[] +->x : number[] | string[] ++>y : string[] | number[] ++>x : string[] | number[] + } + } + @@= skipped -102, +102 lines =@@ } function fn7(x: Array|Array) { ->fn7 : (x: Array | Array) => void +->x : number[] | string[] +>fn7 : (x: string[] | number[]) => void - >x : string[] | number[] ++>x : string[] | number[] - if(x instanceof Array) { \ No newline at end of file + if(x instanceof Array) { + >x instanceof Array : boolean +->x : number[] | string[] ++>x : string[] | number[] + >Array : ArrayConstructor + + // 1.5: y: Array|Array + // Want: y: Array|Array + let y = x; +->y : number[] | string[] +->x : number[] | string[] ++>y : string[] | number[] ++>x : string[] | number[] + } + } diff --git a/testdata/baselines/reference/submodule/compiler/instanceSubtypeCheck2.js.diff b/testdata/baselines/reference/submodule/compiler/instanceSubtypeCheck2.js.diff index 9df8b92812..f147dcae5c 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceSubtypeCheck2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceSubtypeCheck2.js.diff @@ -1,11 +1,39 @@ --- old.instanceSubtypeCheck2.js +++ new.instanceSubtypeCheck2.js -@@= skipped -10, +10 lines =@@ +@@= skipped -9, +9 lines =@@ + } //// [instanceSubtypeCheck2.js] - class C1 { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); +-var C2 = /** @class */ (function (_super) { +- __extends(C2, _super); +- function C2() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C2; +-}(C1)); ++class C1 { + x; - } - class C2 extends C1 { ++} ++class C2 extends C1 { + x; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceofNarrowReadonlyArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/instanceofNarrowReadonlyArray.symbols.diff new file mode 100644 index 0000000000..a8e5648ceb --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instanceofNarrowReadonlyArray.symbols.diff @@ -0,0 +1,11 @@ +--- old.instanceofNarrowReadonlyArray.symbols ++++ new.instanceofNarrowReadonlyArray.symbols +@@= skipped -8, +8 lines =@@ + + if (x instanceof Array) { + >x : Symbol(x, Decl(instanceofNarrowReadonlyArray.ts, 2, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + return x; + >x : Symbol(x, Decl(instanceofNarrowReadonlyArray.ts, 2, 16)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt b/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt index 6f52fab9c0..023c5cdd06 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt @@ -11,7 +11,7 @@ instanceofOperator.ts(21,5): error TS2358: The left-hand side of an 'instanceof' // operand to be of type Any or a subtype of the ‘Function’ interface type. The result is always of the // Boolean primitive type. - module test { + namespace test { class Object { } var obj: Object; diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt.diff index a094b7064b..8923ad7ce6 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.errors.txt.diff @@ -16,7 +16,7 @@ // operand to be of type Any or a subtype of the ‘Function’ interface type. The result is always of the @@= skipped -8, +8 lines =@@ - module test { + namespace test { class Object { } - ~~~~~~ -!!! error TS2725: Class name cannot be 'Object' when targeting ES5 and above with module CommonJS. diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.js b/testdata/baselines/reference/submodule/compiler/instanceofOperator.js index b16bf8bb6e..0bbe9e844b 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofOperator.js +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.js @@ -6,7 +6,7 @@ // operand to be of type Any or a subtype of the ‘Function’ interface type. The result is always of the // Boolean primitive type. -module test { +namespace test { class Object { } var obj: Object; diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.js.diff b/testdata/baselines/reference/submodule/compiler/instanceofOperator.js.diff new file mode 100644 index 0000000000..83e225b6be --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.js.diff @@ -0,0 +1,16 @@ +--- old.instanceofOperator.js ++++ new.instanceofOperator.js +@@= skipped -32, +32 lines =@@ + // Boolean primitive type. + var test; + (function (test) { +- var Object = /** @class */ (function () { +- function Object() { +- } +- return Object; +- }()); ++ class Object { ++ } + var obj; + 4 instanceof null; + // Error and should be error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.symbols b/testdata/baselines/reference/submodule/compiler/instanceofOperator.symbols index fcca138244..a5ec149a69 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofOperator.symbols +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.symbols @@ -6,15 +6,15 @@ // operand to be of type Any or a subtype of the ‘Function’ interface type. The result is always of the // Boolean primitive type. -module test { +namespace test { >test : Symbol(test, Decl(instanceofOperator.ts, 0, 0)) class Object { } ->Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 13)) +>Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 16)) var obj: Object; >obj : Symbol(obj, Decl(instanceofOperator.ts, 7, 7)) ->Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 13)) +>Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 16)) @@ -25,14 +25,14 @@ module test { >obj : Symbol(obj, Decl(instanceofOperator.ts, 7, 7)) Object instanceof obj; ->Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 13)) +>Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 16)) >obj : Symbol(obj, Decl(instanceofOperator.ts, 7, 7)) // Error on left hand side null instanceof null; obj instanceof Object; >obj : Symbol(obj, Decl(instanceofOperator.ts, 7, 7)) ->Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 13)) +>Object : Symbol(Object, Decl(instanceofOperator.ts, 5, 16)) undefined instanceof undefined; >undefined : Symbol(undefined) diff --git a/testdata/baselines/reference/submodule/compiler/instanceofOperator.types b/testdata/baselines/reference/submodule/compiler/instanceofOperator.types index 0e16c59e2c..067577cce1 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofOperator.types +++ b/testdata/baselines/reference/submodule/compiler/instanceofOperator.types @@ -6,7 +6,7 @@ // operand to be of type Any or a subtype of the ‘Function’ interface type. The result is always of the // Boolean primitive type. -module test { +namespace test { >test : typeof test class Object { } diff --git a/testdata/baselines/reference/submodule/compiler/instanceofWithStructurallyIdenticalTypes.js.diff b/testdata/baselines/reference/submodule/compiler/instanceofWithStructurallyIdenticalTypes.js.diff index 512d7e39db..24ba7e0350 100644 --- a/testdata/baselines/reference/submodule/compiler/instanceofWithStructurallyIdenticalTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/instanceofWithStructurallyIdenticalTypes.js.diff @@ -1,32 +1,90 @@ --- old.instanceofWithStructurallyIdenticalTypes.js +++ new.instanceofWithStructurallyIdenticalTypes.js -@@= skipped -74, +74 lines =@@ +@@= skipped -73, +73 lines =@@ + //// [instanceofWithStructurallyIdenticalTypes.js] // Repro from #7271 - class C1 { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); ++class C1 { + item; - } - class C2 { ++} ++class C2 { + item; - } - class C3 { ++} ++class C3 { + item; - } ++} function foo1(x) { if (x instanceof C1) { -@@= skipped -34, +37 lines =@@ + return x.item; +@@= skipped -58, +37 lines =@@ + return "error"; } // More tests - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); +-var A1 = /** @class */ (function (_super) { +- __extends(A1, _super); +- function A1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return A1; +-}(A)); +-var A2 = /** @class */ (function () { +- function A2() { +- } +- return A2; +-}()); +-var B = /** @class */ (function (_super) { +- __extends(B, _super); +- function B() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return B; +-}(A)); ++class A { + a; - } - class A1 extends A { - } - class A2 { ++} ++class A1 extends A { ++} ++class A2 { + a; - } - class B extends A { ++} ++class B extends A { + b; - } ++} function goo(x) { - if (x instanceof A) { \ No newline at end of file + if (x instanceof A) { + x; // A \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiateContextualTypes.types.diff b/testdata/baselines/reference/submodule/compiler/instantiateContextualTypes.types.diff index 91f4e59054..4a1878cb3b 100644 --- a/testdata/baselines/reference/submodule/compiler/instantiateContextualTypes.types.diff +++ b/testdata/baselines/reference/submodule/compiler/instantiateContextualTypes.types.diff @@ -73,4 +73,39 @@ +>createElement2 :

(type: ComponentClass

, child: P extends { children?: infer C | undefined; } ? C extends any[] ? C : C[] : unknown) => any >InferFunctionTypes : typeof InferFunctionTypes >[(foo) => "" + foo] : ((foo: number) => string)[] - >(foo) => "" + foo : (foo: number) => string \ No newline at end of file + >(foo) => "" + foo : (foo: number) => string +@@= skipped -68, +68 lines =@@ + >() : Promise => { return Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'ELSE'; }); } : () => Promise + + return Promise.resolve().then(() => { +->Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'ELSE'; }) : Promise<"SOMETHING" | "ELSE"> ++>Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'ELSE'; }) : Promise<"ELSE" | "SOMETHING"> + >Promise.resolve().then : (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise + >Promise.resolve() : Promise + >Promise.resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } + >Promise : PromiseConstructor + >resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } + >then : (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +->() => { if (1 < 2) { return 'SOMETHING'; } return 'ELSE'; } : () => "SOMETHING" | "ELSE" ++>() => { if (1 < 2) { return 'SOMETHING'; } return 'ELSE'; } : () => "ELSE" | "SOMETHING" + + if (1 < 2) { + >1 < 2 : boolean +@@= skipped -27, +27 lines =@@ + >() : Promise => { return Promise.resolve().then(() => { return 'ELSE'; }); } : () => Promise + + return Promise.resolve().then(() => { +->Promise.resolve().then(() => { return 'ELSE'; }) : Promise<"SOMETHING" | "ELSE"> ++>Promise.resolve().then(() => { return 'ELSE'; }) : Promise<"ELSE" | "SOMETHING"> + >Promise.resolve().then : (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise + >Promise.resolve() : Promise + >Promise.resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } +@@= skipped -19, +19 lines =@@ + >() : Promise => { return Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'SOMETHING'; }); } : () => Promise + + return Promise.resolve().then(() => { +->Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'SOMETHING'; }) : Promise<"SOMETHING" | "ELSE"> ++>Promise.resolve().then(() => { if (1 < 2) { return 'SOMETHING'; } return 'SOMETHING'; }) : Promise<"ELSE" | "SOMETHING"> + >Promise.resolve().then : (onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise + >Promise.resolve() : Promise + >Promise.resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiateContextuallyTypedGenericThis.js.diff b/testdata/baselines/reference/submodule/compiler/instantiateContextuallyTypedGenericThis.js.diff new file mode 100644 index 0000000000..c08822ceae --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instantiateContextuallyTypedGenericThis.js.diff @@ -0,0 +1,13 @@ +--- old.instantiateContextuallyTypedGenericThis.js ++++ new.instantiateContextuallyTypedGenericThis.js +@@= skipped -14, +14 lines =@@ + + + //// [instantiateContextuallyTypedGenericThis.js] +-var $; +-var lines; ++let $; ++let lines; + $.each(lines, function (dit) { + return dit.charAt(0) + this.charAt(1); + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiateCrossFileMerge.js.diff b/testdata/baselines/reference/submodule/compiler/instantiateCrossFileMerge.js.diff new file mode 100644 index 0000000000..db6a012395 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instantiateCrossFileMerge.js.diff @@ -0,0 +1,8 @@ +--- old.instantiateCrossFileMerge.js ++++ new.instantiateCrossFileMerge.js +@@= skipped -11, +11 lines =@@ + + //// [first.js] + //// [second.js] +-new P(function (r) { r('foo'); }); ++new P(r => { r('foo'); }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiatedBaseTypeConstraints.js.diff b/testdata/baselines/reference/submodule/compiler/instantiatedBaseTypeConstraints.js.diff new file mode 100644 index 0000000000..58a95b193e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instantiatedBaseTypeConstraints.js.diff @@ -0,0 +1,16 @@ +--- old.instantiatedBaseTypeConstraints.js ++++ new.instantiatedBaseTypeConstraints.js +@@= skipped -13, +13 lines =@@ + + + //// [instantiatedBaseTypeConstraints.js] +-var Bar = /** @class */ (function () { +- function Bar() { ++class Bar { ++ foo(bar) { + } +- Bar.prototype.foo = function (bar) { +- }; +- return Bar; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiatedReturnTypeContravariance.js.diff b/testdata/baselines/reference/submodule/compiler/instantiatedReturnTypeContravariance.js.diff new file mode 100644 index 0000000000..ca974f316d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instantiatedReturnTypeContravariance.js.diff @@ -0,0 +1,49 @@ +--- old.instantiatedReturnTypeContravariance.js ++++ new.instantiatedReturnTypeContravariance.js +@@= skipped -32, +32 lines =@@ + + + //// [instantiatedReturnTypeContravariance.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function () { +- return null; +- }; +- return c; +-}()); +-var d = /** @class */ (function (_super) { +- __extends(d, _super); +- function d() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- d.prototype.foo = function () { +- return null; +- }; +- return d; +-}(c)); ++class c { ++ foo() { ++ return null; ++ } ++} ++class d extends c { ++ foo() { ++ return null; ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiatedTypeAliasDisplay.js.diff b/testdata/baselines/reference/submodule/compiler/instantiatedTypeAliasDisplay.js.diff index d53a7d7398..794c6e58b3 100644 --- a/testdata/baselines/reference/submodule/compiler/instantiatedTypeAliasDisplay.js.diff +++ b/testdata/baselines/reference/submodule/compiler/instantiatedTypeAliasDisplay.js.diff @@ -5,5 +5,10 @@ //// [instantiatedTypeAliasDisplay.js] -// Repros from #12066 - const x1 = f1(); // Z - const x2 = f2({}, {}, {}, {}); // Z<{}, string[]> +-var x1 = f1(); // Z +-var x2 = f2({}, {}, {}, {}); // Z<{}, string[]> ++const x1 = f1(); // Z ++const x2 = f2({}, {}, {}, {}); // Z<{}, string[]> + + + //// [instantiatedTypeAliasDisplay.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/instantiationExpressionErrorNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/instantiationExpressionErrorNoCrash.js.diff new file mode 100644 index 0000000000..35895b1539 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/instantiationExpressionErrorNoCrash.js.diff @@ -0,0 +1,20 @@ +--- old.instantiationExpressionErrorNoCrash.js ++++ new.instantiationExpressionErrorNoCrash.js +@@= skipped -21, +21 lines =@@ + //// [instantiationExpressionErrorNoCrash.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var createCacheReducer = function (queries) { +- var queriesMap = {}; +- var initialState = { ++const createCacheReducer = (queries) => { ++ const queriesMap = {}; ++ const initialState = { + queries: queriesMap, + }; +- return function (state) { +- if (state === void 0) { state = initialState; } +- return state; +- }; ++ return (state = initialState) => state; + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intTypeCheck.js.diff b/testdata/baselines/reference/submodule/compiler/intTypeCheck.js.diff new file mode 100644 index 0000000000..856b9a0358 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/intTypeCheck.js.diff @@ -0,0 +1,18 @@ +--- old.intTypeCheck.js ++++ new.intTypeCheck.js +@@= skipped -207, +207 lines =@@ + var obj87: i8 = new {}; + + //// [intTypeCheck.js] +-var Base = /** @class */ (function () { +- function Base() { +- } +- Base.prototype.foo = function () { }; +- return Base; +-}()); ++class Base { ++ foo() { } ++} + var anyVar; + // + // Property signatures \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js index 7876ed4cf1..a519a1f020 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js @@ -1,9 +1,9 @@ //// [tests/cases/compiler/interMixingModulesInterfaces0.ts] //// //// [interMixingModulesInterfaces0.ts] -module A { +namespace A { - export module B { + export namespace B { export function createB(): B { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js.diff new file mode 100644 index 0000000000..385301ce3a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces0.js ++++ new.interMixingModulesInterfaces0.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces0.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.symbols index d2badc2e29..bbf49d5870 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/interMixingModulesInterfaces0.ts] //// === interMixingModulesInterfaces0.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces0.ts, 0, 0)) - export module B { ->B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) + export namespace B { +>B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) export function createB(): B { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces0.ts, 2, 21)) ->B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces0.ts, 2, 24)) +>B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) return null; } } export interface B { ->B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) +>B : Symbol(B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) name: string; >name : Symbol(B.name, Decl(interMixingModulesInterfaces0.ts, 8, 24)) @@ -29,10 +29,10 @@ module A { var x: A.B = A.B.createB(); >x : Symbol(x, Decl(interMixingModulesInterfaces0.ts, 14, 3)) >A : Symbol(A, Decl(interMixingModulesInterfaces0.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) ->A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces0.ts, 2, 21)) ->A.B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) +>A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces0.ts, 2, 24)) +>A.B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) >A : Symbol(A, Decl(interMixingModulesInterfaces0.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 10), Decl(interMixingModulesInterfaces0.ts, 6, 5)) ->createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces0.ts, 2, 21)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces0.ts, 0, 13), Decl(interMixingModulesInterfaces0.ts, 6, 5)) +>createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces0.ts, 2, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.types index 9cf537144b..14e1a30f7e 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces0.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/interMixingModulesInterfaces0.ts] //// === interMixingModulesInterfaces0.ts === -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B export function createB(): B { diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js index 5f1072b5e1..17e32d46ed 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/interMixingModulesInterfaces1.ts] //// //// [interMixingModulesInterfaces1.ts] -module A { +namespace A { export interface B { name: string; value: number; } - export module B { + export namespace B { export function createB(): B { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js.diff new file mode 100644 index 0000000000..bb907000e4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces1.js ++++ new.interMixingModulesInterfaces1.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces1.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.symbols index 4dc0c5aea9..0be5945408 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interMixingModulesInterfaces1.ts] //// === interMixingModulesInterfaces1.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces1.ts, 0, 0)) export interface B { ->B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) +>B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) name: string; >name : Symbol(B.name, Decl(interMixingModulesInterfaces1.ts, 2, 24)) @@ -14,12 +14,12 @@ module A { >value : Symbol(B.value, Decl(interMixingModulesInterfaces1.ts, 3, 21)) } - export module B { ->B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) + export namespace B { +>B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) export function createB(): B { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces1.ts, 7, 21)) ->B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces1.ts, 7, 24)) +>B : Symbol(B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) return null; } @@ -29,10 +29,10 @@ module A { var x: A.B = A.B.createB(); >x : Symbol(x, Decl(interMixingModulesInterfaces1.ts, 14, 3)) >A : Symbol(A, Decl(interMixingModulesInterfaces1.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) ->A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces1.ts, 7, 21)) ->A.B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) +>A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces1.ts, 7, 24)) +>A.B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) >A : Symbol(A, Decl(interMixingModulesInterfaces1.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 10), Decl(interMixingModulesInterfaces1.ts, 5, 5)) ->createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces1.ts, 7, 21)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces1.ts, 0, 13), Decl(interMixingModulesInterfaces1.ts, 5, 5)) +>createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces1.ts, 7, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.types index b26d50c5a4..23b8808086 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces1.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/interMixingModulesInterfaces1.ts] //// === interMixingModulesInterfaces1.ts === -module A { +namespace A { >A : typeof A export interface B { @@ -12,7 +12,7 @@ module A { >value : number } - export module B { + export namespace B { >B : typeof B export function createB(): B { diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js index 099b794efc..f591238b0e 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/interMixingModulesInterfaces2.ts] //// //// [interMixingModulesInterfaces2.ts] -module A { +namespace A { export interface B { name: string; value: number; } - module B { + namespace B { export function createB(): B { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js.diff new file mode 100644 index 0000000000..d5fac5703f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces2.js ++++ new.interMixingModulesInterfaces2.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces2.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.symbols index 17d13eabe8..509d3d9f9f 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interMixingModulesInterfaces2.ts] //// === interMixingModulesInterfaces2.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces2.ts, 0, 0)) export interface B { ->B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 10)) +>B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 13)) name: string; >name : Symbol(A.B.name, Decl(interMixingModulesInterfaces2.ts, 2, 24)) @@ -14,12 +14,12 @@ module A { >value : Symbol(A.B.value, Decl(interMixingModulesInterfaces2.ts, 3, 21)) } - module B { ->B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 10), Decl(interMixingModulesInterfaces2.ts, 5, 5)) + namespace B { +>B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 13), Decl(interMixingModulesInterfaces2.ts, 5, 5)) export function createB(): B { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces2.ts, 7, 14)) ->B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 10)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces2.ts, 7, 17)) +>B : Symbol(B, Decl(interMixingModulesInterfaces2.ts, 0, 13)) return null; } @@ -29,5 +29,5 @@ module A { var x: A.B = null; >x : Symbol(x, Decl(interMixingModulesInterfaces2.ts, 14, 3)) >A : Symbol(A, Decl(interMixingModulesInterfaces2.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces2.ts, 0, 10)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces2.ts, 0, 13)) diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.types index 9ced096ba5..efefc7c4d0 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/interMixingModulesInterfaces2.ts] //// === interMixingModulesInterfaces2.ts === -module A { +namespace A { >A : typeof A export interface B { @@ -12,7 +12,7 @@ module A { >value : number } - module B { + namespace B { >B : typeof B export function createB(): B { diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js index 13f576dd1c..2fca60f5cc 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js @@ -1,9 +1,9 @@ //// [tests/cases/compiler/interMixingModulesInterfaces3.ts] //// //// [interMixingModulesInterfaces3.ts] -module A { +namespace A { - module B { + namespace B { export function createB(): B { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js.diff new file mode 100644 index 0000000000..89aa6686a3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces3.js ++++ new.interMixingModulesInterfaces3.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces3.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.symbols index cff762b4c5..df6f97d749 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/interMixingModulesInterfaces3.ts] //// === interMixingModulesInterfaces3.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces3.ts, 0, 0)) - module B { ->B : Symbol(B, Decl(interMixingModulesInterfaces3.ts, 0, 10), Decl(interMixingModulesInterfaces3.ts, 6, 5)) + namespace B { +>B : Symbol(B, Decl(interMixingModulesInterfaces3.ts, 0, 13), Decl(interMixingModulesInterfaces3.ts, 6, 5)) export function createB(): B { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces3.ts, 2, 14)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces3.ts, 2, 17)) >B : Symbol(B, Decl(interMixingModulesInterfaces3.ts, 6, 5)) return null; diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.types index 6d6f72b960..e1f35e4fa5 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces3.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/interMixingModulesInterfaces3.ts] //// === interMixingModulesInterfaces3.ts === -module A { +namespace A { >A : typeof A - module B { + namespace B { >B : typeof B export function createB(): B { diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js index 6c3b42ecad..2ba6f69cef 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js @@ -1,9 +1,9 @@ //// [tests/cases/compiler/interMixingModulesInterfaces4.ts] //// //// [interMixingModulesInterfaces4.ts] -module A { +namespace A { - export module B { + export namespace B { export function createB(): number { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js.diff new file mode 100644 index 0000000000..0cfe3721df --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces4.js ++++ new.interMixingModulesInterfaces4.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces4.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.symbols index 874b918456..d1c9be9001 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.symbols @@ -1,21 +1,21 @@ //// [tests/cases/compiler/interMixingModulesInterfaces4.ts] //// === interMixingModulesInterfaces4.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces4.ts, 0, 0)) - export module B { ->B : Symbol(B, Decl(interMixingModulesInterfaces4.ts, 0, 10)) + export namespace B { +>B : Symbol(B, Decl(interMixingModulesInterfaces4.ts, 0, 13)) export function createB(): number { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces4.ts, 2, 21)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces4.ts, 2, 24)) return null; } } interface B { ->B : Symbol(B, Decl(interMixingModulesInterfaces4.ts, 0, 10), Decl(interMixingModulesInterfaces4.ts, 6, 5)) +>B : Symbol(B, Decl(interMixingModulesInterfaces4.ts, 0, 13), Decl(interMixingModulesInterfaces4.ts, 6, 5)) name: string; >name : Symbol(B.name, Decl(interMixingModulesInterfaces4.ts, 8, 17)) @@ -27,9 +27,9 @@ module A { var x : number = A.B.createB(); >x : Symbol(x, Decl(interMixingModulesInterfaces4.ts, 14, 3)) ->A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces4.ts, 2, 21)) ->A.B : Symbol(A.B, Decl(interMixingModulesInterfaces4.ts, 0, 10)) +>A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces4.ts, 2, 24)) +>A.B : Symbol(A.B, Decl(interMixingModulesInterfaces4.ts, 0, 13)) >A : Symbol(A, Decl(interMixingModulesInterfaces4.ts, 0, 0)) ->B : Symbol(A.B, Decl(interMixingModulesInterfaces4.ts, 0, 10)) ->createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces4.ts, 2, 21)) +>B : Symbol(A.B, Decl(interMixingModulesInterfaces4.ts, 0, 13)) +>createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces4.ts, 2, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.types index 3ee724d082..8e59e099f4 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces4.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/interMixingModulesInterfaces4.ts] //// === interMixingModulesInterfaces4.ts === -module A { +namespace A { >A : typeof A - export module B { + export namespace B { >B : typeof B export function createB(): number { diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js index 98e47c6d7f..8f2ea94831 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/interMixingModulesInterfaces5.ts] //// //// [interMixingModulesInterfaces5.ts] -module A { +namespace A { interface B { name: string; value: number; } - export module B { + export namespace B { export function createB(): number { return null; } diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js.diff b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js.diff new file mode 100644 index 0000000000..08c10bc425 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.js.diff @@ -0,0 +1,11 @@ +--- old.interMixingModulesInterfaces5.js ++++ new.interMixingModulesInterfaces5.js +@@= skipped -19, +19 lines =@@ + //// [interMixingModulesInterfaces5.js] + var A; + (function (A) { +- var B; ++ let B; + (function (B) { + function createB() { + return null; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.symbols b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.symbols index 320d88f480..420659a297 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.symbols +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interMixingModulesInterfaces5.ts] //// === interMixingModulesInterfaces5.ts === -module A { +namespace A { >A : Symbol(A, Decl(interMixingModulesInterfaces5.ts, 0, 0)) interface B { ->B : Symbol(B, Decl(interMixingModulesInterfaces5.ts, 0, 10), Decl(interMixingModulesInterfaces5.ts, 5, 5)) +>B : Symbol(B, Decl(interMixingModulesInterfaces5.ts, 0, 13), Decl(interMixingModulesInterfaces5.ts, 5, 5)) name: string; >name : Symbol(B.name, Decl(interMixingModulesInterfaces5.ts, 2, 17)) @@ -14,11 +14,11 @@ module A { >value : Symbol(B.value, Decl(interMixingModulesInterfaces5.ts, 3, 21)) } - export module B { + export namespace B { >B : Symbol(B, Decl(interMixingModulesInterfaces5.ts, 5, 5)) export function createB(): number { ->createB : Symbol(createB, Decl(interMixingModulesInterfaces5.ts, 7, 21)) +>createB : Symbol(createB, Decl(interMixingModulesInterfaces5.ts, 7, 24)) return null; } @@ -27,9 +27,9 @@ module A { var x: number = A.B.createB(); >x : Symbol(x, Decl(interMixingModulesInterfaces5.ts, 14, 3)) ->A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces5.ts, 7, 21)) +>A.B.createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces5.ts, 7, 24)) >A.B : Symbol(A.B, Decl(interMixingModulesInterfaces5.ts, 5, 5)) >A : Symbol(A, Decl(interMixingModulesInterfaces5.ts, 0, 0)) >B : Symbol(A.B, Decl(interMixingModulesInterfaces5.ts, 5, 5)) ->createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces5.ts, 7, 21)) +>createB : Symbol(A.B.createB, Decl(interMixingModulesInterfaces5.ts, 7, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.types b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.types index 98660365f0..01b2e1bfa7 100644 --- a/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.types +++ b/testdata/baselines/reference/submodule/compiler/interMixingModulesInterfaces5.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/interMixingModulesInterfaces5.ts] //// === interMixingModulesInterfaces5.ts === -module A { +namespace A { >A : typeof A interface B { @@ -12,7 +12,7 @@ module A { >value : number } - export module B { + export namespace B { >B : typeof B export function createB(): number { diff --git a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.errors.txt b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.errors.txt index 1b16cb3a0d..8f36e0c15d 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.errors.txt @@ -8,7 +8,7 @@ interfaceAssignmentCompat.ts(44,9): error TS2322: Type 'IEye[]' is not assignabl ==== interfaceAssignmentCompat.ts (4 errors) ==== - module M { + namespace M { export enum Color { Green, Blue, diff --git a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js index 1c80b4be39..d0ac936d35 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js +++ b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/interfaceAssignmentCompat.ts] //// //// [interfaceAssignmentCompat.ts] -module M { +namespace M { export enum Color { Green, Blue, diff --git a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js.diff new file mode 100644 index 0000000000..6713d77a5d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.js.diff @@ -0,0 +1,11 @@ +--- old.interfaceAssignmentCompat.js ++++ new.interfaceAssignmentCompat.js +@@= skipped -56, +56 lines =@@ + //// [interfaceAssignmentCompat.js] + var M; + (function (M) { +- var Color; ++ let Color; + (function (Color) { + Color[Color["Green"] = 0] = "Green"; + Color[Color["Blue"] = 1] = "Blue"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.symbols b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.symbols index e35074410a..ad125e1f39 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interfaceAssignmentCompat.ts] //// === interfaceAssignmentCompat.ts === -module M { +namespace M { >M : Symbol(M, Decl(interfaceAssignmentCompat.ts, 0, 0)) export enum Color { ->Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 10)) +>Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 13)) Green, >Green : Symbol(Color.Green, Decl(interfaceAssignmentCompat.ts, 1, 23)) @@ -77,21 +77,21 @@ module M { >x : Symbol(x, Decl(interfaceAssignmentCompat.ts, 24, 11)) >color : Symbol(color, Decl(interfaceAssignmentCompat.ts, 27, 14)) >Color.Brown : Symbol(Color.Brown, Decl(interfaceAssignmentCompat.ts, 3, 13)) ->Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 10)) +>Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 13)) >Brown : Symbol(Color.Brown, Decl(interfaceAssignmentCompat.ts, 3, 13)) x[1]={ color:Color.Blue }; >x : Symbol(x, Decl(interfaceAssignmentCompat.ts, 24, 11)) >color : Symbol(color, Decl(interfaceAssignmentCompat.ts, 28, 14)) >Color.Blue : Symbol(Color.Blue, Decl(interfaceAssignmentCompat.ts, 2, 14)) ->Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 10)) +>Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 13)) >Blue : Symbol(Color.Blue, Decl(interfaceAssignmentCompat.ts, 2, 14)) x[2]={ color:Color.Green }; >x : Symbol(x, Decl(interfaceAssignmentCompat.ts, 24, 11)) >color : Symbol(color, Decl(interfaceAssignmentCompat.ts, 29, 14)) >Color.Green : Symbol(Color.Green, Decl(interfaceAssignmentCompat.ts, 1, 23)) ->Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 10)) +>Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 13)) >Green : Symbol(Color.Green, Decl(interfaceAssignmentCompat.ts, 1, 23)) x=x.sort(CompareYeux); // parameter mismatch @@ -121,7 +121,7 @@ module M { result+=((Color._map[z[i].color])+"\r\n"); >result : Symbol(result, Decl(interfaceAssignmentCompat.ts, 25, 11)) ->Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 10)) +>Color : Symbol(Color, Decl(interfaceAssignmentCompat.ts, 0, 13)) >z[i].color : Symbol(IEye.color, Decl(interfaceAssignmentCompat.ts, 7, 27)) >z : Symbol(z, Decl(interfaceAssignmentCompat.ts, 33, 11)) >i : Symbol(i, Decl(interfaceAssignmentCompat.ts, 35, 16)) diff --git a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.types b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.types index 370ac93b48..b638ba1a35 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.types +++ b/testdata/baselines/reference/submodule/compiler/interfaceAssignmentCompat.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/interfaceAssignmentCompat.ts] //// === interfaceAssignmentCompat.ts === -module M { +namespace M { >M : typeof M export enum Color { diff --git a/testdata/baselines/reference/submodule/compiler/interfaceClassMerging.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceClassMerging.js.diff index cc92fbe925..00b67b2c2e 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceClassMerging.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceClassMerging.js.diff @@ -1,10 +1,50 @@ --- old.interfaceClassMerging.js +++ new.interfaceClassMerging.js -@@= skipped -43, +43 lines =@@ +@@= skipped -42, +42 lines =@@ + //// [interfaceClassMerging.js] - class Foo { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.additionalMethod = function (a) { ++class Foo { + additionalProperty; - additionalMethod(a) { ++ additionalMethod(a) { return this.method(0); - } \ No newline at end of file +- }; +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; + } +- Bar.prototype.method = function (a) { ++} ++class Bar extends Foo { ++ method(a) { + return this.optionalProperty; +- }; +- return Bar; +-}(Foo)); ++ } ++} + var bar = new Bar(); + bar.method(0); + bar.optionalMethod(1); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceClassMerging2.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceClassMerging2.js.diff index 0fd17b68a1..78ba89e90e 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceClassMerging2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceClassMerging2.js.diff @@ -1,16 +1,54 @@ --- old.interfaceClassMerging2.js +++ new.interfaceClassMerging2.js -@@= skipped -39, +39 lines =@@ +@@= skipped -38, +38 lines =@@ + //// [interfaceClassMerging2.js] - class Foo { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- Foo.prototype.classFooMethod = function () { +- return this; +- }; +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- __extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Bar.prototype.classBarMethod = function () { +- return this; +- }; +- return Bar; +-}(Foo)); ++class Foo { + classFooProperty; - classFooMethod() { - return this; - } - } - class Bar extends Foo { ++ classFooMethod() { ++ return this; ++ } ++} ++class Bar extends Foo { + classBarProperty; - classBarMethod() { - return this; - } \ No newline at end of file ++ classBarMethod() { ++ return this; ++ } ++} + var bar = new Bar(); + bar.interfaceBarMethod().interfaceFooMethod().classBarMethod().classFooMethod(); + var foo = new Foo(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceContextualType.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceContextualType.js.diff index d2d3879198..2cfcfcba3a 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceContextualType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceContextualType.js.diff @@ -1,10 +1,27 @@ --- old.interfaceContextualType.js +++ new.interfaceContextualType.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + //// [interfaceContextualType.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - class Bug { +-var Bug = /** @class */ (function () { +- function Bug() { +- } +- Bug.prototype.ok = function () { ++class Bug { + values; - ok() { ++ ok() { this.values = {}; - this.values['comments'] = { italic: true }; \ No newline at end of file + this.values['comments'] = { italic: true }; +- }; +- Bug.prototype.shouldBeOK = function () { ++ } ++ shouldBeOK() { + this.values = { + comments: { italic: true } + }; +- }; +- return Bug; +-}()); ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration1.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration1.js.diff new file mode 100644 index 0000000000..efb9cf36dc --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration1.js.diff @@ -0,0 +1,15 @@ +--- old.interfaceDeclaration1.js ++++ new.interfaceDeclaration1.js +@@= skipped -57, +57 lines =@@ + //// [interfaceDeclaration1.js] + var v1; + v1(); +-var C1 = /** @class */ (function () { +- function C1() { ++class C1 { ++ constructor() { + var prototype = 3; + } +- return C1; +-}()); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js index 54b455204c..5484bf8b97 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js @@ -2,7 +2,7 @@ //// [interfaceDeclaration2.ts] interface I1 { } -module I1 { } +namespace I1 { } interface I2 { } class I2 { } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js.diff new file mode 100644 index 0000000000..41a4c662c1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.js.diff @@ -0,0 +1,15 @@ +--- old.interfaceDeclaration2.js ++++ new.interfaceDeclaration2.js +@@= skipped -15, +15 lines =@@ + + + //// [interfaceDeclaration2.js] +-var I2 = /** @class */ (function () { +- function I2() { +- } +- return I2; +-}()); ++class I2 { ++} + function I3() { } + var I4; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.symbols b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.symbols index 934566daeb..de4d69406f 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.symbols @@ -4,14 +4,14 @@ interface I1 { } >I1 : Symbol(I1, Decl(interfaceDeclaration2.ts, 0, 0), Decl(interfaceDeclaration2.ts, 0, 16)) -module I1 { } +namespace I1 { } >I1 : Symbol(I1, Decl(interfaceDeclaration2.ts, 0, 0), Decl(interfaceDeclaration2.ts, 0, 16)) interface I2 { } ->I2 : Symbol(I2, Decl(interfaceDeclaration2.ts, 1, 13), Decl(interfaceDeclaration2.ts, 3, 16)) +>I2 : Symbol(I2, Decl(interfaceDeclaration2.ts, 1, 16), Decl(interfaceDeclaration2.ts, 3, 16)) class I2 { } ->I2 : Symbol(I2, Decl(interfaceDeclaration2.ts, 1, 13), Decl(interfaceDeclaration2.ts, 3, 16)) +>I2 : Symbol(I2, Decl(interfaceDeclaration2.ts, 1, 16), Decl(interfaceDeclaration2.ts, 3, 16)) interface I3 { } >I3 : Symbol(I3, Decl(interfaceDeclaration2.ts, 6, 16), Decl(interfaceDeclaration2.ts, 4, 12)) diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.types b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.types index 5252f1109f..230a8e1c11 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.types +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration2.types @@ -2,7 +2,7 @@ === interfaceDeclaration2.ts === interface I1 { } -module I1 { } +namespace I1 { } interface I2 { } class I2 { } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.errors.txt b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.errors.txt index e19ccdeae1..5c6d33ffd2 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.errors.txt @@ -13,7 +13,7 @@ interfaceDeclaration4.ts(39,15): error TS2304: Cannot find name 'I1'. ==== interfaceDeclaration4.ts (6 errors) ==== // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") - module Foo { + namespace Foo { export interface I1 { item: string; } export class C1 { } } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js index d173f7c8d9..0ee65bd38c 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js @@ -3,7 +3,7 @@ //// [interfaceDeclaration4.ts] // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") -module Foo { +namespace Foo { export interface I1 { item: string; } export class C1 { } } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js.diff index abd1bc25b7..9e61868658 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.js.diff @@ -1,14 +1,41 @@ --- old.interfaceDeclaration4.js +++ new.interfaceDeclaration4.js -@@= skipped -51, +51 lines =@@ +@@= skipped -46, +46 lines =@@ + // import Foo = require("interfaceDeclaration5") + var Foo; + (function (Foo) { +- var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +- }()); ++ class C1 { ++ } Foo.C1 = C1; })(Foo || (Foo = {})); - class C1 { +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); ++class C1 { + item; - } ++} // Err - not implemented item - class C2 { +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); ++class C2 { + token; - } - class C3 { - } \ No newline at end of file ++} ++class C3 { ++} + I1; + { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.symbols b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.symbols index 100e41040a..bb24f07436 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.symbols @@ -3,11 +3,11 @@ === interfaceDeclaration4.ts === // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") -module Foo { +namespace Foo { >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) export interface I1 { item: string; } ->I1 : Symbol(I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(I1, Decl(interfaceDeclaration4.ts, 2, 15)) >item : Symbol(I1.item, Decl(interfaceDeclaration4.ts, 3, 25)) export class C1 { } @@ -16,9 +16,9 @@ module Foo { class C1 implements Foo.I1 { >C1 : Symbol(C1, Decl(interfaceDeclaration4.ts, 5, 1)) ->Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) ->I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) public item:string; >item : Symbol(C1.item, Decl(interfaceDeclaration4.ts, 7, 28)) @@ -27,9 +27,9 @@ class C1 implements Foo.I1 { // Allowed interface I2 extends Foo.I1 { >I2 : Symbol(I2, Decl(interfaceDeclaration4.ts, 9, 1)) ->Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) ->I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) item:string; >item : Symbol(I2.item, Decl(interfaceDeclaration4.ts, 12, 29)) @@ -38,9 +38,9 @@ interface I2 extends Foo.I1 { // Negative Case interface I3 extends Foo.I1 { >I3 : Symbol(I3, Decl(interfaceDeclaration4.ts, 14, 1)) ->Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) ->I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) item:number; >item : Symbol(I3.item, Decl(interfaceDeclaration4.ts, 17, 29)) @@ -48,9 +48,9 @@ interface I3 extends Foo.I1 { interface I4 extends Foo.I1 { >I4 : Symbol(I4, Decl(interfaceDeclaration4.ts, 19, 1)) ->Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) ->I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) token:string; >token : Symbol(I4.token, Decl(interfaceDeclaration4.ts, 21, 29)) @@ -78,9 +78,9 @@ interface I6 extends Foo.C1 { } class C3 implements Foo.I1 { } >C3 : Symbol(C3, Decl(interfaceDeclaration4.ts, 33, 31)) ->Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>Foo.I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) >Foo : Symbol(Foo, Decl(interfaceDeclaration4.ts, 0, 0), Decl(interfaceDeclaration4.ts, 35, 30)) ->I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 12)) +>I1 : Symbol(Foo.I1, Decl(interfaceDeclaration4.ts, 2, 15)) // Negative case interface Foo.I1 { } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.types b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.types index edf2942d9b..9b76134d95 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.types +++ b/testdata/baselines/reference/submodule/compiler/interfaceDeclaration4.types @@ -3,7 +3,7 @@ === interfaceDeclaration4.ts === // Import this module when test harness supports external modules. Also remove the internal module below. // import Foo = require("interfaceDeclaration5") -module Foo { +namespace Foo { >Foo : typeof Foo export interface I1 { item: string; } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClass1.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClass1.js.diff index 8b8fcaea23..63f3387fb5 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClass1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClass1.js.diff @@ -1,10 +1,69 @@ --- old.interfaceExtendsClass1.js +++ new.interfaceExtendsClass1.js -@@= skipped -21, +21 lines =@@ +@@= skipped -20, +20 lines =@@ + //// [interfaceExtendsClass1.js] - class Control { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Control = /** @class */ (function () { +- function Control() { +- } +- return Control; +-}()); +-var Button = /** @class */ (function (_super) { +- __extends(Button, _super); +- function Button() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- Button.prototype.select = function () { }; +- return Button; +-}(Control)); +-var TextBox = /** @class */ (function (_super) { +- __extends(TextBox, _super); +- function TextBox() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- TextBox.prototype.select = function () { }; +- return TextBox; +-}(Control)); +-var Image = /** @class */ (function (_super) { +- __extends(Image, _super); +- function Image() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Image; +-}(Control)); +-var Location = /** @class */ (function () { +- function Location() { +- } +- Location.prototype.select = function () { }; +- return Location; +-}()); ++class Control { + state; - } - class Button extends Control { - select() { } \ No newline at end of file ++} ++class Button extends Control { ++ select() { } ++} ++class TextBox extends Control { ++ select() { } ++} ++class Image extends Control { ++} ++class Location { ++ select() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate1.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate1.js.diff index 63efd44ac2..eb8b9ff738 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate1.js.diff @@ -1,14 +1,50 @@ --- old.interfaceExtendsClassWithPrivate1.js +++ new.interfaceExtendsClassWithPrivate1.js -@@= skipped -30, +30 lines =@@ +@@= skipped -29, +29 lines =@@ + d = c; // error //// [interfaceExtendsClassWithPrivate1.js] - class C { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { - this.x = 1; - } - foo(x) { return x; } +- C.prototype.foo = function (x) { return x; }; +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- D.prototype.foo = function (x) { return x; }; +- D.prototype.other = function (x) { return x; }; +- D.prototype.bar = function () { }; +- return D; +-}(C)); ++class C { ++ foo(x) { return x; } + x = 1; - } - class D extends C { - foo(x) { return x; } \ No newline at end of file ++} ++class D extends C { ++ foo(x) { return x; } ++ other(x) { return x; } ++ bar() { } ++} + var c; + var i; + var d; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate2.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate2.js.diff index 839290c7c9..6aca40179c 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceExtendsClassWithPrivate2.js.diff @@ -1,34 +1,70 @@ --- old.interfaceExtendsClassWithPrivate2.js +++ new.interfaceExtendsClassWithPrivate2.js -@@= skipped -26, +26 lines =@@ +@@= skipped -25, +25 lines =@@ + } //// [interfaceExtendsClassWithPrivate2.js] - class C { -- constructor() { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C = /** @class */ (function () { +- function C() { - this.x = 1; - } - foo(x) { return x; } -+ x = 1; - } - class D extends C { -- constructor() { -- super(...arguments); -- this.x = 2; -- this.y = 3; +- C.prototype.foo = function (x) { return x; }; +- return C; +-}()); +-var D = /** @class */ (function (_super) { +- __extends(D, _super); +- function D() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.x = 2; +- _this.y = 3; +- return _this; +- } +- D.prototype.foo = function (x) { return x; }; +- D.prototype.other = function (x) { return x; }; +- D.prototype.bar = function () { }; +- return D; +-}(C)); +-var D2 = /** @class */ (function (_super) { +- __extends(D2, _super); +- function D2() { +- var _this = _super !== null && _super.apply(this, arguments) || this; +- _this.x = ""; +- return _this; - } - foo(x) { return x; } +- D2.prototype.foo = function (x) { return x; }; +- D2.prototype.other = function (x) { return x; }; +- D2.prototype.bar = function () { }; +- return D2; +-}(C)); ++class C { ++ foo(x) { return x; } ++ x = 1; ++} ++class D extends C { ++ foo(x) { return x; } + x = 2; + y = 3; - other(x) { return x; } - bar() { } - } - class D2 extends C { -- constructor() { -- super(...arguments); -- this.x = ""; -- } - foo(x) { return x; } ++ other(x) { return x; } ++ bar() { } ++} ++class D2 extends C { ++ foo(x) { return x; } + x = ""; - other(x) { return x; } - bar() { } - } \ No newline at end of file ++ other(x) { return x; } ++ bar() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation1.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation1.js.diff index b6905dcdfa..e05edbe4c5 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceImplementation1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation1.js.diff @@ -1,18 +1,30 @@ --- old.interfaceImplementation1.js +++ new.interfaceImplementation1.js -@@= skipped -50, +50 lines =@@ +@@= skipped -48, +48 lines =@@ + + //// [interfaceImplementation1.js] - class C1 { - iFn(n, s) { } +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.iFn = function (n, s) { }; +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- this.x = 1; +- } +- return C2; +-}()); ++class C1 { ++ iFn(n, s) { } + iAny; + iNum; + iObj; - } - class C2 { -- constructor() { -- this.x = 1; -- } ++} ++class C2 { + x = 1; - } ++} var a = function () { - return new C2(); \ No newline at end of file + return new C2(); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation2.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation2.js.diff index c29e036875..846199d001 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceImplementation2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation2.js.diff @@ -1,10 +1,16 @@ --- old.interfaceImplementation2.js +++ new.interfaceImplementation2.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [interfaceImplementation2.js] - class C3 { +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); ++class C3 { + iObj; + iNum; + iAny; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation3.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation3.js.diff index f16628efc0..62026b443e 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceImplementation3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation3.js.diff @@ -1,10 +1,17 @@ --- old.interfaceImplementation3.js +++ new.interfaceImplementation3.js -@@= skipped -18, +18 lines =@@ +@@= skipped -17, +17 lines =@@ + //// [interfaceImplementation3.js] - class C4 { +-var C4 = /** @class */ (function () { +- function C4() { +- } +- C4.prototype.iFn = function () { }; +- return C4; +-}()); ++class C4 { + iObj; + iNum; - iFn() { } - } \ No newline at end of file ++ iFn() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation4.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation4.js.diff index e1c8041171..62d52af5b1 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceImplementation4.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation4.js.diff @@ -1,10 +1,17 @@ --- old.interfaceImplementation4.js +++ new.interfaceImplementation4.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [interfaceImplementation4.js] - class C5 { +-var C5 = /** @class */ (function () { +- function C5() { +- } +- C5.prototype.iFn = function () { }; +- return C5; +-}()); ++class C5 { + iNum; + iAny; - iFn() { } - } \ No newline at end of file ++ iFn() { } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation5.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation5.js.diff new file mode 100644 index 0000000000..5fa024f468 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation5.js.diff @@ -0,0 +1,88 @@ +--- old.interfaceImplementation5.js ++++ new.interfaceImplementation5.js +@@= skipped -33, +33 lines =@@ + + + //// [interfaceImplementation5.js] +-var C1 = /** @class */ (function () { +- function C1() { +- } +- Object.defineProperty(C1.prototype, "getset1", { +- get: function () { return 1; }, +- enumerable: false, +- configurable: true +- }); +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- Object.defineProperty(C2.prototype, "getset1", { +- set: function (baz) { }, +- enumerable: false, +- configurable: true +- }); +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- Object.defineProperty(C3.prototype, "getset1", { +- get: function () { return 1; }, +- set: function (baz) { }, +- enumerable: false, +- configurable: true +- }); +- return C3; +-}()); +-var C4 = /** @class */ (function () { +- function C4() { +- } +- Object.defineProperty(C4.prototype, "getset1", { +- get: function () { var x; return x; }, +- enumerable: false, +- configurable: true +- }); +- return C4; +-}()); +-var C5 = /** @class */ (function () { +- function C5() { +- } +- Object.defineProperty(C5.prototype, "getset1", { +- set: function (baz) { }, +- enumerable: false, +- configurable: true +- }); +- return C5; +-}()); +-var C6 = /** @class */ (function () { +- function C6() { +- } +- Object.defineProperty(C6.prototype, "getset1", { +- get: function () { var x; return x; }, +- set: function (baz) { }, +- enumerable: false, +- configurable: true +- }); +- return C6; +-}()); ++class C1 { ++ get getset1() { return 1; } ++} ++class C2 { ++ set getset1(baz) { } ++} ++class C3 { ++ get getset1() { return 1; } ++ set getset1(baz) { } ++} ++class C4 { ++ get getset1() { var x; return x; } ++} ++class C5 { ++ set getset1(baz) { } ++} ++class C6 { ++ set getset1(baz) { } ++ get getset1() { var x; return x; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation7.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation7.js.diff new file mode 100644 index 0000000000..490b664e7b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation7.js.diff @@ -0,0 +1,15 @@ +--- old.interfaceImplementation7.js ++++ new.interfaceImplementation7.js +@@= skipped -12, +12 lines =@@ + + + //// [interfaceImplementation7.js] +-var C1 = /** @class */ (function () { +- function C1() { +- } +- C1.prototype.name = function () { return ""; }; +- return C1; +-}()); ++class C1 { ++ name() { return ""; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceImplementation8.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceImplementation8.js.diff index d47e8a3fba..43f2c683b2 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceImplementation8.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceImplementation8.js.diff @@ -1,25 +1,90 @@ --- old.interfaceImplementation8.js +++ new.interfaceImplementation8.js -@@= skipped -43, +43 lines =@@ +@@= skipped -42, +42 lines =@@ + //// [interfaceImplementation8.js] - class C1 { +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); +-var C2 = /** @class */ (function () { +- function C2() { +- } +- return C2; +-}()); +-var C3 = /** @class */ (function () { +- function C3() { +- } +- return C3; +-}()); +-var C4 = /** @class */ (function (_super) { +- __extends(C4, _super); +- function C4() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C4; +-}(C1)); +-var C5 = /** @class */ (function (_super) { +- __extends(C5, _super); +- function C5() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C5; +-}(C2)); +-var C6 = /** @class */ (function (_super) { +- __extends(C6, _super); +- function C6() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C6; +-}(C3)); +-var C7 = /** @class */ (function () { +- function C7() { +- } +- return C7; +-}()); +-var C8 = /** @class */ (function (_super) { +- __extends(C8, _super); +- function C8() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C8; +-}(C7)); ++class C1 { + name; - } - class C2 { ++} ++class C2 { + name; - } - class C3 { ++} ++class C3 { + name; - } - class C4 extends C1 { - } -@@= skipped -12, +15 lines =@@ - class C6 extends C3 { - } - class C7 { ++} ++class C4 extends C1 { ++} ++class C5 extends C2 { ++} ++class C6 extends C3 { ++} ++class C7 { + name; - } - class C8 extends C7 { ++} ++class C8 extends C7 { + age; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js index c4b16f3139..6bd9e43cb2 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js +++ b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interfaceInReopenedModule.ts] //// //// [interfaceInReopenedModule.ts] -module m { +namespace m { } // In second instance of same module, exported interface is not visible -module m { +namespace m { interface f {} export class n { private n: f; diff --git a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js.diff index 0d324f05ca..00bbb2dbb0 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.js.diff @@ -1,10 +1,16 @@ --- old.interfaceInReopenedModule.js +++ new.interfaceInReopenedModule.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + // In second instance of same module, exported interface is not visible var m; (function (m) { - class n { +- var n = /** @class */ (function () { +- function n() { +- } +- return n; +- }()); ++ class n { + n; - } ++ } m.n = n; })(m || (m = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.symbols b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.symbols index a6fa2c8879..4bfd383513 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.symbols @@ -1,23 +1,23 @@ //// [tests/cases/compiler/interfaceInReopenedModule.ts] //// === interfaceInReopenedModule.ts === -module m { +namespace m { >m : Symbol(m, Decl(interfaceInReopenedModule.ts, 0, 0), Decl(interfaceInReopenedModule.ts, 1, 1)) } // In second instance of same module, exported interface is not visible -module m { +namespace m { >m : Symbol(m, Decl(interfaceInReopenedModule.ts, 0, 0), Decl(interfaceInReopenedModule.ts, 1, 1)) interface f {} ->f : Symbol(f, Decl(interfaceInReopenedModule.ts, 4, 10)) +>f : Symbol(f, Decl(interfaceInReopenedModule.ts, 4, 13)) export class n { >n : Symbol(n, Decl(interfaceInReopenedModule.ts, 5, 18)) private n: f; >n : Symbol(n.n, Decl(interfaceInReopenedModule.ts, 6, 20)) ->f : Symbol(f, Decl(interfaceInReopenedModule.ts, 4, 10)) +>f : Symbol(f, Decl(interfaceInReopenedModule.ts, 4, 13)) } } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.types b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.types index b6c6fdce49..4e01de50b3 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.types +++ b/testdata/baselines/reference/submodule/compiler/interfaceInReopenedModule.types @@ -1,11 +1,11 @@ //// [tests/cases/compiler/interfaceInReopenedModule.ts] //// === interfaceInReopenedModule.ts === -module m { +namespace m { } // In second instance of same module, exported interface is not visible -module m { +namespace m { >m : typeof m interface f {} diff --git a/testdata/baselines/reference/submodule/compiler/interfaceInheritance.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceInheritance.js.diff index 501c2f6833..c708852d8a 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceInheritance.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceInheritance.js.diff @@ -1,10 +1,17 @@ --- old.interfaceInheritance.js +++ new.interfaceInheritance.js -@@= skipped -43, +43 lines =@@ +@@= skipped -42, +42 lines =@@ + //// [interfaceInheritance.js] - class C1 { +-var C1 = /** @class */ (function () { +- function C1() { +- } +- return C1; +-}()); ++class C1 { + i2P1; - } ++} var i2; - var i1; \ No newline at end of file + var i1; + var i3; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceMergeWithNonGenericTypeArguments.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceMergeWithNonGenericTypeArguments.js.diff new file mode 100644 index 0000000000..bcac01cd5c --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceMergeWithNonGenericTypeArguments.js.diff @@ -0,0 +1,43 @@ +--- old.interfaceMergeWithNonGenericTypeArguments.js ++++ new.interfaceMergeWithNonGenericTypeArguments.js +@@= skipped -11, +11 lines =@@ + + //// [interfaceMergeWithNonGenericTypeArguments.js] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MergedClass = exports.SomeBaseClass = void 0; +-var SomeBaseClass = /** @class */ (function () { +- function SomeBaseClass() { +- } +- return SomeBaseClass; +-}()); ++class SomeBaseClass { ++} + exports.SomeBaseClass = SomeBaseClass; +-var MergedClass = /** @class */ (function (_super) { +- __extends(MergedClass, _super); +- function MergedClass() { +- return _super.call(this) || this; ++class MergedClass extends SomeBaseClass { ++ constructor() { ++ super(); + } +- return MergedClass; +-}(SomeBaseClass)); ++} + exports.MergedClass = MergedClass; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.errors.txt b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.errors.txt index 15cd072ad9..196db4f55b 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.errors.txt @@ -10,7 +10,7 @@ interfaceNameAsIdentifier.ts(12,1): error TS2708: Cannot use namespace 'm2' as a ~ !!! error TS2693: 'C' only refers to a type, but is being used as a value here. - module m2 { + namespace m2 { export interface C { (): void; } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.js b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.js index 36e8cc1a77..d36f6f5b6b 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.js +++ b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.js @@ -6,7 +6,7 @@ interface C { } C(); -module m2 { +namespace m2 { export interface C { (): void; } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.symbols b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.symbols index 15f68a0c37..c6aa0bb19f 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.symbols @@ -8,11 +8,11 @@ interface C { } C(); -module m2 { +namespace m2 { >m2 : Symbol(m2, Decl(interfaceNameAsIdentifier.ts, 3, 4)) export interface C { ->C : Symbol(C, Decl(interfaceNameAsIdentifier.ts, 5, 11)) +>C : Symbol(C, Decl(interfaceNameAsIdentifier.ts, 5, 14)) (): void; } diff --git a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.types b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.types index d9f8fc9ef8..e613a3ba58 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.types +++ b/testdata/baselines/reference/submodule/compiler/interfaceNameAsIdentifier.types @@ -8,7 +8,7 @@ C(); >C() : any >C : any -module m2 { +namespace m2 { export interface C { (): void; } diff --git a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.errors.txt b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.errors.txt index 2d20eda507..07549d2f3b 100644 --- a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.errors.txt @@ -22,7 +22,7 @@ interfacePropertiesWithSameName2.ts(26,11): error TS2320: Interface 'MoverShaker } // Inside a module - declare module MoversAndShakers { + declare namespace MoversAndShakers { export class Mover { move(): void; getStatus(): { speed: number; }; diff --git a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.js b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.js index 80018b4bdb..632c0eba81 100644 --- a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.js +++ b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.js @@ -15,7 +15,7 @@ interface MoverShaker extends Mover, Shaker { } // Inside a module -declare module MoversAndShakers { +declare namespace MoversAndShakers { export class Mover { move(): void; getStatus(): { speed: number; }; diff --git a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.symbols b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.symbols index 811f9cab92..55d71c5fe1 100644 --- a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.symbols +++ b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.symbols @@ -30,11 +30,11 @@ interface MoverShaker extends Mover, Shaker { } // Inside a module -declare module MoversAndShakers { +declare namespace MoversAndShakers { >MoversAndShakers : Symbol(MoversAndShakers, Decl(interfacePropertiesWithSameName2.ts, 11, 1)) export class Mover { ->Mover : Symbol(Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 33)) +>Mover : Symbol(Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 36)) move(): void; >move : Symbol(Mover.move, Decl(interfacePropertiesWithSameName2.ts, 15, 24)) @@ -57,18 +57,18 @@ declare module MoversAndShakers { interface MoverShaker2 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { } // error >MoverShaker2 : Symbol(MoverShaker2, Decl(interfacePropertiesWithSameName2.ts, 23, 1)) ->MoversAndShakers.Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 33)) +>MoversAndShakers.Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 36)) >MoversAndShakers : Symbol(MoversAndShakers, Decl(interfacePropertiesWithSameName2.ts, 11, 1)) ->Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 33)) +>Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 36)) >MoversAndShakers.Shaker : Symbol(MoversAndShakers.Shaker, Decl(interfacePropertiesWithSameName2.ts, 18, 5)) >MoversAndShakers : Symbol(MoversAndShakers, Decl(interfacePropertiesWithSameName2.ts, 11, 1)) >Shaker : Symbol(MoversAndShakers.Shaker, Decl(interfacePropertiesWithSameName2.ts, 18, 5)) interface MoverShaker3 extends MoversAndShakers.Mover, MoversAndShakers.Shaker { >MoverShaker3 : Symbol(MoverShaker3, Decl(interfacePropertiesWithSameName2.ts, 25, 82)) ->MoversAndShakers.Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 33)) +>MoversAndShakers.Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 36)) >MoversAndShakers : Symbol(MoversAndShakers, Decl(interfacePropertiesWithSameName2.ts, 11, 1)) ->Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 33)) +>Mover : Symbol(MoversAndShakers.Mover, Decl(interfacePropertiesWithSameName2.ts, 14, 36)) >MoversAndShakers.Shaker : Symbol(MoversAndShakers.Shaker, Decl(interfacePropertiesWithSameName2.ts, 18, 5)) >MoversAndShakers : Symbol(MoversAndShakers, Decl(interfacePropertiesWithSameName2.ts, 11, 1)) >Shaker : Symbol(MoversAndShakers.Shaker, Decl(interfacePropertiesWithSameName2.ts, 18, 5)) diff --git a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.types b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.types index aed46bf9b6..82dbd663eb 100644 --- a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.types +++ b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName2.types @@ -23,7 +23,7 @@ interface MoverShaker extends Mover, Shaker { } // Inside a module -declare module MoversAndShakers { +declare namespace MoversAndShakers { >MoversAndShakers : typeof MoversAndShakers export class Mover { diff --git a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName3.js.diff b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName3.js.diff index 4968851008..0a2a5522c2 100644 --- a/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName3.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfacePropertiesWithSameName3.js.diff @@ -1,11 +1,22 @@ --- old.interfacePropertiesWithSameName3.js +++ new.interfacePropertiesWithSameName3.js -@@= skipped -11, +11 lines =@@ +@@= skipped -10, +10 lines =@@ + //// [interfacePropertiesWithSameName3.js] - class D2 { +-var D2 = /** @class */ (function () { +- function D2() { +- } +- return D2; +-}()); +-var E2 = /** @class */ (function () { +- function E2() { +- } +- return E2; +-}()); ++class D2 { + a; - } - class E2 { ++} ++class E2 { + a; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceSubtyping.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceSubtyping.js.diff index 58b201c676..3a00b30746 100644 --- a/testdata/baselines/reference/submodule/compiler/interfaceSubtyping.js.diff +++ b/testdata/baselines/reference/submodule/compiler/interfaceSubtyping.js.diff @@ -1,10 +1,18 @@ --- old.interfaceSubtyping.js +++ new.interfaceSubtyping.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + //// [interfaceSubtyping.js] - class Camera { +-var Camera = /** @class */ (function () { +- function Camera(str) { ++class Camera { + str; - constructor(str) { ++ constructor(str) { this.str = str; - } \ No newline at end of file + } +- Camera.prototype.foo = function () { return "s"; }; +- return Camera; +-}()); ++ foo() { return "s"; } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfaceWithMultipleDeclarations.js.diff b/testdata/baselines/reference/submodule/compiler/interfaceWithMultipleDeclarations.js.diff new file mode 100644 index 0000000000..106d7691c1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfaceWithMultipleDeclarations.js.diff @@ -0,0 +1,13 @@ +--- old.interfaceWithMultipleDeclarations.js ++++ new.interfaceWithMultipleDeclarations.js +@@= skipped -39, +39 lines =@@ + } + + //// [interfaceWithMultipleDeclarations.js] +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/interfacedecl.js.diff b/testdata/baselines/reference/submodule/compiler/interfacedecl.js.diff new file mode 100644 index 0000000000..92afba6cb3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfacedecl.js.diff @@ -0,0 +1,15 @@ +--- old.interfacedecl.js ++++ new.interfacedecl.js +@@= skipped -48, +48 lines =@@ + var instance2 = new c1(); + + //// [interfacedecl.js] +-var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +-}()); ++class c1 { ++} + var instance2 = new c1(); + diff --git a/testdata/baselines/reference/submodule/compiler/interfacedeclWithIndexerErrors.js.diff b/testdata/baselines/reference/submodule/compiler/interfacedeclWithIndexerErrors.js.diff new file mode 100644 index 0000000000..ee6d53fefa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/interfacedeclWithIndexerErrors.js.diff @@ -0,0 +1,14 @@ +--- old.interfacedeclWithIndexerErrors.js ++++ new.interfacedeclWithIndexerErrors.js +@@= skipped -55, +55 lines =@@ + var instance2 = new c1(); + + //// [interfacedeclWithIndexerErrors.js] +-var c1 = /** @class */ (function () { +- function c1() { +- } +- return c1; +-}()); ++class c1 { ++} + var instance2 = new c1(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClass.js b/testdata/baselines/reference/submodule/compiler/internalAliasClass.js index 8e88acb2c2..9cd76f8672 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClass.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClass.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/internalAliasClass.ts] //// //// [internalAliasClass.ts] -module a { +namespace a { export class c { } } -module c { +namespace c { import b = a.c; export var x: b = new b(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClass.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClass.js.diff new file mode 100644 index 0000000000..af1c96f425 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClass.js.diff @@ -0,0 +1,16 @@ +--- old.internalAliasClass.js ++++ new.internalAliasClass.js +@@= skipped -13, +13 lines =@@ + //// [internalAliasClass.js] + var a; + (function (a) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + a.c = c; + })(a || (a = {})); + var c; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClass.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClass.symbols index aab7fb72d3..14487c45fe 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClass.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClass.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/internalAliasClass.ts] //// === internalAliasClass.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasClass.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClass.ts, 0, 10)) +>c : Symbol(c, Decl(internalAliasClass.ts, 0, 13)) } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasClass.ts, 3, 1)) import b = a.c; ->b : Symbol(b, Decl(internalAliasClass.ts, 5, 10)) +>b : Symbol(b, Decl(internalAliasClass.ts, 5, 13)) >a : Symbol(a, Decl(internalAliasClass.ts, 0, 0)) ->c : Symbol(b, Decl(internalAliasClass.ts, 0, 10)) +>c : Symbol(b, Decl(internalAliasClass.ts, 0, 13)) export var x: b = new b(); >x : Symbol(x, Decl(internalAliasClass.ts, 7, 14)) ->b : Symbol(b, Decl(internalAliasClass.ts, 5, 10)) ->b : Symbol(b, Decl(internalAliasClass.ts, 5, 10)) +>b : Symbol(b, Decl(internalAliasClass.ts, 5, 13)) +>b : Symbol(b, Decl(internalAliasClass.ts, 5, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClass.types b/testdata/baselines/reference/submodule/compiler/internalAliasClass.types index 2dfd2ab95f..9392c93648 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClass.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClass.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClass.ts] //// === internalAliasClass.ts === -module a { +namespace a { >a : typeof a export class c { @@ -9,7 +9,7 @@ module a { } } -module c { +namespace c { >c : typeof c import b = a.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js index 77c7e5b6e5..b6ee2ebd69 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts] //// //// [internalAliasClassInsideLocalModuleWithExport.ts] -export module x { +export namespace x { export class c { foo(a: number) { return a; @@ -9,8 +9,8 @@ export module x { } } -export module m2 { - export module m3 { +export namespace m2 { + export namespace m3 { export import c = x.c; export var cProp = new c(); var cReturnVal = cProp.foo(10); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js.diff new file mode 100644 index 0000000000..35f1f7a8f2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.js.diff @@ -0,0 +1,27 @@ +--- old.internalAliasClassInsideLocalModuleWithExport.js ++++ new.internalAliasClassInsideLocalModuleWithExport.js +@@= skipped -24, +24 lines =@@ + exports.d = exports.m2 = exports.x = void 0; + var x; + (function (x) { +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function (a) { ++ class c { ++ foo(a) { + return a; +- }; +- return c; +- }()); ++ } ++ } + x.c = c; + })(x || (exports.x = x = {})); + var m2; + (function (m2) { +- var m3; ++ let m3; + (function (m3) { + m3.c = x.c; + m3.cProp = new m3.c(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.symbols index 50618350ff..ae75d2aae3 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts] //// === internalAliasClassInsideLocalModuleWithExport.ts === -export module x { +export namespace x { >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 20)) foo(a: number) { >foo : Symbol(c.foo, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 1, 20)) @@ -17,20 +17,20 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : Symbol(m2, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 6, 1)) - export module m3 { ->m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 18)) + export namespace m3 { +>m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 21)) export import c = x.c; ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 25)) >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 0)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 0, 20)) export var cProp = new c(); >cProp : Symbol(cProp, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 11, 18)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 25)) var cReturnVal = cProp.foo(10); >cReturnVal : Symbol(cReturnVal, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 12, 11)) @@ -42,9 +42,9 @@ export module m2 { export var d = new m2.m3.c(); >d : Symbol(d, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 16, 10)) ->m2.m3.c : Symbol(m2.m3.c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 22)) ->m2.m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 18)) +>m2.m3.c : Symbol(m2.m3.c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 25)) +>m2.m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 21)) >m2 : Symbol(m2, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 6, 1)) ->m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 18)) ->c : Symbol(m2.m3.c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 22)) +>m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 8, 21)) +>c : Symbol(m2.m3.c, Decl(internalAliasClassInsideLocalModuleWithExport.ts, 9, 25)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.types index 5e7b70bedb..1145bc1ce3 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithExport.ts] //// === internalAliasClassInsideLocalModuleWithExport.ts === -export module x { +export namespace x { >x : typeof x export class c { @@ -17,10 +17,10 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : typeof m2 - export module m3 { + export namespace m3 { >m3 : typeof m3 export import c = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js index 6fb7ebdf8f..509aa3a3af 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts] //// //// [internalAliasClassInsideLocalModuleWithoutExport.ts] -export module x { +export namespace x { export class c { foo(a: number) { return a; @@ -9,8 +9,8 @@ export module x { } } -export module m2 { - export module m3 { +export namespace m2 { + export namespace m3 { import c = x.c; export var cProp = new c(); var cReturnVal = cProp.foo(10); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js.diff new file mode 100644 index 0000000000..db8109b909 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.js.diff @@ -0,0 +1,27 @@ +--- old.internalAliasClassInsideLocalModuleWithoutExport.js ++++ new.internalAliasClassInsideLocalModuleWithoutExport.js +@@= skipped -22, +22 lines =@@ + exports.m2 = exports.x = void 0; + var x; + (function (x) { +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function (a) { ++ class c { ++ foo(a) { + return a; +- }; +- return c; +- }()); ++ } ++ } + x.c = c; + })(x || (exports.x = x = {})); + var m2; + (function (m2) { +- var m3; ++ let m3; + (function (m3) { + var c = x.c; + m3.cProp = new c(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.symbols index 3da4653783..cdf8ac6c86 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts] //// === internalAliasClassInsideLocalModuleWithoutExport.ts === -export module x { +export namespace x { >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 20)) foo(a: number) { >foo : Symbol(c.foo, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 1, 20)) @@ -17,20 +17,20 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : Symbol(m2, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 6, 1)) - export module m3 { ->m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 8, 18)) + export namespace m3 { +>m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 8, 21)) import c = x.c; ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 9, 25)) >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 0)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 0, 20)) export var cProp = new c(); >cProp : Symbol(cProp, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 11, 18)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 9, 25)) var cReturnVal = cProp.foo(10); >cReturnVal : Symbol(cReturnVal, Decl(internalAliasClassInsideLocalModuleWithoutExport.ts, 12, 11)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.types index 2c16957708..c446933466 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExport.ts] //// === internalAliasClassInsideLocalModuleWithoutExport.ts === -export module x { +export namespace x { >x : typeof x export class c { @@ -17,10 +17,10 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : typeof m2 - export module m3 { + export namespace m3 { >m3 : typeof m3 import c = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt index c2308deeee..f350f76e8e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.errors.txt @@ -2,7 +2,7 @@ internalAliasClassInsideLocalModuleWithoutExportAccessError.ts(17,26): error TS2 ==== internalAliasClassInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== - export module x { + export namespace x { export class c { foo(a: number) { return a; @@ -10,8 +10,8 @@ internalAliasClassInsideLocalModuleWithoutExportAccessError.ts(17,26): error TS2 } } - export module m2 { - export module m3 { + export namespace m2 { + export namespace m3 { import c = x.c; export var cProp = new c(); var cReturnVal = cProp.foo(10); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js index c5e8da510a..c4c4f5076f 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts] //// //// [internalAliasClassInsideLocalModuleWithoutExportAccessError.ts] -export module x { +export namespace x { export class c { foo(a: number) { return a; @@ -9,8 +9,8 @@ export module x { } } -export module m2 { - export module m3 { +export namespace m2 { + export namespace m3 { import c = x.c; export var cProp = new c(); var cReturnVal = cProp.foo(10); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js.diff new file mode 100644 index 0000000000..de2fc1551b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.js.diff @@ -0,0 +1,27 @@ +--- old.internalAliasClassInsideLocalModuleWithoutExportAccessError.js ++++ new.internalAliasClassInsideLocalModuleWithoutExportAccessError.js +@@= skipped -24, +24 lines =@@ + exports.d = exports.m2 = exports.x = void 0; + var x; + (function (x) { +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function (a) { ++ class c { ++ foo(a) { + return a; +- }; +- return c; +- }()); ++ } ++ } + x.c = c; + })(x || (exports.x = x = {})); + var m2; + (function (m2) { +- var m3; ++ let m3; + (function (m3) { + var c = x.c; + m3.cProp = new c(); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.symbols index 5cfa1a8a39..b76829932e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasClassInsideLocalModuleWithoutExportAccessError.ts === -export module x { +export namespace x { >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) foo(a: number) { >foo : Symbol(c.foo, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 1, 20)) @@ -17,20 +17,20 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : Symbol(m2, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 6, 1)) - export module m3 { ->m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 18)) + export namespace m3 { +>m3 : Symbol(m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 21)) import c = x.c; ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 9, 25)) >x : Symbol(x, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) export var cProp = new c(); >cProp : Symbol(cProp, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 11, 18)) ->c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 9, 22)) +>c : Symbol(c, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 9, 25)) var cReturnVal = cProp.foo(10); >cReturnVal : Symbol(cReturnVal, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 12, 11)) @@ -42,7 +42,7 @@ export module m2 { export var d = new m2.m3.c(); >d : Symbol(d, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 16, 10)) ->m2.m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 18)) +>m2.m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 21)) >m2 : Symbol(m2, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 6, 1)) ->m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 18)) +>m3 : Symbol(m2.m3, Decl(internalAliasClassInsideLocalModuleWithoutExportAccessError.ts, 8, 21)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.types b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.types index e82ceb4444..138a65da19 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasClassInsideLocalModuleWithoutExportAccessError.ts === -export module x { +export namespace x { >x : typeof x export class c { @@ -17,10 +17,10 @@ export module x { } } -export module m2 { +export namespace m2 { >m2 : typeof m2 - export module m3 { + export namespace m3 { >m3 : typeof m3 import c = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js index a4c686d9f4..f3b534293a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts] //// //// [internalAliasClassInsideTopLevelModuleWithExport.ts] -export module x { +export namespace x { export class c { foo(a: number) { return a; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff index 5bc6b0a911..30ead2cef8 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff @@ -8,9 +8,18 @@ +exports.cProp = exports.x = void 0; var x; (function (x) { - class c { -@@= skipped -10, +10 lines =@@ - } +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function (a) { ++ class c { ++ foo(a) { + return a; +- }; +- return c; +- }()); ++ } ++ } x.c = c; })(x || (exports.x = x = {})); -exports.xc = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.symbols index 222d904c56..288812a59c 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts] //// === internalAliasClassInsideTopLevelModuleWithExport.ts === -export module x { +export namespace x { >x : Symbol(x, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 20)) foo(a: number) { >foo : Symbol(c.foo, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 1, 20)) @@ -20,7 +20,7 @@ export module x { export import xc = x.c; >xc : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 6, 1)) >x : Symbol(x, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 0)) ->c : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 17)) +>c : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 0, 20)) export var cProp = new xc(); >cProp : Symbol(cProp, Decl(internalAliasClassInsideTopLevelModuleWithExport.ts, 9, 10)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.types index 1bd582404e..13892d27b2 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithExport.ts] //// === internalAliasClassInsideTopLevelModuleWithExport.ts === -export module x { +export namespace x { >x : typeof x export class c { diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js index a08a459766..4192f9e102 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts] //// //// [internalAliasClassInsideTopLevelModuleWithoutExport.ts] -export module x { +export namespace x { export class c { foo(a: number) { return a; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff index 02dab15e72..84fcf46707 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff @@ -1,7 +1,21 @@ --- old.internalAliasClassInsideTopLevelModuleWithoutExport.js +++ new.internalAliasClassInsideTopLevelModuleWithoutExport.js -@@= skipped -25, +25 lines =@@ - } +@@= skipped -18, +18 lines =@@ + exports.cProp = exports.x = void 0; + var x; + (function (x) { +- var c = /** @class */ (function () { +- function c() { +- } +- c.prototype.foo = function (a) { ++ class c { ++ foo(a) { + return a; +- }; +- return c; +- }()); ++ } ++ } x.c = c; })(x || (exports.x = x = {})); -var xc = x.c; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.symbols index cd667da63a..87f991b79c 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts] //// === internalAliasClassInsideTopLevelModuleWithoutExport.ts === -export module x { +export namespace x { >x : Symbol(x, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 0)) export class c { ->c : Symbol(c, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 17)) +>c : Symbol(c, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 20)) foo(a: number) { >foo : Symbol(c.foo, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 1, 20)) @@ -20,7 +20,7 @@ export module x { import xc = x.c; >xc : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 6, 1)) >x : Symbol(x, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 0)) ->c : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 17)) +>c : Symbol(xc, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 0, 20)) export var cProp = new xc(); >cProp : Symbol(cProp, Decl(internalAliasClassInsideTopLevelModuleWithoutExport.ts, 9, 10)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.types index bd532d4f40..91e98ad663 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.ts] //// === internalAliasClassInsideTopLevelModuleWithoutExport.ts === -export module x { +export namespace x { >x : typeof x export class c { diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js index 5e4eac99b8..7ce58c39b7 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnum.ts] //// //// [internalAliasEnum.ts] -module a { +namespace a { export enum weekend { Friday, Saturday, @@ -9,7 +9,7 @@ module a { } } -module c { +namespace c { import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js.diff new file mode 100644 index 0000000000..bb60b97da2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.js.diff @@ -0,0 +1,11 @@ +--- old.internalAliasEnum.js ++++ new.internalAliasEnum.js +@@= skipped -17, +17 lines =@@ + //// [internalAliasEnum.js] + var a; + (function (a) { +- var weekend; ++ let weekend; + (function (weekend) { + weekend[weekend["Friday"] = 0] = "Friday"; + weekend[weekend["Saturday"] = 1] = "Saturday"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.symbols index 7ebd443be2..4627995fe1 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasEnum.ts] //// === internalAliasEnum.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasEnum.ts, 0, 0)) export enum weekend { ->weekend : Symbol(weekend, Decl(internalAliasEnum.ts, 0, 10)) +>weekend : Symbol(weekend, Decl(internalAliasEnum.ts, 0, 13)) Friday, >Friday : Symbol(weekend.Friday, Decl(internalAliasEnum.ts, 1, 25)) @@ -18,19 +18,19 @@ module a { } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasEnum.ts, 6, 1)) import b = a.weekend; ->b : Symbol(b, Decl(internalAliasEnum.ts, 8, 10)) +>b : Symbol(b, Decl(internalAliasEnum.ts, 8, 13)) >a : Symbol(a, Decl(internalAliasEnum.ts, 0, 0)) ->weekend : Symbol(b, Decl(internalAliasEnum.ts, 0, 10)) +>weekend : Symbol(b, Decl(internalAliasEnum.ts, 0, 13)) export var bVal: b = b.Sunday; >bVal : Symbol(bVal, Decl(internalAliasEnum.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasEnum.ts, 8, 10)) +>b : Symbol(b, Decl(internalAliasEnum.ts, 8, 13)) >b.Sunday : Symbol(b.Sunday, Decl(internalAliasEnum.ts, 3, 17)) ->b : Symbol(b, Decl(internalAliasEnum.ts, 8, 10)) +>b : Symbol(b, Decl(internalAliasEnum.ts, 8, 13)) >Sunday : Symbol(b.Sunday, Decl(internalAliasEnum.ts, 3, 17)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.types b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.types index 9e83cd66b5..b3fac2fdcd 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnum.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnum.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnum.ts] //// === internalAliasEnum.ts === -module a { +namespace a { >a : typeof a export enum weekend { @@ -18,7 +18,7 @@ module a { } } -module c { +namespace c { >c : typeof c import b = a.weekend; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js index 8158bca9e2..30e574e421 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts] //// //// [internalAliasEnumInsideLocalModuleWithExport.ts] -export module a { +export namespace a { export enum weekend { Friday, Saturday, @@ -9,7 +9,7 @@ export module a { } } -export module c { +export namespace c { export import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js.diff new file mode 100644 index 0000000000..e93677cb16 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.js.diff @@ -0,0 +1,11 @@ +--- old.internalAliasEnumInsideLocalModuleWithExport.js ++++ new.internalAliasEnumInsideLocalModuleWithExport.js +@@= skipped -20, +20 lines =@@ + exports.c = exports.a = void 0; + var a; + (function (a) { +- var weekend; ++ let weekend; + (function (weekend) { + weekend[weekend["Friday"] = 0] = "Friday"; + weekend[weekend["Saturday"] = 1] = "Saturday"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.symbols index ae6ccb94b8..575e09f2dd 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts] //// === internalAliasEnumInsideLocalModuleWithExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 0)) export enum weekend { ->weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 17)) +>weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 20)) Friday, >Friday : Symbol(weekend.Friday, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 1, 25)) @@ -18,19 +18,19 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 6, 1)) export import b = a.weekend; ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 20)) >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 0)) ->weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 17)) +>weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 0, 20)) export var bVal: b = b.Sunday; >bVal : Symbol(bVal, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 20)) >b.Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 3, 17)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 8, 20)) >Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithExport.ts, 3, 17)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.types index 884a960504..07fe32d9d2 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithExport.ts] //// === internalAliasEnumInsideLocalModuleWithExport.ts === -export module a { +export namespace a { >a : typeof a export enum weekend { @@ -18,7 +18,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c export import b = a.weekend; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js index 704bb82697..5819c51519 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts] //// //// [internalAliasEnumInsideLocalModuleWithoutExport.ts] -export module a { +export namespace a { export enum weekend { Friday, Saturday, @@ -9,7 +9,7 @@ export module a { } } -export module c { +export namespace c { import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js.diff new file mode 100644 index 0000000000..f2e76b240e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.js.diff @@ -0,0 +1,11 @@ +--- old.internalAliasEnumInsideLocalModuleWithoutExport.js ++++ new.internalAliasEnumInsideLocalModuleWithoutExport.js +@@= skipped -20, +20 lines =@@ + exports.c = exports.a = void 0; + var a; + (function (a) { +- var weekend; ++ let weekend; + (function (weekend) { + weekend[weekend["Friday"] = 0] = "Friday"; + weekend[weekend["Saturday"] = 1] = "Saturday"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.symbols index 215e585662..a1d01ce4ba 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts] //// === internalAliasEnumInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 0)) export enum weekend { ->weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 17)) +>weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 20)) Friday, >Friday : Symbol(weekend.Friday, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 1, 25)) @@ -18,19 +18,19 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 6, 1)) import b = a.weekend; ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 20)) >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 0)) ->weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 17)) +>weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 0, 20)) export var bVal: b = b.Sunday; >bVal : Symbol(bVal, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 20)) >b.Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 3, 17)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 8, 20)) >Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithoutExport.ts, 3, 17)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.types index da6ef6aa36..36d66dc457 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExport.ts] //// === internalAliasEnumInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : typeof a export enum weekend { @@ -18,7 +18,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.weekend; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt index bfb69ade57..b6e6834372 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.errors.txt @@ -2,7 +2,7 @@ internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts(14,21): error TS23 ==== internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== - export module a { + export namespace a { export enum weekend { Friday, Saturday, @@ -10,7 +10,7 @@ internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts(14,21): error TS23 } } - export module c { + export namespace c { import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index 0af41aa1ff..f020f103e0 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts] //// //// [internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts] -export module a { +export namespace a { export enum weekend { Friday, Saturday, @@ -9,7 +9,7 @@ export module a { } } -export module c { +export namespace c { import b = a.weekend; export var bVal: b = b.Sunday; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js.diff new file mode 100644 index 0000000000..8728fad80d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js.diff @@ -0,0 +1,11 @@ +--- old.internalAliasEnumInsideLocalModuleWithoutExportAccessError.js ++++ new.internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +@@= skipped -21, +21 lines =@@ + exports.c = exports.a = void 0; + var a; + (function (a) { +- var weekend; ++ let weekend; + (function (weekend) { + weekend[weekend["Friday"] = 0] = "Friday"; + weekend[weekend["Saturday"] = 1] = "Saturday"; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.symbols index fb3f53b44b..ab16730f5a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) export enum weekend { ->weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>weekend : Symbol(weekend, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) Friday, >Friday : Symbol(weekend.Friday, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 1, 25)) @@ -18,19 +18,19 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 6, 1)) import b = a.weekend; ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 20)) >a : Symbol(a, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) ->weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>weekend : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) export var bVal: b = b.Sunday; >bVal : Symbol(bVal, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 20)) >b.Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 3, 17)) ->b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 8, 20)) >Sunday : Symbol(b.Sunday, Decl(internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts, 3, 17)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.types b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.types index 879485ccd1..c3eac571a9 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasEnumInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : typeof a export enum weekend { @@ -18,7 +18,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.weekend; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.js index 987df6fe46..2b1cbd6307 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/internalAliasFunction.ts] //// //// [internalAliasFunction.ts] -module a { +namespace a { export function foo(x: number) { return x; } } -module c { +namespace c { import b = a.foo; export var bVal = b(10); export var bVal2 = b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.symbols index 8f9ae5e861..74b311c1a4 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasFunction.ts] //// === internalAliasFunction.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasFunction.ts, 0, 0)) export function foo(x: number) { ->foo : Symbol(foo, Decl(internalAliasFunction.ts, 0, 10)) +>foo : Symbol(foo, Decl(internalAliasFunction.ts, 0, 13)) >x : Symbol(x, Decl(internalAliasFunction.ts, 1, 24)) return x; @@ -13,20 +13,20 @@ module a { } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasFunction.ts, 4, 1)) import b = a.foo; ->b : Symbol(b, Decl(internalAliasFunction.ts, 6, 10)) +>b : Symbol(b, Decl(internalAliasFunction.ts, 6, 13)) >a : Symbol(a, Decl(internalAliasFunction.ts, 0, 0)) ->foo : Symbol(b, Decl(internalAliasFunction.ts, 0, 10)) +>foo : Symbol(b, Decl(internalAliasFunction.ts, 0, 13)) export var bVal = b(10); >bVal : Symbol(bVal, Decl(internalAliasFunction.ts, 8, 14)) ->b : Symbol(b, Decl(internalAliasFunction.ts, 6, 10)) +>b : Symbol(b, Decl(internalAliasFunction.ts, 6, 13)) export var bVal2 = b; >bVal2 : Symbol(bVal2, Decl(internalAliasFunction.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasFunction.ts, 6, 10)) +>b : Symbol(b, Decl(internalAliasFunction.ts, 6, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.types b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.types index cbd8d879d5..2c3620e09b 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunction.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunction.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunction.ts] //// === internalAliasFunction.ts === -module a { +namespace a { >a : typeof a export function foo(x: number) { @@ -13,7 +13,7 @@ module a { } } -module c { +namespace c { >c : typeof c import b = a.foo; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.js index b0f4d96f6f..a6650d34c5 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts] //// //// [internalAliasFunctionInsideLocalModuleWithExport.ts] -export module a { +export namespace a { export function foo(x: number) { return x; } } -export module c { +export namespace c { export import b = a.foo; export var bVal = b(10); export var bVal2 = b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.symbols index a791abf9a2..0db0631684 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts] //// === internalAliasFunctionInsideLocalModuleWithExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 0)) export function foo(x: number) { ->foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 17)) +>foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 20)) >x : Symbol(x, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 1, 24)) return x; @@ -13,20 +13,20 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 4, 1)) export import b = a.foo; ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 20)) >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 0)) ->foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 17)) +>foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 0, 20)) export var bVal = b(10); >bVal : Symbol(bVal, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 8, 14)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 20)) export var bVal2 = b; >bVal2 : Symbol(bVal2, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithExport.ts, 6, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.types index ff3b284448..0700187100 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithExport.ts] //// === internalAliasFunctionInsideLocalModuleWithExport.ts === -export module a { +export namespace a { >a : typeof a export function foo(x: number) { @@ -13,7 +13,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c export import b = a.foo; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.js index a825869db9..2220e6a466 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts] //// //// [internalAliasFunctionInsideLocalModuleWithoutExport.ts] -export module a { +export namespace a { export function foo(x: number) { return x; } } -export module c { +export namespace c { import b = a.foo; var bVal = b(10); export var bVal2 = b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.symbols index ad137a0a68..beaa5999c6 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts] //// === internalAliasFunctionInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 0)) export function foo(x: number) { ->foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 17)) +>foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 20)) >x : Symbol(x, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 1, 24)) return x; @@ -13,20 +13,20 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 4, 1)) import b = a.foo; ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 20)) >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 0)) ->foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 17)) +>foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 0, 20)) var bVal = b(10); >bVal : Symbol(bVal, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 8, 7)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 20)) export var bVal2 = b; >bVal2 : Symbol(bVal2, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExport.ts, 6, 20)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.types index 454af06efb..cde244f6b1 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExport.ts] //// === internalAliasFunctionInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : typeof a export function foo(x: number) { @@ -13,7 +13,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.foo; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt index e5aeb0fe3a..247df15b61 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.errors.txt @@ -2,13 +2,13 @@ internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts(12,11): error ==== internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== - export module a { + export namespace a { export function foo(x: number) { return x; } } - export module c { + export namespace c { import b = a.foo; var bVal = b(10); export var bVal2 = b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js index 8c5a35063f..3f2d5e95ce 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.js @@ -1,13 +1,13 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts] //// //// [internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts] -export module a { +export namespace a { export function foo(x: number) { return x; } } -export module c { +export namespace c { import b = a.foo; var bVal = b(10); export var bVal2 = b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.symbols index bf3b07d1ab..4028ad4932 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) export function foo(x: number) { ->foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>foo : Symbol(foo, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) >x : Symbol(x, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 1, 24)) return x; @@ -13,21 +13,21 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 4, 1)) import b = a.foo; ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 20)) >a : Symbol(a, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) ->foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>foo : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) var bVal = b(10); >bVal : Symbol(bVal, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 8, 7)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 20)) export var bVal2 = b; >bVal2 : Symbol(bVal2, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 17)) +>b : Symbol(b, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 6, 20)) } var d = c.b(11); >d : Symbol(d, Decl(internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts, 11, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.types b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.types index 13304de122..0017c1bb70 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasFunctionInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : typeof a export function foo(x: number) { @@ -13,7 +13,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.foo; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js index 6c6bd17bab..744b95b871 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts] //// //// [internalAliasFunctionInsideTopLevelModuleWithoutExport.ts] -export module a { +export namespace a { export function foo(x: number) { return x; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.symbols index 7f695ecc01..21cd469627 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts] //// === internalAliasFunctionInsideTopLevelModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 0)) export function foo(x: number) { ->foo : Symbol(foo, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 17)) +>foo : Symbol(foo, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 20)) >x : Symbol(x, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 1, 24)) return x; @@ -16,7 +16,7 @@ export module a { import b = a.foo; >b : Symbol(b, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 4, 1)) >a : Symbol(a, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 0)) ->foo : Symbol(b, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 17)) +>foo : Symbol(b, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 0, 20)) export var bVal = b(10); >bVal : Symbol(bVal, Decl(internalAliasFunctionInsideTopLevelModuleWithoutExport.ts, 7, 10)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.types index ae55d9aa1e..e09970699e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.ts] //// === internalAliasFunctionInsideTopLevelModuleWithoutExport.ts === -export module a { +export namespace a { >a : typeof a export function foo(x: number) { diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js index d9b642f482..e24e584a93 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasInitializedModule.ts] //// //// [internalAliasInitializedModule.ts] -module a { - export module b { +namespace a { + export namespace b { export class c { } } } -module c { +namespace c { import b = a.b; export var x: b.c = new b.c(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js.diff new file mode 100644 index 0000000000..26bf9f5995 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.js.diff @@ -0,0 +1,19 @@ +--- old.internalAliasInitializedModule.js ++++ new.internalAliasInitializedModule.js +@@= skipped -15, +15 lines =@@ + //// [internalAliasInitializedModule.js] + var a; + (function (a) { +- var b; ++ let b; + (function (b) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + b.c = c; + })(b = a.b || (a.b = {})); + })(a || (a = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.symbols index aa503c00f8..949f66d282 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.symbols @@ -1,31 +1,31 @@ //// [tests/cases/compiler/internalAliasInitializedModule.ts] //// === internalAliasInitializedModule.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasInitializedModule.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasInitializedModule.ts, 0, 10)) + export namespace b { +>b : Symbol(b, Decl(internalAliasInitializedModule.ts, 0, 13)) export class c { ->c : Symbol(c, Decl(internalAliasInitializedModule.ts, 1, 21)) +>c : Symbol(c, Decl(internalAliasInitializedModule.ts, 1, 24)) } } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasInitializedModule.ts, 5, 1)) import b = a.b; ->b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 10)) +>b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 13)) >a : Symbol(a, Decl(internalAliasInitializedModule.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasInitializedModule.ts, 0, 10)) +>b : Symbol(b, Decl(internalAliasInitializedModule.ts, 0, 13)) export var x: b.c = new b.c(); >x : Symbol(x, Decl(internalAliasInitializedModule.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 10)) ->c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 21)) ->b.c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 21)) ->b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 10)) ->c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 13)) +>c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 24)) +>b.c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 24)) +>b : Symbol(b, Decl(internalAliasInitializedModule.ts, 7, 13)) +>c : Symbol(b.c, Decl(internalAliasInitializedModule.ts, 1, 24)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.types b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.types index 51115cca98..df44200d2d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModule.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/internalAliasInitializedModule.ts] //// === internalAliasInitializedModule.ts === -module a { +namespace a { >a : typeof a - export module b { + export namespace b { >b : typeof b export class c { @@ -13,7 +13,7 @@ module a { } } -module c { +namespace c { >c : typeof c import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js index 1b57712806..488d0d2061 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts] //// //// [internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts] -export module a { - export module b { +export namespace a { + export namespace b { export class c { } } } -export module c { +export namespace c { import b = a.b; export var x: b.c = new b.c(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js.diff new file mode 100644 index 0000000000..c5c34f9302 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.js.diff @@ -0,0 +1,19 @@ +--- old.internalAliasInitializedModuleInsideLocalModuleWithoutExport.js ++++ new.internalAliasInitializedModuleInsideLocalModuleWithoutExport.js +@@= skipped -18, +18 lines =@@ + exports.c = exports.a = void 0; + var a; + (function (a) { +- var b; ++ let b; + (function (b) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + b.c = c; + })(b = a.b || (a.b = {})); + })(a || (exports.a = a = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.symbols index 4b7e43281b..3a9564bece 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.symbols @@ -1,31 +1,31 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts] //// === internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 20)) export class c { ->c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) +>c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) } } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 5, 1)) import b = a.b; ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 17)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 20)) >a : Symbol(a, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 0, 20)) export var x: b.c = new b.c(); >x : Symbol(x, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 17)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) ->b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 17)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 20)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) +>b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 7, 20)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.types index df9b9dcde6..7ebb98ec46 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts] //// === internalAliasInitializedModuleInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : typeof a - export module b { + export namespace b { >b : typeof b export class c { @@ -13,7 +13,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt index 408c37a10f..45363b8b1a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.errors.txt @@ -2,14 +2,14 @@ internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts(13,22 ==== internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== - export module a { - export module b { + export namespace a { + export namespace b { export class c { } } } - export module c { + export namespace c { import b = a.b; export var x: b.c = new b.c(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js index 429f0b4643..f19590b25f 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts] //// //// [internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts] -export module a { - export module b { +export namespace a { + export namespace b { export class c { } } } -export module c { +export namespace c { import b = a.b; export var x: b.c = new b.c(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js.diff new file mode 100644 index 0000000000..bc70cc4727 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js.diff @@ -0,0 +1,19 @@ +--- old.internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js ++++ new.internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.js +@@= skipped -20, +20 lines =@@ + exports.d = exports.c = exports.a = void 0; + var a; + (function (a) { +- var b; ++ let b; + (function (b) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } + b.c = c; + })(b = a.b || (a.b = {})); + })(a || (exports.a = a = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.symbols index dc78ad8f0d..e2fafee6ac 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.symbols @@ -1,33 +1,33 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) export class c { ->c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 21)) +>c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 24)) } } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 5, 1)) import b = a.b; ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 17)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 20)) >a : Symbol(a, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 0, 20)) export var x: b.c = new b.c(); >x : Symbol(x, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 9, 14)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 17)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 21)) ->b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 21)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 17)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 20)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 24)) +>b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 24)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 7, 20)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts, 1, 24)) } export var d = new c.b.c(); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.types b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.types index 333d72f53b..acedea49b0 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasInitializedModuleInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : typeof a - export module b { + export namespace b { >b : typeof b export class c { @@ -13,7 +13,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js index 63656bc076..0461e52f50 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts] //// //// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts] -export module a { - export module b { +export namespace a { + export namespace b { export class c { } } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff index bc977f9b52..11bd9d85b3 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff @@ -8,8 +8,16 @@ +exports.x = exports.a = void 0; var a; (function (a) { - let b; -@@= skipped -10, +10 lines =@@ +- var b; ++ let b; + (function (b) { +- var c = /** @class */ (function () { +- function c() { +- } +- return c; +- }()); ++ class c { ++ } b.c = c; })(b = a.b || (a.b = {})); })(a || (exports.a = a = {})); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.symbols index 828b4aa004..4c1f31341e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts] //// === internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 20)) export class c { ->c : Symbol(c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 21)) +>c : Symbol(c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 24)) } } } @@ -16,13 +16,13 @@ export module a { export import b = a.b; >b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 5, 1)) >a : Symbol(a, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 0, 20)) export var x: b.c = new b.c(); >x : Symbol(x, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 8, 10)) >b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 5, 1)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 21)) ->b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 21)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 24)) +>b.c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 24)) >b : Symbol(b, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 5, 1)) ->c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 21)) +>c : Symbol(b.c, Decl(internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts, 1, 24)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.types index 605aeca007..1df59d014d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.types @@ -1,10 +1,10 @@ //// [tests/cases/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts] //// === internalAliasInitializedModuleInsideTopLevelModuleWithExport.ts === -export module a { +export namespace a { >a : typeof a - export module b { + export namespace b { >b : typeof b export class c { diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.js b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.js index 1d58c80f52..f4ba705fd0 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/internalAliasInterface.ts] //// //// [internalAliasInterface.ts] -module a { +namespace a { export interface I { } } -module c { +namespace c { import b = a.I; export var x: b; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.symbols index 5b655587b0..bf15c4f90e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/internalAliasInterface.ts] //// === internalAliasInterface.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasInterface.ts, 0, 0)) export interface I { ->I : Symbol(I, Decl(internalAliasInterface.ts, 0, 10)) +>I : Symbol(I, Decl(internalAliasInterface.ts, 0, 13)) } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasInterface.ts, 3, 1)) import b = a.I; ->b : Symbol(b, Decl(internalAliasInterface.ts, 5, 10)) +>b : Symbol(b, Decl(internalAliasInterface.ts, 5, 13)) >a : Symbol(a, Decl(internalAliasInterface.ts, 0, 0)) ->I : Symbol(b, Decl(internalAliasInterface.ts, 0, 10)) +>I : Symbol(b, Decl(internalAliasInterface.ts, 0, 13)) export var x: b; >x : Symbol(x, Decl(internalAliasInterface.ts, 7, 14)) ->b : Symbol(b, Decl(internalAliasInterface.ts, 5, 10)) +>b : Symbol(b, Decl(internalAliasInterface.ts, 5, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.types b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.types index 256b14e511..afc7853bbe 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterface.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterface.types @@ -1,12 +1,12 @@ //// [tests/cases/compiler/internalAliasInterface.ts] //// === internalAliasInterface.ts === -module a { +namespace a { export interface I { } } -module c { +namespace c { >c : typeof c import b = a.I; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.js index 3fdafa56c8..b8e9b91e05 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.ts] //// //// [internalAliasInterfaceInsideTopLevelModuleWithExport.ts] -export module a { +export namespace a { export interface I { } } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.symbols index 8a154681b3..44152ec80a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.symbols @@ -1,18 +1,18 @@ //// [tests/cases/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.ts] //// === internalAliasInterfaceInsideTopLevelModuleWithExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 0)) export interface I { ->I : Symbol(I, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 17)) +>I : Symbol(I, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 20)) } } export import b = a.I; >b : Symbol(b, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 3, 1)) >a : Symbol(a, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 0)) ->I : Symbol(b, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 17)) +>I : Symbol(b, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 0, 20)) export var x: b; >x : Symbol(x, Decl(internalAliasInterfaceInsideTopLevelModuleWithExport.ts, 6, 10)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.types index b187f5c95c..59b630a11c 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasInterfaceInsideTopLevelModuleWithExport.ts] //// === internalAliasInterfaceInsideTopLevelModuleWithExport.ts === -export module a { +export namespace a { export interface I { } } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.js b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.js index eec2a1dd93..10f8c4fc40 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/internalAliasUninitializedModule.ts] //// //// [internalAliasUninitializedModule.ts] -module a { - export module b { +namespace a { + export namespace b { export interface I { foo(); } } } -module c { +namespace c { import b = a.b; export var x: b.I; x.foo(); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.symbols index a44a835f42..51bcdfe2a8 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasUninitializedModule.ts] //// === internalAliasUninitializedModule.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasUninitializedModule.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 0, 10)) + export namespace b { +>b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 0, 13)) export interface I { ->I : Symbol(I, Decl(internalAliasUninitializedModule.ts, 1, 21)) +>I : Symbol(I, Decl(internalAliasUninitializedModule.ts, 1, 24)) foo(); >foo : Symbol(I.foo, Decl(internalAliasUninitializedModule.ts, 2, 28)) @@ -16,18 +16,18 @@ module a { } } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasUninitializedModule.ts, 6, 1)) import b = a.b; ->b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 8, 10)) +>b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 8, 13)) >a : Symbol(a, Decl(internalAliasUninitializedModule.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 0, 10)) +>b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 0, 13)) export var x: b.I; >x : Symbol(x, Decl(internalAliasUninitializedModule.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 8, 10)) ->I : Symbol(b.I, Decl(internalAliasUninitializedModule.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasUninitializedModule.ts, 8, 13)) +>I : Symbol(b.I, Decl(internalAliasUninitializedModule.ts, 1, 24)) x.foo(); >x.foo : Symbol(b.I.foo, Decl(internalAliasUninitializedModule.ts, 2, 28)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.types b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.types index d65c6dca5c..9ea5074e5b 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModule.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasUninitializedModule.ts] //// === internalAliasUninitializedModule.ts === -module a { - export module b { +namespace a { + export namespace b { export interface I { foo(); >foo : () => any @@ -10,7 +10,7 @@ module a { } } -module c { +namespace c { >c : typeof c import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.js index a2a8f84d0a..b4948557f9 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.ts] //// //// [internalAliasUninitializedModuleInsideLocalModuleWithExport.ts] -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); } } } -export module c { +export namespace c { export import b = a.b; export var x: b.I; x.foo(); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.symbols index da3669a869..2b36169fa0 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.ts] //// === internalAliasUninitializedModuleInsideLocalModuleWithExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 20)) export interface I { ->I : Symbol(I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 1, 21)) +>I : Symbol(I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 1, 24)) foo(); >foo : Symbol(I.foo, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 2, 28)) @@ -16,18 +16,18 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 6, 1)) export import b = a.b; ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 8, 20)) >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 0, 20)) export var x: b.I; >x : Symbol(x, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 8, 17)) ->I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 8, 20)) +>I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 1, 24)) x.foo(); >x.foo : Symbol(b.I.foo, Decl(internalAliasUninitializedModuleInsideLocalModuleWithExport.ts, 2, 28)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.types index 2e138a465d..c6b329cc35 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithExport.ts] //// === internalAliasUninitializedModuleInsideLocalModuleWithExport.ts === -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); >foo : () => any @@ -10,7 +10,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c export import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js index d1373b7f90..97fa467ab0 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.js @@ -1,15 +1,15 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts] //// //// [internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts] -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); } } } -export module c { +export namespace c { import b = a.b; export var x: b.I; x.foo(); diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.symbols index a1aa543f42..be474c5e37 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts] //// === internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 20)) export interface I { ->I : Symbol(I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) +>I : Symbol(I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) foo(); >foo : Symbol(I.foo, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 2, 28)) @@ -16,18 +16,18 @@ export module a { } } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 6, 1)) import b = a.b; ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 8, 17)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 8, 20)) >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 0, 20)) export var x: b.I; >x : Symbol(x, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 10, 14)) ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 8, 17)) ->I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 1, 21)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 8, 20)) +>I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 1, 24)) x.foo(); >x.foo : Symbol(b.I.foo, Decl(internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts, 2, 28)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.types index 0a7ec69546..0bb488c423 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts] //// === internalAliasUninitializedModuleInsideLocalModuleWithoutExport.ts === -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); >foo : () => any @@ -10,7 +10,7 @@ export module a { } } -export module c { +export namespace c { >c : typeof c import b = a.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js index 49f01fe526..8cf1b21131 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.js @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts] //// //// [internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts] -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.symbols index 6724ca2dde..a2e4d68d8e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.symbols @@ -1,14 +1,14 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts] //// === internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 0)) - export module b { ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 17)) + export namespace b { +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 20)) export interface I { ->I : Symbol(I, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 1, 21)) +>I : Symbol(I, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 1, 24)) foo(); >foo : Symbol(I.foo, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 2, 28)) @@ -19,12 +19,12 @@ export module a { import b = a.b; >b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 6, 1)) >a : Symbol(a, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 0)) ->b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 17)) +>b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 0, 20)) export var x: b.I; >x : Symbol(x, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 9, 10)) >b : Symbol(b, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 6, 1)) ->I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 1, 21)) +>I : Symbol(b.I, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 1, 24)) x.foo(); >x.foo : Symbol(b.I.foo, Decl(internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts, 2, 28)) diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.types index 678832d810..5fca8ea911 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts] //// === internalAliasUninitializedModuleInsideTopLevelModuleWithoutExport.ts === -export module a { - export module b { +export namespace a { + export namespace b { export interface I { foo(); >foo : () => any diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVar.js b/testdata/baselines/reference/submodule/compiler/internalAliasVar.js index 6cc8293a4a..3f45caa186 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVar.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVar.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasVar.ts] //// //// [internalAliasVar.ts] -module a { +namespace a { export var x = 10; } -module c { +namespace c { import b = a.x; export var bVal = b; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVar.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasVar.symbols index a1f80ebafa..7dcfcec972 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVar.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVar.symbols @@ -1,23 +1,23 @@ //// [tests/cases/compiler/internalAliasVar.ts] //// === internalAliasVar.ts === -module a { +namespace a { >a : Symbol(a, Decl(internalAliasVar.ts, 0, 0)) export var x = 10; >x : Symbol(x, Decl(internalAliasVar.ts, 1, 14)) } -module c { +namespace c { >c : Symbol(c, Decl(internalAliasVar.ts, 2, 1)) import b = a.x; ->b : Symbol(b, Decl(internalAliasVar.ts, 4, 10)) +>b : Symbol(b, Decl(internalAliasVar.ts, 4, 13)) >a : Symbol(a, Decl(internalAliasVar.ts, 0, 0)) >x : Symbol(b, Decl(internalAliasVar.ts, 1, 14)) export var bVal = b; >bVal : Symbol(bVal, Decl(internalAliasVar.ts, 6, 14)) ->b : Symbol(b, Decl(internalAliasVar.ts, 4, 10)) +>b : Symbol(b, Decl(internalAliasVar.ts, 4, 13)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVar.types b/testdata/baselines/reference/submodule/compiler/internalAliasVar.types index 76acf41ff5..bcb5db8c43 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVar.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVar.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasVar.ts] //// === internalAliasVar.ts === -module a { +namespace a { >a : typeof a export var x = 10; @@ -9,7 +9,7 @@ module a { >10 : 10 } -module c { +namespace c { >c : typeof c import b = a.x; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt index dd54dd8123..dc9bbcf979 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.errors.txt @@ -2,11 +2,11 @@ internalAliasVarInsideLocalModuleWithoutExportAccessError.ts(10,18): error TS233 ==== internalAliasVarInsideLocalModuleWithoutExportAccessError.ts (1 errors) ==== - export module a { + export namespace a { export var x = 10; } - export module c { + export namespace c { import b = a.x; export var bVal = b; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.js b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.js index c306ede11a..4fa123fc2d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts] //// //// [internalAliasVarInsideLocalModuleWithoutExportAccessError.ts] -export module a { +export namespace a { export var x = 10; } -export module c { +export namespace c { import b = a.x; export var bVal = b; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.symbols index e84c85b8cd..cbf3875c64 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.symbols @@ -1,24 +1,24 @@ //// [tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasVarInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) export var x = 10; >x : Symbol(x, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 1, 14)) } -export module c { +export namespace c { >c : Symbol(c, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 2, 1)) import b = a.x; ->b : Symbol(b, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 4, 17)) +>b : Symbol(b, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 4, 20)) >a : Symbol(a, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 0, 0)) >x : Symbol(b, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 1, 14)) export var bVal = b; >bVal : Symbol(bVal, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 6, 14)) ->b : Symbol(b, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 4, 17)) +>b : Symbol(b, Decl(internalAliasVarInsideLocalModuleWithoutExportAccessError.ts, 4, 20)) } export var z = c.b; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.types b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.types index 777474c862..ed724f47b1 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasVarInsideLocalModuleWithoutExportAccessError.ts] //// === internalAliasVarInsideLocalModuleWithoutExportAccessError.ts === -export module a { +export namespace a { >a : typeof a export var x = 10; @@ -9,7 +9,7 @@ export module a { >10 : 10 } -export module c { +export namespace c { >c : typeof c import b = a.x; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js index bf9a8626b2..f79e47ffd5 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts] //// //// [internalAliasVarInsideTopLevelModuleWithoutExport.ts] -export module a { +export namespace a { export var x = 10; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.symbols index 945cdb2159..95d1fc23c9 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.symbols @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts] //// === internalAliasVarInsideTopLevelModuleWithoutExport.ts === -export module a { +export namespace a { >a : Symbol(a, Decl(internalAliasVarInsideTopLevelModuleWithoutExport.ts, 0, 0)) export var x = 10; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.types b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.types index c4b0c60256..943b893a3d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.ts] //// === internalAliasVarInsideTopLevelModuleWithoutExport.ts === -export module a { +export namespace a { >a : typeof a export var x = 10; diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.js b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.js index 91b7b34f82..7113286dcf 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.js +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.js @@ -1,10 +1,10 @@ //// [tests/cases/compiler/internalAliasWithDottedNameEmit.ts] //// //// [internalAliasWithDottedNameEmit.ts] -module a.b.c { +namespace a.b.c { export var d; } -module a.e.f { +namespace a.e.f { import g = b.c; } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols index fe7efd3065..9d8e99848a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.symbols @@ -1,22 +1,22 @@ //// [tests/cases/compiler/internalAliasWithDottedNameEmit.ts] //// === internalAliasWithDottedNameEmit.ts === -module a.b.c { +namespace a.b.c { >a : Symbol(a, Decl(internalAliasWithDottedNameEmit.ts, 0, 0), Decl(internalAliasWithDottedNameEmit.ts, 2, 1)) ->b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 9)) ->c : Symbol(c, Decl(internalAliasWithDottedNameEmit.ts, 0, 11)) +>b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 12)) +>c : Symbol(c, Decl(internalAliasWithDottedNameEmit.ts, 0, 14)) export var d; >d : Symbol(d, Decl(internalAliasWithDottedNameEmit.ts, 1, 16)) } -module a.e.f { +namespace a.e.f { >a : Symbol(a, Decl(internalAliasWithDottedNameEmit.ts, 0, 0), Decl(internalAliasWithDottedNameEmit.ts, 2, 1)) ->e : Symbol(e, Decl(internalAliasWithDottedNameEmit.ts, 3, 9)) ->f : Symbol(f, Decl(internalAliasWithDottedNameEmit.ts, 3, 11)) +>e : Symbol(e, Decl(internalAliasWithDottedNameEmit.ts, 3, 12)) +>f : Symbol(f, Decl(internalAliasWithDottedNameEmit.ts, 3, 14)) import g = b.c; ->g : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 3, 14)) ->b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 9)) ->c : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 0, 11)) +>g : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 3, 17)) +>b : Symbol(b, Decl(internalAliasWithDottedNameEmit.ts, 0, 12)) +>c : Symbol(g, Decl(internalAliasWithDottedNameEmit.ts, 0, 14)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types index 1b30a8f6a8..911eb2916a 100644 --- a/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types +++ b/testdata/baselines/reference/submodule/compiler/internalAliasWithDottedNameEmit.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalAliasWithDottedNameEmit.ts] //// === internalAliasWithDottedNameEmit.ts === -module a.b.c { +namespace a.b.c { >a : typeof a >b : typeof b >c : typeof c @@ -9,7 +9,7 @@ module a.b.c { export var d; >d : any } -module a.e.f { +namespace a.e.f { import g = b.c; >g : typeof g >b : typeof b diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 48e3e5e593..2bbd7fc379 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -5,12 +5,12 @@ internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts(11,16): class A { aProp: string; } - module A { + namespace A { export interface X { s: string } export var a = 10; } - module B { + namespace B { var A = 1; import Y = A; ~ diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js index cc25ca21dd..11a3484be1 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js @@ -4,12 +4,12 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff index a05066dfca..a91a1ead60 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff @@ -1,14 +1,20 @@ --- old.internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js +++ new.internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js -@@= skipped -16, +16 lines =@@ +@@= skipped -15, +15 lines =@@ + //// [internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + aProp; - } ++} (function (A) { A.a = 10; -@@= skipped -7, +8 lines =@@ + })(A || (A = {})); var B; (function (B) { var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.symbols b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.symbols index ea5f8ed472..d85fc816c2 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.symbols @@ -7,18 +7,18 @@ class A { aProp: string; >aProp : Symbol(A.aProp, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 0, 9)) } -module A { +namespace A { >A : Symbol(A, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 0, 0), Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 2, 1)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 3, 10)) +>X : Symbol(X, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 3, 13)) >s : Symbol(X.s, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 4, 24)) export var a = 10; >a : Symbol(a, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 5, 14)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 6, 1)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.types b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.types index 6cea1edac5..e4de291243 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.types @@ -7,7 +7,7 @@ class A { aProp: string; >aProp : string } -module A { +namespace A { >A : typeof A export interface X { s: string } @@ -18,7 +18,7 @@ module A { >10 : 10 } -module B { +namespace B { >B : typeof B var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js index febe5a635b..5fd10b55a8 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js @@ -4,12 +4,12 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff index f62e163ed5..66f58c89b9 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff @@ -1,10 +1,17 @@ --- old.internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js +++ new.internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + aProp; - } ++} (function (A) { - A.a = 10; \ No newline at end of file + A.a = 10; + })(A || (A = {})); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols index bac3eda8df..54e1da4fcd 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols @@ -7,22 +7,22 @@ class A { aProp: string; >aProp : Symbol(A.aProp, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 9)) } -module A { +namespace A { >A : Symbol(A, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 0), Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 2, 1)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 3, 10)) +>X : Symbol(X, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 3, 13)) >s : Symbol(X.s, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 4, 24)) export var a = 10; >a : Symbol(a, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 5, 14)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 6, 1)) import Y = A; ->Y : Symbol(Y, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 8, 10)) +>Y : Symbol(Y, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 8, 13)) >A : Symbol(Y, Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 0), Decl(internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 2, 1)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types index 6fddc37ed2..e2b9f4957f 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types @@ -7,7 +7,7 @@ class A { aProp: string; >aProp : string } -module A { +namespace A { >A : typeof A export interface X { s: string } @@ -18,7 +18,7 @@ module A { >10 : 10 } -module B { +namespace B { import Y = A; >Y : typeof Y >A : Y diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.errors.txt b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.errors.txt index 4d5964a227..eb1b85ed94 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.errors.txt @@ -2,12 +2,12 @@ internalImportInstantiatedModuleNotReferencingInstance.ts(8,16): error TS2437: M ==== internalImportInstantiatedModuleNotReferencingInstance.ts (1 errors) ==== - module A { + namespace A { export interface X { s: string } export var a = 10; } - module B { + namespace B { var A = 1; import Y = A; ~ diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.js b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.js index 407ca41d6d..2a33d1d20c 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.js @@ -1,12 +1,12 @@ //// [tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts] //// //// [internalImportInstantiatedModuleNotReferencingInstance.ts] -module A { +namespace A { export interface X { s: string } export var a = 10; } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.symbols b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.symbols index 5241cc2855..59cb3636cf 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.symbols @@ -1,18 +1,18 @@ //// [tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts] //// === internalImportInstantiatedModuleNotReferencingInstance.ts === -module A { +namespace A { >A : Symbol(A, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 0, 0)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 0, 10)) +>X : Symbol(X, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 0, 13)) >s : Symbol(X.s, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 1, 24)) export var a = 10; >a : Symbol(a, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 2, 14)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportInstantiatedModuleNotReferencingInstance.ts, 3, 1)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.types b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.types index 2381f0f051..b85d4bf897 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportInstantiatedModuleNotReferencingInstance.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts] //// === internalImportInstantiatedModuleNotReferencingInstance.ts === -module A { +namespace A { >A : typeof A export interface X { s: string } @@ -12,7 +12,7 @@ module A { >10 : 10 } -module B { +namespace B { >B : typeof B var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 1f0885c8f9..01137ba0fc 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -5,11 +5,11 @@ internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts(10,16 class A { aProp: string; } - module A { + namespace A { export interface X { s: string } } - module B { + namespace B { var A = 1; import Y = A; ~ diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js index 7e81eee570..2bc0f66034 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js @@ -4,11 +4,11 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff index 953153cf76..5a04ba2ad4 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js.diff @@ -1,11 +1,17 @@ --- old.internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js +++ new.internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js -@@= skipped -15, +15 lines =@@ +@@= skipped -14, +14 lines =@@ + //// [internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + aProp; - } ++} var B; (function (B) { var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.symbols b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.symbols index 3b055e9e9d..d23af3863e 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.symbols @@ -7,15 +7,15 @@ class A { aProp: string; >aProp : Symbol(A.aProp, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 0, 9)) } -module A { +namespace A { >A : Symbol(A, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 0, 0), Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 2, 1)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 3, 10)) +>X : Symbol(X, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 3, 13)) >s : Symbol(X.s, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 4, 24)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts, 5, 1)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.types b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.types index 81cd8c6b80..fb3d21cc23 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.types @@ -7,12 +7,12 @@ class A { aProp: string; >aProp : string } -module A { +namespace A { export interface X { s: string } >s : string } -module B { +namespace B { >B : typeof B var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js index 401d9798af..c7e5c340e1 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js @@ -4,11 +4,11 @@ class A { aProp: string; } -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff index eb9acb112d..055671eac8 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js.diff @@ -1,8 +1,14 @@ --- old.internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js +++ new.internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + //// [internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.js] - class A { +-var A = /** @class */ (function () { +- function A() { +- } +- return A; +-}()); ++class A { + aProp; - } \ No newline at end of file ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols index 1009fed03d..7106230a9d 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.symbols @@ -7,19 +7,19 @@ class A { aProp: string; >aProp : Symbol(A.aProp, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 9)) } -module A { +namespace A { >A : Symbol(A, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 0), Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 2, 1)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 3, 10)) +>X : Symbol(X, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 3, 13)) >s : Symbol(X.s, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 4, 24)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 5, 1)) import Y = A; ->Y : Symbol(Y, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 7, 10)) +>Y : Symbol(Y, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 7, 13)) >A : Symbol(Y, Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 0, 0), Decl(internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.ts, 2, 1)) } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types index 68dfbeb42e..6f436c04fa 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstanceNoConflict.types @@ -7,12 +7,12 @@ class A { aProp: string; >aProp : string } -module A { +namespace A { export interface X { s: string } >s : string } -module B { +namespace B { import Y = A; >Y : typeof Y >A : Y diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.js b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.js index 256decfe5d..60dea9e0fb 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.js +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.js @@ -1,11 +1,11 @@ //// [tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts] //// //// [internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts] -module A { +namespace A { export interface X { s: string } } -module B { +namespace B { var A = 1; import Y = A; } diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.symbols b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.symbols index de45fbfc15..956d9631b6 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.symbols +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.symbols @@ -1,15 +1,15 @@ //// [tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts] //// === internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts === -module A { +namespace A { >A : Symbol(A, Decl(internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts, 0, 0)) export interface X { s: string } ->X : Symbol(X, Decl(internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts, 0, 10)) +>X : Symbol(X, Decl(internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts, 0, 13)) >s : Symbol(X.s, Decl(internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts, 1, 24)) } -module B { +namespace B { >B : Symbol(B, Decl(internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts, 2, 1)) var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.types b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.types index 492893ed74..659500e029 100644 --- a/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.types +++ b/testdata/baselines/reference/submodule/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.types @@ -1,12 +1,12 @@ //// [tests/cases/compiler/internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts] //// === internalImportUnInstantiatedModuleNotReferencingInstanceNoConflict.ts === -module A { +namespace A { export interface X { s: string } >s : string } -module B { +namespace B { >B : typeof B var A = 1; diff --git a/testdata/baselines/reference/submodule/compiler/intersectionOfTypeVariableHasApparentSignatures.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionOfTypeVariableHasApparentSignatures.js.diff new file mode 100644 index 0000000000..f35a28e2fa --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/intersectionOfTypeVariableHasApparentSignatures.js.diff @@ -0,0 +1,12 @@ +--- old.intersectionOfTypeVariableHasApparentSignatures.js ++++ new.intersectionOfTypeVariableHasApparentSignatures.js +@@= skipped -19, +19 lines =@@ + //// [intersectionOfTypeVariableHasApparentSignatures.js] + f({ + props: { +- children: (function (_a) { +- var x = _a.x; +- }) ++ children: (({ x }) => { }) + } + }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionPropertyCheck.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionPropertyCheck.js.diff index abe516b032..b87456b3e0 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionPropertyCheck.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionPropertyCheck.js.diff @@ -7,4 +7,15 @@ -"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { \ No newline at end of file + for (var s, i = 1, n = arguments.length; i < n; i++) { +@@= skipped -12, +11 lines =@@ + }; + return __assign.apply(this, arguments); + }; +-var obj = { a: { x: 'hello', y: 2 }, c: 5 }; // Nested excess property +-var weak = wrong; // Nested weak object type ++let obj = { a: { x: 'hello', y: 2 }, c: 5 }; // Nested excess property ++let weak = wrong; // Nested weak object type + function foo(x, y) { + x = y; // Mismatched property in source intersection + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionSatisfiesConstraint.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionSatisfiesConstraint.js.diff index 0d6173edf0..e942da8714 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionSatisfiesConstraint.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionSatisfiesConstraint.js.diff @@ -5,6 +5,13 @@ //// [intersectionSatisfiesConstraint.js] -"use strict"; - const myFirstFunction = (param1) => { - const newParam = Object.assign(param1, { otherProperty: 3 }); - mySecondFunction(newParam); \ No newline at end of file +-var myFirstFunction = function (param1) { +- var newParam = Object.assign(param1, { otherProperty: 3 }); ++const myFirstFunction = (param1) => { ++ const newParam = Object.assign(param1, { otherProperty: 3 }); + mySecondFunction(newParam); + }; +-var mySecondFunction = function (newParam) { ++const mySecondFunction = (newParam) => { + return newParam; + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff index 56f35b8476..68654647d9 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionTypeInference1.js.diff @@ -9,5 +9,8 @@ exports.Form3 = void 0; +// Repro from #8801 function alert(s) { } - const parameterFn = (props) => alert(props.store); - const brokenFunction = (f) => (o) => o; \ No newline at end of file +-var parameterFn = function (props) { return alert(props.store); }; +-var brokenFunction = function (f) { return function (o) { return o; }; }; ++const parameterFn = (props) => alert(props.store); ++const brokenFunction = (f) => (o) => o; + exports.Form3 = brokenFunction(parameterFn)({ store: "hello" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.js.diff new file mode 100644 index 0000000000..49123a6526 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.js.diff @@ -0,0 +1,12 @@ +--- old.intersectionTypeNormalization.js ++++ new.intersectionTypeNormalization.js +@@= skipped -124, +124 lines =@@ + return value.str; + } + function foo(so) { +- var val = so; +- var isGenre = val.genreId; ++ const val = so; ++ const isGenre = val.genreId; + return isGenre; + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.types.diff b/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.types.diff new file mode 100644 index 0000000000..09bd33a262 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/intersectionTypeNormalization.types.diff @@ -0,0 +1,14 @@ +--- old.intersectionTypeNormalization.types ++++ new.intersectionTypeNormalization.types +@@= skipped -123, +123 lines =@@ + + if (value.kind === 'int') { + >value.kind === 'int' : boolean +->value.kind : "string" | "int" ++>value.kind : "int" | "string" + >value : IntersectionFail +->kind : "string" | "int" ++>kind : "int" | "string" + >'int' : "int" + + return '' + value.num; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsAndOptionalProperties.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionsAndOptionalProperties.js.diff index cab7556f54..71626ea062 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionsAndOptionalProperties.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionsAndOptionalProperties.js.diff @@ -7,4 +7,14 @@ -"use strict"; x = y; // Error x = z; // Error - function foo(v) { \ No newline at end of file + function foo(v) { +- var x; ++ let x; + x = v; // Error + x.field = v.field; // Error + } + // Repro from #38348 +-var yy = [1]; +-var xx = yy; ++const yy = [1]; ++const xx = yy; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff index 1552e303e5..9697eab2f5 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions.js.diff @@ -11,5 +11,14 @@ exports.assertNodeProperty = assertNodeProperty; +// Repro from #23977 function assertIsElement(node) { - let nodeType = node === null ? null : node.nodeType; - return nodeType === 1; \ No newline at end of file +- var nodeType = node === null ? null : node.nodeType; ++ let nodeType = node === null ? null : node.nodeType; + return nodeType === 1; + } + function assertNodeTagName(node, tagName) { + if (assertIsElement(node)) { +- var nodeTagName = node.tagName.toLowerCase(); ++ const nodeTagName = node.tagName.toLowerCase(); + return nodeTagName === tagName; + } + return false; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff index 7468281772..663da98f0b 100644 --- a/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/intersectionsOfLargeUnions2.js.diff @@ -7,4 +7,17 @@ -// Repro from #24233 Object.defineProperty(exports, "__esModule", { value: true }); exports.assertIsElement = assertIsElement; - exports.assertNodeTagName = assertNodeTagName; \ No newline at end of file + exports.assertNodeTagName = assertNodeTagName; + exports.assertNodeProperty = assertNodeProperty; + function assertIsElement(node) { +- var nodeType = node === null ? null : node.nodeType; ++ let nodeType = node === null ? null : node.nodeType; + return nodeType === 1; + } + function assertNodeTagName(node, tagName) { + if (assertIsElement(node)) { +- var nodeTagName = node.tagName.toLowerCase(); ++ const nodeTagName = node.tagName.toLowerCase(); + return nodeTagName === tagName; + } + return false; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/intrinsics.errors.txt b/testdata/baselines/reference/submodule/compiler/intrinsics.errors.txt index 59c337081a..545052fa23 100644 --- a/testdata/baselines/reference/submodule/compiler/intrinsics.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/intrinsics.errors.txt @@ -7,7 +7,7 @@ intrinsics.ts(10,1): error TS2304: Cannot find name '__proto__'. ~~~~~~~~~~~~~~ !!! error TS2749: 'hasOwnProperty' refers to a value, but is being used as a type here. Did you mean 'typeof hasOwnProperty'? - module m1 { + namespace m1 { export var __proto__; interface __proto__ {} diff --git a/testdata/baselines/reference/submodule/compiler/intrinsics.js b/testdata/baselines/reference/submodule/compiler/intrinsics.js index 8fb4f5774c..c65cf69341 100644 --- a/testdata/baselines/reference/submodule/compiler/intrinsics.js +++ b/testdata/baselines/reference/submodule/compiler/intrinsics.js @@ -3,7 +3,7 @@ //// [intrinsics.ts] var hasOwnProperty: hasOwnProperty; // Error -module m1 { +namespace m1 { export var __proto__; interface __proto__ {} diff --git a/testdata/baselines/reference/submodule/compiler/intrinsics.js.diff b/testdata/baselines/reference/submodule/compiler/intrinsics.js.diff new file mode 100644 index 0000000000..0b0887d545 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/intrinsics.js.diff @@ -0,0 +1,25 @@ +--- old.intrinsics.js ++++ new.intrinsics.js +@@= skipped -19, +19 lines =@@ + var hasOwnProperty; // Error + var m1; + (function (m1) { +- var C = /** @class */ (function () { +- function C() { +- } +- return C; +- }()); ++ class C { ++ } + })(m1 || (m1 = {})); + __proto__ = 0; // Error, __proto__ not defined + m1.__proto__ = 0; +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); ++class Foo { ++} + var foo; + diff --git a/testdata/baselines/reference/submodule/compiler/intrinsics.symbols b/testdata/baselines/reference/submodule/compiler/intrinsics.symbols index 57badd4a6d..3ef123b2b2 100644 --- a/testdata/baselines/reference/submodule/compiler/intrinsics.symbols +++ b/testdata/baselines/reference/submodule/compiler/intrinsics.symbols @@ -5,7 +5,7 @@ var hasOwnProperty: hasOwnProperty; // Error >hasOwnProperty : Symbol(hasOwnProperty, Decl(intrinsics.ts, 0, 3)) >hasOwnProperty : Symbol(hasOwnProperty) -module m1 { +namespace m1 { >m1 : Symbol(m1, Decl(intrinsics.ts, 0, 35)) export var __proto__; diff --git a/testdata/baselines/reference/submodule/compiler/intrinsics.types b/testdata/baselines/reference/submodule/compiler/intrinsics.types index 82ce2a122b..46190dd2f0 100644 --- a/testdata/baselines/reference/submodule/compiler/intrinsics.types +++ b/testdata/baselines/reference/submodule/compiler/intrinsics.types @@ -4,7 +4,7 @@ var hasOwnProperty: hasOwnProperty; // Error >hasOwnProperty : hasOwnProperty -module m1 { +namespace m1 { >m1 : typeof m1 export var __proto__; diff --git a/testdata/baselines/reference/submodule/compiler/invalidContinueInDownlevelAsync.js.diff b/testdata/baselines/reference/submodule/compiler/invalidContinueInDownlevelAsync.js.diff index a2890c0457..f04e3f1492 100644 --- a/testdata/baselines/reference/submodule/compiler/invalidContinueInDownlevelAsync.js.diff +++ b/testdata/baselines/reference/submodule/compiler/invalidContinueInDownlevelAsync.js.diff @@ -13,14 +13,48 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } +-}; -function func() { -- return __awaiter(this, void 0, void 0, function* () { -- if (true) { -- continue; -- } -- else { -- yield 1; -- } +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: +- if (!true) return [3 /*break*/, 1]; +- continue; +- return [3 /*break*/, 3]; +- case 1: return [4 /*yield*/, 1]; +- case 2: +- _a.sent(); +- _a.label = 3; +- case 3: return [2 /*return*/]; +- } +- }); - }); +async function func() { + if (true) { diff --git a/testdata/baselines/reference/submodule/compiler/invalidOptionalChainFromNewExpression.js.diff b/testdata/baselines/reference/submodule/compiler/invalidOptionalChainFromNewExpression.js.diff new file mode 100644 index 0000000000..90e3c8084f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/invalidOptionalChainFromNewExpression.js.diff @@ -0,0 +1,17 @@ +--- old.invalidOptionalChainFromNewExpression.js ++++ new.invalidOptionalChainFromNewExpression.js +@@= skipped -10, +10 lines =@@ + + //// [invalidOptionalChainFromNewExpression.js] + var _a, _b; +-var A = /** @class */ (function () { +- function A() { +- } +- A.prototype.b = function () { }; +- return A; +-}()); ++class A { ++ b() { } ++} + (_a = new A) === null || _a === void 0 ? void 0 : _a.b(); // error + (_b = new A()) === null || _b === void 0 ? void 0 : _b.b(); // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/invalidReferenceSyntax1.js.diff b/testdata/baselines/reference/submodule/compiler/invalidReferenceSyntax1.js.diff new file mode 100644 index 0000000000..6f619c89a4 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/invalidReferenceSyntax1.js.diff @@ -0,0 +1,13 @@ +--- old.invalidReferenceSyntax1.js ++++ new.invalidReferenceSyntax1.js +@@= skipped -7, +7 lines =@@ + + //// [invalidReferenceSyntax1.js] + /// { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; then(success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; diff --git a/testdata/baselines/reference/submodule/compiler/ipromise2.symbols b/testdata/baselines/reference/submodule/compiler/ipromise2.symbols index 56b0b3e7c3..6615cac700 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise2.symbols +++ b/testdata/baselines/reference/submodule/compiler/ipromise2.symbols @@ -1,12 +1,12 @@ //// [tests/cases/compiler/ipromise2.ts] //// === ipromise2.ts === -declare module Windows.Foundation { +declare namespace Windows.Foundation { >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 23)) +>Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 26)) export interface IPromise { ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >T : Symbol(T, Decl(ipromise2.ts, 1, 30)) then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -15,17 +15,17 @@ declare module Windows.Foundation { >success : Symbol(success, Decl(ipromise2.ts, 2, 16)) >value : Symbol(value, Decl(ipromise2.ts, 2, 27)) >T : Symbol(T, Decl(ipromise2.ts, 1, 30)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 2, 13)) >error : Symbol(error, Decl(ipromise2.ts, 2, 52)) >error : Symbol(error, Decl(ipromise2.ts, 2, 62)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 2, 13)) >progress : Symbol(progress, Decl(ipromise2.ts, 2, 89)) >progress : Symbol(progress, Decl(ipromise2.ts, 2, 102)) >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 2, 13)) then(success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -34,7 +34,7 @@ declare module Windows.Foundation { >success : Symbol(success, Decl(ipromise2.ts, 3, 16)) >value : Symbol(value, Decl(ipromise2.ts, 3, 27)) >T : Symbol(T, Decl(ipromise2.ts, 1, 30)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 3, 13)) >error : Symbol(error, Decl(ipromise2.ts, 3, 52)) >error : Symbol(error, Decl(ipromise2.ts, 3, 62)) @@ -42,8 +42,8 @@ declare module Windows.Foundation { >progress : Symbol(progress, Decl(ipromise2.ts, 3, 79)) >progress : Symbol(progress, Decl(ipromise2.ts, 3, 92)) >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 3, 13)) then(success?: (value: T) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -55,13 +55,13 @@ declare module Windows.Foundation { >U : Symbol(U, Decl(ipromise2.ts, 4, 13)) >error : Symbol(error, Decl(ipromise2.ts, 4, 42)) >error : Symbol(error, Decl(ipromise2.ts, 4, 52)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 4, 13)) >progress : Symbol(progress, Decl(ipromise2.ts, 4, 79)) >progress : Symbol(progress, Decl(ipromise2.ts, 4, 92)) >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 4, 13)) then(success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -77,8 +77,8 @@ declare module Windows.Foundation { >progress : Symbol(progress, Decl(ipromise2.ts, 5, 69)) >progress : Symbol(progress, Decl(ipromise2.ts, 5, 82)) >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise2.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise2.ts, 0, 38)) >U : Symbol(U, Decl(ipromise2.ts, 5, 13)) done(success?: (value: T) => any, error?: (error: any) => any, progress?: (progress: any) => void ): void; @@ -101,8 +101,8 @@ declare module Windows.Foundation { var p: Windows.Foundation.IPromise; >p : Symbol(p, Decl(ipromise2.ts, 11, 3)) >Windows : Symbol(Windows, Decl(ipromise2.ts, 0, 0)) ->Foundation : Symbol(Windows.Foundation, Decl(ipromise2.ts, 0, 23)) ->IPromise : Symbol(Windows.Foundation.IPromise, Decl(ipromise2.ts, 0, 35)) +>Foundation : Symbol(Windows.Foundation, Decl(ipromise2.ts, 0, 26)) +>IPromise : Symbol(Windows.Foundation.IPromise, Decl(ipromise2.ts, 0, 38)) var p2 = p.then(function (s) { >p2 : Symbol(p2, Decl(ipromise2.ts, 13, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/ipromise2.types b/testdata/baselines/reference/submodule/compiler/ipromise2.types index 867d8dd37d..e93ecb3775 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise2.types +++ b/testdata/baselines/reference/submodule/compiler/ipromise2.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ipromise2.ts] //// === ipromise2.ts === -declare module Windows.Foundation { +declare namespace Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; >then : { (success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: T) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } diff --git a/testdata/baselines/reference/submodule/compiler/ipromise2.types.diff b/testdata/baselines/reference/submodule/compiler/ipromise2.types.diff index 755fdef161..7b8eec5431 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/ipromise2.types.diff @@ -1,7 +1,7 @@ --- old.ipromise2.types +++ new.ipromise2.types @@= skipped -3, +3 lines =@@ - declare module Windows.Foundation { + declare namespace Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; ->then : { (success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => IPromise, error?: (error: any) => U_1, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => U_1, error?: (error: any) => IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => U_1, error?: (error: any) => U_1, progress?: (progress: any) => void): Windows.Foundation.IPromise; } diff --git a/testdata/baselines/reference/submodule/compiler/ipromise4.js b/testdata/baselines/reference/submodule/compiler/ipromise4.js index ef501525a0..cf91d12a68 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise4.js +++ b/testdata/baselines/reference/submodule/compiler/ipromise4.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ipromise4.ts] //// //// [ipromise4.ts] -declare module Windows.Foundation { +declare namespace Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; then(success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; diff --git a/testdata/baselines/reference/submodule/compiler/ipromise4.symbols b/testdata/baselines/reference/submodule/compiler/ipromise4.symbols index 9f3beaa644..f8e88a5cb2 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise4.symbols +++ b/testdata/baselines/reference/submodule/compiler/ipromise4.symbols @@ -1,12 +1,12 @@ //// [tests/cases/compiler/ipromise4.ts] //// === ipromise4.ts === -declare module Windows.Foundation { +declare namespace Windows.Foundation { >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 23)) +>Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 26)) export interface IPromise { ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >T : Symbol(T, Decl(ipromise4.ts, 1, 30)) then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -15,17 +15,17 @@ declare module Windows.Foundation { >success : Symbol(success, Decl(ipromise4.ts, 2, 16)) >value : Symbol(value, Decl(ipromise4.ts, 2, 27)) >T : Symbol(T, Decl(ipromise4.ts, 1, 30)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 2, 13)) >error : Symbol(error, Decl(ipromise4.ts, 2, 52)) >error : Symbol(error, Decl(ipromise4.ts, 2, 62)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 2, 13)) >progress : Symbol(progress, Decl(ipromise4.ts, 2, 89)) >progress : Symbol(progress, Decl(ipromise4.ts, 2, 102)) >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 2, 13)) then(success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -34,7 +34,7 @@ declare module Windows.Foundation { >success : Symbol(success, Decl(ipromise4.ts, 3, 16)) >value : Symbol(value, Decl(ipromise4.ts, 3, 27)) >T : Symbol(T, Decl(ipromise4.ts, 1, 30)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 3, 13)) >error : Symbol(error, Decl(ipromise4.ts, 3, 52)) >error : Symbol(error, Decl(ipromise4.ts, 3, 62)) @@ -42,8 +42,8 @@ declare module Windows.Foundation { >progress : Symbol(progress, Decl(ipromise4.ts, 3, 79)) >progress : Symbol(progress, Decl(ipromise4.ts, 3, 92)) >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 3, 13)) then(success?: (value: T) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -55,13 +55,13 @@ declare module Windows.Foundation { >U : Symbol(U, Decl(ipromise4.ts, 4, 13)) >error : Symbol(error, Decl(ipromise4.ts, 4, 42)) >error : Symbol(error, Decl(ipromise4.ts, 4, 52)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 4, 13)) >progress : Symbol(progress, Decl(ipromise4.ts, 4, 79)) >progress : Symbol(progress, Decl(ipromise4.ts, 4, 92)) >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 4, 13)) then(success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; @@ -77,8 +77,8 @@ declare module Windows.Foundation { >progress : Symbol(progress, Decl(ipromise4.ts, 5, 69)) >progress : Symbol(progress, Decl(ipromise4.ts, 5, 82)) >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 23)) ->IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 35)) +>Foundation : Symbol(Foundation, Decl(ipromise4.ts, 0, 26)) +>IPromise : Symbol(IPromise, Decl(ipromise4.ts, 0, 38)) >U : Symbol(U, Decl(ipromise4.ts, 5, 13)) done? (success?: (value: T) => any, error?: (error: any) => any, progress?: (progress: any) => void ): void; @@ -97,8 +97,8 @@ declare module Windows.Foundation { var p: Windows.Foundation.IPromise = null; >p : Symbol(p, Decl(ipromise4.ts, 10, 3)) >Windows : Symbol(Windows, Decl(ipromise4.ts, 0, 0)) ->Foundation : Symbol(Windows.Foundation, Decl(ipromise4.ts, 0, 23)) ->IPromise : Symbol(Windows.Foundation.IPromise, Decl(ipromise4.ts, 0, 35)) +>Foundation : Symbol(Windows.Foundation, Decl(ipromise4.ts, 0, 26)) +>IPromise : Symbol(Windows.Foundation.IPromise, Decl(ipromise4.ts, 0, 38)) p.then(function (x) { } ); // should not error >p.then : Symbol(Windows.Foundation.IPromise.then, Decl(ipromise4.ts, 1, 34), Decl(ipromise4.ts, 2, 159), Decl(ipromise4.ts, 3, 149), Decl(ipromise4.ts, 4, 149)) diff --git a/testdata/baselines/reference/submodule/compiler/ipromise4.types b/testdata/baselines/reference/submodule/compiler/ipromise4.types index bb1e9b63e0..aa3cd153bc 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise4.types +++ b/testdata/baselines/reference/submodule/compiler/ipromise4.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/ipromise4.ts] //// === ipromise4.ts === -declare module Windows.Foundation { +declare namespace Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; >then : { (success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; (success?: (value: T) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void): IPromise; (success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void): IPromise; } diff --git a/testdata/baselines/reference/submodule/compiler/ipromise4.types.diff b/testdata/baselines/reference/submodule/compiler/ipromise4.types.diff index dee4790fcd..91cf2b79c8 100644 --- a/testdata/baselines/reference/submodule/compiler/ipromise4.types.diff +++ b/testdata/baselines/reference/submodule/compiler/ipromise4.types.diff @@ -1,7 +1,7 @@ --- old.ipromise4.types +++ new.ipromise4.types @@= skipped -3, +3 lines =@@ - declare module Windows.Foundation { + declare namespace Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; ->then : { (success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => IPromise, error?: (error: any) => U_1, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => U_1, error?: (error: any) => IPromise, progress?: (progress: any) => void): Windows.Foundation.IPromise; (success?: (value: T) => U_1, error?: (error: any) => U_1, progress?: (progress: any) => void): Windows.Foundation.IPromise; } diff --git a/testdata/baselines/reference/submodule/compiler/isArray.symbols.diff b/testdata/baselines/reference/submodule/compiler/isArray.symbols.diff new file mode 100644 index 0000000000..c42e291621 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isArray.symbols.diff @@ -0,0 +1,10 @@ +--- old.isArray.symbols ++++ new.isArray.symbols +@@= skipped -6, +6 lines =@@ + + if (Array.isArray(maybeArray)) { + >Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) + >maybeArray : Symbol(maybeArray, Decl(isArray.ts, 0, 3)) diff --git a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js index 6247281d70..527310c1e5 100644 --- a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js +++ b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js @@ -2,28 +2,28 @@ //// [isDeclarationVisibleNodeKinds.ts] // Function types -module schema { +namespace schema { export function createValidator1(schema: any): (data: T) => T { return undefined; } } // Constructor types -module schema { +namespace schema { export function createValidator2(schema: any): new (data: T) => T { return undefined; } } // union types -module schema { +namespace schema { export function createValidator3(schema: any): number | { new (data: T): T; } { return undefined; } } // Array types -module schema { +namespace schema { export function createValidator4(schema: any): { new (data: T): T; }[] { return undefined; } @@ -31,35 +31,35 @@ module schema { // TypeLiterals -module schema { +namespace schema { export function createValidator5(schema: any): { new (data: T): T } { return undefined; } } // Tuple types -module schema { +namespace schema { export function createValidator6(schema: any): [ new (data: T) => T, number] { return undefined; } } // Paren Types -module schema { +namespace schema { export function createValidator7(schema: any): (new (data: T)=>T )[] { return undefined; } } // Type reference -module schema { +namespace schema { export function createValidator8(schema: any): Array<{ (data: T) : T}> { return undefined; } } -module schema { +namespace schema { export class T { get createValidator9(): (data: T) => T { return undefined; diff --git a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js.diff b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js.diff new file mode 100644 index 0000000000..7446966682 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.js.diff @@ -0,0 +1,33 @@ +--- old.isDeclarationVisibleNodeKinds.js ++++ new.isDeclarationVisibleNodeKinds.js +@@= skipped -128, +128 lines =@@ + schema_8.createValidator8 = createValidator8; + })(schema || (schema = {})); + (function (schema) { +- var T = /** @class */ (function () { +- function T() { +- } +- Object.defineProperty(T.prototype, "createValidator9", { +- get: function () { +- return undefined; +- }, +- enumerable: false, +- configurable: true +- }); +- Object.defineProperty(T.prototype, "createValidator10", { +- set: function (v) { +- }, +- enumerable: false, +- configurable: true +- }); +- return T; +- }()); ++ class T { ++ get createValidator9() { ++ return undefined; ++ } ++ set createValidator10(v) { ++ } ++ } + schema.T = T; + })(schema || (schema = {})); diff --git a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols index 3047367814..c484193eee 100644 --- a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols +++ b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols @@ -2,11 +2,11 @@ === isDeclarationVisibleNodeKinds.ts === // Function types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator1(schema: any): (data: T) => T { ->createValidator1 : Symbol(createValidator1, Decl(isDeclarationVisibleNodeKinds.ts, 1, 15)) +>createValidator1 : Symbol(createValidator1, Decl(isDeclarationVisibleNodeKinds.ts, 1, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 2, 37)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 2, 52)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 2, 55)) @@ -19,11 +19,11 @@ module schema { } // Constructor types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator2(schema: any): new (data: T) => T { ->createValidator2 : Symbol(createValidator2, Decl(isDeclarationVisibleNodeKinds.ts, 8, 15)) +>createValidator2 : Symbol(createValidator2, Decl(isDeclarationVisibleNodeKinds.ts, 8, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 9, 37)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 9, 56)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 9, 59)) @@ -36,11 +36,11 @@ module schema { } // union types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator3(schema: any): number | { new (data: T): T; } { ->createValidator3 : Symbol(createValidator3, Decl(isDeclarationVisibleNodeKinds.ts, 15, 15)) +>createValidator3 : Symbol(createValidator3, Decl(isDeclarationVisibleNodeKinds.ts, 15, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 16, 38)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 16, 68)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 16, 71)) @@ -53,11 +53,11 @@ module schema { } // Array types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator4(schema: any): { new (data: T): T; }[] { ->createValidator4 : Symbol(createValidator4, Decl(isDeclarationVisibleNodeKinds.ts, 22, 15)) +>createValidator4 : Symbol(createValidator4, Decl(isDeclarationVisibleNodeKinds.ts, 22, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 23, 38)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 23, 59)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 23, 62)) @@ -71,11 +71,11 @@ module schema { // TypeLiterals -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator5(schema: any): { new (data: T): T } { ->createValidator5 : Symbol(createValidator5, Decl(isDeclarationVisibleNodeKinds.ts, 30, 15)) +>createValidator5 : Symbol(createValidator5, Decl(isDeclarationVisibleNodeKinds.ts, 30, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 31, 37)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 31, 58)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 31, 61)) @@ -88,11 +88,11 @@ module schema { } // Tuple types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator6(schema: any): [ new (data: T) => T, number] { ->createValidator6 : Symbol(createValidator6, Decl(isDeclarationVisibleNodeKinds.ts, 37, 15)) +>createValidator6 : Symbol(createValidator6, Decl(isDeclarationVisibleNodeKinds.ts, 37, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 38, 37)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 38, 58)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 38, 61)) @@ -105,11 +105,11 @@ module schema { } // Paren Types -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator7(schema: any): (new (data: T)=>T )[] { ->createValidator7 : Symbol(createValidator7, Decl(isDeclarationVisibleNodeKinds.ts, 44, 15)) +>createValidator7 : Symbol(createValidator7, Decl(isDeclarationVisibleNodeKinds.ts, 44, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 45, 37)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 45, 57)) >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 45, 60)) @@ -122,11 +122,11 @@ module schema { } // Type reference -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export function createValidator8(schema: any): Array<{ (data: T) : T}> { ->createValidator8 : Symbol(createValidator8, Decl(isDeclarationVisibleNodeKinds.ts, 51, 15)) +>createValidator8 : Symbol(createValidator8, Decl(isDeclarationVisibleNodeKinds.ts, 51, 18)) >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 52, 37)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 52, 60)) @@ -140,11 +140,11 @@ module schema { } -module schema { +namespace schema { >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 0, 0), Decl(isDeclarationVisibleNodeKinds.ts, 5, 1), Decl(isDeclarationVisibleNodeKinds.ts, 12, 1), Decl(isDeclarationVisibleNodeKinds.ts, 19, 1), Decl(isDeclarationVisibleNodeKinds.ts, 26, 1) ... and 4 more) export class T { ->T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 58, 15)) +>T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 58, 18)) get createValidator9(): (data: T) => T { >createValidator9 : Symbol(T.createValidator9, Decl(isDeclarationVisibleNodeKinds.ts, 59, 20)) diff --git a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols.diff b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols.diff new file mode 100644 index 0000000000..ea6cdee438 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.symbols.diff @@ -0,0 +1,11 @@ +--- old.isDeclarationVisibleNodeKinds.symbols ++++ new.isDeclarationVisibleNodeKinds.symbols +@@= skipped -127, +127 lines =@@ + export function createValidator8(schema: any): Array<{ (data: T) : T}> { + >createValidator8 : Symbol(createValidator8, Decl(isDeclarationVisibleNodeKinds.ts, 51, 18)) + >schema : Symbol(schema, Decl(isDeclarationVisibleNodeKinds.ts, 52, 37)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 52, 60)) + >data : Symbol(data, Decl(isDeclarationVisibleNodeKinds.ts, 52, 63)) + >T : Symbol(T, Decl(isDeclarationVisibleNodeKinds.ts, 52, 60)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.types b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.types index 9581f9d403..b412672796 100644 --- a/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.types +++ b/testdata/baselines/reference/submodule/compiler/isDeclarationVisibleNodeKinds.types @@ -2,7 +2,7 @@ === isDeclarationVisibleNodeKinds.ts === // Function types -module schema { +namespace schema { >schema : typeof schema export function createValidator1(schema: any): (data: T) => T { @@ -16,7 +16,7 @@ module schema { } // Constructor types -module schema { +namespace schema { >schema : typeof schema export function createValidator2(schema: any): new (data: T) => T { @@ -30,7 +30,7 @@ module schema { } // union types -module schema { +namespace schema { >schema : typeof schema export function createValidator3(schema: any): number | { new (data: T): T; } { @@ -44,7 +44,7 @@ module schema { } // Array types -module schema { +namespace schema { >schema : typeof schema export function createValidator4(schema: any): { new (data: T): T; }[] { @@ -59,7 +59,7 @@ module schema { // TypeLiterals -module schema { +namespace schema { >schema : typeof schema export function createValidator5(schema: any): { new (data: T): T } { @@ -73,7 +73,7 @@ module schema { } // Tuple types -module schema { +namespace schema { >schema : typeof schema export function createValidator6(schema: any): [ new (data: T) => T, number] { @@ -87,7 +87,7 @@ module schema { } // Paren Types -module schema { +namespace schema { >schema : typeof schema export function createValidator7(schema: any): (new (data: T)=>T )[] { @@ -101,7 +101,7 @@ module schema { } // Type reference -module schema { +namespace schema { >schema : typeof schema export function createValidator8(schema: any): Array<{ (data: T) : T}> { @@ -115,7 +115,7 @@ module schema { } -module schema { +namespace schema { >schema : typeof schema export class T { diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsExpressions.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsExpressions.types.diff new file mode 100644 index 0000000000..5f81bf8c57 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsExpressions.types.diff @@ -0,0 +1,20 @@ +--- old.isolatedDeclarationErrorsExpressions.types ++++ new.isolatedDeclarationErrorsExpressions.types +@@= skipped -541, +541 lines =@@ + >1 : 1 + + export const [, , b = 1]: [number, number, number | undefined] = [0, 1, 2]; +-> : undefined +-> : undefined + >b : number + >1 : 1 + >[0, 1, 2] : [number, number, number] +@@= skipped -11, +9 lines =@@ + + export function foo([, , b]: [ + >foo : ([, , b]?: [number, number, number]) => void +-> : undefined +-> : undefined + >b : number + + number, \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff new file mode 100644 index 0000000000..723c165e00 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationErrorsObjects.types.diff @@ -0,0 +1,13 @@ +--- old.isolatedDeclarationErrorsObjects.types ++++ new.isolatedDeclarationErrorsObjects.types +@@= skipped -218, +218 lines =@@ + >1 : 1 + + export const oWithSpread = { +->oWithSpread : { c: number; part: { a: number; }; a: number; b: number; } +->{ b: 1, ...part, c: 1, part,} : { c: number; part: { a: number; }; a: number; b: number; } ++>oWithSpread : { a: number; b: number; c: number; part: { a: number; }; } ++>{ b: 1, ...part, c: 1, part,} : { a: number; b: number; c: number; part: { a: number; }; } + + b: 1, + >b : number \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined.js.diff index f80a112b47..f2bb26ec6d 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined.js.diff @@ -1,33 +1,55 @@ --- old.isolatedDeclarationsAddUndefined.js +++ new.isolatedDeclarationsAddUndefined.js -@@= skipped -23, +23 lines =@@ +@@= skipped -22, +22 lines =@@ + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Bar = void 0; - class Bar { -- constructor() { +-var Bar = /** @class */ (function () { +- function Bar() { - this.c = [2]; - this.c3 = 1; - this.r = 1; - this.f = 2; - } +- return Bar; +-}()); ++class Bar { + c = [2]; + c3 = 1; + r = 1; + f = 2; - } ++} exports.Bar = Bar; //// [file2.js] -@@= skipped -18, +16 lines =@@ - } - function foo2(p = (ip = 10, v) => { }) { } - class Bar2 { -- constructor() { + "use strict"; +@@= skipped -16, +13 lines =@@ + exports.Bar2 = void 0; + exports.foo = foo; + exports.foo2 = foo2; +-function foo(p) { +- if (p === void 0) { p = function (ip, v) { +- if (ip === void 0) { ip = 10; } +- }; } +-} +-function foo2(p) { +- if (p === void 0) { p = function (ip, v) { +- if (ip === void 0) { ip = 10; } +- }; } +-} +-var Bar2 = /** @class */ (function () { +- function Bar2() { - this.r = 1; - this.f = 2; - } +- return Bar2; +-}()); ++function foo(p = (ip = 10, v) => { }) { ++} ++function foo2(p = (ip = 10, v) => { }) { } ++class Bar2 { + r = 1; + f = 2; - } ++} exports.Bar2 = Bar2; diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff index b9c92a668b..c850228f5d 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.js.diff @@ -10,30 +10,50 @@ exports.test1 = test1; exports.test2 = test2; exports.test3 = test3; +-var Bar = /** @class */ (function () { +- function Bar(x) { +// https://github.com/microsoft/TypeScript/issues/60123 - class Bar { ++class Bar { + x; - constructor(x) { ++ constructor(x) { this.x = x; } - } +- return Bar; +-}()); ++} exports.Bar = Bar; - class Bar2 { +-var Bar2 = /** @class */ (function () { +- function Bar2(x) { ++class Bar2 { + x; - constructor(x) { ++ constructor(x) { this.x = x; } - } +- return Bar2; +-}()); ++} exports.Bar2 = Bar2; - class Bar3 { +-var Bar3 = /** @class */ (function () { +- function Bar3(x) { ++class Bar3 { + x; - constructor(x) { ++ constructor(x) { this.x = x; } - } +- return Bar3; +-}()); ++} exports.Bar3 = Bar3; - class Bar4 { +-var Bar4 = /** @class */ (function () { +- function Bar4(x) { ++class Bar4 { + x; - constructor(x) { ++ constructor(x) { this.x = x; - } \ No newline at end of file + } +- return Bar4; +-}()); ++} + exports.Bar4 = Bar4; + function test1(x) { } + function test2(x) { } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.symbols.diff b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.symbols.diff new file mode 100644 index 0000000000..104ce70097 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedDeclarationsAddUndefined2.symbols.diff @@ -0,0 +1,45 @@ +--- old.isolatedDeclarationsAddUndefined2.symbols ++++ new.isolatedDeclarationsAddUndefined2.symbols +@@= skipped -7, +7 lines =@@ + + constructor(private x?: Array | undefined) {} + >x : Symbol(Bar.x, Decl(isolatedDeclarationsAddUndefined2.ts, 3, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + export class Bar2 { +@@= skipped -8, +8 lines =@@ + + constructor(private x?: Array) {} + >x : Symbol(Bar2.x, Decl(isolatedDeclarationsAddUndefined2.ts, 7, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + export class Bar3 { +@@= skipped -8, +8 lines =@@ + + constructor(private x: Array | undefined) {} + >x : Symbol(Bar3.x, Decl(isolatedDeclarationsAddUndefined2.ts, 11, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + export class Bar4 { +@@= skipped -8, +8 lines =@@ + + constructor(private x: Array) {} + >x : Symbol(Bar4.x, Decl(isolatedDeclarationsAddUndefined2.ts, 15, 16)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + } + + export function test1(x?: Array | undefined): void {} + >test1 : Symbol(test1, Decl(isolatedDeclarationsAddUndefined2.ts, 16, 1)) + >x : Symbol(x, Decl(isolatedDeclarationsAddUndefined2.ts, 18, 22)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + export function test2(x?: Unresolved | undefined): void {} + >test2 : Symbol(test2, Decl(isolatedDeclarationsAddUndefined2.ts, 18, 53)) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesExportDeclarationType.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesExportDeclarationType.js.diff index 1e89e725c7..e8ee862d5c 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesExportDeclarationType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesExportDeclarationType.js.diff @@ -1,6 +1,15 @@ --- old.isolatedModulesExportDeclarationType.js +++ new.isolatedModulesExportDeclarationType.js -@@= skipped -40, +40 lines =@@ +@@= skipped -28, +28 lines =@@ + //// [test1.js] + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); +-var T = 0; // Error as of #56354 ++const T = 0; // Error as of #56354 + exports.default = T; // Ok + //// [test2.js] + "use strict"; +@@= skipped -12, +12 lines =@@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // @ts-expect-error diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesExportImportUninstantiatedNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesExportImportUninstantiatedNamespace.js.diff new file mode 100644 index 0000000000..f0f9861065 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesExportImportUninstantiatedNamespace.js.diff @@ -0,0 +1,14 @@ +--- old.isolatedModulesExportImportUninstantiatedNamespace.js ++++ new.isolatedModulesExportImportUninstantiatedNamespace.js +@@= skipped -23, +23 lines =@@ + //// [jsx.js] + export {}; + //// [factory.js] +-export function createElement(tagName, attributes) { +- var children = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- children[_i - 2] = arguments[_i]; +- } ++export function createElement(tagName, attributes, ...children) { + //... + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.js.diff index 84245da38a..df5c3a7212 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesGlobalNamespacesAndEnums.js.diff @@ -1,6 +1,11 @@ --- old.isolatedModulesGlobalNamespacesAndEnums.js +++ new.isolatedModulesGlobalNamespacesAndEnums.js -@@= skipped -56, +56 lines =@@ +@@= skipped -52, +52 lines =@@ + Enum[Enum["B"] = 1] = "B"; + Enum[Enum["C"] = 2] = "C"; + })(Enum || (Enum = {})); +-var d = 'd'; ++const d = 'd'; //// [enum2.js] var Enum; (function (Enum) { diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision.js.diff index dc33b712bd..37d2e7e5ba 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesImportExportElision.js.diff @@ -1,20 +1,46 @@ --- old.isolatedModulesImportExportElision.js +++ new.isolatedModulesImportExportElision.js -@@= skipped -17, +17 lines =@@ +@@= skipped -15, +15 lines =@@ + + //// [file1.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.z = exports.c1 = void 0; -var module_1 = require("module"); -var module_2 = require("module"); -var ns = require("module"); +-var C = /** @class */ (function (_super) { +- __extends(C, _super); +- function C() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return C; +-}(module_2.c2.C)); +-var x = new module_1.c(); +-var y = ns.value; +-var module_3 = require("module"); +const module_1 = require("module"); +const module_2 = require("module"); +const ns = require("module"); - class C extends module_2.c2.C { - } - let x = new module_1.c(); - let y = ns.value; --var module_3 = require("module"); ++class C extends module_2.c2.C { ++} ++let x = new module_1.c(); ++let y = ns.value; +const module_3 = require("module"); Object.defineProperty(exports, "c1", { enumerable: true, get: function () { return module_3.c1; } }); exports.z = x; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/isolatedModulesReExportType.js.diff b/testdata/baselines/reference/submodule/compiler/isolatedModulesReExportType.js.diff index 0b525d20bd..25420baaf0 100644 --- a/testdata/baselines/reference/submodule/compiler/isolatedModulesReExportType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/isolatedModulesReExportType.js.diff @@ -1,6 +1,20 @@ --- old.isolatedModulesReExportType.js +++ new.isolatedModulesReExportType.js -@@= skipped -72, +72 lines =@@ +@@= skipped -61, +61 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.C = void 0; +-var C = /** @class */ (function () { +- function C() { +- } +- return C; +-}()); ++class C { ++} + exports.C = C; + //// [reExportValueAsTypeOnly.js] + "use strict"; +@@= skipped -14, +11 lines =@@ Object.defineProperty(exports, "__esModule", { value: true }); exports.NS = exports.C = void 0; // OK, has a value side diff --git a/testdata/baselines/reference/submodule/compiler/javascriptCommonjsModule.js.diff b/testdata/baselines/reference/submodule/compiler/javascriptCommonjsModule.js.diff index 8f662402ff..668c82a752 100644 --- a/testdata/baselines/reference/submodule/compiler/javascriptCommonjsModule.js.diff +++ b/testdata/baselines/reference/submodule/compiler/javascriptCommonjsModule.js.diff @@ -1,8 +1,25 @@ --- old.javascriptCommonjsModule.js +++ new.javascriptCommonjsModule.js -@@= skipped -12, +12 lines =@@ - } - class Bar extends Foo { - } +@@= skipped -8, +8 lines =@@ + + + //// [index.js] +-var tslib_1 = require("tslib"); +-var Foo = /** @class */ (function () { +- function Foo() { +- } +- return Foo; +-}()); +-var Bar = /** @class */ (function (_super) { +- tslib_1.__extends(Bar, _super); +- function Bar() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Bar; +-}(Foo)); ++class Foo { ++} ++class Bar extends Foo { ++} +export = Bar; module.exports = Bar; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.js.diff b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.js.diff index daef94d047..ba1308adab 100644 --- a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.js.diff +++ b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.js.diff @@ -4,31 +4,56 @@ ElementsArray.isArray(new ElementsArray()); //// [a.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var _a, _b; - class Thing { +-var Thing = /** @class */ (function () { +- function Thing() { ++class Thing { + static { + this.doSomething = () => { }; -+ } - } + } +- return Thing; +-}()); -_a = Thing; --(() => { -- _a.doSomething = () => { }; +-(function () { +- _a.doSomething = function () { }; -})(); ++} Thing.doSomething(); // GH#46468 - class ElementsArray extends Array { +-var ElementsArray = /** @class */ (function (_super) { +- __extends(ElementsArray, _super); +- function ElementsArray() { +- return _super !== null && _super.apply(this, arguments) || this; ++class ElementsArray extends Array { + static { + const superisArray = super.isArray; + const customIsArray = (arg) => superisArray(arg); + this.isArray = customIsArray; -+ } - } + } +- return ElementsArray; +-}(Array)); -_b = ElementsArray; --(() => { -- const superisArray = super.isArray; -- const customIsArray = (arg) => superisArray(arg); +-(function () { +- var superisArray = _super.isArray; +- var customIsArray = function (arg) { return superisArray(arg); }; - _b.isArray = customIsArray; -})(); ++} ElementsArray.isArray(new ElementsArray()); diff --git a/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff new file mode 100644 index 0000000000..52d8bb5654 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/javascriptThisAssignmentInStaticBlock.symbols.diff @@ -0,0 +1,18 @@ +--- old.javascriptThisAssignmentInStaticBlock.symbols ++++ new.javascriptThisAssignmentInStaticBlock.symbols +@@= skipped -19, +19 lines =@@ + // GH#46468 + class ElementsArray extends Array { + >ElementsArray : Symbol(ElementsArray, Decl(a.js, 6, 20)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + static { + const superisArray = super.isArray; + >superisArray : Symbol(superisArray, Decl(a.js, 11, 13)) + >super.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +->super : Symbol(ArrayConstructor, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>super : Symbol(ArrayConstructor, Decl(lib.es5.d.ts, --, --)) + >isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) + + const customIsArray = (arg)=> superisArray(arg); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.js.diff b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.js.diff index 0db9d018b3..5c98e58965 100644 --- a/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsDeclarationEmitExportedClassWithExtends.js.diff @@ -1,14 +1,54 @@ --- old.jsDeclarationEmitExportedClassWithExtends.js +++ new.jsDeclarationEmitExportedClassWithExtends.js -@@= skipped -49, +49 lines =@@ +@@= skipped -41, +41 lines =@@ + export class ElementC extends LitElement2 {} - - //// [index.d.ts] --export class ElementB extends LitElement { --} + //// [index.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + import { LitElement, LitElement as LitElement2 } from "lit"; +-var ElementB = /** @class */ (function (_super) { +- __extends(ElementB, _super); +- function ElementB() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ElementB; +-}(LitElement)); +-export { ElementB }; +-var ElementC = /** @class */ (function (_super) { +- __extends(ElementC, _super); +- function ElementC() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return ElementC; +-}(LitElement2)); +-export { ElementC }; +- +- +-//// [index.d.ts] + export class ElementB extends LitElement { + } -export class ElementC extends LitElement { -} -import { LitElement } from "lit"; ++export class ElementC extends LitElement2 { ++} ++ ++ ++//// [index.d.ts] +import { LitElement, LitElement as LitElement2 } from "lit"; +export declare class ElementB extends LitElement { +} diff --git a/testdata/baselines/reference/submodule/compiler/jsEnumTagOnObjectFrozen.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsEnumTagOnObjectFrozen.symbols.diff index 532ea2f34b..731012c5b8 100644 --- a/testdata/baselines/reference/submodule/compiler/jsEnumTagOnObjectFrozen.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsEnumTagOnObjectFrozen.symbols.diff @@ -1,6 +1,15 @@ --- old.jsEnumTagOnObjectFrozen.symbols +++ new.jsEnumTagOnObjectFrozen.symbols -@@= skipped -42, +42 lines =@@ +@@= skipped -30, +30 lines =@@ + time: Date.now(), + >time : Symbol(time, Decl(usage.js, 12, 22)) + >Date.now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) +->Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + >now : Symbol(DateConstructor.now, Decl(lib.es5.d.ts, --, --)) + + type, +@@= skipped -12, +12 lines =@@ === index.js === /** @enum {string} */ const Thing = Object.freeze({ diff --git a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff index 72bb7b12fe..7bab6c1e0a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileAlternativeUseOfOverloadTag.js.diff @@ -9,7 +9,30 @@ // These are a few examples of existing alternative uses of @overload tag. // They will not work as expected with our implementation, but we are // trying to make sure that our changes do not result in any crashes here. -@@= skipped -51, +53 lines =@@ +-var example1 = { ++const example1 = { + /** + * @overload Example1(value) + * Creates Example1 +@@= skipped -11, +13 lines =@@ + */ + constructor: function Example1(value, options) { }, + }; +-var example2 = { ++const example2 = { + /** + * Example 2 + * +@@= skipped -21, +21 lines =@@ + */ + constructor: function Example2() { }, + }; +-var example3 = { ++const example3 = { + /** + * @overload evaluate(options = {}, [callback]) + * Evaluate something +@@= skipped -19, +19 lines =@@ //// [jsFileAlternativeUseOfOverloadTag.d.ts] diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationAwaitModifier.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAwaitModifier.js.diff index 3f2cd40883..556b3d09ae 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationAwaitModifier.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationAwaitModifier.js.diff @@ -13,22 +13,68 @@ - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - class Foo { -- constructor() { -- this.b = () => __awaiter(this, void 0, void 0, function* () { -- yield Promise.resolve(1); -- }); +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -- a() { -- return __awaiter(this, void 0, void 0, function* () { -- yield Promise.resolve(1); -- }); +-}; +-var Foo = /** @class */ (function () { +- function Foo() { +- var _this = this; +- this.b = function () { return __awaiter(_this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, Promise.resolve(1)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); +- }); }; - } +- Foo.prototype.a = function () { +- return __awaiter(this, void 0, void 0, function () { +- return __generator(this, function (_a) { +- switch (_a.label) { +- case 0: return [4 /*yield*/, Promise.resolve(1)]; +- case 1: +- _a.sent(); +- return [2 /*return*/]; +- } +- }); +- }); ++class Foo { + async a() { + await Promise.resolve(1); + } + b = async () => { + await Promise.resolve(1); -+ }; - } + }; +- return Foo; +-}()); ++} + + //// [a.d.ts] \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js.diff new file mode 100644 index 0000000000..25c22d1363 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js.diff @@ -0,0 +1,16 @@ +--- old.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js ++++ new.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.js +@@= skipped -14, +14 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + //// [b.js] + /// + // b.d.ts should have c.d.ts as the reference path \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js.diff new file mode 100644 index 0000000000..6099a3d3f3 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js.diff @@ -0,0 +1,16 @@ +--- old.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js ++++ new.jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithOutDir.js +@@= skipped -13, +13 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + //// [c.js] + function bar() { + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt index efda02b1ad..15ff5aab34 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.errors.txt @@ -1,11 +1,11 @@ error TS5055: Cannot write file 'a.js' because it would overwrite input file. Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. -a.js(1,8): error TS8006: 'module' declarations can only be used in TypeScript files. +a.js(1,11): error TS8006: 'namespace' declarations can only be used in TypeScript files. !!! error TS5055: Cannot write file 'a.js' because it would overwrite input file. !!! error TS5055: Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. ==== a.js (1 errors) ==== - module M { } - ~ -!!! error TS8006: 'module' declarations can only be used in TypeScript files. \ No newline at end of file + namespace M { } + ~ +!!! error TS8006: 'namespace' declarations can only be used in TypeScript files. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.symbols b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.symbols index fdce210ce3..607642a1c6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.symbols @@ -1,6 +1,6 @@ //// [tests/cases/compiler/jsFileCompilationModuleSyntax.ts] //// === a.js === -module M { } +namespace M { } >M : Symbol(M, Decl(a.js, 0, 0)) diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.types b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.types index dd64e11677..371454e95f 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.types +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationModuleSyntax.types @@ -2,4 +2,4 @@ === a.js === -module M { } +namespace M { } diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js.diff new file mode 100644 index 0000000000..9134c198ed --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js.diff @@ -0,0 +1,16 @@ +--- old.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js ++++ new.jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.js +@@= skipped -14, +14 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + //// [b.js] + /// + // no error on above reference path since not emitting declarations \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.js.diff new file mode 100644 index 0000000000..8b8d75da0e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationTypeArgumentSyntaxOfCall.js.diff @@ -0,0 +1,11 @@ +--- old.jsFileCompilationTypeArgumentSyntaxOfCall.js ++++ new.jsFileCompilationTypeArgumentSyntaxOfCall.js +@@= skipped -10, +10 lines =@@ + //// [a.js] + Foo < number > (); + Foo < number > (1); +-Foo < number > ""; ++Foo < number > ``; + , >; + , />; + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.js.diff new file mode 100644 index 0000000000..14b89f202b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithDeclarationEmitPathSameAsInput.js.diff @@ -0,0 +1,13 @@ +--- old.jsFileCompilationWithDeclarationEmitPathSameAsInput.js ++++ new.jsFileCompilationWithDeclarationEmitPathSameAsInput.js +@@= skipped -7, +7 lines =@@ + declare function isC(): boolean; + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.diff new file mode 100644 index 0000000000..a12789cd01 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.diff @@ -0,0 +1,14 @@ +--- old.jsFileCompilationWithMapFileAsJs.js ++++ new.jsFileCompilationWithMapFileAsJs.js +@@= skipped -12, +12 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + //# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.map.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.map.diff new file mode 100644 index 0000000000..a8fa474710 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.js.map.diff @@ -0,0 +1,8 @@ +--- old.jsFileCompilationWithMapFileAsJs.js.map ++++ new.jsFileCompilationWithMapFileAsJs.js.map +@@= skipped -0, +0 lines =@@ + //// [a.js.map] +-{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} +-//// https://sokra.github.io/source-map-visualization#base64,dmFyIGMgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7DQogICAgZnVuY3Rpb24gYygpIHsNCiAgICB9DQogICAgcmV0dXJuIGM7DQp9KCkpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ==,Y2xhc3MgYyB7Cn0K ++{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} ++//// https://sokra.github.io/source-map-visualization#base64,Y2xhc3MgYyB7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1hLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDO0NBQ04ifQ==,Y2xhc3MgYyB7Cn0K \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.sourcemap.txt.diff new file mode 100644 index 0000000000..044e4b09d2 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJs.sourcemap.txt.diff @@ -0,0 +1,69 @@ +--- old.jsFileCompilationWithMapFileAsJs.sourcemap.txt ++++ new.jsFileCompilationWithMapFileAsJs.sourcemap.txt +@@= skipped -7, +7 lines =@@ + emittedFile:a.js + sourceFile:a.ts + ------------------------------------------------------------------- +->>>var c = /** @class */ (function () { +-1 > +-2 >^^^^^^^^^^^^^^^^^^^-> +-1 > ++>>>class c { ++1 > ++2 >^^^^^^ ++3 > ^ ++1 > ++2 >class ++3 > c + 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +---- +->>> function c() { +-1->^^^^ +-2 > ^^-> +-1-> +-1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) +---- +->>> } +-1->^^^^ +-2 > ^ +-3 > ^^^^^^^^^-> +-1->class c { +- > +-2 > } +-1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) +---- +->>> return c; +-1->^^^^ +-2 > ^^^^^^^^ +-1-> +-2 > } +-1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) +---- +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +-1 > +-2 >} +-3 > +-4 > class c { +- > } +-1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +-2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) +-3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) +-4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) ++2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) ++3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ++--- ++>>>} ++1 >^ ++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> ++1 > { ++ >} ++1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) + --- + >>>//# sourceMappingURL=a.js.map \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js.diff new file mode 100644 index 0000000000..1308543906 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js.diff @@ -0,0 +1,15 @@ +--- old.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js ++++ new.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.js +@@= skipped -12, +12 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); +-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== ++class c { ++} ++//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDO0NBQ04ifQ== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt.diff new file mode 100644 index 0000000000..02e05d5b0a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt.diff @@ -0,0 +1,79 @@ +--- old.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt ++++ new.jsFileCompilationWithMapFileAsJsWithInlineSourceMap.sourcemap.txt +@@= skipped -0, +0 lines =@@ + =================================================================== + JsFile: a.js +-mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== ++mapUrl: data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDO0NBQ04ifQ== + sourceRoot: + sources: a.ts + =================================================================== +@@= skipped -7, +7 lines =@@ + emittedFile:a.js + sourceFile:a.ts + ------------------------------------------------------------------- +->>>var c = /** @class */ (function () { +-1 > +-2 >^^^^^^^^^^^^^^^^^^^-> +-1 > ++>>>class c { ++1 > ++2 >^^^^^^ ++3 > ^ ++1 > ++2 >class ++3 > c + 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +---- +->>> function c() { +-1->^^^^ +-2 > ^^-> +-1-> +-1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) +---- +->>> } +-1->^^^^ +-2 > ^ +-3 > ^^^^^^^^^-> +-1->class c { +- > +-2 > } +-1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) +---- +->>> return c; +-1->^^^^ +-2 > ^^^^^^^^ +-1-> +-2 > } +-1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) +---- +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +-1 > +-2 >} +-3 > +-4 > class c { +- > } +-1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +-2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) +-3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) +-4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) +---- +->>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7SUFBQTtJQUNBLENBQUM7SUFBRCxRQUFDO0FBQUQsQ0FBQyxBQURELElBQ0MifQ== ++2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) ++3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ++--- ++>>>} ++1 >^ ++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> ++1 > { ++ >} ++1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) ++--- ++>>>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDO0NBQ04ifQ== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.diff new file mode 100644 index 0000000000..37a0b6e39a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.diff @@ -0,0 +1,16 @@ +--- old.jsFileCompilationWithMapFileAsJsWithOutDir.js ++++ new.jsFileCompilationWithMapFileAsJsWithOutDir.js +@@= skipped -12, +12 lines =@@ + } + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} + //# sourceMappingURL=a.js.map + //// [b.js] + function bar() { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.map.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.map.diff index 64d40d95c6..cd7634034b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.js.map.diff @@ -2,7 +2,8 @@ +++ new.jsFileCompilationWithMapFileAsJsWithOutDir.js.map @@= skipped -0, +0 lines =@@ //// [a.js.map] - {"version":3,"file":"a.js","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} +-{"version":3,"file":"a.js","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA;IAAA;IACA,CAAC;IAAD,QAAC;AAAD,CAAC,AADD,IACC"} ++{"version":3,"file":"a.js","sourceRoot":"","sources":["../a.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC;CACN"} //// [b.js.map] -{"version":3,"file":"b.js","sourceRoot":"","sources":["../b.js"],"names":[],"mappings":"AAAA,SAAS,GAAG;AACZ,CAAC"} +{"version":3,"file":"b.js","sourceRoot":"","sources":["../b.js"],"names":[],"mappings":"AAAA,SAAS,GAAG,GAAG;AAAC,CACf"} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt.diff index 51e3373196..109a7da656 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt.diff @@ -1,6 +1,74 @@ --- old.jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt +++ new.jsFileCompilationWithMapFileAsJsWithOutDir.sourcemap.txt -@@= skipped -39, +39 lines =@@ +@@= skipped -7, +7 lines =@@ + emittedFile:out/a.js + sourceFile:../a.ts + ------------------------------------------------------------------- +->>>var c = /** @class */ (function () { +-1 > +-2 >^^^^^^^^^^^^^^^^^^^-> +-1 > ++>>>class c { ++1 > ++2 >^^^^^^ ++3 > ^ ++1 > ++2 >class ++3 > c + 1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) +---- +->>> function c() { +-1->^^^^ +-2 > ^^-> +-1-> +-1->Emitted(2, 5) Source(1, 1) + SourceIndex(0) +---- +->>> } +-1->^^^^ +-2 > ^ +-3 > ^^^^^^^^^-> +-1->class c { +- > +-2 > } +-1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(3, 6) Source(2, 2) + SourceIndex(0) +---- +->>> return c; +-1->^^^^ +-2 > ^^^^^^^^ +-1-> +-2 > } +-1->Emitted(4, 5) Source(2, 1) + SourceIndex(0) +-2 >Emitted(4, 13) Source(2, 2) + SourceIndex(0) +---- +->>>}()); +-1 > +-2 >^ +-3 > +-4 > ^^^^ +-5 > ^^^^^^^^^^^^^^^^^^^^^^^-> +-1 > +-2 >} +-3 > +-4 > class c { +- > } +-1 >Emitted(5, 1) Source(2, 1) + SourceIndex(0) +-2 >Emitted(5, 2) Source(2, 2) + SourceIndex(0) +-3 >Emitted(5, 2) Source(1, 1) + SourceIndex(0) +-4 >Emitted(5, 6) Source(2, 2) + SourceIndex(0) ++2 >Emitted(1, 7) Source(1, 7) + SourceIndex(0) ++3 >Emitted(1, 8) Source(1, 8) + SourceIndex(0) ++--- ++>>>} ++1 >^ ++2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> ++1 > { ++ >} ++1 >Emitted(2, 2) Source(2, 2) + SourceIndex(0) + --- + >>>//# sourceMappingURL=a.js.map=================================================================== + JsFile: b.js +@@= skipped -60, +32 lines =@@ 1 > 2 >^^^^^^^^^ 3 > ^^^ diff --git a/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.js.diff new file mode 100644 index 0000000000..71ee3302e1 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsFileCompilationWithoutOut.js.diff @@ -0,0 +1,13 @@ +--- old.jsFileCompilationWithoutOut.js ++++ new.jsFileCompilationWithoutOut.js +@@= skipped -9, +9 lines =@@ + + + //// [a.js] +-var c = /** @class */ (function () { +- function c() { +- } +- return c; +-}()); ++class c { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads.js.diff index 90f6061451..0837539614 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads.js.diff @@ -1,10 +1,27 @@ --- old.jsFileFunctionOverloads.js +++ new.jsFileFunctionOverloads.js -@@= skipped -111, +111 lines =@@ +@@= skipped -87, +87 lines =@@ + * @param {T} x + * @returns {T} + */ +-var identity = function (x) { return x; }; ++const identity = x => x; + /** + * @template T + * @template U +@@= skipped -20, +20 lines =@@ + * @param {(x: unknown) => unknown} iterable + * @returns {unknown[]} + */ +-function flatMap(array, iterable) { +- if (iterable === void 0) { iterable = identity; } ++function flatMap(array, iterable = identity) { /** @type {unknown[]} */ - const result = []; - for (let i = 0; i < array.length; i += 1) { -- result.push(... /** @type {unknown[]} */(iterable(array[i]))); +- var result = []; +- for (var i = 0; i < array.length; i += 1) { +- result.push.apply(result, /** @type {unknown[]} */ (iterable(array[i]))); ++ const result = []; ++ for (let i = 0; i < array.length; i += 1) { + result.push(... /** @type {unknown[]} */iterable(array[i])); } return result; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads2.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads2.js.diff index 9356c66d0d..0e42c58017 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileFunctionOverloads2.js.diff @@ -1,10 +1,27 @@ --- old.jsFileFunctionOverloads2.js +++ new.jsFileFunctionOverloads2.js -@@= skipped -101, +101 lines =@@ +@@= skipped -80, +80 lines =@@ + * @param {T} x + * @returns {T} + */ +-var identity = function (x) { return x; }; ++const identity = x => x; + /** + * @template T + * @template U +@@= skipped -17, +17 lines =@@ + * @param {(x: unknown) => unknown} iterable + * @returns {unknown[]} + */ +-function flatMap(array, iterable) { +- if (iterable === void 0) { iterable = identity; } ++function flatMap(array, iterable = identity) { /** @type {unknown[]} */ - const result = []; - for (let i = 0; i < array.length; i += 1) { -- result.push(... /** @type {unknown[]} */(iterable(array[i]))); +- var result = []; +- for (var i = 0; i < array.length; i += 1) { +- result.push.apply(result, /** @type {unknown[]} */ (iterable(array[i]))); ++ const result = []; ++ for (let i = 0; i < array.length; i += 1) { + result.push(... /** @type {unknown[]} */iterable(array[i])); } return result; diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.js.diff index 941e442062..847c6ed028 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads.js.diff @@ -1,6 +1,47 @@ --- old.jsFileMethodOverloads.js +++ new.jsFileMethodOverloads.js -@@= skipped -104, +104 lines =@@ +@@= skipped -52, +52 lines =@@ + /** + * @template T + */ +-var Example = /** @class */ (function () { ++class Example { + /** + * @param {T} value + */ +- function Example(value) { ++ constructor(value) { + this.value = value; + } + /** +@@= skipped -20, +20 lines =@@ + /** + * @returns {string} + */ +- Example.prototype.getTypeName = function () { ++ getTypeName() { + return typeof this.value; +- }; ++ } + /** + * @template U + * @overload +@@= skipped -17, +17 lines =@@ + * @param {(y: T) => unknown} [fn] + * @returns {unknown} + */ +- Example.prototype.transform = function (fn) { ++ transform(fn) { + return fn ? fn(this.value) : this.value; +- }; +- return Example; +-}()); ++ } ++} + + + //// [jsFileMethodOverloads.d.ts] +@@= skipped -16, +15 lines =@@ * @param {T} value */ constructor(value: T); diff --git a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.js.diff b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.js.diff index de6bba4b36..b74db5ff0d 100644 --- a/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsFileMethodOverloads2.js.diff @@ -1,6 +1,47 @@ --- old.jsFileMethodOverloads2.js +++ new.jsFileMethodOverloads2.js -@@= skipped -98, +98 lines =@@ +@@= skipped -50, +50 lines =@@ + /** + * @template T + */ +-var Example = /** @class */ (function () { ++class Example { + /** + * @param {T} value + */ +- function Example(value) { ++ constructor(value) { + this.value = value; + } + /** +@@= skipped -18, +18 lines =@@ + * + * @returns {string} + */ +- Example.prototype.getTypeName = function () { ++ getTypeName() { + return typeof this.value; +- }; ++ } + /** + * @template U + * @overload +@@= skipped -15, +15 lines =@@ + * @param {(y: T) => unknown} [fn] + * @returns {unknown} + */ +- Example.prototype.transform = function (fn) { ++ transform(fn) { + return fn ? fn(this.value) : this.value; +- }; +- return Example; +-}()); ++ } ++} + + + //// [jsFileMethodOverloads2.d.ts] +@@= skipped -16, +15 lines =@@ * @param {T} value */ constructor(value: T); diff --git a/testdata/baselines/reference/submodule/compiler/jsNoImplicitAnyNoCascadingReferenceErrors.js.diff b/testdata/baselines/reference/submodule/compiler/jsNoImplicitAnyNoCascadingReferenceErrors.js.diff index 280dbab05a..afb0598088 100644 --- a/testdata/baselines/reference/submodule/compiler/jsNoImplicitAnyNoCascadingReferenceErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsNoImplicitAnyNoCascadingReferenceErrors.js.diff @@ -1,11 +1,38 @@ --- old.jsNoImplicitAnyNoCascadingReferenceErrors.js +++ new.jsNoImplicitAnyNoCascadingReferenceErrors.js -@@= skipped -17, +17 lines =@@ +@@= skipped -16, +16 lines =@@ + //// [index.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var somelib_1 = require("./somelib"); +-var MyFoo = /** @class */ (function (_super) { +- __extends(MyFoo, _super); +- function MyFoo() { +- var _this = _super.call(this) || this; +- _this.prop.alpha = 12; +- return _this; +const somelib_1 = require("./somelib"); - class MyFoo extends somelib_1.Foo { - constructor() { - super(); \ No newline at end of file ++class MyFoo extends somelib_1.Foo { ++ constructor() { ++ super(); ++ this.prop.alpha = 12; + } +- return MyFoo; +-}(somelib_1.Foo)); ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff index afcfd4e612..fc17b20a50 100644 --- a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff @@ -1,23 +1,41 @@ --- old.jsdocInTypeScript.js +++ new.jsdocInTypeScript.js -@@= skipped -60, +60 lines =@@ +@@= skipped -59, +59 lines =@@ + //// [jsdocInTypeScript.js] - class T { +-var T = /** @class */ (function () { +- function T() { +- } +- return T; +-}()); ++class T { + prop; - } ++} x.prop; // @param type has no effect. -@@= skipped -18, +19 lines =@@ + /** +@@= skipped -17, +15 lines =@@ + f(true).length; + // @type has no effect either. + /** @type {{ x?: number }} */ +-var z = {}; ++const z = {}; + z.x = 1; // Error /** @template T */ function tem(t) { return {}; } - let i; // Should succeed thanks to type parameter default +-var i; // Should succeed thanks to type parameter default -/** @typedef {string} N.Str */ -var M = N; // Error: @typedef does not create namespaces in TypeScript code. ++let i; // Should succeed thanks to type parameter default // Not legal JSDoc, but that shouldn't matter in TypeScript. /** * @type {{foo: (function(string, string): string)}} -@@= skipped -12, +10 lines =@@ + */ +-var obj = { foo: function (a, b) { return a + b; } }; ++const obj = { foo: (a, b) => a + b }; + /** @enum {string} */ + var E = {}; E[""]; // make sure import types in JSDoc are not resolved /** @type {import("should-not-be-resolved").Type} */ diff --git a/testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInvalidName.js.diff b/testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInvalidName.js.diff new file mode 100644 index 0000000000..ef9f6d1e15 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsdocParameterParsingInvalidName.js.diff @@ -0,0 +1,20 @@ +--- old.jsdocParameterParsingInvalidName.js ++++ new.jsdocParameterParsingInvalidName.js +@@= skipped -9, +9 lines =@@ + } + + //// [jsdocParameterParsingInvalidName.js] +-var c = /** @class */ (function () { +- function c() { +- } ++class c { + /** + * @param {string} [`foo] + */ +- c.prototype.method = function (foo) { +- }; +- return c; +-}()); ++ method(foo) { ++ } ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsdocTypeCast.js.diff b/testdata/baselines/reference/submodule/compiler/jsdocTypeCast.js.diff index 61084e3733..dbf61e96fc 100644 --- a/testdata/baselines/reference/submodule/compiler/jsdocTypeCast.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsdocTypeCast.js.diff @@ -1,10 +1,18 @@ --- old.jsdocTypeCast.js +++ new.jsdocTypeCast.js -@@= skipped -30, +30 lines =@@ - let b = (((x))); // Error +@@= skipped -24, +24 lines =@@ + */ + function f(x) { + /** @type {'a' | 'b'} */ +- var a = (x); // Error ++ let a = (x); // Error + a; + /** @type {'a' | 'b'} */ +- var b = (((x))); // Error ++ let b = (((x))); // Error b; /** @type {'a' | 'b'} */ -- let c = /** @type {'a' | 'b'} */ (x); // Ok +- var c = /** @type {'a' | 'b'} */ (x); // Ok + let c = /** @type {'a' | 'b'} */ x; // Ok c; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsdocTypecastNoTypeNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/jsdocTypecastNoTypeNoCrash.js.diff new file mode 100644 index 0000000000..ddace95d19 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsdocTypecastNoTypeNoCrash.js.diff @@ -0,0 +1,8 @@ +--- old.jsdocTypecastNoTypeNoCrash.js ++++ new.jsdocTypecastNoTypeNoCrash.js +@@= skipped -6, +6 lines =@@ + + //// [index.js] + function Foo() { } +-var a = /* @type string */ (Foo); ++const a = /* @type string */ (Foo); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/json.stringify.js.diff b/testdata/baselines/reference/submodule/compiler/json.stringify.js.diff new file mode 100644 index 0000000000..4c22f7ff72 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/json.stringify.js.diff @@ -0,0 +1,9 @@ +--- old.json.stringify.js ++++ new.json.stringify.js +@@= skipped -12, +12 lines =@@ + JSON.stringify(value, undefined, 2); + JSON.stringify(value, null, 2); + JSON.stringify(value, ["a", 1], 2); +-JSON.stringify(value, function (k) { return undefined; }, 2); ++JSON.stringify(value, (k) => undefined, 2); + JSON.stringify(value, undefined, 2); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/json.stringify.symbols.diff b/testdata/baselines/reference/submodule/compiler/json.stringify.symbols.diff new file mode 100644 index 0000000000..abd0a75d02 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/json.stringify.symbols.diff @@ -0,0 +1,42 @@ +--- old.json.stringify.symbols ++++ new.json.stringify.symbols +@@= skipped -5, +5 lines =@@ + + JSON.stringify(value, undefined, 2); + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >value : Symbol(value, Decl(json.stringify.ts, 0, 3)) + >undefined : Symbol(undefined) + + JSON.stringify(value, null, 2); + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >value : Symbol(value, Decl(json.stringify.ts, 0, 3)) + + JSON.stringify(value, ["a", 1], 2); + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >value : Symbol(value, Decl(json.stringify.ts, 0, 3)) + + JSON.stringify(value, (k) => undefined, 2); + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >value : Symbol(value, Decl(json.stringify.ts, 0, 3)) + >k : Symbol(k, Decl(json.stringify.ts, 4, 23)) +@@= skipped -27, +27 lines =@@ + + JSON.stringify(value, undefined, 2); + >JSON.stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>JSON : Symbol(JSON, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >stringify : Symbol(JSON.stringify, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >value : Symbol(value, Decl(json.stringify.ts, 0, 3)) + >undefined : Symbol(undefined) \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxAttributeMissingInitializer.js.diff b/testdata/baselines/reference/submodule/compiler/jsxAttributeMissingInitializer.js.diff new file mode 100644 index 0000000000..9fc0fbab35 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxAttributeMissingInitializer.js.diff @@ -0,0 +1,10 @@ +--- old.jsxAttributeMissingInitializer.js ++++ new.jsxAttributeMissingInitializer.js +@@= skipped -5, +5 lines =@@ + + + //// [jsxAttributeMissingInitializer.jsx] +-var x =

; +-var y = 0; ++const x =
; ++const y = 0; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff index c1dbfd53f8..7fa41d9a13 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxCallElaborationCheckNoCrash1.js.diff @@ -8,8 +8,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Hoc = void 0; -var React = require("react"); +-var Hoc = function (TagElement) { +- var Component = function () { return React.createElement(TagElement, null); }; +/// +const React = require("react"); - const Hoc = (TagElement) => { - const Component = () => React.createElement(TagElement, null); - return Component; \ No newline at end of file ++const Hoc = (TagElement) => { ++ const Component = () => React.createElement(TagElement, null); + return Component; + }; + exports.Hoc = Hoc; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxCallbackWithDestructuring.js.diff b/testdata/baselines/reference/submodule/compiler/jsxCallbackWithDestructuring.js.diff new file mode 100644 index 0000000000..3ade23af33 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxCallbackWithDestructuring.js.diff @@ -0,0 +1,37 @@ +--- old.jsxCallbackWithDestructuring.js ++++ new.jsxCallbackWithDestructuring.js +@@= skipped -29, +29 lines =@@ + + //// [jsxCallbackWithDestructuring.jsx] + "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); + Object.defineProperty(exports, "__esModule", { value: true }); + exports.MyComponent = void 0; +-var MyComponent = /** @class */ (function (_super) { +- __extends(MyComponent, _super); +- function MyComponent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyComponent; +-}(Component)); ++class MyComponent extends Component { ++} + exports.MyComponent = MyComponent; +-; ++ { }}/>; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.js.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.js.diff index 0f17e08fc4..f17c17a3b6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.js.diff @@ -7,7 +7,7 @@ -"use strict"; /// /// --const b = (React.createElement(Foo, null, +-var b = (React.createElement(Foo, null, - React.createElement("div", null), - "aa")); +const b = (React.createElement(Foo, null, React.createElement("div", null), "aa")); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.types.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.types.diff new file mode 100644 index 0000000000..c7c9909d39 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenArrayWrongType.types.diff @@ -0,0 +1,11 @@ +--- old.jsxChildrenArrayWrongType.types ++++ new.jsxChildrenArrayWrongType.types +@@= skipped -7, +7 lines =@@ + + interface PropsType { + children: [string, number] | boolean[]; +->children : [string, number] | boolean[] ++>children : boolean[] | [string, number] + } + declare class Foo extends React.Component {} + >Foo : Foo \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenGenericContextualTypes.js.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenGenericContextualTypes.js.diff index f570d9e0ed..4748d1dda6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenGenericContextualTypes.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenGenericContextualTypes.js.diff @@ -5,6 +5,26 @@ //// [jsxChildrenGenericContextualTypes.jsx] -"use strict"; - const Elem = (p) =>
; - Elem({ prop: { a: "x" }, children: i => ({ a: "z" }) }); - const q = ({ a: "z" })}/>; \ No newline at end of file +-var Elem = function (p) { return
; }; +-Elem({ prop: { a: "x" }, children: function (i) { return ({ a: "z" }); } }); +-var q = ; +-var qq = {function (i) { return ({ a: "z" }); }}; +-var ElemLit = function (p) { return
; }; +-ElemLit({ prop: "x", children: function () { return "x"; } }); +-var j = ; +-var jj = {function () { return "x"; }}; ++const Elem = (p) =>
; ++Elem({ prop: { a: "x" }, children: i => ({ a: "z" }) }); ++const q = ({ a: "z" })}/>; ++const qq = {i => ({ a: "z" })}; ++const ElemLit = (p) =>
; ++ElemLit({ prop: "x", children: () => "x" }); ++const j = "x"}/>; ++const jj = {() => "x"}; + // Should error +-var arg = ; +-var argchild = {function (p) { return "y"; }}; +-var mismatched = {function () { return 12; }}; ++const arg = "y"}/>; ++const argchild = {p => "y"}; ++const mismatched = {() => 12}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.errors.txt.diff new file mode 100644 index 0000000000..f516bd0320 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.jsxChildrenIndividualErrorElaborations.errors.txt ++++ new.jsxChildrenIndividualErrorElaborations.errors.txt +@@= skipped -5, +5 lines =@@ + index.tsx(42,10): error TS2745: This JSX tag's 'children' prop expects type '((x: number) => string)[]' which requires multiple children, but only a single child was provided. + index.tsx(48,9): error TS2322: Type 'number' is not assignable to type 'string'. + index.tsx(49,9): error TS2322: Type 'number' is not assignable to type 'string'. +-index.tsx(63,3): error TS2322: Type '(x: number) => number' is not assignable to type 'Cb | Cb[]'. ++index.tsx(63,3): error TS2322: Type '(x: number) => number' is not assignable to type 'Cb[] | Cb'. + Type '(x: number) => number' is not assignable to type 'Cb'. + Type 'number' is not assignable to type 'string'. +-index.tsx(67,16): error TS2747: 'Blah3' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Cb | Cb[]'. ++index.tsx(67,16): error TS2747: 'Blah3' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Cb[] | Cb'. + index.tsx(73,9): error TS2322: Type 'number' is not assignable to type 'string'. + index.tsx(74,9): error TS2322: Type 'number' is not assignable to type 'string'. + +@@= skipped -95, +95 lines =@@ + var a = + {x => x} + ~~~~~~~~ +-!!! error TS2322: Type '(x: number) => number' is not assignable to type 'Cb | Cb[]'. ++!!! error TS2322: Type '(x: number) => number' is not assignable to type 'Cb[] | Cb'. + !!! error TS2322: Type '(x: number) => number' is not assignable to type 'Cb'. + !!! error TS2322: Type 'number' is not assignable to type 'string'. + !!! related TS6500 index.tsx:54:3: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & PropsMixed' +@@= skipped -13, +13 lines =@@ + ~~~~~~~~~~~~~~~~~~~~~~~~ + + +-!!! error TS2747: 'Blah3' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Cb | Cb[]'. ++!!! error TS2747: 'Blah3' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Cb[] | Cb'. + !!! related TS6500 index.tsx:54:3: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & PropsMixed' + + // Blah3 components don't accept multiple children of the wrong type. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.js.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.js.diff index 9240c8544f..d2f5d5833d 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.js.diff @@ -9,33 +9,39 @@ function Blah(props) { return React.createElement(React.Fragment, null); } -@@= skipped -9, +9 lines =@@ + // Incompatible child. +-var a = React.createElement(Blah, null, function (x) { return x; }); ++var a = React.createElement(Blah, null, x => x); // Blah components don't accept text as child elements var a = React.createElement(Blah, null, "Hello unexpected text!"); // Blah components don't accept multiple children. -var a = React.createElement(Blah, null, -- x => "" + x, -- x => "" + x); +- function (x) { return "" + x; }, +- function (x) { return "" + x; }); +var a = React.createElement(Blah, null, x => "" + x, x => "" + x); function Blah2(props) { return React.createElement(React.Fragment, null); } -@@= skipped -11, +9 lines =@@ + // Incompatible child. +-var a = React.createElement(Blah2, null, function (x) { return x; }); ++var a = React.createElement(Blah2, null, x => x); // Blah2 components don't accept text as child elements var a = React.createElement(Blah2, null, "Hello unexpected text!"); // Blah2 components don't accept multiple children of the wrong type. -var a = React.createElement(Blah2, null, -- x => x, -- x => x); +- function (x) { return x; }, +- function (x) { return x; }); +var a = React.createElement(Blah2, null, x => x, x => x); function Blah3(props) { return React.createElement(React.Fragment, null); } -@@= skipped -11, +9 lines =@@ + // Incompatible child. +-var a = React.createElement(Blah3, null, function (x) { return x; }); ++var a = React.createElement(Blah3, null, x => x); // Blah3 components don't accept text as child elements var a = React.createElement(Blah3, null, "Hello unexpected text!"); // Blah3 components don't accept multiple children of the wrong type. -var a = React.createElement(Blah3, null, -- x => x, -- x => x); +- function (x) { return x; }, +- function (x) { return x; }); +var a = React.createElement(Blah3, null, x => x, x => x); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.types.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.types.diff new file mode 100644 index 0000000000..37865edc9e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenIndividualErrorElaborations.types.diff @@ -0,0 +1,11 @@ +--- old.jsxChildrenIndividualErrorElaborations.types ++++ new.jsxChildrenIndividualErrorElaborations.types +@@= skipped -128, +128 lines =@@ + + interface PropsMixed { + children: Cb | Cb[]; +->children : Cb | Cb[] ++>children : Cb[] | Cb + } + + export function Blah3(props: PropsMixed) { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff index 4f2d8d312a..f159f42c4e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js.diff @@ -5,6 +5,21 @@ //// [jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.js] "use strict"; -/// +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); exports.App = void 0; -var React = require("react"); @@ -12,4 +27,22 @@ +const React = require("react"); function TabLayout(props) { return React.createElement("div", null); - } \ No newline at end of file + } +-var App = /** @class */ (function (_super) { +- __extends(App, _super); +- function App() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- App.prototype.render = function () { ++class App extends React.Component { ++ render() { + return React.createElement(TabLayout, null, [ + ['Users', React.createElement("div", null)], + ['Products', React.createElement("div", null)] + ]); +- }; +- return App; +-}(React.Component)); ++ } ++} + exports.App = App; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxChildrenWrongType.types.diff b/testdata/baselines/reference/submodule/compiler/jsxChildrenWrongType.types.diff new file mode 100644 index 0000000000..2df0878e80 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxChildrenWrongType.types.diff @@ -0,0 +1,11 @@ +--- old.jsxChildrenWrongType.types ++++ new.jsxChildrenWrongType.types +@@= skipped -6, +6 lines =@@ + + interface PropsType { + children: [string, number?] | Iterable; +->children : [string, number?] | Iterable ++>children : Iterable | [string, number?] + } + declare class Foo extends React.Component {} + >Foo : Foo \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff index 1a21218483..19874c82c5 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.js.diff @@ -16,5 +16,10 @@ +/// +const React = require("react"); function createReactSingleSelect(WrappedComponent) { - return (props) => { - return (React.createElement(ReactSelectClass, __assign({}, props, { multi: false, autosize: false, value: props.value, onChange: (value) => { \ No newline at end of file +- return function (props) { +- return (React.createElement(ReactSelectClass, __assign({}, props, { multi: false, autosize: false, value: props.value, onChange: function (value) { ++ return (props) => { ++ return (React.createElement(ReactSelectClass, __assign({}, props, { multi: false, autosize: false, value: props.value, onChange: (value) => { + if (props.onChange) { + props.onChange(value === null ? undefined : value); + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.symbols.diff new file mode 100644 index 0000000000..bf6aaba18e --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.symbols.diff @@ -0,0 +1,29 @@ +--- old.jsxComplexSignatureHasApplicabilityError.symbols ++++ new.jsxComplexSignatureHasApplicabilityError.symbols +@@= skipped -408, +408 lines =@@ + >TValue : Symbol(TValue, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 88, 36)) + >OptionValues : Symbol(OptionValues, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 124, 1)) + >input : Symbol(input, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 88, 62)) +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + >AutocompleteResult : Symbol(AutocompleteResult, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 89, 152)) + >TValue : Symbol(TValue, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 88, 36)) + +@@= skipped -39, +39 lines =@@ + >Options : Symbol(Options, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 100, 1)) + >TValue : Symbol(TValue, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 102, 20)) + >OptionValues : Symbol(OptionValues, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 124, 1)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Option : Symbol(Option, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 102, 67)) + >TValue : Symbol(TValue, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 102, 20)) + +@@= skipped -265, +265 lines =@@ + + values?: Array>; + >values : Symbol(ValueComponentProps.values, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 251, 26)) +->Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >Option : Symbol(Option, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 102, 67)) + >TValue : Symbol(TValue, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 244, 37)) + } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.types.diff b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.types.diff new file mode 100644 index 0000000000..52c8f11a2a --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxComplexSignatureHasApplicabilityError.types.diff @@ -0,0 +1,25 @@ +--- old.jsxComplexSignatureHasApplicabilityError.types ++++ new.jsxComplexSignatureHasApplicabilityError.types +@@= skipped -62, +62 lines =@@ + >false : false + + value={props.value} +->value : ExtractValueType | Option> | undefined +->props.value : ExtractValueType | Option> | undefined ++>value : Option> | ExtractValueType | undefined ++>props.value : Option> | ExtractValueType | undefined + >props : Omit, keyof Omit & keyof Props>> & Props> & { children?: React.ReactNode; } +->value : ExtractValueType | Option> | undefined ++>value : Option> | ExtractValueType | undefined + + onChange={(value) => { + >onChange : (value: Option> | Options> | null) => void +@@= skipped -874, +874 lines =@@ + * initial field value + */ + value?: Option | Options | string | string[] | number | number[] | boolean; +->value : string | number | boolean | Option | Options | string[] | number[] | undefined ++>value : string | number | boolean | string[] | number[] | Option | Options | undefined + + /** + * the option property to use for the value \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.js.diff b/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.js.diff index 4ce429b405..1cd4ee8854 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.js.diff @@ -5,17 +5,51 @@ //// [jsxComponentTypeErrors.jsx] -"use strict"; - function FunctionComponent({ type }) { +-function FunctionComponent(_a) { +- var type = _a.type; ++function FunctionComponent({ type }) { return { - type -@@= skipped -10, +9 lines =@@ +- type: type ++ type + }; + } + FunctionComponent.useThis = function () { return ; }; - class ClassComponent { -- constructor() { +-var ClassComponent = /** @class */ (function () { +- function ClassComponent() { - this.type = 'string'; - } +- return ClassComponent; +-}()); +-var MixedComponent = Math.random() ? FunctionComponent : ClassComponent; +-var elem1 = ; +-var elem2 = ; +-var elem3 = ; +-var elem4 = ; +-var obj = { +- MemberFunctionComponent: function () { ++class ClassComponent { + type = 'string'; - } - const MixedComponent = Math.random() ? FunctionComponent : ClassComponent; - const elem1 = ; \ No newline at end of file ++} ++const MixedComponent = Math.random() ? FunctionComponent : ClassComponent; ++const elem1 = ; ++const elem2 = ; ++const elem3 = ; ++const elem4 = ; ++const obj = { ++ MemberFunctionComponent() { + return {}; + }, +- MemberClassComponent: /** @class */ (function () { +- function MemberClassComponent() { +- } +- return MemberClassComponent; +- }()), ++ MemberClassComponent: class { ++ }, + }; +-var elem5 = ; +-var elem6 = ; ++const elem5 = ; ++const elem6 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.symbols.diff index 584cfd4928..d4bb99620e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxComponentTypeErrors.symbols.diff @@ -23,9 +23,12 @@ >type : Symbol(type, Decl(jsxComponentTypeErrors.tsx, 15, 14)) } -@@= skipped -20, +20 lines =@@ +@@= skipped -18, +18 lines =@@ + const MixedComponent = Math.random() ? FunctionComponent : ClassComponent; + >MixedComponent : Symbol(MixedComponent, Decl(jsxComponentTypeErrors.tsx, 22, 5)) >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) - >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) ->FunctionComponent : Symbol(FunctionComponent, Decl(jsxComponentTypeErrors.tsx, 7, 1), Decl(jsxComponentTypeErrors.tsx, 13, 1)) +>FunctionComponent : Symbol(FunctionComponent, Decl(jsxComponentTypeErrors.tsx, 7, 1)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementClassTooManyParams.js.diff b/testdata/baselines/reference/submodule/compiler/jsxElementClassTooManyParams.js.diff index 2cd0bb4f1a..a475b0ba15 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementClassTooManyParams.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxElementClassTooManyParams.js.diff @@ -5,8 +5,15 @@ //// [jsxElementClassTooManyParams.jsx] -"use strict"; - class ElemClass { +-var ElemClass = /** @class */ (function () { +- function ElemClass(props) { ++class ElemClass { + props; - constructor(props) { ++ constructor(props) { this.props = props; - } \ No newline at end of file + } +- return ElemClass; +-}()); +-var elem = ; ++} ++const elem = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementType.js.diff b/testdata/baselines/reference/submodule/compiler/jsxElementType.js.diff index a68ad5ac7d..f9f3d9efc7 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxElementType.js.diff @@ -4,6 +4,21 @@ //// [jsxElementType.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { @@ -12,20 +27,103 @@ - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +-}; +-var __generator = (this && this.__generator) || function (thisArg, body) { +- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); +- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; +- function verb(n) { return function (v) { return step([n, v]); }; } +- function step(op) { +- if (f) throw new TypeError("Generator is already executing."); +- while (g && (g = 0, op[0] && (_ = 0)), _) try { +- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; +- if (y = 0, t) op = [op[0] & 2, t.value]; +- switch (op[0]) { +- case 0: case 1: t = op; break; +- case 4: _.label++; return { value: op[1], done: false }; +- case 5: _.label++; y = op[1]; op = [0]; continue; +- case 7: op = _.ops.pop(); _.trys.pop(); continue; +- default: +- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } +- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } +- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } +- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } +- if (t[2]) _.ops.pop(); +- _.trys.pop(); continue; +- } +- op = body.call(thisArg, _); +- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } +- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; +- } -}; Object.defineProperty(exports, "__esModule", { value: true }); /// -var React = require("react"); +-var Component; +-var RenderElement = function (_a) { +- var title = _a.title; +- return React.createElement("div", null, title); +-}; +const React = require("react"); - let Component; - const RenderElement = ({ title }) => React.createElement("div", null, title); ++let Component; ++const RenderElement = ({ title }) => React.createElement("div", null, title); Component = RenderElement; -@@= skipped -34, +25 lines =@@ + React.createElement(RenderElement, null); + React.createElement(RenderElement, { title: "react" }); + React.createElement(RenderElement, { excessProp: true }); +-var RenderString = function (_a) { +- var title = _a.title; +- return title; +-}; ++const RenderString = ({ title }) => title; + Component = RenderString; + React.createElement(RenderString, null); + React.createElement(RenderString, { title: "react" }); + React.createElement(RenderString, { excessProp: true }); +-var RenderNumber = function (_a) { +- var title = _a.title; +- return title.length; +-}; ++const RenderNumber = ({ title }) => title.length; + Component = RenderNumber; + React.createElement(RenderNumber, null); + React.createElement(RenderNumber, { title: "react" }); + React.createElement(RenderNumber, { excessProp: true }); +-var RenderArray = function (_a) { +- var title = _a.title; +- return [title]; +-}; ++const RenderArray = ({ title }) => [title]; + Component = RenderArray; + React.createElement(RenderArray, null); React.createElement(RenderArray, { title: "react" }); React.createElement(RenderArray, { excessProp: true }); // React Server Component --const RenderPromise = (_a) => __awaiter(void 0, [_a], void 0, function* ({ title }) { return "react"; }); +-var RenderPromise = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) { +- var title = _b.title; +- return __generator(this, function (_c) { +- return [2 /*return*/, "react"]; +- }); +-}); }; +const RenderPromise = async ({ title }) => "react"; Component = RenderPromise; React.createElement(RenderPromise, null); - React.createElement(RenderPromise, { title: "react" }); \ No newline at end of file + React.createElement(RenderPromise, { title: "react" }); + React.createElement(RenderPromise, { excessProp: true }); + // Class components still work +-var RenderStringClass = /** @class */ (function (_super) { +- __extends(RenderStringClass, _super); +- function RenderStringClass() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- RenderStringClass.prototype.render = function () { ++class RenderStringClass extends React.Component { ++ render() { + return this.props.title; +- }; +- return RenderStringClass; +-}(React.Component)); ++ } ++} + Component = RenderStringClass; + React.createElement(RenderStringClass, null); + React.createElement(RenderStringClass, { title: "react" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementType.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsxElementType.symbols.diff index 5b050c4bf5..5e3cdf5874 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementType.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxElementType.symbols.diff @@ -1,6 +1,24 @@ --- old.jsxElementType.symbols +++ new.jsxElementType.symbols -@@= skipped -63, +63 lines =@@ +@@= skipped -6, +6 lines =@@ + + type React18ReactFragment = ReadonlyArray; + >React18ReactFragment : Symbol(React18ReactFragment, Decl(jsxElementType.tsx, 1, 31)) +->ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) + >React18ReactNode : Symbol(React18ReactNode, Decl(jsxElementType.tsx, 3, 60)) + + type React18ReactNode = +@@= skipped -23, +23 lines =@@ + | null + | undefined + | Promise; +->Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --)) + >React18ReactNode : Symbol(React18ReactNode, Decl(jsxElementType.tsx, 3, 60)) + + // // React.JSXElementConstructor but it now can return React nodes from function components. +@@= skipped -34, +34 lines =@@ >IntrinsicElements : Symbol(IntrinsicElements, Decl(react16.d.ts, 2514, 86), Decl(jsxElementType.tsx, 22, 67), Decl(jsxElementType.tsx, 101, 19)) ['my-custom-element']: React.DOMAttributes; diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteral.js.diff b/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteral.js.diff index 3e5c4e37d0..9fe1e2f2bb 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteral.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteral.js.diff @@ -7,5 +7,12 @@ -var React = require("react"); +const React = require("react"); // should be fine - `ElementType` accepts `div` - let a = React.createElement("div", null); - // should be an error - `ElementType` does not accept `span` \ No newline at end of file +-var a = React.createElement("div", null); ++let a = React.createElement("div", null); + // should be an error - `ElementType` does not accept `span` +-var b = React.createElement("span", null); ++let b = React.createElement("span", null); + // Should be an error. + // `ruhroh` is in neither `IntrinsicElements` nor `ElementType` +-var c = React.createElement("ruhroh", null); ++let c = React.createElement("ruhroh", null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteralWithGeneric.js.diff b/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteralWithGeneric.js.diff index e24b0f3772..2602b02626 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteralWithGeneric.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxElementTypeLiteralWithGeneric.js.diff @@ -7,5 +7,9 @@ -var React = require("react"); +const React = require("react"); // should be fine - `ElementType` accepts `div` - let a = React.createElement("div", null); - // Should be an error. \ No newline at end of file +-var a = React.createElement("div", null); ++let a = React.createElement("div", null); + // Should be an error. + // `ruhroh` is in neither `IntrinsicElements` nor `ElementType` +-var c = React.createElement("ruhroh", null); ++let c = React.createElement("ruhroh", null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.js b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.js index 7c3ecfb686..aa68e3d32e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.js +++ b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.js @@ -2,7 +2,7 @@ //// [a.tsx] declare const React: any; -declare module JSX { +declare namespace JSX { interface IntrinsicElements { ["package"]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.symbols b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.symbols index bb9c68c22a..33e9500c33 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.symbols @@ -4,11 +4,11 @@ declare const React: any; >React : Symbol(React, Decl(a.tsx, 0, 13)) -declare module JSX { +declare namespace JSX { >JSX : Symbol(JSX, Decl(a.tsx, 0, 25)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(a.tsx, 1, 20)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(a.tsx, 1, 23)) ["package"]: any; >["package"] : Symbol(IntrinsicElements["package"], Decl(a.tsx, 2, 33)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.types b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.types index 151b41a104..d015cb26df 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.types +++ b/testdata/baselines/reference/submodule/compiler/jsxElementsAsIdentifierNames.types @@ -4,7 +4,7 @@ declare const React: any; >React : any -declare module JSX { +declare namespace JSX { interface IntrinsicElements { ["package"]: any; >["package"] : any diff --git a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react).js.diff b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react).js.diff index e75b72d689..ec992273f0 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react).js.diff @@ -9,6 +9,6 @@ function Wrapper(props) { return React.createElement("div", null, props.children); } --const element = (React.createElement(Wrapper, null, +-var element = (React.createElement(Wrapper, null, - React.createElement("div", null, "Hello"))); +const element = (React.createElement(Wrapper, null, React.createElement("div", null, "Hello"))); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).js.diff b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).js.diff index 345ffbaac1..3d91add4a1 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).js.diff @@ -10,5 +10,5 @@ - return (0, jsx_runtime_1.jsx)("div", { children: props.children }); + return jsx_runtime_1.jsx("div", { children: props.children }); } --const element = ((0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsx)("div", { children: "Hello" }) })); +-var element = ((0, jsx_runtime_1.jsx)(Wrapper, { children: (0, jsx_runtime_1.jsx)("div", { children: "Hello" }) })); +const element = (jsx_runtime_1.jsx(Wrapper, { children: jsx_runtime_1.jsx("div", { children: "Hello" }) })); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).js.diff b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).js.diff index 536da522f2..c93cd03406 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).js.diff @@ -5,11 +5,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); +-var _jsxFileName = "jsxEmptyExpressionNotCountedAsChild.tsx"; +const jsx_dev_runtime_1 = require("react/jsx-dev-runtime"); - const _jsxFileName = "jsxEmptyExpressionNotCountedAsChild.tsx"; ++const _jsxFileName = "jsxEmptyExpressionNotCountedAsChild.tsx"; function Wrapper(props) { - return (0, jsx_dev_runtime_1.jsxDEV)("div", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 9, columnNumber: 11 }, this); + return jsx_dev_runtime_1.jsxDEV("div", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 9, columnNumber: 11 }, this); } --const element = ((0, jsx_dev_runtime_1.jsxDEV)(Wrapper, { children: (0, jsx_dev_runtime_1.jsxDEV)("div", { children: "Hello" }, void 0, false, { fileName: _jsxFileName, lineNumber: 15, columnNumber: 6 }, this) }, void 0, false, { fileName: _jsxFileName, lineNumber: 12, columnNumber: 18 }, this)); +-var element = ((0, jsx_dev_runtime_1.jsxDEV)(Wrapper, { children: (0, jsx_dev_runtime_1.jsxDEV)("div", { children: "Hello" }, void 0, false, { fileName: _jsxFileName, lineNumber: 15, columnNumber: 6 }, this) }, void 0, false, { fileName: _jsxFileName, lineNumber: 12, columnNumber: 18 }, this)); +const element = (jsx_dev_runtime_1.jsxDEV(Wrapper, { children: jsx_dev_runtime_1.jsxDEV("div", { children: "Hello" }, void 0, false, { fileName: _jsxFileName, lineNumber: 15, columnNumber: 6 }, this) }, void 0, false, { fileName: _jsxFileName, lineNumber: 12, columnNumber: 18 }, this)); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff index 961aefabfb..f9b0e6d9fe 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxExcessPropsAndAssignability.js.diff @@ -13,8 +13,14 @@ }; Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); +-var myHoc = function (ComposedComponent) { +- var WrapperComponent = null; +- var props = null; +/// +const React = require("react"); - const myHoc = (ComposedComponent) => { - const WrapperComponent = null; - const props = null; \ No newline at end of file ++const myHoc = (ComposedComponent) => { ++ const WrapperComponent = null; ++ const props = null; + React.createElement(WrapperComponent, __assign({}, props, { myProp: '1000000' })); + React.createElement(WrapperComponent, __assign({}, props, { myProp: 1000000 })); + }; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js index 75a062bf6c..890c0464a6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryIdentifierAsParameter.ts] //// //// [test.tsx] -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map index 908cb637e1..4e6510529b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map @@ -1,3 +1,3 @@ //// [test.js.map] {"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,CAAC,aAAa,EAAE;QAClB,OAAO,0BAAO,CAAC;IAAA,CAClB;CACJ"} -//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLDBCQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLDBCQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map.diff index 20eebd306b..dd8e3fb7ff 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.js.map.diff @@ -3,6 +3,6 @@ @@= skipped -0, +0 lines =@@ //// [test.js.map] -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA,MAAa,YAAY;IACrB,MAAM,CAAC,aAAa;QAChB,OAAO,0BAAO,CAAC;IACnB,CAAC;CACJ;AAJD,oCAIC"} --//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNLENBQUMsYUFBYTtRQUNoQixPQUFPLDBCQUFPLENBQUM7SUFDbkIsQ0FBQztDQUNKO0FBSkQsb0NBSUMifQ==,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== +-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNLENBQUMsYUFBYTtRQUNoQixPQUFPLDBCQUFPLENBQUM7SUFDbkIsQ0FBQztDQUNKO0FBSkQsb0NBSUMifQ==,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,CAAC,aAAa,EAAE;QAClB,OAAO,0BAAO,CAAC;IAAA,CAClB;CACJ"} -+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLDBCQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== \ No newline at end of file ++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gY3JlYXRlRWxlbWVudCgiZGl2IiwgbnVsbCk7DQogICAgfQ0KfQ0KZXhwb3J0cy5BcHBDb21wb25lbnQgPSBBcHBDb21wb25lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD10ZXN0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLDBCQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9Cg== \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt index 1a2a18a05b..a7009bc5c8 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt @@ -14,7 +14,7 @@ sourceFile:test.tsx >>>class AppComponent { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >declare module JSX { +1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; > } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt.diff index cb1ecd68bb..866141ddf0 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.sourcemap.txt.diff @@ -8,7 +8,7 @@ -3 > ^^^^^^^^^^^^ -4 > ^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 >declare module JSX { + 1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; @@= skipped -10, +8 lines =@@ diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.symbols b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.symbols index 2d672d4436..6026e8df25 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/jsxFactoryIdentifierAsParameter.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { >JSX : Symbol(JSX, Decl(test.tsx, 0, 0)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 20)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 23)) [s: string]: any; >s : Symbol(s, Decl(test.tsx, 2, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.types b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.types index ede4290568..8c17766941 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.types +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierAsParameter.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryIdentifierAsParameter.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; >s : string diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.errors.txt index 12f0c6873c..9f223e1e28 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.errors.txt @@ -2,7 +2,7 @@ test.tsx(9,17): error TS2552: Cannot find name 'createElement'. Did you mean 'fr ==== test.tsx (1 errors) ==== - declare module JSX { + declare namespace JSX { interface IntrinsicElements { [s: string]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js index 552ad4338a..1c87cb140d 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryIdentifierWithAbsentParameter.ts] //// //// [test.tsx] -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map index 0cd80cedfe..43127f785e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map @@ -1,3 +1,3 @@ //// [test.js.map] {"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,GAAG;QACL,OAAO,0BAAO,CAAC;IAAA,CAClB;CACJ"} -//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxHQUFHO1FBQ0wsT0FBTywwQkFBTyxDQUFDO0lBQUEsQ0FDbEI7Q0FDSiJ9,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxHQUFHO1FBQ0wsT0FBTywwQkFBTyxDQUFDO0lBQUEsQ0FDbEI7Q0FDSiJ9,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map.diff index 5fd8ae847f..664699ce61 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.js.map.diff @@ -3,6 +3,6 @@ @@= skipped -0, +0 lines =@@ //// [test.js.map] -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA,MAAa,YAAY;IACrB,MAAM;QACF,OAAO,0BAAO,CAAC;IACnB,CAAC;CACJ;AAJD,oCAIC"} --//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNO1FBQ0YsT0FBTywwQkFBTyxDQUFDO0lBQ25CLENBQUM7Q0FDSjtBQUpELG9DQUlDIn0=,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K +-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNO1FBQ0YsT0FBTywwQkFBTyxDQUFDO0lBQ25CLENBQUM7Q0FDSjtBQUpELG9DQUlDIn0=,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,GAAG;QACL,OAAO,0BAAO,CAAC;IAAA,CAClB;CACJ"} -+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxHQUFHO1FBQ0wsT0FBTywwQkFBTyxDQUFDO0lBQUEsQ0FDbEI7Q0FDSiJ9,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K \ No newline at end of file ++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoKSB7DQogICAgICAgIHJldHVybiBjcmVhdGVFbGVtZW50KCJkaXYiLCBudWxsKTsNCiAgICB9DQp9DQpleHBvcnRzLkFwcENvbXBvbmVudCA9IEFwcENvbXBvbmVudDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRlc3QuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxHQUFHO1FBQ0wsT0FBTywwQkFBTyxDQUFDO0lBQUEsQ0FDbEI7Q0FDSiJ9,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoKSB7CiAgICAgICAgcmV0dXJuIDxkaXYgLz47CiAgICB9Cn0K \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt index 9243a828d6..81e163c482 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt @@ -14,7 +14,7 @@ sourceFile:test.tsx >>>class AppComponent { 1 > 2 >^^^^^^^^^^^^^^^-> -1 >declare module JSX { +1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; > } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt.diff index cc0b06435d..3b79b45c04 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.sourcemap.txt.diff @@ -7,7 +7,7 @@ -2 >^^^^^^ -3 > ^^^^^^^^^^^^ +2 >^^^^^^^^^^^^^^^-> - 1 >declare module JSX { + 1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; @@= skipped -9, +8 lines =@@ diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.symbols b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.symbols index 06fc93d8ee..29fd832973 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/jsxFactoryIdentifierWithAbsentParameter.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { >JSX : Symbol(JSX, Decl(test.tsx, 0, 0)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 20)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 23)) [s: string]: any; >s : Symbol(s, Decl(test.tsx, 2, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.types b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.types index 0848c0e958..e55710c5fb 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.types +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryIdentifierWithAbsentParameter.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryIdentifierWithAbsentParameter.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; >s : string diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.errors.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.errors.txt index 869be8017a..effcaf3d25 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.errors.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.errors.txt @@ -2,7 +2,7 @@ test.tsx(9,17): error TS2552: Cannot find name 'MyElement'. Did you mean 'Elemen ==== test.tsx (1 errors) ==== - declare module JSX { + declare namespace JSX { interface IntrinsicElements { [s: string]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js index 262e29825d..47131cebb8 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryQualifiedNameResolutionError.ts] //// //// [test.tsx] -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map index 36429acd7b..67186097cf 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map @@ -1,3 +1,3 @@ //// [test.js.map] {"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,CAAC,aAAa,EAAE;QAClB,OAAO,oCAAO,CAAC;IAAA,CAClB;CACJ"} -//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLG9DQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 +//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLG9DQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map.diff index 65825cfb4f..f5ade4888b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.js.map.diff @@ -3,6 +3,6 @@ @@= skipped -0, +0 lines =@@ //// [test.js.map] -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA,MAAa,YAAY;IACrB,MAAM,CAAC,aAAa;QAChB,OAAO,oCAAO,CAAC;IACnB,CAAC;CACJ;AAJD,oCAIC"} --//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNLENBQUMsYUFBYTtRQUNoQixPQUFPLG9DQUFPLENBQUM7SUFDbkIsQ0FBQztDQUNKO0FBSkQsb0NBSUMifQ==,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 +-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLE1BQWEsWUFBWTtJQUNyQixNQUFNLENBQUMsYUFBYTtRQUNoQixPQUFPLG9DQUFPLENBQUM7SUFDbkIsQ0FBQztDQUNKO0FBSkQsb0NBSUMifQ==,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.tsx"],"names":[],"mappings":";;;AAMA;IACI,MAAM,CAAC,aAAa,EAAE;QAClB,OAAO,oCAAO,CAAC;IAAA,CAClB;CACJ"} -+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLG9DQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBtb2R1bGUgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 \ No newline at end of file ++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gdm9pZCAwOw0KY2xhc3MgQXBwQ29tcG9uZW50IHsNCiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgew0KICAgICAgICByZXR1cm4gTXlFbGVtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIsIG51bGwpOw0KICAgIH0NCn0NCmV4cG9ydHMuQXBwQ29tcG9uZW50ID0gQXBwQ29tcG9uZW50Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGVzdC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BO0lBQ0ksTUFBTSxDQUFDLGFBQWEsRUFBRTtRQUNsQixPQUFPLG9DQUFPLENBQUM7SUFBQSxDQUNsQjtDQUNKIn0=,ZGVjbGFyZSBuYW1lc3BhY2UgSlNYIHsKICAgIGludGVyZmFjZSBJbnRyaW5zaWNFbGVtZW50cyB7CiAgICAgICAgW3M6IHN0cmluZ106IGFueTsKICAgIH0KfQoKZXhwb3J0IGNsYXNzIEFwcENvbXBvbmVudCB7CiAgICByZW5kZXIoY3JlYXRlRWxlbWVudCkgewogICAgICAgIHJldHVybiA8ZGl2IC8+OwogICAgfQp9 \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt index 4c750c57f6..b82bc0280c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt @@ -14,7 +14,7 @@ sourceFile:test.tsx >>>class AppComponent { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >declare module JSX { +1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; > } diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt.diff index 021bbed328..b20838370e 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.sourcemap.txt.diff @@ -8,7 +8,7 @@ -3 > ^^^^^^^^^^^^ -4 > ^^^^^^^^^^-> +2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> - 1 >declare module JSX { + 1 >declare namespace JSX { > interface IntrinsicElements { > [s: string]: any; @@= skipped -10, +8 lines =@@ diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.symbols b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.symbols index e8a460ccc2..36602561e6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.symbols +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.symbols @@ -1,11 +1,11 @@ //// [tests/cases/compiler/jsxFactoryQualifiedNameResolutionError.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { >JSX : Symbol(JSX, Decl(test.tsx, 0, 0)) interface IntrinsicElements { ->IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 20)) +>IntrinsicElements : Symbol(IntrinsicElements, Decl(test.tsx, 0, 23)) [s: string]: any; >s : Symbol(s, Decl(test.tsx, 2, 9)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.types b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.types index 5f790033c3..fbf3a55e38 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.types +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameResolutionError.types @@ -1,7 +1,7 @@ //// [tests/cases/compiler/jsxFactoryQualifiedNameResolutionError.ts] //// === test.tsx === -declare module JSX { +declare namespace JSX { interface IntrinsicElements { [s: string]: any; >s : string diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.errors.txt.diff new file mode 100644 index 0000000000..a69fc04503 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.errors.txt.diff @@ -0,0 +1,20 @@ +--- old.jsxFactoryQualifiedNameWithEs5.errors.txt ++++ new.jsxFactoryQualifiedNameWithEs5.errors.txt +@@= skipped -0, +0 lines =@@ +-index.tsx(1,8): error TS2882: Cannot find module or type declarations for side-effect import of './jsx'. +- +- +-==== index.tsx (1 errors) ==== +- import "./jsx"; +- ~~~~~~~ +-!!! error TS2882: Cannot find module or type declarations for side-effect import of './jsx'. +- +- var skate: any; +- const React = { createElement: skate.h }; +- +- class Component { +- renderCallback() { +- return
test
; +- } +- }; ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.js.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.js.diff new file mode 100644 index 0000000000..5c934a406b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.js.diff @@ -0,0 +1,21 @@ +--- old.jsxFactoryQualifiedNameWithEs5.js ++++ new.jsxFactoryQualifiedNameWithEs5.js +@@= skipped -16, +16 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); + require("./jsx"); + var skate; +-var React = { createElement: skate.h }; +-var Component = /** @class */ (function () { +- function Component() { +- } +- Component.prototype.renderCallback = function () { ++const React = { createElement: skate.h }; ++class Component { ++ renderCallback() { + return skate.h("div", null, "test"); +- }; +- return Component; +-}()); ++ } ++} + ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.types.diff b/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.types.diff deleted file mode 100644 index 3e8165a7f9..0000000000 --- a/testdata/baselines/reference/submodule/compiler/jsxFactoryQualifiedNameWithEs5.types.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- old.jsxFactoryQualifiedNameWithEs5.types -+++ new.jsxFactoryQualifiedNameWithEs5.types -@@= skipped -20, +20 lines =@@ - >renderCallback : () => any - - return
test
; -->
test
: error -+>
test
: any - >div : any - >div : any - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.js.diff b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.js.diff index c831aea953..8bf098d7f0 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxFragmentFactoryNoUnusedLocals.js.diff @@ -5,11 +5,14 @@ exports.Counter = Counter; /// -var react_1 = require("react"); -+const react_1 = require("react"); - function Counter({ count = 0 }) { - const [cnt, setCnt] = null; +-function Counter(_a) { +- var _b = _a.count, count = _b === void 0 ? 0 : _b; +- var _c = null, cnt = _c[0], setCnt = _c[1]; - return (0, react_1.createElement)(react_1.Fragment, null, - (0, react_1.createElement)("p", null, cnt), -- (0, react_1.createElement)("button", { onClick: () => setCnt((prev) => prev + 1), type: "button" }, "Update")); +- (0, react_1.createElement)("button", { onClick: function () { return setCnt(function (prev) { return prev + 1; }); }, type: "button" }, "Update")); ++const react_1 = require("react"); ++function Counter({ count = 0 }) { ++ const [cnt, setCnt] = null; + return (0, react_1.createElement)(react_1.Fragment, null, (0, react_1.createElement)("p", null, cnt), (0, react_1.createElement)("button", { onClick: () => setCnt((prev) => prev + 1), type: "button" }, "Update")); } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxHasLiteralType.js.diff b/testdata/baselines/reference/submodule/compiler/jsxHasLiteralType.js.diff index 7be5e063dd..cedfa57a1b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxHasLiteralType.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxHasLiteralType.js.diff @@ -1,11 +1,35 @@ --- old.jsxHasLiteralType.js +++ new.jsxHasLiteralType.js -@@= skipped -12, +12 lines =@@ +@@= skipped -11, +11 lines =@@ + //// [jsxHasLiteralType.js] "use strict"; +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); +-var MyComponent = /** @class */ (function (_super) { +- __extends(MyComponent, _super); +- function MyComponent() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return MyComponent; +-}(React.Component)); +-var m = React.createElement(MyComponent, { x: "a" }); +const React = require("react"); - class MyComponent extends React.Component { - } - const m = React.createElement(MyComponent, { x: "a" }); \ No newline at end of file ++class MyComponent extends React.Component { ++} ++const m = React.createElement(MyComponent, { x: "a" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.errors.txt.diff new file mode 100644 index 0000000000..89c9f97ce7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.errors.txt.diff @@ -0,0 +1,17 @@ +--- old.jsxImportForSideEffectsNonExtantNoError.errors.txt ++++ new.jsxImportForSideEffectsNonExtantNoError.errors.txt +@@= skipped -0, +0 lines =@@ +-jsxImportForSideEffectsNonExtantNoError.tsx(4,8): error TS2882: Cannot find module or type declarations for side-effect import of './App.css'. +- +- +-==== jsxImportForSideEffectsNonExtantNoError.tsx (1 errors) ==== +- /// +- import * as React from "react"; +- +- import "./App.css"; // doesn't actually exist +- ~~~~~~~~~~~ +-!!! error TS2882: Cannot find module or type declarations for side-effect import of './App.css'. +- +- const tag =
; +- ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.js.diff b/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.js.diff index 0cacd6ca78..e4ee135254 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxImportForSideEffectsNonExtantNoError.js.diff @@ -7,4 +7,5 @@ -var React = require("react"); +const React = require("react"); require("./App.css"); // doesn't actually exist - const tag = React.createElement("div", null); \ No newline at end of file +-var tag = React.createElement("div", null); ++const tag = React.createElement("div", null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxImportInAttribute.js.diff b/testdata/baselines/reference/submodule/compiler/jsxImportInAttribute.js.diff index 2ff8ed15ca..c761904f1a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxImportInAttribute.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxImportInAttribute.js.diff @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); /// -var Test_1 = require("Test"); +-var x = Test_1.default; // emit test_1.default +const Test_1 = require("Test"); - let x = Test_1.default; // emit test_1.default ++let x = Test_1.default; // emit test_1.default ; // ? \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxImportSourceNonPragmaComment.js.diff b/testdata/baselines/reference/submodule/compiler/jsxImportSourceNonPragmaComment.js.diff index 4ba41a3fec..4c6ca5320a 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxImportSourceNonPragmaComment.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxImportSourceNonPragmaComment.js.diff @@ -1,11 +1,23 @@ --- old.jsxImportSourceNonPragmaComment.js +++ new.jsxImportSourceNonPragmaComment.js -@@= skipped -20, +20 lines =@@ +@@= skipped -16, +16 lines =@@ + + //// [jsxImportSourceNonPragmaComment.jsx] + "use strict"; +-var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { +- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } +- return cooked; +-}; + Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Component; /* eslint-disable react/react-in-jsx-scope -- Unaware of @jsxImportSource */ /** @jsxImportSource @emotion/react */ -var react_1 = require("@emotion/react"); +const react_1 = require("@emotion/react"); function Component() { - return (); ++ return (); + } +-var templateObject_1; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxInExtendsClause.js.diff b/testdata/baselines/reference/submodule/compiler/jsxInExtendsClause.js.diff new file mode 100644 index 0000000000..d718a7c490 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxInExtendsClause.js.diff @@ -0,0 +1,42 @@ +--- old.jsxInExtendsClause.js ++++ new.jsxInExtendsClause.js +@@= skipped -13, +13 lines =@@ + }) {} + + //// [jsxInExtendsClause.js] +-var __extends = (this && this.__extends) || (function () { +- var extendStatics = function (d, b) { +- extendStatics = Object.setPrototypeOf || +- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || +- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; +- return extendStatics(d, b); +- }; +- return function (d, b) { +- if (typeof b !== "function" && b !== null) +- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +- extendStatics(d, b); +- function __() { this.constructor = d; } +- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +- }; +-})(); +-var Foo = /** @class */ (function (_super) { +- __extends(Foo, _super); +- function Foo() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- return Foo; +-}(createComponentClass(function () { return /** @class */ (function (_super) { +- __extends(class_1, _super); +- function class_1() { +- return _super !== null && _super.apply(this, arguments) || this; +- } +- class_1.prototype.render = function () { ++class Foo extends createComponentClass(() => class extends React.Component { ++ render() { + return React.createElement("span", null, "Hello, world!"); +- }; +- return class_1; +-}(React.Component)); }))); ++ } ++}) { ++} \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.js.diff b/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.js.diff index 16c89ce1ba..7642ea36b6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.js.diff @@ -5,16 +5,24 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); -+const React = require("react"); - class TestObject { -- constructor() { +-var TestObject = /** @class */ (function () { +- function TestObject() { - this.a = ''; - this.b = 1; -- this.c = () => { }; +- this.c = function () { }; - } +- return TestObject; +-}()); ++const React = require("react"); ++class TestObject { + a = ''; + b = 1; + c = () => { }; - } ++} function Test(props) { return React.createElement(React.Fragment, null); } - const model = new TestObject(); \ No newline at end of file +-var model = new TestObject(); +-var el1 = React.createElement(Test, { model: model, foo: "c" }); +-var el2 = React.createElement(Test, { model: model, foo: "c" }); ++const model = new TestObject(); ++const el1 = React.createElement(Test, { model: model, foo: "c" }); ++const el2 = React.createElement(Test, { model: model, foo: "c" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.symbols.diff index 0823ec356b..0f024f7a03 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.symbols.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxInferenceProducesLiteralAsExpected.symbols.diff @@ -4,7 +4,7 @@ >T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27)) >T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27)) >K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 35)) -->Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +->Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >K : Symbol(K, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 35)) >T : Symbol(T, Decl(jsxInferenceProducesLiteralAsExpected.tsx, 1, 27)) diff --git a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicElementsTypeArgumentErrors.js.diff b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicElementsTypeArgumentErrors.js.diff index c67464a392..7f363350a6 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicElementsTypeArgumentErrors.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicElementsTypeArgumentErrors.js.diff @@ -7,5 +7,28 @@ -var React = require("react"); +const React = require("react"); // opening + closing - const a = React.createElement("div", null); // empty type args - const b = React.createElement("div", null); // trailing comma type args \ No newline at end of file +-var a = React.createElement("div", null); // empty type args +-var b = React.createElement("div", null); // trailing comma type args +-var c = React.createElement("div", null); // nonexistant type args +-var d = React.createElement("div", null); // nested missing type args +-var e = React.createElement("div", null); // existing but incorrect nested type args +-var f = React.createElement("div", null); // existing type argument with no internal issues ++const a = React.createElement("div", null); // empty type args ++const b = React.createElement("div", null); // trailing comma type args ++const c = React.createElement("div", null); // nonexistant type args ++const d = React.createElement("div", null); // nested missing type args ++const e = React.createElement("div", null); // existing but incorrect nested type args ++const f = React.createElement("div", null); // existing type argument with no internal issues + // self-closing +-var g = React.createElement("div", null); // empty type args +-var h = React.createElement("div", null); // trailing comma type args +-var i = React.createElement("div", null); // nonexistant type args +-var j = React.createElement("div", null); // nested missing type args +-var k = React.createElement("div", null); // existing but incorrect nested type args +-var l = React.createElement("div", null); // existing type argument with no internal issues ++const g = React.createElement("div", null); // empty type args ++const h = React.createElement("div", null); // trailing comma type args ++const i = React.createElement("div", null); // nonexistant type args ++const j = React.createElement("div", null); // nested missing type args ++const k = React.createElement("div", null); // existing but incorrect nested type args ++const l = React.createElement("div", null); // existing type argument with no internal issues \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff index 3ca0818f87..ca5259d892 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.js.diff @@ -7,7 +7,9 @@ -/// Object.defineProperty(exports, "__esModule", { value: true }); -var React = require("react"); +-var El = Math.random() ? 'h1' : 'h2'; +-var tag = React.createElement(El, { className: "ok", key: "key" }, "Title"); +/// +const React = require("react"); - const El = Math.random() ? 'h1' : 'h2'; - const tag = React.createElement(El, { className: "ok", key: "key" }, "Title"); \ No newline at end of file ++const El = Math.random() ? 'h1' : 'h2'; ++const tag = React.createElement(El, { className: "ok", key: "key" }, "Title"); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.symbols.diff b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.symbols.diff new file mode 100644 index 0000000000..e097fd5e35 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxIntrinsicUnions.symbols.diff @@ -0,0 +1,11 @@ +--- old.jsxIntrinsicUnions.symbols ++++ new.jsxIntrinsicUnions.symbols +@@= skipped -8, +8 lines =@@ + const El = Math.random() ? 'h1' : 'h2'; + >El : Symbol(El, Decl(jsxIntrinsicUnions.tsx, 4, 5)) + >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +->Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) ++>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + + const tag = {"Title"}; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff index 3125094b86..b210831c2c 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxIssuesErrorWhenTagExpectsTooManyArguments.js.diff @@ -11,4 +11,16 @@ +const React = require("react"); function MyComp4(props, context, bad, verybad) { return React.createElement("div", null); - } \ No newline at end of file + } +@@= skipped -12, +12 lines =@@ + function MyComp2(props, context) { + return React.createElement("div", null); + } +-var a = React.createElement(MyComp4, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides +-var b = React.createElement(MyComp3, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides +-var c = React.createElement(MyComp2, { x: 2 }); // Should be OK, `context` is allowed, per react rules +-var d = React.createElement(MyTagWithOptionalNonJSXBits, { x: 2 }); // Technically OK, but probably questionable ++const a = React.createElement(MyComp4, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides ++const b = React.createElement(MyComp3, { x: 2 }); // using `MyComp` as a component should error - it expects more arguments than react provides ++const c = React.createElement(MyComp2, { x: 2 }); // Should be OK, `context` is allowed, per react rules ++const d = React.createElement(MyTagWithOptionalNonJSXBits, { x: 2 }); // Technically OK, but probably questionable \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxLocalNamespaceIndexSignatureNoCrash.js.diff b/testdata/baselines/reference/submodule/compiler/jsxLocalNamespaceIndexSignatureNoCrash.js.diff new file mode 100644 index 0000000000..624f462071 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxLocalNamespaceIndexSignatureNoCrash.js.diff @@ -0,0 +1,21 @@ +--- old.jsxLocalNamespaceIndexSignatureNoCrash.js ++++ new.jsxLocalNamespaceIndexSignatureNoCrash.js +@@= skipped -22, +22 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.X = void 0; +-var X = /** @class */ (function () { +- function X() { +- } +- X.jsx = function () { ++class X { ++ static jsx() { + return document.createElement('p'); +- }; +- return X; +-}()); ++ } ++} + exports.X = X; + function A() { + return (X.jsx("p", null, "Hello")); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeStringValues.js.diff b/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeStringValues.js.diff new file mode 100644 index 0000000000..54e626026f --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeStringValues.js.diff @@ -0,0 +1,14 @@ +--- old.jsxMultilineAttributeStringValues.js ++++ new.jsxMultilineAttributeStringValues.js +@@= skipped -9, +9 lines =@@ + + + //// [jsxMultilineAttributeStringValues.jsx] +-var a = ; +-var b = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeValuesReact.js.diff b/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeValuesReact.js.diff index 83e9614ba0..e2fb663b6b 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeValuesReact.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxMultilineAttributeValuesReact.js.diff @@ -1,10 +1,12 @@ --- old.jsxMultilineAttributeValuesReact.js +++ new.jsxMultilineAttributeValuesReact.js -@@= skipped -14, +14 lines =@@ +@@= skipped -13, +13 lines =@@ + //// [jsxMultilineAttributeValuesReact.js] - const a = React.createElement("input", { value: "\nfoo: 23\n" }); --const b = React.createElement("input", { value: '\nfoo: 23\n' }); --const c = React.createElement("input", { value: '\nfoo: 23\\n\n' }); +-var a = React.createElement("input", { value: "\nfoo: 23\n" }); +-var b = React.createElement("input", { value: '\nfoo: 23\n' }); +-var c = React.createElement("input", { value: '\nfoo: 23\\n\n' }); ++const a = React.createElement("input", { value: "\nfoo: 23\n" }); +const b = React.createElement("input", { value: "\nfoo: 23\n" }); +const c = React.createElement("input", { value: "\nfoo: 23\\n\n" }); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsx).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsx).js.diff index 6196964fdf..390a966ebe 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsx).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsx).js.diff @@ -5,9 +5,9 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("/jsx/jsx-runtime"); --const Title = (props) => (0, jsx_runtime_1.jsx)("h1", { children: props.children }); +-var Title = function (props) { return (0, jsx_runtime_1.jsx)("h1", { children: props.children }); }; -(0, jsx_runtime_1.jsx)(Title, { children: "Hello, world!" }); --const Wrong = (props) => (0, jsx_runtime_1.jsx)("h1", { children: props.offspring }); +-var Wrong = function (props) { return (0, jsx_runtime_1.jsx)("h1", { children: props.offspring }); }; -(0, jsx_runtime_1.jsx)(Wrong, { children: "Byebye, world!" }); +const jsx_runtime_1 = require("/jsx/jsx-runtime"); +const Title = (props) => jsx_runtime_1.jsx("h1", { children: props.children }); diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js.diff index aef716b7f0..e46ccae383 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js.diff @@ -1,16 +1,19 @@ --- old.jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js +++ new.jsxNamespaceElementChildrenAttributeIgnoredWhenReactJsx(jsx=react-jsxdev).js -@@= skipped -33, +33 lines =@@ +@@= skipped -32, +32 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); //// [test.js] "use strict"; +-var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("/jsx/jsx-dev-runtime"); -+const jsx_dev_runtime_1 = require("/jsx/jsx-dev-runtime"); - const _jsxFileName = "/test.tsx"; --const Title = (props) => (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, this); +-var _jsxFileName = "/test.tsx"; +-var Title = function (props) { return (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, _this); }; -(0, jsx_dev_runtime_1.jsxDEV)(Title, { children: "Hello, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 74 }, this); --const Wrong = (props) => (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.offspring }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 48 }, this); +-var Wrong = function (props) { return (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.offspring }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 48 }, _this); }; -(0, jsx_dev_runtime_1.jsxDEV)(Wrong, { children: "Byebye, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 76 }, this); ++const jsx_dev_runtime_1 = require("/jsx/jsx-dev-runtime"); ++const _jsxFileName = "/test.tsx"; +const Title = (props) => jsx_dev_runtime_1.jsxDEV("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, this); +jsx_dev_runtime_1.jsxDEV(Title, { children: "Hello, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 74 }, this); +const Wrong = (props) => jsx_dev_runtime_1.jsxDEV("h1", { children: props.offspring }, void 0, false, { fileName: _jsxFileName, lineNumber: 5, columnNumber: 48 }, this); diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexport.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexport.js.diff index 86a236decb..731772d7f3 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexport.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexport.js.diff @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Comp = void 0; -var jsx_runtime_1 = require("preact/jsx-runtime"); --const Comp = () => (0, jsx_runtime_1.jsx)("div", {}); +-var Comp = function () { return (0, jsx_runtime_1.jsx)("div", {}); }; +const jsx_runtime_1 = require("preact/jsx-runtime"); +const Comp = () => jsx_runtime_1.jsx("div", {}); exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexportMissingAliasTarget.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexportMissingAliasTarget.js.diff index c52ffb7cb8..7ea05971c8 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexportMissingAliasTarget.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceGlobalReexportMissingAliasTarget.js.diff @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Comp = void 0; -var jsx_runtime_1 = require("preact/jsx-runtime"); --const Comp = () => (0, jsx_runtime_1.jsx)("div", {}); +-var Comp = function () { return (0, jsx_runtime_1.jsx)("div", {}); }; +const jsx_runtime_1 = require("preact/jsx-runtime"); +const Comp = () => jsx_runtime_1.jsx("div", {}); exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespace.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespace.js.diff index 94896cadcc..5fca1592d7 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespace.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespace.js.diff @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Comp = void 0; -var jsx_runtime_1 = require("preact/jsx-runtime"); --const Comp = () => (0, jsx_runtime_1.jsx)("div", {}); +-var Comp = function () { return (0, jsx_runtime_1.jsx)("div", {}); }; +const jsx_runtime_1 = require("preact/jsx-runtime"); +const Comp = () => jsx_runtime_1.jsx("div", {}); exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js.diff new file mode 100644 index 0000000000..4d98e6d329 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js.diff @@ -0,0 +1,9 @@ +--- old.jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js ++++ new.jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).js +@@= skipped -67, +67 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.Comp = void 0; +-var Comp = function () { return
; }; ++const Comp = () =>
; + exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).js.diff index 50c71fe543..72ea270b34 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).js.diff @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Comp = void 0; -var jsx_runtime_1 = require("@emotion/react/jsx-runtime"); --const Comp = () => (0, jsx_runtime_1.jsx)("div", { css: "color: hotpink;" }); +-var Comp = function () { return (0, jsx_runtime_1.jsx)("div", { css: "color: hotpink;" }); }; +const jsx_runtime_1 = require("@emotion/react/jsx-runtime"); +const Comp = () => jsx_runtime_1.jsx("div", { css: "color: hotpink;" }); exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.js.diff index 50f2558812..b66fee98ca 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.js.diff @@ -7,6 +7,6 @@ -var jsx_runtime_1 = require("@emotion/react/jsx-runtime"); +const jsx_runtime_1 = require("@emotion/react/jsx-runtime"); /* @jsxImportSource @emotion/react */ --const Comp = () => (0, jsx_runtime_1.jsx)("div", { css: "color: hotpink;" }); +-var Comp = function () { return (0, jsx_runtime_1.jsx)("div", { css: "color: hotpink;" }); }; +const Comp = () => jsx_runtime_1.jsx("div", { css: "color: hotpink;" }); exports.Comp = Comp; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsx).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsx).js.diff index 06c32b4f64..08cd838e40 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsx).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsx).js.diff @@ -5,8 +5,8 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("/jsx/jsx-runtime"); --const Title = (props) => (0, jsx_runtime_1.jsx)("h1", { children: props.children }); --const element = (0, jsx_runtime_1.jsx)(Title, { children: "Hello, world!" }); +-var Title = function (props) { return (0, jsx_runtime_1.jsx)("h1", { children: props.children }); }; +-var element = (0, jsx_runtime_1.jsx)(Title, { children: "Hello, world!" }); +const jsx_runtime_1 = require("/jsx/jsx-runtime"); +const Title = (props) => jsx_runtime_1.jsx("h1", { children: props.children }); +const element = jsx_runtime_1.jsx(Title, { children: "Hello, world!" }); diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js.diff index 40af9ba871..5a177d9cd1 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js.diff @@ -1,14 +1,17 @@ --- old.jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js +++ new.jsxNamespaceNoElementChildrenAttributeReactJsx(jsx=react-jsxdev).js -@@= skipped -24, +24 lines =@@ +@@= skipped -23, +23 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); //// [test.js] "use strict"; +-var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_dev_runtime_1 = require("/jsx/jsx-dev-runtime"); +-var _jsxFileName = "/test.tsx"; +-var Title = function (props) { return (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, _this); }; +-var element = (0, jsx_dev_runtime_1.jsxDEV)(Title, { children: "Hello, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 16 }, this); +const jsx_dev_runtime_1 = require("/jsx/jsx-dev-runtime"); - const _jsxFileName = "/test.tsx"; --const Title = (props) => (0, jsx_dev_runtime_1.jsxDEV)("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, this); --const element = (0, jsx_dev_runtime_1.jsxDEV)(Title, { children: "Hello, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 16 }, this); ++const _jsxFileName = "/test.tsx"; +const Title = (props) => jsx_dev_runtime_1.jsxDEV("h1", { children: props.children }, void 0, false, { fileName: _jsxFileName, lineNumber: 1, columnNumber: 47 }, this); +const element = jsx_dev_runtime_1.jsxDEV(Title, { children: "Hello, world!" }, void 0, false, { fileName: _jsxFileName, lineNumber: 3, columnNumber: 16 }, this); //// [jsx-runtime.js] diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixIntrinsics.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixIntrinsics.js.diff new file mode 100644 index 0000000000..5844c78541 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespacePrefixIntrinsics.js.diff @@ -0,0 +1,18 @@ +--- old.jsxNamespacePrefixIntrinsics.js ++++ new.jsxNamespacePrefixIntrinsics.js +@@= skipped -20, +20 lines =@@ + + + //// [jsxNamespacePrefixIntrinsics.jsx] +-var valid = ; +-var validUpcase1 = ; +-var validUpcase2 = ; +-var invalid1 = ; +-var invalid2 = ; +-var invalid3 = ; ++const valid = ; ++const validUpcase1 = ; ++const validUpcase2 = ; ++const invalid1 = ; ++const invalid2 = ; ++const invalid3 = ; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNamespaceReexports.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNamespaceReexports.js.diff index 2847d547d3..ddc0c92e31 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxNamespaceReexports.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxNamespaceReexports.js.diff @@ -1,9 +1,20 @@ --- old.jsxNamespaceReexports.js +++ new.jsxNamespaceReexports.js -@@= skipped -22, +22 lines =@@ +@@= skipped -18, +18 lines =@@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.createElement = createElement; +-function createElement(element, props) { +- var children = []; +- for (var _i = 2; _i < arguments.length; _i++) { +- children[_i - 2] = arguments[_i]; +- } +-} ++function createElement(element, props, ...children) { } //// [index.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -var MyLib = require("./library"); +-var content = MyLib.createElement("my-element", null); +const MyLib = require("./library"); - const content = MyLib.createElement("my-element", null); \ No newline at end of file ++const content = MyLib.createElement("my-element", null); \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxNestedWithinTernaryParsesCorrectly.js.diff b/testdata/baselines/reference/submodule/compiler/jsxNestedWithinTernaryParsesCorrectly.js.diff new file mode 100644 index 0000000000..a938fbfe6b --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/jsxNestedWithinTernaryParsesCorrectly.js.diff @@ -0,0 +1,13 @@ +--- old.jsxNestedWithinTernaryParsesCorrectly.js ++++ new.jsxNestedWithinTernaryParsesCorrectly.js +@@= skipped -15, +15 lines =@@ + ); + + //// [jsxNestedWithinTernaryParsesCorrectly.jsx] +-var emptyMessage = null; +-var a = (
++const emptyMessage = null; ++const a = (
+ {0 ? (emptyMessage // must be identifier? + ) : ( + // must be exactly two expression holes \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.js.diff b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.js.diff index 36644f33cb..3aa2762d77 100644 --- a/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.js.diff +++ b/testdata/baselines/reference/submodule/compiler/jsxPartialSpread.js.diff @@ -1,11 +1,15 @@ --- old.jsxPartialSpread.js +++ new.jsxPartialSpread.js -@@= skipped -19, +19 lines =@@ +@@= skipped -18, +18 lines =@@ + Object.defineProperty(exports, "__esModule", { value: true }); exports.Repro = Repro; /// - const Select = (p) =>

; +-var Select = function (p) { return

; }; -var react_1 = __importDefault(require("react")); +-function Repro(_a) { +- var _b = _a.SelectProps, SelectProps = _b === void 0 ? {} : _b; ++const Select = (p) =>

; +const react_1 = __importDefault(require("react")); - function Repro({ SelectProps = {} }) { ++function Repro({ SelectProps = {} }) { return (